RISC-V: Add tests for vfwredosum.vs register overlap.
New test cases ensure RISC-V vector instructions do not cause register group overlaps.
This commit introduces new test cases to ensure the vfwredosum.vs RISC-V vector instruction correctly handles register allocation. It focuses on preventing the destination register (vs1) from overlapping with the source register group (vs2), which is a requirement of the RISC-V vector specification for operations involving different element widths. The tests cover various data types and modes to ensure robust code generation.
In Details
This commit adds test cases for the vfwredosum.vs instruction in the RISC-V vector extension. It specifically targets potential register aliasing issues where the vs1 operand (EEW = 2x SEW) might incorrectly fall within the vs2 register group (SEW). This adherence to register group constraints, as outlined in the RISC-V vector specification, is crucial for correct instruction encoding and to prevent runtime errors.
- RISC-V Vector Extension (RVV)
- An extension to the RISC-V instruction set architecture that adds support for vector processing, enabling single-instruction, multiple-data (SIMD) operations for improved performance on parallelizable tasks.
- vfwredosum.vs
- A RISC-V vector instruction for widening floating-point sum reductions where the destination and second source registers are the same. It involves operations with different element widths.
- SEW (Standard Element Width)
- The base element width for vector operations in RISC-V, which can be 8, 16, 32, or 64 bits.
- EEW (Extended Element Width)
- The element width used for operations that require a wider data path than the SEW, such as widening reductions in RISC-V.
- Register Group
- In the RISC-V vector extension, a set of consecutive vector registers that are treated as a unit for certain operations or constraints.