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

RISC-V: Add tests for vwabda[u].vv register group overlap

New test cases verify that RISC-V vector instructions vwabda[u].vv do not cause register group overlaps.

This commit introduces new test cases to the RISC-V testsuite specifically for the vwabda.vv and vwabdau.vv vector instructions. These tests ensure that the source registers (vs1, vs2) do not fall within the destination register group (vd), preventing potential register allocation conflicts and ensuring correct behavior according to the RISC-V vector specification.

In Details

These commits add test coverage for the vwabda.vv and vwabdau.vv instructions, which perform widening absolute difference and accumulate operations. The tests target potential register group overlaps where source registers (vs1, vs2) might fall within the destination register (vd)'s group. This is critical because the RISC-V vector specification prohibits encodings where a register supplies operands with different effective element widths (EEWs). The tests, located in gcc/testsuite/gcc.target/riscv/rvv/, aim to catch violations of this rule, particularly concerning the accumulator…

For Context
vwabda.vv
A RISC-V vector instruction for widening absolute difference and accumulate. It takes two source vector registers and writes to a destination vector register, potentially with a wider element width than the sources.
EEW
Effective Element Width. In RISC-V vector operations, this refers to the actual bit width of the elements being processed, which can be different from the base element width (SEW) in widening operations.
SEW
Standard Element Width. The base bit width of the elements in a RISC-V vector register, such as 8, 16, 32, or 64 bits.
vd
Destination Vector Register. The register where the result of a vector operation is stored.
vs1
Source Vector Register 1. The first input register for a vector operation.
vs2
Source Vector Register 2. The second input register for a vector operation.
Filed Under: risc-vvector instructionstesting