[gcc r15-711] testsuite, rs6000: Remove powerpc_popcntb_ok

Kewen Lin linkw@gcc.gnu.org
Tue May 21 02:03:34 GMT 2024


https://gcc.gnu.org/g:f4598e71cf28478ecad2bc6a47f500e30bd65eb6

commit r15-711-gf4598e71cf28478ecad2bc6a47f500e30bd65eb6
Author: Kewen Lin <linkw@linux.ibm.com>
Date:   Mon May 20 21:01:07 2024 -0500

    testsuite, rs6000: Remove powerpc_popcntb_ok
    
    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.
    
    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.

Diff:
---
 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(-)

diff --git a/gcc/testsuite/gcc.target/powerpc/cmpb-2.c b/gcc/testsuite/gcc.target/powerpc/cmpb-2.c
index 02b84d0731d5..44a554bee4a2 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 75641bdb22cc..43de37a571d5 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 d4264ab6e7d3..0713c44fcff2 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 82dea149c257..34027b64e520 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -3946,26 +3946,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.


More information about the Gcc-cvs mailing list