https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118610
--- Comment #4 from Jeffrey A. Law <law at gcc dot gnu.org> --- Given the range in question this seems relevant: ommit 01339d29b7663d85eea6145eac2b1ad1da428c11 Author: Vladimir N. Makarov <vmaka...@redhat.com> Date: Tue Jan 28 08:37:33 2025 -0500 [PR118663][LRA]: Change secondary memory mode only if there are regs holding the changed mode My recent patch for PR118067 changes the secondary memory mode if all regs of the pseudo reg class are prohibited in the secondary mode. But the patch does not check a special case when the corresponding target hook returns this mode although there are no hard regs of pseudo class holding value of the mode at all. This results in given PR and this patch fixes it. gcc/ChangeLog: PR target/118663 * lra-constraints.cc (invalid_mode_reg_p): Check empty reg_class_contents. gcc/testsuite/ChangeLog: PR target/118663 * gcc.target/powerpc/pr118663.c: New. If it's not that patch them it's most likely just gone latent.