[PATCH] test/rs6000: Replace test target p8 and p9+
Kewen.Lin
linkw@linux.ibm.com
Tue Sep 1 03:19:55 GMT 2020
Hi,
This is a trivial patch to clean existing rs6000 test targets
p8 and p9+ with existing has_arch_pwr8 and has_arch_pwr9
target combination or only one of them. Not sure if it's a
good idea to tidy this, but send out for comments.
Bootstrapped/regtested on powerpc64le-linux-gnu P9.
Any comments are highly appreciated.
BR,
Kewen
-----
gcc/testsuite/ChangeLog:
* gcc.target/powerpc/pr92398.p9+.c: Replace p9+ with has_arch_pwr9.
* gcc.target/powerpc/pr92398.p9-.c: Replace p9+ with has_arch_pwr9,
and replace p8 with has_arch_pwr8 && !has_arch_pwr9.
* lib/target-supports.exp (check_effective_target_p8): Remove.
(check_effective_target_p9+): Remove.
-------------- next part --------------
diff --git a/gcc/testsuite/gcc.target/powerpc/pr92398.p9+.c b/gcc/testsuite/gcc.target/powerpc/pr92398.p9+.c
index a819c3f16af..72dd1d9a274 100644
--- a/gcc/testsuite/gcc.target/powerpc/pr92398.p9+.c
+++ b/gcc/testsuite/gcc.target/powerpc/pr92398.p9+.c
@@ -1,4 +1,4 @@
-/* { dg-do compile { target { lp64 && p9+ } } } */
+/* { dg-do compile { target { lp64 && has_arch_pwr9 } } } */
/* { dg-require-effective-target powerpc_vsx_ok } */
/* { dg-options "-O2 -mvsx" } */
diff --git a/gcc/testsuite/gcc.target/powerpc/pr92398.p9-.c b/gcc/testsuite/gcc.target/powerpc/pr92398.p9-.c
index 065ae73f267..bd7fa98af51 100644
--- a/gcc/testsuite/gcc.target/powerpc/pr92398.p9-.c
+++ b/gcc/testsuite/gcc.target/powerpc/pr92398.p9-.c
@@ -1,9 +1,9 @@
-/* { dg-do compile { target { lp64 && {! p9+} } } } */
+/* { dg-do compile { target { lp64 && {! has_arch_pwr9} } } } */
/* { dg-require-effective-target powerpc_vsx_ok } */
/* { dg-options "-O2 -mvsx" } */
/* { dg-final { scan-assembler-times {\mnot\M} 2 { xfail be } } } */
-/* { dg-final { scan-assembler-times {\mstd\M} 2 { xfail { p8 && be } } } } */
+/* { dg-final { scan-assembler-times {\mstd\M} 2 { xfail { { {! has_arch_pwr9} && has_arch_pwr8 } && be } } } } */
/* Source code for the test in pr92398.h */
#include "pr92398.h"
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index de2196d71f7..220e858f63b 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -2687,26 +2687,6 @@ proc check_effective_target_le { } {
}]
}
-# Return 1 if we're generating code for only power8 platforms.
-
-proc check_effective_target_p8 { } {
- return [check_no_compiler_messages_nocache p8 assembly {
- #if !(!defined(_ARCH_PWR9) && defined(_ARCH_PWR8))
- #error NO
- #endif
- } ""]
-}
-
-# Return 1 if we're generating code for power9 or later platforms.
-
-proc check_effective_target_p9+ { } {
- return [check_no_compiler_messages_nocache p9+ assembly {
- #if !(defined(_ARCH_PWR9))
- #error NO
- #endif
- } ""]
-}
-
# Return 1 if we're generating 32-bit code using default options, 0
# otherwise.
More information about the Gcc-patches
mailing list