http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50435
Ira Rosen <irar at il dot ibm.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |irar at il dot ibm.com --- Comment #1 from Ira Rosen <irar at il dot ibm.com> 2011-09-16 15:18:11 UTC --- (In reply to comment #0) > > indeed no "basic block vectorized using SLP". However compiling the test with > -ftree-vectorizer-verbose=2 returns > > ... > Vectorizing loop at /opt/gcc/work/gcc/testsuite/gcc.dg/vect/bb-slp-25.c:16 > > 16: created 2 versioning for alias checks. > > 16: vectorizing stmts using SLP. > 16: LOOP VECTORIZED. > ... I understand that the loop vectorization somehow worked, so could you please try the following patch to avoid it: Index: bb-slp-25.c =================================================================== --- bb-slp-25.c (revision 178880) +++ bb-slp-25.c (working copy) @@ -9,7 +9,7 @@ short src[N], dst[N]; -void foo (short * __restrict dst, short * __restrict src, int h, int stride) +void foo (short * __restrict dst, short * __restrict src, int h, int stride, int dummy) { int i; h /= 16; @@ -25,6 +25,8 @@ void foo (short * __restrict dst, short dst[7] += A*src[7] + src[7+stride]; dst += 8; src += 8; + if (dummy == 32) + abort (); } } @@ -41,7 +43,7 @@ int main (void) src[i] = i; } - foo (dst, src, N, 8); + foo (dst, src, N, 8, 0); for (i = 0; i < N/2; i++) { > > I have applied r178880 on top of r178869 on powerpc-apple-darwin9 and the > tests > pass while I get the above results when I run them manually. For PowerPC vect_element_align is false, while /* { dg-final { scan-tree-dump-times "basic block vectorized using SLP" 1 "slp" { target vect_element_align } } } */ so we don't expect the basic block to get vectorized. Thanks, Ira