]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
testsuite, rs6000: Adjust pr78056-[1357].c and remove pr78056-[246].c
authorKewen Lin <linkw@linux.ibm.com>
Wed, 7 Aug 2024 07:03:55 +0000 (02:03 -0500)
committerKewen Lin <linkw@gcc.gnu.org>
Wed, 7 Aug 2024 07:03:55 +0000 (02:03 -0500)
When cleaning up the remaining powerpc_{vsx,altivec}_ok test
cases, I found some issues are related to pr78056-*.c.
Firstly, the test points of pr78056-[246].c are no longer
available since r9-3164 drops many HAVE_AS_* and the expected
warning are dropped together, so this patch is to remove them.
Secondly, pr78056-1.c and pr78056-3.c include altivec.h but
don't use any builtins, checking powerpc_altivec is enough
(don't need to check powerpc_vsx).  And pr78056-5.c doesn't
require any altivec/vsx feature, so powerpc_vsx_ok can be
removed.  Lastly, pr78056-7.c should just use powerpc_fprs
instead of dfp_hw as it only cares about insn fcpsgn.

gcc/testsuite/ChangeLog:

* gcc.target/powerpc/pr78056-1.c: Check for powerpc_altivec rather than
powerpc_vsx.
* gcc.target/powerpc/pr78056-3.c: Likewise.
* gcc.target/powerpc/pr78056-5.c: Drop powerpc_vsx_ok check.
* gcc.target/powerpc/pr78056-7.c: Check for powerpc_fprs rather than
dfp_hw.
* gcc.target/powerpc/pr78056-2.c: Remove.
* gcc.target/powerpc/pr78056-4.c: Remove.
* gcc.target/powerpc/pr78056-6.c: Remove.

gcc/testsuite/gcc.target/powerpc/pr78056-1.c
gcc/testsuite/gcc.target/powerpc/pr78056-2.c [deleted file]
gcc/testsuite/gcc.target/powerpc/pr78056-3.c
gcc/testsuite/gcc.target/powerpc/pr78056-4.c [deleted file]
gcc/testsuite/gcc.target/powerpc/pr78056-5.c
gcc/testsuite/gcc.target/powerpc/pr78056-6.c [deleted file]
gcc/testsuite/gcc.target/powerpc/pr78056-7.c

index 72640007dbb63aa3e771089198e7595d3aca4be0..49ebafe39b65bc51142cda8aff2badd238e1abb7 100644 (file)
@@ -1,7 +1,7 @@
 /* { dg-do compile { target { powerpc*-*-* } } } */
 /* { dg-skip-if "" { powerpc*-*-aix* } } */
-/* { dg-options "-mdejagnu-cpu=power8 -mvsx" } */
-/* { dg-require-effective-target powerpc_vsx } */
+/* { dg-options "-mdejagnu-cpu=power8" } */
+/* { dg-require-effective-target powerpc_altivec } */
 
 /* This test should succeed on both 32- and 64-bit configurations.  */
 #include <altivec.h>
diff --git a/gcc/testsuite/gcc.target/powerpc/pr78056-2.c b/gcc/testsuite/gcc.target/powerpc/pr78056-2.c
deleted file mode 100644 (file)
index 5cda9d6..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-/* { dg-do compile { target { powerpc*-*-* } } } */
-/* { dg-require-effective-target powerpc_vsx_ok } */
-/* { dg-skip-if "" { powerpc_vsx_ok } } */
-/* { dg-skip-if "" { powerpc*-*-aix* } } */
-/* { dg-options "-mdejagnu-cpu=power8 -mvsx" } */
-
-/* This test should succeed on both 32- and 64-bit configurations.  */
-#include <altivec.h>
-
-/* Though the command line specifies power8 target, this function is
-   to support power9. Expect an error message here because this target
-   does not support power9.  */
-__attribute__((target("cpu=power9")))
-int get_random ()
-{ /* { dg-warning "lacks power9 support" } */
-  return __builtin_darn_32 (); /* { dg-warning "implicit declaration" } */
-}
-
index cf57d058e8be9a740b014837f62853efa09d568a..745552b244d03be46650b160d42e7def886b040d 100644 (file)
@@ -1,7 +1,7 @@
 /* { dg-do compile { target { powerpc*-*-* } } } */
-/* { dg-options "-mdejagnu-cpu=power7" } */
-/* { dg-require-effective-target powerpc_vsx } */
 /* { dg-skip-if "" { powerpc*-*-aix* } } */
+/* { dg-options "-mdejagnu-cpu=power7" } */
+/* { dg-require-effective-target powerpc_altivec } */
 
 /* This test should succeed on both 32- and 64-bit configurations.  */
 #include <altivec.h>
diff --git a/gcc/testsuite/gcc.target/powerpc/pr78056-4.c b/gcc/testsuite/gcc.target/powerpc/pr78056-4.c
deleted file mode 100644 (file)
index 0bea0f8..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-/* { dg-do compile { target { powerpc*-*-* } } } */
-/* powerpc_vsx_ok represents power7 */
-/* { dg-require-effective-target powerpc_vsx_ok } */
-/* { dg-skip-if "" { powerpc_vsx_ok } } */
-/* { dg-skip-if "" { powerpc*-*-aix* } } */
-/* { dg-options "-mdejagnu-cpu=power7" } */
-
-/* This test should succeed on both 32- and 64-bit configurations.  */
-#include <altivec.h>
-
-/* Though the command line specifies power7 target, this function is
-   to support power8, which will fail because this platform does not
-   support power8.  */
-__attribute__((target("cpu=power8")))
-char
-char_fetch_add_relaxed (char *ptr, int value)
-{ /* { dg-warning "lacks power8 support" } */
-  return __atomic_fetch_add (ptr, value, __ATOMIC_RELAXED);
-}
index d012a9fc9550d0ac1dc9867cddef0738fbc6026a..1a62b029fda6abd0112263f802fff9319bf326dd 100644 (file)
@@ -1,6 +1,4 @@
 /* { dg-do compile { target { powerpc*-*-* } } } */
-/* powerpc_vsx_ok represents power7 */
-/* { dg-require-effective-target powerpc_vsx_ok } */
 /* { dg-skip-if "" { powerpc*-*-aix* } } */
 /* { dg-options "-mdejagnu-cpu=power5" } */
 
diff --git a/gcc/testsuite/gcc.target/powerpc/pr78056-6.c b/gcc/testsuite/gcc.target/powerpc/pr78056-6.c
deleted file mode 100644 (file)
index 2b26eeb..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-/* { dg-do compile { target { powerpc*-*-* } } } */
-/* dfp_hw represents power 6 */
-/* { dg-require-effective-target dfp_hw } */
-/* powerpc_vsx_ok represents power7 */
-/* { dg-skip-if "" { powerpc_vsx_ok } } */
-/* { dg-skip-if "" { powerpc*-*-aix* } } */
-/* { dg-options "-mdejagnu-cpu=power6" } */
-
-/* This test should succeed on both 32- and 64-bit configurations.  */
-#include <altivec.h>
-
-/* This test follows the pattern of pr78056-2.c, which has been
- * exercised with binutils 2.25.  This test, however, has not
- * been exercised because the author of the test does not have access
- * to a development environment that succesfully bootstraps gcc
- * while at the same lacking assembler support for power 7.  */
-
-/* Though the command line specifies power6 target, this function is
-   to support power7.  */
-__attribute__((target("cpu=power7")))
-int
-div_we (int a, int b)
-{ /* { dg-warning "lacks power7 support" } */
-  return __builtin_divwe (a, b); /* { dg-warning "implicit declaration" } */
-}
index 90452588fc8a7a2fe0228f97b6a96f96010b66b0..e3df19aadc717a4bf8a69597b063a9a11dd0527a 100644 (file)
@@ -1,6 +1,4 @@
 /* { dg-do compile { target { powerpc*-*-* } } } */
-/* dfp_hw represents power 6 */
-/* { dg-require-effective-target dfp_hw } */
 /* { dg-skip-if "" { powerpc*-*-aix* } } */
 /* { dg-options "-mdejagnu-cpu=power5" } */