https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121495
--- Comment #17 from Richard Sandiford <rsandifo at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #16)
> So this was fixed really in GCC 15.2.0 by r15-9859-g2efe8cc55581a5.
> Backporting that is not straight forward so unassigning.
FWIW, and IIUC, only the rtlanal.cc part should be needed to fix early-ra.
That part applies cleanly and should make:
// Mark all registers that occur in addresses as needing a GPR.
vec_rtx_properties properties;
properties.add_insn (insn, true);
for (rtx_obj_reference ref : properties.refs ())
if (ref.is_reg ()
&& ref.in_address ()
&& !HARD_REGISTER_NUM_P (ref.regno))
m_pseudo_regs[ref.regno].flags |= ALLOWS_NONFPR | NEEDS_NONFPR;
work as intended.