diff mbox

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

Message ID OF9B23FCE9.37998EEB-ONC2257975.00452381-C2257975.004A77E7@il.ibm.com
State New
Headers show

Commit Message

Ira Rosen Dec. 29, 2011, 1:33 p.m. UTC
Igor Zamyatin <izamyatin@gmail.com> 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:

 /* { 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 <IRAR@il.ibm.com> wrote:
> >
> >
> > Igor Zamyatin <izamyatin@gmail.com> 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
> >
> >
>

Comments

Igor Zamyatin Dec. 29, 2011, 1:51 p.m. UTC | #1
Thanks, I'll look into your remarks

On Thu, Dec 29, 2011 at 5:33 PM, Ira Rosen <IRAR@il.ibm.com> wrote:
>
>
> Igor Zamyatin <izamyatin@gmail.com> 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 <IRAR@il.ibm.com> wrote:
>> >
>> >
>> > Igor Zamyatin <izamyatin@gmail.com> 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
>> >
>> >
>>
>
diff mbox

Patch

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 } } } */