GCC Newspaper
OCTOBER 6, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
testsuite

Enable SVE2 selection for aarch64_sve2_hw probe.

Ensures SVE2 instructions are recognized in test suite probes on AArch64 hardware.

This commit improves the AArch64 SVE2 hardware probe by explicitly selecting SVE2. Previously, the probe program was compiled without architecture options, causing the assembler to reject SVE2 instructions. This resulted in the probe incorrectly reporting that SVE2 was not available, skipping relevant tests. By adding a target pragma, the probe now correctly identifies SVE2 hardware, allowing SVE2-specific tests to pass.

In Details

The check_effective_target_aarch64_sve2_hw test in GCC's testsuite uses a small probe program compiled with the target to check for SVE2 hardware support. Without explicit architecture flags, the assembler may not recognize SVE2 instructions. This change adds a #pragma GCC target("sve2") to the probe program, ensuring it's compiled with SVE2 enabled, thereby correctly validating SVE2 hardware presence and enabling related tests.

For Context
SVE2
Scalable Vector Extension 2, an advanced set of SIMD instructions for ARM processors that allows vector length to be implementation-defined.
AArch64
The 64-bit ARM architecture.
probe program
A small piece of code compiled and run by the testsuite to determine specific hardware or compiler feature capabilities.
target pragma
A directive that allows specifying compilation target options, such as CPU features or instruction sets, for a specific block of code.
Filed Under: testsuiteaarch64SVE2