AArch64 SIMD tests now accept flexible operand order for faminmax.
SIMD codegen tests for AArch64's faminmax instructions now accept both operand orders, adapting to changes in forward propagation.
Following a change in the forward propagation pass that reorders vector construction for commutative instructions, the AArch64 SIMD codegen tests for faminmax and faminmaxq were failing. This commit updates the testsuite to accept either operand order for these instructions. Both orders are semantically equivalent, and this change ensures the tests accurately reflect the instruction set capabilities without being brittle to minor reordering optimizations.
In Details
The forwprop pass now folds BIT_INSERT_EXPR chains into CONSTRUCTORs, which alters the operand order for commutative instructions like FAMAX/FAMIN and FMAXNM/FMINNM in their 64-bit vector forms. Previously, the check-function-bodies regex in the AArch64 SIMD testsuite was pinned to a specific operand order. This commit modifies faminmax-codegen.c and faminmax-codegen-no-flag.c to accept either operand order for test_vamax_f32, test_vamaxq_f64, test_vamin_f32, and test_vaminq_f64, resolving test failures without impacting correctness.
- faminmax
- SIMD instructions on AArch64 that perform element-wise minimum or maximum operations on floating-point vectors.
faminmaxqrefers to the double-width vector version. - AArch64
- The 64-bit ARM architecture, for which GCC generates code.
- SIMD
- Single Instruction, Multiple Data. A class of parallel computers in Flynn's taxonomy that perform the same operation on multiple data points simultaneously. Many modern CPUs have SIMD instruction sets (e.g., SSE, NEON).
- forwprop
- Forward propagation is an optimization pass in GCC that simplifies expressions by propagating constants and known values through the intermediate representation.
- BIT_INSERT_EXPR
- An expression in GCC's intermediate representation used to set a specific bit or range of bits within a larger value.
- CONSTRUCTOR
- A GCC intermediate representation node that represents the construction of an aggregate value, such as an array or struct, from its components.