https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80160
--- Comment #5 from Vladimir Makarov <vmakarov at gcc dot gnu.org> --- (In reply to Bernd Schmidt from comment #4) > Perhaps this. > > Index: lra-assigns.c > =================================================================== > --- lra-assigns.c (revision 246226) > +++ lra-assigns.c (working copy) > @@ -908,7 +908,8 @@ must_not_spill_p (unsigned spill_regno) > does not solve the general case where existing reloads fully > cover a limited register class. */ > if (!bitmap_bit_p (&non_reload_pseudos, spill_regno) > - && reg_class_size [reg_preferred_class (spill_regno)] == 1) > + && reg_class_size [reg_preferred_class (spill_regno)] == 1 > + && reg_alternate_class (spill_regno) == NO_REGS) > return true; > return false; > } It looks OK to me. Bernd, please, go ahead and commit it (of course after successful testing). Thanks for the fast response.