https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113948

--- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Richard Sandiford <[email protected]>:

https://gcc.gnu.org/g:7ec6968058b393882580b18d1268a83776fd7d8f

commit r17-468-g7ec6968058b393882580b18d1268a83776fd7d8f
Author: Yoshinori Sato <[email protected]>
Date:   Tue May 12 12:39:07 2026 +0100

    RX: Fix infinite-loop on LRA [PR113948]

    The LRA was confused and looping due to the definition of the register
class.
    The LRA yielded incorrect results because the manipulation of stack frames
    and the movement of double words relied heavily on existing reloads.
    These changes ensure that the correct code is generated even when the
"-mlra"
    option is specified.

    gcc/ChangeLog:
            PR target/113948

            * config/rx/rx-protos.h (rx_split_double_move): New helper
prototype.
            (rx_relax_double_operands): Likewise.
            * config/rx/rx.cc (rx_legitimize_address): Add expand complex case.
            (rx_is_legitimate_address): Add double word case.
            (rx_gen_move_template): Fix operation size in unsigned extend.
            (rx_gen_move_template): Remove DImode and DFmode.
            (rx_get_stack_layout): Fix for frame size calculation.
            (rx_initial_elimination_offset): The calculation method has been
            changed to one that supports LRA.
            (rx_hard_regno_nregs): Use CEIL.
            (rx_hard_regno_mode_ok): Add ATTRIBUTE_UNUSED.
            (rx_get_subword): New. Double word move helper.
            (rx_split_double_move): Likewise.
            (rx_relax_double_operands): Likewise.
            * config/rx/rx.h (reg_class): Add CC for all regsisters.
            (CLASS_MAX_NREGS): Remove.
            * config/rx/rx.md (mov<register_modes:mode>):
            Replace copy_to_mode_reg to force_reg.
            (movdi): Limit the arguments to make register allocation easier.
            (movdf): Likewise.
            (movdi_internal): New.
            (movdf_internal): New.
            (addsi3_pid): New. Handling UNSPEC_PID_ADDR.
            (addsi3_lra): New. alternative addptrsi3.
            (ashlsi3_lra): Likewise.

    Signed-off-by: Yoshinori Sato <[email protected]>

Reply via email to