From: Kewen Lin Date: Fri, 4 Sep 2020 02:58:39 +0000 (-0500) Subject: test/rs6000: Replace test targets p8 and p9+ X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e1336703f8220dcffdeddb5e19dd032c766fbb8f;p=gcc.git test/rs6000: Replace test targets p8 and p9+ 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. --- 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 e106278631f..6881b66cd23 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.