https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104971
--- Comment #7 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:25725506b85f478076770942d76799c54310c696 commit r12-7817-g25725506b85f478076770942d76799c54310c696 Author: Vladimir N. Makarov <vmaka...@redhat.com> Date: Fri Mar 25 12:22:08 2022 -0400 [PR104971] LRA: check live hard regs to remove a dead insn LRA removes insn modifying sp for given PR test set. We should also have checked living hard regs to prevent this. The patch fixes this. gcc/ChangeLog: PR middle-end/104971 * lra-lives.cc (process_bb_lives): Check hard_regs_live for hard regs to clear remove_p flag.