From patchwork Wed Jun 16 10:33:34 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [testsuite, powerpc] fix slp-perm-{5, 6}.c regression (PR testsuite/44538) Date: Wed, 16 Jun 2010 00:33:34 -0000 From: Mikael Pettersson X-Patchwork-Id: 55869 Message-Id: <19480.43134.61768.905494@pilspetsen.it.uu.se> To: gcc-patches@gcc.gnu.org This fixes a powerpc testsuite regression on trunk and 4.5. The fix for PR43949 improved VRP, causing initialization loops in two vectorization test cases (gcc.dg/vect/slp-perm-{5,6}.c) to also be vectorized. The scan-tree-dump-times check then sees too many "vectorized 1 loops" messages, and fails. Fixed by placing asm (""); markers in the initialization loops, as suggested by Richard Guenther in the PR entry. Tested on powerpc-linux where it eliminated the new FAILs for gcc.dg/vect/slp-perm-{5,6}.c. There was no change in testsuite results on x86_64-linux; the patch does have the same effect on x86_64 with regard to the number of vectorized loops, but x86_64 is not a vect_perm target so the number of vectorized loops is not actually checked there. Ok for trunk and 4.5? (I don't have svn write access.) /Mikael gcc/testsuite/ 2010-06-16 Mikael Pettersson PR testsuite/44538 * gcc.dg/vect/slp-perm-5.c (main): Prevent initialization loop from being vectorized. * gcc.dg/vect/slp-perm-6.c (main): Likewise. --- gcc-4.6-20100612/gcc/testsuite/gcc.dg/vect/slp-perm-5.c.~1~ 2008-09-04 12:41:50.000000000 +0200 +++ gcc-4.6-20100612/gcc/testsuite/gcc.dg/vect/slp-perm-5.c 2010-06-15 22:08:10.000000000 +0200 @@ -63,6 +63,7 @@ int main (int argc, const char* argv[]) output2[i] = 0; if (input[i] > 256) abort (); + __asm__ volatile (""); } foo (input, output, input2, output2); --- gcc-4.6-20100612/gcc/testsuite/gcc.dg/vect/slp-perm-6.c.~1~ 2008-09-04 12:41:50.000000000 +0200 +++ gcc-4.6-20100612/gcc/testsuite/gcc.dg/vect/slp-perm-6.c 2010-06-15 22:08:10.000000000 +0200 @@ -62,6 +62,7 @@ int main (int argc, const char* argv[]) output2[i] = 0; if (input[i] > 256) abort (); + __asm__ volatile (""); } foo (input, output, input2, output2);