[gcc r17-3503] testsuite: Select SVE2 for the aarch64_sve2_hw probe
Kyrylo Tkachov via Gcc-cvs <[email protected]>
| Newsgroups | gmane.comp.gcc.cvs |
|---|---|
| Message-ID | <[email protected]> |
https://gcc.gnu.org/g:5900e859fbd0ca39d81a275bcc7c96814c0606e1 commit r17-3503-g5900e859fbd0ca39d81a275bcc7c96814c0606e1 Author: Kyrylo Tkachov <[email protected]> Date: Wed Aug 19 11:54:14 2026 +0200 testsuite: Select SVE2 for the aarch64_sve2_hw probe 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. 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]> Diff: --- 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 13a269100941..5beec1c45ebc 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -6793,6 +6793,7 @@ proc check_effective_target_aarch64_sve2_hw { } { return 0 } return [check_runtime aarch64_sve2_hw_available { + #pragma GCC target "+sve2" int main (void) {