test/rs6000: Replace test targets p8 and p9+
authorKewen Lin <linkw@gcc.gnu.org>
Fri, 4 Sep 2020 02:58:39 +0000 (21:58 -0500)
committerKewen Lin <linkw@linux.ibm.com>
Fri, 4 Sep 2020 03:01:56 +0000 (22:01 -0500)
This patch is to clean existing rs6000 test targets p8 and p9+
with existing has_arch_pwr8 and has_arch_pwr9 targets combination
or only one of them.

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.

gcc/testsuite/gcc.target/powerpc/pr92398.p9+.c
gcc/testsuite/gcc.target/powerpc/pr92398.p9-.c
gcc/testsuite/lib/target-supports.exp

index a819c3f16afa52e213aeae402d609c2b206da048..72dd1d9a274e7c709b7883713419eb893f535b4a 100644 (file)
@@ -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" } */
 
index 065ae73f26770703b66830ec659cd131515a326e..bd7fa98af5155611980d61fa7538b5a2fd4df1c1 100644 (file)
@@ -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"
index e106278631f484ca99cd19f75baa3d7015246e7c..6881b66cd23d38a09179889ad2edb0df55fd1270 100644 (file)
@@ -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.