]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
testsuite: arm: factorize arm_v8_neon_ok flags
authorChristophe Lyon <christophe.lyon@linaro.org>
Sun, 27 Apr 2025 20:34:33 +0000 (20:34 +0000)
committerChristophe Lyon <christophe.lyon@linaro.org>
Mon, 1 Sep 2025 14:57:16 +0000 (14:57 +0000)
Like we do in other effective-targets, add
"-mcpu=unset -march=armv8-a"
directly when setting et_arm_v8_neon_flags in arm_v8_neon_ok_nocache,
to avoid having to add these two flags in all users of arm_v8_neon_ok.

This avoids duplication and possible typos / oversights.

gcc/testsuite/ChangeLog:
* lib/target-supports.exp
(check_effective_target_arm_v8_neon_ok_nocache): Add "-mcpu=unset
-march=armv8-a" to et_arm_v8_neon_flags.
(add_options_for_vect_early_break): Remove useless "-mcpu=unset
-march=armv8-a".
(add_options_for_arm_v8_neon): Likewise.

gcc/testsuite/lib/target-supports.exp

index b09675d248910ec5caba3f1fc620d440a2550183..957fa7f3599e8965ed4c8e287bcbc740d70262e9 100644 (file)
@@ -4639,7 +4639,7 @@ proc add_options_for_vect_early_break { flags } {
 
     if { [check_effective_target_arm_v8_neon_ok] } {
        global et_arm_v8_neon_flags
-       return "$flags $et_arm_v8_neon_flags -mcpu=unset -march=armv8-a"
+       return "$flags $et_arm_v8_neon_flags"
     }
 
     if { [check_effective_target_sse4] } {
@@ -5462,7 +5462,7 @@ proc add_options_for_arm_v8_neon { flags } {
        return "$flags"
     }
     global et_arm_v8_neon_flags
-    return "$flags $et_arm_v8_neon_flags -mcpu=unset -march=armv8-a"
+    return "$flags $et_arm_v8_neon_flags"
 }
 
 # Add the options needed for ARMv8.1 Adv.SIMD.  Also adds the ARMv8 NEON
@@ -5931,7 +5931,7 @@ proc check_effective_target_arm_v8_neon_ok_nocache { } {
                __asm__ volatile ("vrintn.f32 q0, q0");
            }
        } "$flags -mcpu=unset -march=armv8-a"] } {
-           set et_arm_v8_neon_flags $flags
+           set et_arm_v8_neon_flags "$flags -mcpu=unset -march=armv8-a"
            return 1
        }
     }