This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH, rs6000] fix-up int128 fold vector multiply tests
- From: Will Schmidt <will_schmidt at vnet dot ibm dot com>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Cc: Segher Boessenkool <segher at kernel dot crashing dot org>, Bill Schmidt <wschmidt at linux dot vnet dot ibm dot com>, David Edelsohn <dje dot gcc at gmail dot com>
- Date: Mon, 09 Oct 2017 16:27:54 -0500
- Subject: [PATCH, rs6000] fix-up int128 fold vector multiply tests
- Authentication-results: sourceware.org; auth=none
- Reply-to: will_schmidt at vnet dot ibm dot com
Hi
[PATCH, rs6000] fix-up int128 fold vector multiply tests
Fix up a few issues with the tests.
- add -O2 to int128-p8 test, and firm up the -mcpu options
- update the set of expected instructions for the int128-p9 test.
- replace the float128_hw requirement with power8_vector_ok
for the int128-p9 test.
sniff-tested P6 and newer.
OK for trunk?
Thanks,
-Will
2017-10-09 Will Schmidt <will_schmidt@vnet.ibm.com>
* gcc.target/powerpc/fold-vec-mult-int128-p8.c: Update options
* gcc.target/powerpc/fold-vec-mult-int128-p9.c: Update expected
instruction list.
diff --git a/gcc/testsuite/gcc.target/powerpc/fold-vec-mult-int128-p8.c b/gcc/testsuite/gcc.target/powerpc/fold-vec-mult-int128-p8.c
index 97d6b945..5ced2cd 100644
--- a/gcc/testsuite/gcc.target/powerpc/fold-vec-mult-int128-p8.c
+++ b/gcc/testsuite/gcc.target/powerpc/fold-vec-mult-int128-p8.c
@@ -3,11 +3,12 @@
/* { dg-do compile } */
/* { dg-require-effective-target powerpc_p8vector_ok } */
/* { dg-require-effective-target int128 } */
/* { dg-require-effective-target lp64 } */
-/* { dg-options "-mpower8-vector" } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
+/* { dg-options "-mpower8-vector -mcpu=power8 -O2" } */
/* { dg-additional-options "-maix64" { target powerpc-ibm-aix* } } */
#include "altivec.h"
vector signed __int128
@@ -20,7 +21,7 @@ vector unsigned __int128
test2 (vector unsigned __int128 x, vector unsigned __int128 y)
{
return vec_mul (x, y);
}
-/* { dg-final { scan-assembler-times "\[ \t\]mulld " 6 } } */
+/* { dg-final { scan-assembler-times "\[ \t\]mulld" 6 } } */
/* { dg-final { scan-assembler-times "\[ \t\]mulhdu" 2 } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/fold-vec-mult-int128-p9.c b/gcc/testsuite/gcc.target/powerpc/fold-vec-mult-int128-p9.c
index e81ea5f..a226ae0 100644
--- a/gcc/testsuite/gcc.target/powerpc/fold-vec-mult-int128-p9.c
+++ b/gcc/testsuite/gcc.target/powerpc/fold-vec-mult-int128-p9.c
@@ -1,10 +1,10 @@
/* Verify that overloaded built-ins for vec_mul with __int128
inputs produce the right results. */
/* { dg-do compile } */
-/* { dg-require-effective-target powerpc_float128_hw_ok } */
+/* { dg-require-effective-target powerpc_p8vector_ok } */
/* { dg-require-effective-target int128 } */
/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
/* { dg-options "-mcpu=power9 -O2" } */
/* { dg-additional-options "-maix64" { target powerpc-ibm-aix* } } */
@@ -20,6 +20,7 @@ vector unsigned __int128
test2 (vector unsigned __int128 x, vector unsigned __int128 y)
{
return vec_mul (x, y);
}
-/* { dg-final { scan-assembler-times "\[ \t\]xsmulqp" 2 } } */
+/* { dg-final { scan-assembler-times "\[ \t\]mulld" 4 } } */
+/* { dg-final { scan-assembler-times "\[ \t\]mulhdu" 2 } } */