PR 100167: Fix vector long long multiply/divide tests on power10.
authorMichael Meissner <meissner@linux.ibm.com>
Tue, 20 Jul 2021 16:56:19 +0000 (12:56 -0400)
committerMichael Meissner <meissner@linux.ibm.com>
Tue, 20 Jul 2021 16:56:19 +0000 (12:56 -0400)
This patch updates the vector long long multiply and divide tests to
supply the correct code information if power10 code generation is used.

2021-06-18  Michael Meissner  <meissner@linux.ibm.com>

gcc/testsuite/
PR testsuite/100167
* gcc.target/powerpc/fold-vec-div-longlong.c: Fix expected code
generation on power10.
* gcc.target/powerpc/fold-vec-mult-longlong.c: Likewise.

gcc/testsuite/gcc.target/powerpc/fold-vec-div-longlong.c
gcc/testsuite/gcc.target/powerpc/fold-vec-mult-longlong.c

index 312e984..f6a9b29 100644 (file)
@@ -19,5 +19,8 @@ test6 (vector unsigned long long x, vector unsigned long long y)
 {
   return vec_div (x, y);
 }
-/* { dg-final { scan-assembler-times {\mdivd\M} 2 } } */
-/* { dg-final { scan-assembler-times {\mdivdu\M} 2 } } */
+
+/* { dg-final { scan-assembler-times {\mdivd\M}   2 { target { ! has_arch_pwr10 } } } } */
+/* { dg-final { scan-assembler-times {\mdivdu\M}  2 { target { ! has_arch_pwr10 } } } } */
+/* { dg-final { scan-assembler-times {\mvdivsd\M} 1 { target {   has_arch_pwr10 } } } } */
+/* { dg-final { scan-assembler-times {\mvdivud\M} 1 { target {   has_arch_pwr10 } } } } */
index 38dba9f..dff073d 100644 (file)
@@ -20,5 +20,8 @@ test6 (vector unsigned long long x, vector unsigned long long y)
   return vec_mul (x, y);
 }
 
-/* { dg-final { scan-assembler-times "\[ \t\]mulld " 4 { target lp64 } } } */
-
+/* Power10 can generate the vmulld instruction even in 32-bit.  Before power10,
+   we limit the code to lp64, since 32-bit cannot generate the mulld
+   instruction.  */
+/* { dg-final { scan-assembler-times {\mmulld\M}  4 { target { lp64 && { ! has_arch_pwr10 } } } } } */
+/* { dg-final { scan-assembler-times {\mvmulld\M} 2 { target { has_arch_pwr10             } } } } */