diff mbox series

testsuite, rs6000: Adjust pr78056-[1357].c and remove pr78056-[246].c

Message ID 164b39c2-e4b5-6ada-946b-92905c03300d@linux.ibm.com
State New
Headers show
Series testsuite, rs6000: Adjust pr78056-[1357].c and remove pr78056-[246].c | expand

Commit Message

Kewen.Lin July 31, 2024, 9:09 a.m. UTC
Hi,

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.

Bootstrapped and regtested on powerpc64-linux-gnu P8/P9 and
powerpc64le-linux-gnu P9 and P10.

I'm going to push this next week if no objections.

BR,
Kewen
----

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 |  4 ++--
 gcc/testsuite/gcc.target/powerpc/pr78056-2.c | 18 --------------
 gcc/testsuite/gcc.target/powerpc/pr78056-3.c |  4 ++--
 gcc/testsuite/gcc.target/powerpc/pr78056-4.c | 19 ---------------
 gcc/testsuite/gcc.target/powerpc/pr78056-5.c |  2 --
 gcc/testsuite/gcc.target/powerpc/pr78056-6.c | 25 --------------------
 gcc/testsuite/gcc.target/powerpc/pr78056-7.c |  2 --
 7 files changed, 4 insertions(+), 70 deletions(-)
 delete mode 100644 gcc/testsuite/gcc.target/powerpc/pr78056-2.c
 delete mode 100644 gcc/testsuite/gcc.target/powerpc/pr78056-4.c
 delete mode 100644 gcc/testsuite/gcc.target/powerpc/pr78056-6.c

--
2.43.5
diff mbox series

Patch

diff --git a/gcc/testsuite/gcc.target/powerpc/pr78056-1.c b/gcc/testsuite/gcc.target/powerpc/pr78056-1.c
index 72640007dbb..49ebafe39b6 100644
--- a/gcc/testsuite/gcc.target/powerpc/pr78056-1.c
+++ b/gcc/testsuite/gcc.target/powerpc/pr78056-1.c
@@ -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
index 5cda9d6193b..00000000000
--- a/gcc/testsuite/gcc.target/powerpc/pr78056-2.c
+++ /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" } */
-}
-
diff --git a/gcc/testsuite/gcc.target/powerpc/pr78056-3.c b/gcc/testsuite/gcc.target/powerpc/pr78056-3.c
index cf57d058e8b..745552b244d 100644
--- a/gcc/testsuite/gcc.target/powerpc/pr78056-3.c
+++ b/gcc/testsuite/gcc.target/powerpc/pr78056-3.c
@@ -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
index 0bea0f895fa..00000000000
--- a/gcc/testsuite/gcc.target/powerpc/pr78056-4.c
+++ /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);
-}
diff --git a/gcc/testsuite/gcc.target/powerpc/pr78056-5.c b/gcc/testsuite/gcc.target/powerpc/pr78056-5.c
index d012a9fc955..1a62b029fda 100644
--- a/gcc/testsuite/gcc.target/powerpc/pr78056-5.c
+++ b/gcc/testsuite/gcc.target/powerpc/pr78056-5.c
@@ -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
index 2b26eebbc8d..00000000000
--- a/gcc/testsuite/gcc.target/powerpc/pr78056-6.c
+++ /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" } */
-}
diff --git a/gcc/testsuite/gcc.target/powerpc/pr78056-7.c b/gcc/testsuite/gcc.target/powerpc/pr78056-7.c
index 90452588fc8..e3df19aadc7 100644
--- a/gcc/testsuite/gcc.target/powerpc/pr78056-7.c
+++ b/gcc/testsuite/gcc.target/powerpc/pr78056-7.c
@@ -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" } */