diff mbox series

testsuite, rs6000: Remove powerpc_popcntb_ok

Message ID 59115d84-bb26-0ff0-d3ad-8006c220e283@linux.ibm.com
State New
Headers show
Series testsuite, rs6000: Remove powerpc_popcntb_ok | expand

Commit Message

Kewen.Lin May 8, 2024, 6:36 a.m. UTC
Hi,

There are three uses of effective target powerpc_popcntb_ok,
they are all for compiling, but powerpc_popcntb_ok checks
for executable generation, which is too heavy.  This patch
is to remove powerpc_popcntb_ok and adjust its three uses
accordingly.

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

I'm going to push this soon if no objections.

BR,
Kewen
-----

gcc/testsuite/ChangeLog:

	* lib/target-supports.exp (check_effective_target_powerpc_popcntb_ok):
	Remove.
	* gcc.target/powerpc/cmpb-2.c: Adjust with dg-skip-if as
	powerpc_popcntb_ok gets removed.
	* gcc.target/powerpc/cmpb-3.c: Likewise.
	* gcc.target/powerpc/cmpb32-2.c: Likewise.
---
 gcc/testsuite/gcc.target/powerpc/cmpb-2.c   |  3 ++-
 gcc/testsuite/gcc.target/powerpc/cmpb-3.c   |  3 ++-
 gcc/testsuite/gcc.target/powerpc/cmpb32-2.c |  3 ++-
 gcc/testsuite/lib/target-supports.exp       | 20 --------------------
 4 files changed, 6 insertions(+), 23 deletions(-)

--
2.39.1
diff mbox series

Patch

diff --git a/gcc/testsuite/gcc.target/powerpc/cmpb-2.c b/gcc/testsuite/gcc.target/powerpc/cmpb-2.c
index 02b84d0731d..44a554bee4a 100644
--- a/gcc/testsuite/gcc.target/powerpc/cmpb-2.c
+++ b/gcc/testsuite/gcc.target/powerpc/cmpb-2.c
@@ -1,6 +1,7 @@ 
 /* { dg-do compile { target { powerpc*-*-* } } } */
+/* Skip powerpc*-*-darwin* powerpc-*-eabi as dropped popcntb_ok.  */
+/* { dg-skip-if "" { powerpc*-*-darwin* powerpc-*-eabi } } */
 /* { dg-require-effective-target lp64 } */
-/* { dg-require-effective-target powerpc_popcntb_ok } */
 /* { dg-options "-mdejagnu-cpu=power5" } */

 void abort ();
diff --git a/gcc/testsuite/gcc.target/powerpc/cmpb-3.c b/gcc/testsuite/gcc.target/powerpc/cmpb-3.c
index 75641bdb22c..43de37a571d 100644
--- a/gcc/testsuite/gcc.target/powerpc/cmpb-3.c
+++ b/gcc/testsuite/gcc.target/powerpc/cmpb-3.c
@@ -1,6 +1,7 @@ 
 /* { dg-do compile { target { powerpc*-*-* } } } */
+/* Skip powerpc*-*-darwin* powerpc-*-eabi as dropped popcntb_ok.  */
+/* { dg-skip-if "" { powerpc*-*-darwin* powerpc-*-eabi } } */
 /* { dg-require-effective-target ilp32 } */
-/* { dg-require-effective-target powerpc_popcntb_ok } */
 /* { dg-options "-mdejagnu-cpu=power6" } */

 void abort ();
diff --git a/gcc/testsuite/gcc.target/powerpc/cmpb32-2.c b/gcc/testsuite/gcc.target/powerpc/cmpb32-2.c
index d4264ab6e7d..0713c44fcff 100644
--- a/gcc/testsuite/gcc.target/powerpc/cmpb32-2.c
+++ b/gcc/testsuite/gcc.target/powerpc/cmpb32-2.c
@@ -1,5 +1,6 @@ 
 /* { dg-do compile { target { powerpc*-*-* } } } */
-/* { dg-require-effective-target powerpc_popcntb_ok } */
+/* Skip powerpc*-*-darwin* powerpc-*-eabi as dropped popcntb_ok.  */
+/* { dg-skip-if "" { powerpc*-*-darwin* powerpc-*-eabi } } */
 /* { dg-options "-mdejagnu-cpu=power5" } */

 void abort ();
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index 16dc2766850..5f34f02c387 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -3952,26 +3952,6 @@  proc check_effective_target_unsigned_char {} {
     }]
 }

-proc check_effective_target_powerpc_popcntb_ok { } {
-    return [check_cached_effective_target powerpc_popcntb_ok {
-
-	# Disable on Darwin.
-	if { [istarget powerpc-*-eabi] || [istarget powerpc*-*-eabispe] || [istarget *-*-darwin*]} {
-	    expr 0
-	} else {
-	    check_runtime_nocache powerpc_popcntb_ok {
-		volatile int r;
-		volatile int a = 0x12345678;
-		int main()
-		{
-		    asm volatile ("popcntb %0,%1" : "=r" (r) : "r" (a));
-		    return 0;
-		}
-	    } "-mcpu=power5"
-	}
-    }]
-}
-
 # Return 1 if the target supports executing DFP hardware instructions,
 # 0 otherwise.  Cache the result.