Improve s390 vector permute expanders and add V8HF support.
S390 vector permute operations are refined for correctness and V8HF mode support is added.
This commit enhances GCC’s s390 backend by correcting operand handling in vector permute expanders and adding support for the V8HF mode. Issues with gen_rtx_SUBREG and invalid RTL generation in functions like expand_perm_as_a_vlbr_vstbr_candidate and expand_perm_reverse_elements have been fixed by using simplify_gen_subreg and expand_insn. Support for V8HFmode is extended across various vector permutation and merge operations, improving the compiler’s vectorization capabilities on s390.
In Details
The s390 GCC backend's vector permute expanders (expand_perm_as_a_vlbr_vstbr_candidate, expand_perm_reverse_elements, expand_perm_with_merge) have been refactored to prevent invalid RTL generation. Specifically, incorrect gen_rtx_SUBREG usage and operand legitimacy issues were addressed using simplify_gen_subreg and expand_insn with proper input/output operand handling. Additionally, support for V8HFmode has been integrated into vector operations by introducing a new mode iterator V_HW_H and parameterizing relevant instructions in vector.md, enhancing vectorization for half-wo…
- s390
- A 64-bit non-ன்று mainframe computer architecture developed by IBM.
- vector permute
- A vector instruction that rearranges elements within a vector register based on a control mask or index.
- expander
- In a compiler, a function that takes a high-level intermediate representation and expands it into a sequence of lower-level instructions or RTL.
- RTL
- Register Transfer Language, an intermediate representation used by GCC to represent code before it is translated into machine code.
- V8HFmode
- A GCC machine mode representing a vector of 8 half-precision floating-point numbers (likely 8x16-bit floats).
- SUBREG
- A GCC RTL construct used to represent a sub-register or a part of a larger register, often for type conversion or accessing specific fields.