On 2025-09-01 16:59, Christophe Lyon wrote:
On Wed, 27 Aug 2025 at 13:25, Torbjorn SVENSSON
<torbjorn.svens...@foss.st.com> wrote:
On 2025-08-18 19:24, Christophe Lyon wrote:
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.
Is there any chance to get this merged anytime soon?
Sorry for the delay, I've just pushed the two patches to trunk.
Also, can it please be picked to releases/gcc-15 and releases/gcc-14?
I haven't looked at this yet, can you share some configuration of
interest to you that I should check to make sure the patches work as
intended in those branches?
For GCC-14, I see the following in my logs for "-mcpu=cortex-a7
-mfloat-abi=hard":
XPASS: gcc.dg/vect/tsvc/vect-tsvc-s332.c -flto -ffat-lto-objects scan-tree-dump vect
"vectorized 1 loops"
XPASS: gcc.dg/vect/tsvc/vect-tsvc-s332.c scan-tree-dump vect "vectorized 1
loops"
XPASS: gcc.dg/vect/tsvc/vect-tsvc-s481.c -flto -ffat-lto-objects scan-tree-dump vect
"vectorized 1 loops"
XPASS: gcc.dg/vect/tsvc/vect-tsvc-s481.c scan-tree-dump vect "vectorized 1
loops"
XPASS: gcc.dg/vect/tsvc/vect-tsvc-s482.c -flto -ffat-lto-objects scan-tree-dump vect
"vectorized 1 loops"
XPASS: gcc.dg/vect/tsvc/vect-tsvc-s482.c scan-tree-dump vect "vectorized 1
loops"
All 6 of these were fixed with your patch when I tried it a few weeks back.
Kind regards,
Torbjörn
Thanks,
Christophe
Kind regards,
Torbjörn
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 | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/gcc/testsuite/lib/target-supports.exp
b/gcc/testsuite/lib/target-supports.exp
index 0a4c59c5697..3712321bc21 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -4617,7 +4617,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] } {
@@ -5440,7 +5440,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
@@ -5909,7 +5909,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
}
}