Re: [PATCH] PR testsuite/51097 fix: a lot of "FAIL: gcc.dg/vect" on i686 avx build 181167 to 181177

2011-12-29 Thread Igor Zamyatin
Thanks, I'll look into your remarks

On Thu, Dec 29, 2011 at 5:33 PM, Ira Rosen  wrote:
>
>
> Igor Zamyatin  wrote on 29/12/2011 02:29:46 PM:
>
>>
>> Because it includes AVX and AVX2 which deals with int and for AVX2
>> there are no problems with doubled diagnostics.
>
> And you can't just update vect_int because AVX does support it but with
> 128-bit vectors, right?
> So, your vect_float_no_int looks incorrect as well.
> You need to describe the case when two vector sizes are analyzed, but the
> first one always fails. Maybe vect_sizes_32B_16B_noint? Probably ugly, but
> correct at least.
>
> I also suggest to simplify the checks and not to check the number of times
> a pattern was detected , like this:
>
> Index: vect-widen-mult-half.c
> ===
> --- vect-widen-mult-half.c      (revision 182703)
> +++ vect-widen-mult-half.c      (working copy)
> @@ -43,7 +43,7 @@ int main (void)
>  }
>
>  /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1
> "vect" { target vect_widen_mult_hi_to_si } } } */
> -/* { dg-final { scan-tree-dump-times "vect_recog_widen_mult_pattern:
> detected" 1 "vect" { target vect_widen_mult_hi_to_si_pattern } } } */
> +/* { dg-final { scan-tree-dump "vect_recog_widen_mult_pattern: detected"
> "vect" { target vect_widen_mult_hi_to_si_pattern } } } */
>  /* { dg-final { scan-tree-dump-times "pattern recognized" 1
> "vect" { target vect_widen_mult_hi_to_si_pattern } } } */
>  /* { dg-final { cleanup-tree-dump "vect" } } */
>
>
> And split the tests with several loops into several files, like, for
> example, vect-widen-mult-const-s16.c.
>
> The simplification is ok for slp-reduc-6.c, vect-119.c, vect-35-big-array.c
> as well.
>
> For the rest of the tests, I don't understand why there are alignment
> messages printed twice for two vector sizes. Why doesn't the vectorizer
> fail during vect_determine_vectorization_factor?
>
> Ira
>
>>
>> I understand that all this looks quite bulky but it's hard to create
>> something which looks better without loosing generality
>>
>>
>> On Thu, Dec 29, 2011 at 4:15 PM, Ira Rosen  wrote:
>> >
>> >
>> > Igor Zamyatin  wrote on 29/12/2011 02:04:45 PM:
>> >
>> >> When compiler configured with, say corei7-avx, it outputs twice more
>> >> diagnostics on integer tests since AVX deals mostly with floats. I.e.
>> >> compiler tries to vectorize on AVX vector size, than fails and then
>> >> vectorizes on smaller vector size. This double work leads to double
>> >> diagnostic output.
>> >
>> > OK, so you why not use vect_sizes_32B_16B?
>> >
>> > Ira
>> >
>> >
>>
>


Re: [PATCH] PR testsuite/51097 fix: a lot of "FAIL: gcc.dg/vect" on i686 avx build 181167 to 181177

2011-12-29 Thread Ira Rosen


Igor Zamyatin  wrote on 29/12/2011 02:29:46 PM:

>
> Because it includes AVX and AVX2 which deals with int and for AVX2
> there are no problems with doubled diagnostics.

And you can't just update vect_int because AVX does support it but with
128-bit vectors, right?
So, your vect_float_no_int looks incorrect as well.
You need to describe the case when two vector sizes are analyzed, but the
first one always fails. Maybe vect_sizes_32B_16B_noint? Probably ugly, but
correct at least.

I also suggest to simplify the checks and not to check the number of times
a pattern was detected , like this:

Index: vect-widen-mult-half.c
===
--- vect-widen-mult-half.c  (revision 182703)
+++ vect-widen-mult-half.c  (working copy)
@@ -43,7 +43,7 @@ int main (void)
 }

 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1
"vect" { target vect_widen_mult_hi_to_si } } } */
-/* { dg-final { scan-tree-dump-times "vect_recog_widen_mult_pattern:
detected" 1 "vect" { target vect_widen_mult_hi_to_si_pattern } } } */
+/* { dg-final { scan-tree-dump "vect_recog_widen_mult_pattern: detected"
"vect" { target vect_widen_mult_hi_to_si_pattern } } } */
 /* { dg-final { scan-tree-dump-times "pattern recognized" 1
"vect" { target vect_widen_mult_hi_to_si_pattern } } } */
 /* { dg-final { cleanup-tree-dump "vect" } } */


