https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118663
--- Comment #13 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Vladimir Makarov <vmaka...@gcc.gnu.org>: https://gcc.gnu.org/g:01339d29b7663d85eea6145eac2b1ad1da428c11 commit r15-7250-g01339d29b7663d85eea6145eac2b1ad1da428c11 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.