https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110215
--- Comment #5 from CVS 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:154c69039571c66b3a6d16ecfa9e6ff22942f59f commit r14-1891-g154c69039571c66b3a6d16ecfa9e6ff22942f59f Author: Vladimir N. Makarov <vmaka...@redhat.com> Date: Fri Jun 16 11:12:32 2023 -0400 RA: Ignore conflicts for some pseudos from insns throwing a final exception IRA adds conflicts to the pseudos from insns can throw exceptions internally even if the exception code is final for the function and the pseudo value is not used in the exception code. This results in spilling a pseudo in a loop (see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110215). The following patch fixes the problem. PR rtl-optimization/110215 gcc/ChangeLog: * ira-lives.cc: Include except.h. (process_bb_node_lives): Ignore conflicts from cleanup exceptions when the pseudo does not live at the exception landing pad.