RISC-V: Fix register overlap for vwabda[u].vv instructions
RISC-V vector instructions vwabda[u].vv are updated to prevent register group overlaps, ensuring correct operation.
This commit addresses register group overlap issues in RISC-V vector instructions vwabda[u].vv. The instructions, which widen absolute differences and accumulate, previously had encodings where source registers could overlap with the destination register group. This commit disables such overlaps by using early clobber constraints and adds comprehensive test cases to verify correct register allocation and prevent incorrect instruction generation.
In Details
This commit modifies the RISC-V vector instruction patterns in GCC's vector.md to correctly handle register constraints for vwabda[u].vv. The vwabda[u].vv instructions perform a widening absolute difference and accumulate operation, where the destination register vd has an effective element width (EEW) twice that of the source registers vs1 and vs2. The RISC-V Vector Specification reserves encodings where a register supplies operands with different EEWs. To comply, the commit replaces the Wvr constraint with an early clobber vr for vd in vwabda[u].vv to prevent vs1 and `…