i386: Avoid ICE when splitting paradoxical subreg in double modes
Fixes an internal compiler error when handling certain double-precision register splits on i386.
An internal compiler error (ICE) in split_double_mode on the i386 architecture has been fixed. The issue occurred when attempting to split a paradoxical subregister in a double-precision mode. The compiler now correctly handles these cases by assigning a zero value to the high half of the split register, preventing the ICE and ensuring correct code generation.
In Details
Fixes an ICE in split_double_mode on i386 when gen_reg_rtx(half_mode) is called for the high half of a paradoxical subreg after register allocation. The paradoxical subreg's high bits are irrelevant. The patch modifies the function to use CONST0_RTX(half_mode) when encountering such a case, resolving the ICE and ensuring that the generated register has a defined value, which is likely to satisfy subsequent instruction constraints.
- ICE
- Internal Compiler Error. A severe error that causes the compiler to crash, typically due to an unrecoverable state in the compiler's logic.
- i386
- A 32-bit microprocessor architecture, commonly associated with Intel processors. GCC has specific back-end code for this architecture.
- split_double_mode
- A function within the GCC compiler backend that handles splitting a double-width machine mode (like a 64-bit integer or float) into two single-width modes (e.g., two 32-bit integers).
- paradoxical subreg
- A subregister reference where the offset and size combination does not naturally align with the larger register's layout, but is still logically valid in certain contexts.
- RA
- Register Allocation. A compiler optimization phase that assigns program variables to the limited number of hardware registers available on the target CPU.
- CONST0_RTX
- Represents a constant zero value within GCC's internal representation (RTX) for a given machine mode.
- half_mode
- A machine mode representing half the width of a standard mode, often used when splitting larger data types.