From: Kyrylo Tkachov <[email protected]>
check_effective_target_aarch64_sve2_hw compiles its probe program with
no architecture options, so the assembler rejects the SVE2 instruction
in the inline asm unless the toolchain already defaults to SVE2. The
check then reports 0 even on SVE2 hardware and every test that requires
it is skipped.
Select SVE2 for the probe with a target pragma, the way
check_effective_target_aarch64_sve2p1_hw already does. On a Neoverse V2
host this turns gcc.target/aarch64/sve2/pr122069_2.c and
gcc.target/aarch64/sve2/pr123775.c from UNSUPPORTED into PASS.
Bootstrapped and tested on aarch64-none-linux-gnu.
Pushing to trunk.
Thanks,
Kyrill
gcc/testsuite/ChangeLog:
* lib/target-supports.exp
(check_effective_target_aarch64_sve2_hw): Add a target pragma to
the probe program.
Signed-off-by: Kyrylo Tkachov <[email protected]>
---
gcc/testsuite/lib/target-supports.exp | 1 +
1 file changed, 1 insertion(+)
diff --git a/gcc/testsuite/lib/target-supports.exp
b/gcc/testsuite/lib/target-supports.exp
index 987e57dfac7..23388e68027 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -6772,6 +6772,7 @@ proc check_effective_target_aarch64_sve2_hw { } {
return 0
}
return [check_runtime aarch64_sve2_hw_available {
+ #pragma GCC target "+sve2"
int
main (void)
{
--
2.50.1 (Apple Git-155)