rs6000: Fix altivec-7.c testcase
authorSegher Boessenkool <segher@kernel.crashing.org>
Mon, 18 Mar 2019 17:46:18 +0000 (18:46 +0100)
committerSegher Boessenkool <segher@gcc.gnu.org>
Mon, 18 Mar 2019 17:46:18 +0000 (18:46 +0100)
It currently wants to see lvx insns on AIX, and no lvx insns on Linux.
What is really wanted is lvx insns when no VSX, and lxv* insns if VSX.
This fixes it.

* gcc.target/powerpc/altivec-7.c: Look for lxv* if generating VSX
instructions, and lvx if not.

From-SVN: r269772

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/powerpc/altivec-7.c

index ba77fc552018a0709c2086ce175a7d719ff22271..18a24a7454b4164989011447892b5cf8340895eb 100644 (file)
@@ -4,6 +4,12 @@
        the "store" test as well.
        * gcc.target/powerpc/bswap32.c: Ditto.
 
+2019-03-18  Segher Boessenkool  <segher@kernel.crashing.org>
+
+       * gcc.target/powerpc/bswap16.c: Use a pointer instead of a global for
+       the "store" test as well.
+       * gcc.target/powerpc/bswap32.c: Ditto.
+
 2019-03-18  Segher Boessenkool  <segher@kernel.crashing.org>
 
        * gcc.target/powerpc/pr18096-1.c: Allow an error message that says
index ebc4a85ed8bb102536f179d56963453d6a8dd126..42c04a1ed79492ab857f8817d7bc13b2fbe0b5c9 100644 (file)
@@ -85,8 +85,10 @@ int main ()
 /* { dg-final { scan-assembler-times "vpkpx" 2 } } */
 /* { dg-final { scan-assembler-times "vmulesb" 1 } } */
 /* { dg-final { scan-assembler-times "vmulosb" 1 } } */
-/* { dg-final { scan-assembler-times {\mlvx\M} 0 { target { powerpc*-*-linux* } } } } */
-/* { dg-final { scan-assembler-times {\mlvx\M} 42 { target { powerpc*-*-aix* } } } } */
+/* { dg-final { scan-assembler-times {\mlvx\M} 42 { target { ! powerpc_vsx } } } } */
+/* { dg-final { scan-assembler-times {\mlxv} 0 { target { ! powerpc_vsx } } } } */
+/* { dg-final { scan-assembler-times {\mlvx\M} 0 { target powerpc_vsx } } } */
+/* { dg-final { scan-assembler-times {\mlxv} 42 { target powerpc_vsx } } } */
 /* { dg-final { scan-assembler-times "lvewx" 2 } } */
 /* { dg-final { scan-assembler-times "lvxl" 1 } } */
 /* { dg-final { scan-assembler-times "vupklsh" 2 } } */