And split the tests with several loops into several files, like, for
example, vect-widen-mult-const-s16.c.

The simplification is ok for slp-reduc-6.c, vect-119.c, vect-35-big-array.c
as well.

For the rest of the tests, I don't understand why there are alignment
messages printed twice for two vector sizes. Why doesn't the vectorizer
fail during vect_determine_vectorization_factor?

Ira

>
> I understand that all this looks quite bulky but it's hard to create
> something which looks better without loosing generality
>
>
> On Thu, Dec 29, 2011 at 4:15 PM, Ira Rosen  wrote:
> >
> >
> > Igor Zamyatin  wrote on 29/12/2011 02:04:45 PM:
> >
> >> When compiler configured with, say corei7-avx, it outputs twice more
> >> diagnostics on integer tests since AVX deals mostly with floats. I.e.
> >> compiler tries to vectorize on AVX vector size, than fails and then
> >> vectorizes on smaller vector size. This double work leads to double
> >> diagnostic output.
> >
> > OK, so you why not use vect_sizes_32B_16B?
> >
> > Ira
> >
> >
>



Re: [PATCH] PR testsuite/51097 fix: a lot of "FAIL: gcc.dg/vect" on i686 avx build 181167 to 181177

2011-12-29 Thread Igor Zamyatin
Because it includes AVX and AVX2 which deals with int and for AVX2
there are no problems with doubled diagnostics.

I understand that all this looks quite bulky but it's hard to create
something which looks better without loosing generality


On Thu, Dec 29, 2011 at 4:15 PM, Ira Rosen  wrote:
>
>
> Igor Zamyatin  wrote on 29/12/2011 02:04:45 PM:
>
>> When compiler configured with, say corei7-avx, it outputs twice more
>> diagnostics on integer tests since AVX deals mostly with floats. I.e.
>> compiler tries to vectorize on AVX vector size, than fails and then
>> vectorizes on smaller vector size. This double work leads to double
>> diagnostic output.
>
> OK, so you why not use vect_sizes_32B_16B?
>
> Ira
>
>


Re: [PATCH] PR testsuite/51097 fix: a lot of "FAIL: gcc.dg/vect" on i686 avx build 181167 to 181177

2011-12-29 Thread Ira Rosen


Igor Zamyatin  wrote on 29/12/2011 02:04:45 PM:

> When compiler configured with, say corei7-avx, it outputs twice more
> diagnostics on integer tests since AVX deals mostly with floats. I.e.
> compiler tries to vectorize on AVX vector size, than fails and then
> vectorizes on smaller vector size. This double work leads to double
> diagnostic output.

OK, so you why not use vect_sizes_32B_16B?

Ira




Re: [PATCH] PR testsuite/51097 fix: a lot of "FAIL: gcc.dg/vect" on i686 avx build 181167 to 181177

2011-12-29 Thread Igor Zamyatin
When compiler configured with, say corei7-avx, it outputs twice more
diagnostics on integer tests since AVX deals mostly with floats. I.e.
compiler tries to vectorize on AVX vector size, than fails and then
vectorizes on smaller vector size. This double work leads to double
diagnostic output.

