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

RISC-V: Add test cases for register overlap in vfwmacc.vv

New RISC-V tests cover register group overlap for the vfwmacc.vv instruction.

This commit enhances the RISC-V Vector extension test suite with new cases for the vfwmacc.vv instruction. The tests are designed to validate the instruction’s behavior when register groups overlap, meaning destination and source registers may be shared. Scenarios for half-precision (f16) and single-precision (f32) floating-point data types are covered, with various vector configurations (m1, m2, m4, mf2, mf4) to ensure robustness.

In Details

This patch adds test cases to gcc/testsuite/gcc.target/riscv/rvv/autovec/group_overlap/ for the vfwmacc.vv instruction. The tests focus on register group overlap, examining behavior with f16 and f32 data types across different vector lengths/configurations (m1, m2, m4, mf2, mf4). This aims to ensure correct handling of potential register aliasing for this vector fused multiply-accumulate instruction.

For Context
RISC-V
An open-standard Instruction Set Architecture (ISA) based on Reduced Instruction Set Computing principles.
vfwmacc.vv
A RISC-V Vector extension instruction for a fused floating-point multiply-accumulate operation that operates on two vector registers and writes the result to a third vector register. The '.vv' suffix indicates vector-to-vector operands.
register group overlap
A condition in vector processing where the set of registers used for storing the results of an operation intersects with the set of registers used as input operands. This requires careful management by the hardware and compiler.
f16
Half-precision floating-point format (16 bits).
f32
Single-precision floating-point format (32 bits).
m1, m2, m4, mf2, mf4
These likely refer to different vector lengths or configurations within the RISC-V Vector extension, possibly related to the number of elements (m1=1, m2=2, m4=4) or masked elements (mf2, mf4).
Filed Under: risc-vvectorrvvtestingautovec