GCC Newspaper
NOVEMBER 30, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
testsuite

Accept indexed addressing in aarch64 fneg-abs_3.c test

Modifies an AArch64 test case to accept both indexed and post-increment addressing modes for vectorized loads and stores.

The fneg-abs_3.c test in the AArch64 test suite previously failed due to register pressure estimation in the ivopts pass selecting an indexed addressing mode over the desired post-increment form. This change updates the test to accept either addressing mode, ensuring the test passes without altering the core check for vectorizing fneg(fabs(x)) to a single ORR instruction.

In Details

The AArch64 test case fneg-abs_3.c verifies vectorization of fneg(fabs(x)) into a single ORR instruction with a sign-bit mask, requiring a post-incremented store. Recent changes to ivopts register pressure estimation (e.g., 6d975812860) led it to favor indexed addressing ([x0, x2]) over post-increment ([x0], 16) on -mtune=generic. This commit broadens the test's acceptance patterns to include register-offset addressing, decoupling the test's success from specific register allocation choices by ivopts.

For Context
ivopts
A GCC optimization pass that performs instruction scheduling and register allocation, often involving loop optimizations.
Indexed addressing
A memory addressing mode where the effective address is calculated by adding an offset to the value of a register.
Post-increment addressing
A memory addressing mode where the operand is accessed, and then the address register is updated by adding a specified offset.
AArch64
The 64-bit ARM architecture.
Filed Under: testsuiteaarch64vectorizationregister-allocation