On Thu, Dec 29, 2011 at 12:07 PM, Ira Rosen  wrote:
>
>
> gcc-patches-ow...@gcc.gnu.org wrote on 28/12/2011 11:05:19 PM:
>
>> Hi,
>
> Hi Igor,
>
>>
>> Here is another patch about failures in gcc.dg/vect tests. These
>> changes fix fails that could be seen on avx-built compilers. It also
>> introduces no FAILs/XFAILs/XPASSes/ERRORs on regular i686, x86_64,
>> avx2_32, avx2_64.
>> Is it ok for the trunk?
>
>
>> diff --git a/gcc/testsuite/gcc.dg/vect/vect-widen-mult-sum.c
> b/gcc/testsuite/gcc.dg/vect/vect-widen-mult-sum.c
>> index 2898918..1d190fc 100644
>> --- a/gcc/testsuite/gcc.dg/vect/vect-widen-mult-sum.c
>> +++ b/gcc/testsuite/gcc.dg/vect/vect-widen-mult-sum.c
>> @@ -43,5 +43,6 @@ int main (void)
>>
>>
>>  /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1
> "vect" { target vect_widen_mult_hi_to_si } } } */
>> -/* { dg-final { scan-tree-dump-times "vect_recog_widen_mult_pattern:
> detected" 1 "vect" } } */
>> +/* { dg-final { scan-tree-dump-times "vect_recog_widen_mult_pattern:
> detected" 1 "vect" { target {! vect_float_no_int } } } } */
>> +/* { dg-final { scan-tree-dump-times "vect_recog_widen_mult_pattern:
> detected" 2 "vect" { target vect_float_no_int } } } */
>>  /* { dg-final { cleanup-tree-dump "vect" } } */
>
> Could you please explain what are you trying to do? How is
>> +# Return 1 if the target supports hardware vectors of float and doesn't
> support
>> +# vectors of int, 0 otherwise.
> related to the number of times that pattern is detected?
>
> Thanks,
> Ira
>
>
>>
>> Thanks,
>> Igor
>>
>> 2011-12-28  Igor Zamyatin  
>>
>>        PR testsuite/51097
>>        * lib/target-supports.exp
> (check_effective_target_vect_float_no_int):
>>        New function.
>>        (check_avx2_available): Ditto.
>>        * gcc.dg/vect/no-scevccp-outer-7.c: Adjust dg-scans for AVX-built
>>        compiler.
>>        * gcc.dg/vect/no-scevccp-vect-iv-3.c: Likewise.
>>        * gcc.dg/vect/no-vfa-vect-depend-1.c: Likewise.
>>        * gcc.dg/vect/no-vfa-vect-dv-2.c: Likewise.
>>        * gcc.dg/vect/slp-perm-9.c: Likewise.
>>        * gcc.dg/vect/slp-reduc-6.c: Likewise.
>>        * gcc.dg/vect/slp-widen-mult-half.c: Likewise.
>>        * gcc.dg/vect/vect-109.c: Likewise.
>>        * gcc.dg/vect/vect-119.c: Likewise.
>>        * gcc.dg/vect/vect-35-big-array.c: Likewise.
>>        * gcc.dg/vect/vect-91.c: Likewise.
>>        * gcc.dg/vect/vect-multitypes-4.c: Likewise.
>>        * gcc.dg/vect/vect-multitypes-6.c: Likewise.
>>        * gcc.dg/vect/vect-outer-4c-big-array.c: Likewise.
>>        * gcc.dg/vect/vect-over-widen-1.c: Likewise.
>>        * gcc.dg/vect/vect-over-widen-4.c: Likewise.
>>        * gcc.dg/vect/vect-peel-1.c: Likewise.
>>        * gcc.dg/vect/vect-peel-3.c: Likewise.
>>        * gcc.dg/vect/vect-peel-4.c: Likewise.
>>        * gcc.dg/vect/vect-reduc-dot-s16a.c: Likewise.
>>        * gcc.dg/vect/vect-reduc-dot-s8a.c: Likewise.
>>        * gcc.dg/vect/vect-reduc-dot-u8a.c: Likewise.
>>        * gcc.dg/vect/vect-reduc-dot-u8b.c: Likewise.
>>        * gcc.dg/vect/vect-reduc-pattern-1a.c: Likewise.
>>        * gcc.dg/vect/vect-reduc-pattern-1b-big-array.c: Likewise.
>>        * gcc.dg/vect/vect-reduc-pattern-1c-big-array.c: Likewise.
>>        * gcc.dg/vect/vect-reduc-pattern-2a.c: Likewise.
>>        * gcc.dg/vect/vect-reduc-pattern-2b-big-array.c: Likewise.
>>        * gcc.dg/vect/vect-widen-mult-const-s16.c: Likewise.
>>        * gcc.dg/vect/vect-widen-mult-const-u16.c: Likewise.
>>        * gcc.dg/vect/vect-widen-mult-half-u8.c: Likewise.
>>        * gcc.dg/vect/vect-widen-mult-half.c: Likewise.
>>        * gcc.dg/vect/vect-widen-mult-sum.c: Likewise.
>>        * gcc.dg/vect/vect-widen-mult-u16.c: Likewise.
>>        * gcc.dg/vect/wrapv-vect-reduc-dot-s8b.c: Likewise.
>> [attachment "51097.patch" deleted by Ira Rosen/Haifa/IBM]
>


