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

RISC-V: Add tests for vfwred[ou]sum.vs register overlap.

New test cases ensure RISC-V vector instructions do not cause register group overlaps.

Multiple commits add new test cases for RISC-V vector instructions, specifically focusing on the vfwred[ou]sum.vs operations. These tests aim to prevent scenarios where the destination register (vs1) overlaps with the source register group (vs2), which is disallowed by the RISC-V vector specification when different element widths are involved. The tests cover various data types and multiplication factors to ensure correctness.

In Details

These commits address register allocation constraints in the RISC-V vector extension (RVV). Specifically, they add test cases to verify that the vfwredosum.vs and vfwredusum.vs instructions, which perform widening floating-point reductions, adhere to register group restrictions. The vs1 operand, which is read with a wider element width (2x SEW) than vs2 (1x SEW), must not fall within the register group of vs2 to avoid encoding conflicts as per the RISC-V vector specification.

For Context
RISC-V Vector Extension (RVV)
An extension to the RISC-V instruction set architecture that adds support for vector processing, enabling single-instruction, multiple-data (SIMD) operations for improved performance on parallelizable tasks.
vfwredosum.vs / vfwredusum.vs
Specific RISC-V vector instructions for widening floating-point sum reductions. '.vs' indicates that the destination register and the second source register are the same.
SEW (Standard Element Width)
The base element width for vector operations in RISC-V, which can be 8, 16, 32, or 64 bits.
EEW (Extended Element Width)
The element width used for operations that require a wider data path than the SEW, such as widening reductions in RISC-V.
Register Group
In the RISC-V vector extension, a set of consecutive vector registers that are treated as a unit for certain operations or constraints.
Filed Under: risc-vvectortesting