https://gcc.gnu.org/g:9e84a4552dd90ad2d15bd56ea168d945b4b71b98

commit r15-10174-g9e84a4552dd90ad2d15bd56ea168d945b4b71b98
Author: Spencer Abson <spencer.ab...@arm.com>
Date:   Thu Jul 31 13:53:08 2025 +0000

    aarch64: testsuite: Fix do-assemble tests for SME
    
    GCC doesn't support SME without SVE2, so the -march=armv8-a+<ext> argument 
to
    check_no_compiler_messages causes aarch64_asm_<ext>_ok to return zero for 
SME
    and any <ext> that implies it.
    
    This patch changes the baseline architecure to armv9-a for these extensions.
    
    gcc/testsuite/ChangeLog:
    
            * lib/target-supports.exp: Split the extensions that require SME 
into
            a separate set, and use armv9-a as their baseline.
    
    (cherry picked from commit 9793ffce9332349441b5c83f8c1809ac4264a0f2)

Diff:
---
 gcc/testsuite/lib/target-supports.exp | 34 ++++++++++++++++++++++++++++------
 1 file changed, 28 insertions(+), 6 deletions(-)

diff --git a/gcc/testsuite/lib/target-supports.exp 
b/gcc/testsuite/lib/target-supports.exp
index 35dca396f4ef..c0376b04551e 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -12367,12 +12367,20 @@ proc check_effective_target_aarch64_tiny { } {
 # Create functions to check that the AArch64 assembler supports the
 # various architecture extensions via the .arch_extension pseudo-op.
 
-foreach { aarch64_ext } { "fp" "simd" "crypto" "crc" "lse" "dotprod" "sve"
-                         "i8mm" "f32mm" "f64mm" "bf16" "sb" "sve2" "ls64"
-                         "lut" "sme" "sme-i16i64" "sme2" "sve-b16b16"
-                         "sme-b16b16" "sme-f16f16" "sme2p1" "fp8" "fp8fma"
-                         "ssve-fp8fma" "fp8dot2" "ssve-fp8dot2" "fp8dot4"
-                         "ssve-fp8dot4"} {
+set exts {
+    "bf16" "crc" "crypto" "dotprod" "f32mm" "f64mm" "fp" "fp8"
+    "fp8dot2" "fp8dot4" "fp8fma" "i8mm" "ls64" "lse" "lut" "sb" "simd"
+    "sve-b16b16" "sve" "sve2"
+}
+
+# We don't support SME without SVE2, so we'll use armv9 as the base
+# archiecture for SME and the features that require it.
+set exts_sve2 {
+    "sme-b16b16" "sme-f16f16" "sme-i16i64" "sme" "sme2" "sme2p1"
+    "ssve-fp8dot2" "ssve-fp8dot4" "ssve-fp8fma"
+}
+
+foreach { aarch64_ext } $exts {
     eval [string map [list FUNC $aarch64_ext] {
        proc check_effective_target_aarch64_asm_FUNC_ok { } {
          if { [istarget aarch64*-*-*] } {
@@ -12386,6 +12394,20 @@ foreach { aarch64_ext } { "fp" "simd" "crypto" "crc" 
"lse" "dotprod" "sve"
     }]
 }
 
+foreach { aarch64_ext } $exts_sve2 {
+    eval [string map [list FUNC $aarch64_ext] {
+       proc check_effective_target_aarch64_asm_FUNC_ok { } {
+         if { [istarget aarch64*-*-*] } {
+               return [check_no_compiler_messages aarch64_FUNC_assembler 
object {
+                       __asm__ (".arch_extension FUNC");
+               } "-march=armv9-a+FUNC"]
+         } else {
+               return 0
+         }
+       }
+    }]
+}
+
 proc check_effective_target_aarch64_asm_sve2p1_ok { } {
     if { [istarget aarch64*-*-*] } {
        return [check_no_compiler_messages aarch64_sve2p1_assembler object {

Reply via email to