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

Update SVE dup_lane tests for lane 0

Adjusts AArch64 SVE dup_lane tests to expect 'mov' instruction for lane 0 due to common assembly output.

This commit updates AArch64 SVE assembly tests for dup_lane operations involving lane 0. Due to common subexpression elimination (CSE) simplifying duplicated vectors of lane 0 into a mov instruction, the expected assembly output has changed. The tests are modified to reflect this, ensuring they pass while still verifying correct SVE functionality.

In Details

Tests in gcc.target/aarch64/sve/acle/asm for dup_lane_X where X is bf16, f16, f32, etc., previously expected dup z0.<T>, zN.<T>[0]. After recent CSE improvements that simplify vec_duplicate(vec_select(lane 0)) into vec_duplicate(<lowpart_subreg>), the preferred alias *vec_duplicate<mode>_reg is emitted as a mov instruction (e.g., mov z0.b, b1). Since DUP (indexed) and DUP (scalar) assemble to the same encoding, the assembly output is unchanged; the tests are updated to match the mov emission.

For Context
SVE
Scalable Vector Extension. A vector processing architecture for ARM processors that allows vector lengths to vary dynamically.
dup_lane
An operation that duplicates a single lane (element) from a vector register to fill an entire vector register.
CSE
Common Subexpression Elimination. A compiler optimization that replaces multiple identical computations with a single instance.
AArch64
The 64-bit ARM architecture.
MOV
Move instruction. A fundamental CPU instruction used to copy data from one location to another.
Filed Under: aarch64svetestsuiteassembly