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

RISC-V: Add test cases for vfwsub.wv register group overlap

New test cases verify that vfwsub.wv correctly handles register overlap scenarios in RISC-V vector operations.

This commit introduces new test cases to ensure the vfwsub.wv instruction in RISC-V vector extensions properly handles register group overlaps. It specifically checks that the narrow operand vs1 does not fall within the vs2 register group, maintaining correct data handling and preventing unintended aliasing.

In Details

This change addresses register allocation constraints in the RISC-V Vector extension for the vfwsub.wv instruction. It modifies the instruction's pattern matching in vector.md to accommodate register overlap scenarios, specifically 2 * SEW = 2 * SEW - SEW. The update allows vs1 to overlap with the higher part of vd, but crucially prevents overlap with vs2's group. This impacts codegen for vector subword operations.

Filed Under: risc-vvector extensionregister allocation