diff mbox

[testsuite,powerpc] fix slp-perm-{5,6}.c regression (PR testsuite/44538)

Message ID 19480.43134.61768.905494@pilspetsen.it.uu.se
State New
Headers show

Commit Message

Mikael Pettersson June 16, 2010, 10:33 a.m. UTC
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  <mikpe@it.uu.se>

	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.

Comments

Richard Biener June 16, 2010, 11:01 a.m. UTC | #1
On Wed, Jun 16, 2010 at 12:33 PM, Mikael Pettersson <mikpe@it.uu.se> wrote:
> 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.)

Ok with the if () removed (which was supposed to prevent
vectorization).  I'll take care of that change and the commit.

Thanks,
Richard.

> /Mikael
>
> gcc/testsuite/
>
> 2010-06-16  Mikael Pettersson  <mikpe@it.uu.se>
>
>        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);
>
diff mbox

Patch

--- 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);