Re: [PATCH] PR testsuite/51097 fix: a lot of "FAIL: gcc.dg/vect" on i686 avx build 181167 to 181177

2011-12-29 Thread Ira Rosen


gcc-patches-ow...@gcc.gnu.org wrote on 28/12/2011 11:05:19 PM:

> Hi,

Hi Igor,

>
> Here is another patch about failures in gcc.dg/vect tests. These
> changes fix fails that could be seen on avx-built compilers. It also
> introduces no FAILs/XFAILs/XPASSes/ERRORs on regular i686, x86_64,
> avx2_32, avx2_64.
> Is it ok for the trunk?


> diff --git a/gcc/testsuite/gcc.dg/vect/vect-widen-mult-sum.c
b/gcc/testsuite/gcc.dg/vect/vect-widen-mult-sum.c
> index 2898918..1d190fc 100644
> --- a/gcc/testsuite/gcc.dg/vect/vect-widen-mult-sum.c
> +++ b/gcc/testsuite/gcc.dg/vect/vect-widen-mult-sum.c
> @@ -43,5 +43,6 @@ int main (void)
>
>
>  /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1
"vect" { target vect_widen_mult_hi_to_si } } } */
> -/* { dg-final { scan-tree-dump-times "vect_recog_widen_mult_pattern:
detected" 1 "vect" } } */
> +/* { dg-final { scan-tree-dump-times "vect_recog_widen_mult_pattern:
detected" 1 "vect" { target {! vect_float_no_int } } } } */
> +/* { dg-final { scan-tree-dump-times "vect_recog_widen_mult_pattern:
detected" 2 "vect" { target vect_float_no_int } } } */
>  /* { dg-final { cleanup-tree-dump "vect" } } */

Could you please explain what are you trying to do? How is
> +# Return 1 if the target supports hardware vectors of float and doesn't
support
> +# vectors of int, 0 otherwise.
related to the number of times that pattern is detected?

Thanks,
Ira


>
> Thanks,
> Igor
>
> 2011-12-28  Igor Zamyatin  
>
>        PR testsuite/51097
>        * lib/target-supports.exp
(check_effective_target_vect_float_no_int):
>        New function.
>        (check_avx2_available): Ditto.
>        * gcc.dg/vect/no-scevccp-outer-7.c: Adjust dg-scans for AVX-built
>        compiler.
>        * gcc.dg/vect/no-scevccp-vect-iv-3.c: Likewise.
>        * gcc.dg/vect/no-vfa-vect-depend-1.c: Likewise.
>        * gcc.dg/vect/no-vfa-vect-dv-2.c: Likewise.
>        * gcc.dg/vect/slp-perm-9.c: Likewise.
>        * gcc.dg/vect/slp-reduc-6.c: Likewise.
>        * gcc.dg/vect/slp-widen-mult-half.c: Likewise.
>        * gcc.dg/vect/vect-109.c: Likewise.
>        * gcc.dg/vect/vect-119.c: Likewise.
>        * gcc.dg/vect/vect-35-big-array.c: Likewise.
>        * gcc.dg/vect/vect-91.c: Likewise.
>        * gcc.dg/vect/vect-multitypes-4.c: Likewise.
>        * gcc.dg/vect/vect-multitypes-6.c: Likewise.
>        * gcc.dg/vect/vect-outer-4c-big-array.c: Likewise.
>        * gcc.dg/vect/vect-over-widen-1.c: Likewise.
>        * gcc.dg/vect/vect-over-widen-4.c: Likewise.
>        * gcc.dg/vect/vect-peel-1.c: Likewise.
>        * gcc.dg/vect/vect-peel-3.c: Likewise.
>        * gcc.dg/vect/vect-peel-4.c: Likewise.
>        * gcc.dg/vect/vect-reduc-dot-s16a.c: Likewise.
>        * gcc.dg/vect/vect-reduc-dot-s8a.c: Likewise.
>        * gcc.dg/vect/vect-reduc-dot-u8a.c: Likewise.
>        * gcc.dg/vect/vect-reduc-dot-u8b.c: Likewise.
>        * gcc.dg/vect/vect-reduc-pattern-1a.c: Likewise.
>        * gcc.dg/vect/vect-reduc-pattern-1b-big-array.c: Likewise.
>        * gcc.dg/vect/vect-reduc-pattern-1c-big-array.c: Likewise.
>        * gcc.dg/vect/vect-reduc-pattern-2a.c: Likewise.
>        * gcc.dg/vect/vect-reduc-pattern-2b-big-array.c: Likewise.
>        * gcc.dg/vect/vect-widen-mult-const-s16.c: Likewise.
>        * gcc.dg/vect/vect-widen-mult-const-u16.c: Likewise.
>        * gcc.dg/vect/vect-widen-mult-half-u8.c: Likewise.
>        * gcc.dg/vect/vect-widen-mult-half.c: Likewise.
>        * gcc.dg/vect/vect-widen-mult-sum.c: Likewise.
>        * gcc.dg/vect/vect-widen-mult-u16.c: Likewise.
>        * gcc.dg/vect/wrapv-vect-reduc-dot-s8b.c: Likewise.
> [attachment "51097.patch" deleted by Ira Rosen/Haifa/IBM]



