RISC-V integer widening ternary instructions avoid register overlap
Adds tests to ensure integer widening ternary instructions on RISC-V do not cause register conflicts.
This commit introduces test cases for RISC-V integer widening ternary instructions to ensure that source registers (vs1 and vs2) do not overlap with the destination register (vd). This is important because the destination register also serves as the accumulator for a wider element width, and overlap could lead to incorrect results. The tests cover various integer multiply-accumulate instructions.
In Details
This change adds test cases for the RISC-V Vector extension (RVV) targeting integer widening ternary instructions. It verifies that source registers (vs1, vs2) in instructions like vwmacc.vv do not alias the destination register (vd). This is critical because vd functions as a wider accumulator (EEW), and such aliasing could lead to RAW (Read-After-Write) hazards where vd is read before being fully written, corrupting the accumulator's value.
- RISC-V
- An open-standard instruction set architecture (ISA) based on Reduced Instruction Set Computer principles. GCC supports various RISC-V configurations.
- RVV
- The RISC-V Vector extension, which adds support for SIMD (Single Instruction, Multiple Data) operations on vectors of data.
- widening ternary instructions
- Vector instructions that perform a ternary operation (three operands) and widen the data type of the result, typically used for fused multiply-accumulate operations.
- register group overlap
- A situation where different operands of an instruction (source, destination) refer to registers that are part of the same physical or logical register allocation group, potentially leading to data corruption or unexpected behavior if not handled correctly by the hardware or compiler.
- EEW
- Element Extension Width, a parameter in the RISC-V Vector extension that specifies the bit width of individual elements within a vector register. This determines the data type being operated on (e.g., 16-bit, 32-bit, 64-bit).
- vwmacc.vv
- A RISC-V Vector instruction for performing a widening signed multiply-accumulate operation with two vector sources and a vector destination.