RISC-V: Add tests for vfwredusum.vs register overlap.
New test cases ensure RISC-V vector instructions do not cause register group overlaps.
This commit introduces new test cases to verify that the vfwredusum.vs RISC-V vector instruction does not cause register group overlaps. It specifically targets scenarios where the destination register (vs1) might overlap with the source register group (vs2), ensuring compliance with the RISC-V vector specification’s constraints on register usage for operations with differing element widths.
In Details
This commit adds test cases for the vfwredusum.vs instruction within the RISC-V vector extension. The tests focus on ensuring that the vs1 operand, which has an EEW of 2x SEW, does not overlap with the vs2 register group (SEW), as required by section 5.2 of the vector specification to avoid encoding conflicts. This is particularly relevant for auto-vectorization and code generation quality.
- 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.
- vfwredusum.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.