testsuite: Enable aarch64 SVE2 tests by saving intermediate files
Fixes broken aarch64 SVE2 tests by ensuring assembly files are generated.
This commit resolves an issue where several aarch64 SVE2 tests were failing or marked as UNRESOLVED. When these tests were switched to dg-do assemble mode due to newer binutils supporting SVE2.1/SVE2.2 instructions, the assembly (.s) files were not being preserved. By adding the -save-temps flag, similar to other assemble-mode tests, the intermediate assembly files are now created, allowing the check-function-bodies and scan-assembler tools to function correctly and the tests to pass.
In Details
The gcc/testsuite has several aarch64 SVE2 tests (firstp.c, lastp.c, whilelt_1.c, whilele_1.c) that, with recent binutils versions supporting SVE2.1/SVE2.2 instructions, now default to dg-do assemble. In this mode, the test runner invokes the assembler directly without producing a .s file by default. Consequently, check-function-bodies and scan-assembler checks fail, marking the tests as UNRESOLVED. Adding -save-temps to these tests ensures that the .s file is generated and retained, allowing the subsequent checks to operate correctly and resolving PR testsuite/128980.
- SVE2
- Scalable Vector Extension 2, an advanced feature for ARM processors that allows vector operations to adapt to different vector lengths.
- dg-do assemble
- A test directive in GCC's testsuite that instructs the test runner to assemble the source code directly, rather than compiling and then assembling.
- check-function-bodies
- A GCC testsuite tool that verifies the function bodies in assembly output.
- scan-assembler
- A GCC testsuite tool used to check the output of the assembler.
- -save-temps
- A compiler flag that instructs GCC to keep intermediate files, such as the preprocessed source (
.i) and assembly (.s) files, after compilation. - UNRESOLVED
- A test status in GCC's testsuite indicating that the test could not be run or verified correctly, often due to environment or configuration issues.