[PATCH] PR testsuite/51097 fix: a lot of "FAIL: gcc.dg/vect" on i686 avx build 181167 to 181177

2011-12-28 Thread Igor Zamyatin
Hi,

Here is another patch about failures in gcc.dg/vect tests. These
changes fix fails that could be seen on avx-built compilers. It also
introduces no FAILs/XFAILs/XPASSes/ERRORs on regular i686, x86_64,
avx2_32, avx2_64.
Is it ok for the trunk?

Thanks,
Igor

2011-12-28  Igor Zamyatin  

       PR testsuite/51097
       * lib/target-supports.exp (check_effective_target_vect_float_no_int):
       New function.
       (check_avx2_available): Ditto.
       * gcc.dg/vect/no-scevccp-outer-7.c: Adjust dg-scans for AVX-built
       compiler.
       * gcc.dg/vect/no-scevccp-vect-iv-3.c: Likewise.
       * gcc.dg/vect/no-vfa-vect-depend-1.c: Likewise.
       * gcc.dg/vect/no-vfa-vect-dv-2.c: Likewise.
       * gcc.dg/vect/slp-perm-9.c: Likewise.
       * gcc.dg/vect/slp-reduc-6.c: Likewise.
       * gcc.dg/vect/slp-widen-mult-half.c: Likewise.
       * gcc.dg/vect/vect-109.c: Likewise.
       * gcc.dg/vect/vect-119.c: Likewise.
       * gcc.dg/vect/vect-35-big-array.c: Likewise.
       * gcc.dg/vect/vect-91.c: Likewise.
       * gcc.dg/vect/vect-multitypes-4.c: Likewise.
       * gcc.dg/vect/vect-multitypes-6.c: Likewise.
       * gcc.dg/vect/vect-outer-4c-big-array.c: Likewise.
       * gcc.dg/vect/vect-over-widen-1.c: Likewise.
       * gcc.dg/vect/vect-over-widen-4.c: Likewise.
       * gcc.dg/vect/vect-peel-1.c: Likewise.
       * gcc.dg/vect/vect-peel-3.c: Likewise.
       * gcc.dg/vect/vect-peel-4.c: Likewise.
       * gcc.dg/vect/vect-reduc-dot-s16a.c: Likewise.
       * gcc.dg/vect/vect-reduc-dot-s8a.c: Likewise.
       * gcc.dg/vect/vect-reduc-dot-u8a.c: Likewise.
       * gcc.dg/vect/vect-reduc-dot-u8b.c: Likewise.
       * gcc.dg/vect/vect-reduc-pattern-1a.c: Likewise.
       * gcc.dg/vect/vect-reduc-pattern-1b-big-array.c: Likewise.
       * gcc.dg/vect/vect-reduc-pattern-1c-big-array.c: Likewise.
       * gcc.dg/vect/vect-reduc-pattern-2a.c: Likewise.
       * gcc.dg/vect/vect-reduc-pattern-2b-big-array.c: Likewise.
       * gcc.dg/vect/vect-widen-mult-const-s16.c: Likewise.
       * gcc.dg/vect/vect-widen-mult-const-u16.c: Likewise.
       * gcc.dg/vect/vect-widen-mult-half-u8.c: Likewise.
       * gcc.dg/vect/vect-widen-mult-half.c: Likewise.
       * gcc.dg/vect/vect-widen-mult-sum.c: Likewise.
       * gcc.dg/vect/vect-widen-mult-u16.c: Likewise.
       * gcc.dg/vect/wrapv-vect-reduc-dot-s8b.c: Likewise.


51097.patch
Description: Binary data