[PATCH] adjust BB vectorization dump scanning

Richard Biener rguenther@suse.de
Fri Oct 9 08:30:45 GMT 2020


On Thu, 8 Oct 2020, Thomas Schwinge wrote:

> Hi Richard!
> 
> On 2020-10-08T13:34:02+0200, Richard Biener <rguenther@suse.de> wrote:
> > It might be interesting to work on adding sth like
> > dg-warning to look for -fopt-info-{optimized,missing} so
> > we could directly annotate (not) vectorized loops instead of
> > relying on fragile counts.
> 
> I'm maybe (likely?) misunderstanding what you're looking for, but just in
> case I'm not, the following works already:
> 
>     --- gcc/testsuite/gcc.dg/vect/bb-slp-1.c
>     +++ gcc/testsuite/gcc.dg/vect/bb-slp-1.c
>     @@ -1,4 +1,5 @@
>      /* { dg-require-effective-target vect_int } */
>     +/* { dg-additional-options "-fopt-info-optimized-vec" } */
> 
>      #include <stdarg.h>
>      #include "tree-vect.h"
>     @@ -17,7 +18,7 @@ main1 (int dummy)
> 
>        for (i = 0; i < N; i++)
>          {
>     -      *pout++ = *pin++;
>     +      *pout++ = *pin++; /* { dg-message "optimized: basic block part vectorized" } */

Oh, nice.  OK, well - it doesn't help with extra spurious vectorizations
of course.  I'd also have to check for duplicate messages on the same line
caused by unrolling.

But yeah, I'll see whether this makes it easier to follow what we actually
expect to be vectorized...

Thanks,
Richard.

>            *pout++ = *pin++;
>            *pout++ = *pin++;
>            *pout++ = *pin++;
>     @@ -55,4 +56,3 @@ int main (void)
>      }
> 
>      /* { dg-final { scan-tree-dump-not "can't force alignment" "slp1" } } */
>     -/* { dg-final { scan-tree-dump-times "basic block vectorized" 1 "slp1" } } */
> 
> 
> Gr??e
>  Thomas
> -----------------
> Mentor Graphics (Deutschland) GmbH, Arnulfstra?e 201, 80634 M?nchen / Germany
> Registergericht M?nchen HRB 106955, Gesch?ftsf?hrer: Thomas Heurung, Alexander Walter
> 

-- 
Richard Biener <rguenther@suse.de>
SUSE Software Solutions Germany GmbH, Maxfeldstrasse 5, 90409 Nuernberg,
Germany; GF: Felix Imend


More information about the Gcc-patches mailing list