GCC Newspaper
OCTOBER 6, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
i386

i386: Reject 16-bit modes for SSE registers without SSE2

Compiler now rejects invalid 16-bit SSE register modes when SSE2 is not enabled, preventing ICEs.

This change prevents the GCC compiler from entering an internal compiler error (ICE) when encountering 16-bit modes for SSE registers in conjunction with SSE1 without SSE2. Previously, the register allocator would attempt to create invalid subregisters, leading to failure. The fix modifies ix86_hard_regno_mode_ok to reject these invalid modes, ensuring correct behavior and stability.

In Details

The ix86_hard_regno_mode_ok function is updated to reject 16-bit modes (HI, SI) for SSE hardware registers when SSE2 is not enabled. This resolves an ICE in the LRA (Local Register Allocation) pass that occurred when attempting to create paradoxical subregisters like (subreg:SI (reg/v:HI 21 xmm1)). The change ensures REG_CAN_CHANGE_MODE_P correctly flags such invalid mode transitions.

For Context
SSE
Streaming SIMD Extensions, a set of CPU instructions for multimedia and signal processing. SSE registers (XMM) are typically 128 bits wide.
SSE2
A second version of SSE, which added support for wider integer operations and became a standard part of x86 processors.
ICE
Internal Compiler Error. A crash within the compiler itself, typically due to an unexpected internal state or logic error.
LRA
Local Register Allocation. A compiler pass responsible for assigning physical machine registers to program variables within a function's basic blocks.
subreg
A smaller part of a larger machine register, accessed through specific instructions. For example, accessing the lower 16 bits of a 32-bit register.
Filed Under: i386ssecompiler