GCC Newspaper
JUNE 15, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
rx Performance Win

RX: Fix infinite-loop on LRA

The RX backend now avoids an infinite loop during LRA by correcting register class definitions and stack frame manipulation.

The RX backend experienced an infinite loop during the LRA (Local Register Allocation) phase due to incorrect register class definitions. This commit fixes the issue by correcting the register class definitions and stack frame manipulation. The changes ensure that the correct code is generated even when the -mlra option is used, especially for double-word operations.

In Details

The RX backend's LRA was looping due to register class definition issues, particularly with stack frame manipulation and double-word movements. This commit introduces helper functions (rx_split_double_move, rx_relax_double_operands) and modifies register class definitions in rx.h by adding CC for all registers. It also adjusts code generation templates in rx.md.

For Context

Register allocation is a crucial step in compilation where the compiler decides which variables to store in registers for faster access. Local Register Allocation (LRA) optimizes register usage within basic blocks of code. This commit addresses a bug in the RX backend (a specific processor architecture) where the compiler would get stuck in an infinite loop during LRA. The fix involves correcting how registers are classified and how stack frames are managed, especially when dealing with double-precision floating-point numbers.

Filed Under: rxlraregister allocationbackendbugfix