RISC-V: Enable RVV register overlap for vfw{macc,msac}.vv
RISC-V vector instructions vfw{macc,msac}.vv now support register overlap.
This commit enables register overlap for the RISC-V Vector extension instructions vfwmacc.vv and vfwmsac.vv. Similar to how vwmacc.vv handles overlapping source and destination registers, this change allows these dual-width floating-point ternary instructions to also utilize register overlap. This potentially improves instruction scheduling and register pressure management.
In Details
This patch modifies config/riscv/vector.md to allow register overlap for vfwmacc.vv and vfwmsac.vv by leveraging the Wvr constraint. This enables these fused multiply-accumulate/subtract vector instructions to share registers between sources and destinations, similar to the existing support for vwmacc.vv, potentially improving register allocation and code density.
- RISC-V
- An open-standard Instruction Set Architecture (ISA) based on Reduced Instruction Set Computing principles.
- RVV
- RISC-V Vector extension, providing SIMD capabilities.
- register overlap
- A situation where a destination register for an instruction is also used as a source register for the same or a subsequent instruction. Allowing overlap can improve efficiency by reducing the need for extra temporary registers.
- vfw{macc,msac}.vv
- RISC-V Vector extension instructions for fused multiply-accumulate (vfwmacc) and multiply-subtract-accumulate (vfwmsac) operations on floating-point vectors. The '.vv' suffix indicates vector-to-vector operations.
- Wvr constraint
- A constraint used in GCC's machine description files to specify that a register must be a vector register, potentially with additional properties related to widening or specific usage patterns.