GCC Newspaper
NOVEMBER 30, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
risc-v

RISC-V: Revert RVV register overlap for vwmacc[u].vv

RISC-V compiler reverts RVV register overlap for widening multiply-add instructions.

The GCC compiler reverts changes that allowed register overlap for RISC-V vector widening multiply-add instructions (vwmacc[u].vv). This is to comply with the vector specification, which reserves encodings where a single register supplies operands with different effective element widths. The change affects multiple test cases and the vector instruction definitions.

In Details

This commit reverts GCC's RISC-V backend to disallow register overlap for vwmacc[u].vv and related instructions. The RISC-V Vector Extension (RVV) specification reserves encodings where a single vector register (vd) is used for accumulation with an Effective Element Width (EEW) twice that of the source registers (vs1, vs2), which also have EEW = SEW. This prevents vs1/vs2 from overlapping vd even in the highest-numbered part of the register group, as their EEW differs from vd's EEW when vd is used as an accumulator.

For Context
RISC-V Vector Extension (RVV)
An extension to the RISC-V instruction set architecture that provides support for single instruction, multiple data (SIMD) operations, enabling efficient processing of vector data.
vwmacc[u].vv
A RISC-V Vector Extension instruction for widening signed (vwmacc) or unsigned (vwmaccu) multiply-accumulate operations, where all operands (destination and two sources) are vector registers.
EEW (Effective Element Width)
In RISC-V vectors, this defines the bit width of individual elements within a vector register for a given operation. It can differ from the SEW (Standard Element Width).
SEW (Standard Element Width)
The base element width defined for a vector register, upon which EEW is often based.
Register Overlap
In this context, it refers to a situation where the same physical register can be interpreted as having different roles or widths simultaneously, which is disallowed by the RISC-V vector specification for certain instructions.
Filed Under: risc-vvector instructionscompiler