SH: Adjust fp-reg move insns for LRA compatibility
SH backend modifies floating-point move instructions to better integrate with the LRA register allocator.
The SH backend adjusts floating-point move instructions to accommodate the Long-Range Addresser (LRA) register allocator. Modifications include splitting the movsf_ie_ra instruction, introducing new sub-patterns for movdf constant loads, and creating a movsf_ie_rffr pattern. These changes aim to remove match_scratch constraints that LRA struggles with, improving its reliability for floating-point operations.
In Details
Adjusts floating-point move insns in config/sh/sh.md and related C/header files to improve LRA compatibility, targeting PR target/55212. Specifically, movsf_ie_ra is refactored to avoid match_scratch constraints that LRA had trouble with. New patterns like movdf_i4_F_z and movsf_ie_rffr are introduced, and movsf_ie_ra is redefined. The use of movsf_ie_ra for certain subreg cases is also disabled.
- LRA
- Long-Range Addresser, a register allocator in GCC designed to handle complex register allocation scenarios, particularly in architectures with large register files or specific addressing constraints.
- SH
- SuperH, a family of 32-bit RISC microcontrollers and microprocessors developed by Hitachi.
- match_scratch
- A constraint in GCC's machine description that requires a temporary scratch register to be used for an operation.
- movsf
- SH instruction for moving single-precision floating-point values.
- movdf
- SH instruction for moving double-precision floating-point values.