This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] vectorizer testsuite: add alignment checks





> Maybe related to the size of the vector type.

indeed

> Can I xfail it on SPARC?

could xfail on SPARC,
or create a new target keyword "vecsize_more_than_64byte", and expect the
peeling to take place only for these targets,
or change the testcase as follows so that it will be also misaligned for
SPARC:

Index: vect-66.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/vect/vect-66.c,v
retrieving revision 1.6
diff -u -3 -p -r1.6 vect-66.c
--- vect-66.c   9 Jan 2005 17:30:23 -0000       1.6
+++ vect-66.c   16 Jan 2005 11:51:10 -0000
@@ -52,7 +52,7 @@ int main1 ()
     {
       for (j = 0; j < 4; j++)
         {
-           ic[2][1][6][j] = 5;
+           ic[2][1][6][j+1] = 5;
         }
     }

@@ -61,7 +61,7 @@ int main1 ()
     {
       for (j = 0; j < 4; j++)
         {
-           if (ic[2][1][6][j] != 5)
+           if (ic[2][1][6][j+1] != 5)
                 abort();
         }
     }

(I tested it on powerpc-darwin and i686-pc-linux-gnu).
I think I prefer the last option, but either is fine with me.

dorit



Eric Botcazou <ebotcazou@libertysurf.fr> wrote on 15/01/2005 14:47:15:

> > Sometimes when an access is not guaranteed to be aligned the vectorizer
> > performs loop peeling to force the alignment of the access.
Vectorization
> > of such accesses therefore does not require misalignment support, so
these
> > are not reported along with the above. To detect these we match the
pattern
> > "Alignment of access forced using peeling". This check was not added to
> > testcases in which accesses are trivially aligned (e.g. in which all
> > accesses are of user-defined types with sufficient alignment
attribute).
>
> One problem on SPARC 32-bit and 64-bit:
>
> FAIL: gcc.dg/vect/vect-66.c scan-tree-dump-times Alignment of access
forced
> using peeling 1
>
> We don't need loop peeling to vectorize the third loop:
>
> loop at vect-66.c:17: if (ivtmp.20_83 < 2) goto <L72>; else goto <L3>;
> loop at vect-66.c:17: LOOP VECTORIZED.
> loop at vect-66.c:28: not vectorized: bad loop form. multiple exits.
> loop at vect-66.c:36: if (ivtmp.28_69 < 2) goto <L78>; else goto <L17>;
> loop at vect-66.c:36: LOOP VECTORIZED.
> loop at vect-66.c:44: not vectorized: bad loop form. multiple exits.
> loop at vect-66.c:52: if (ivtmp.36_13 < 2) goto <L84>; else goto <L31>;
> loop at vect-66.c:52: LOOP VECTORIZED.
> loop at vect-66.c:63: not vectorized: bad loop form. multiple exits.
>
> Maybe related to the size of the vector type.  Can I xfail it on SPARC?
>
> --
> Eric Botcazou


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]