https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117770
--- Comment #7 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:e79583cef924f5fb5de551bd61da7b5fdee5c690 commit r15-5802-ge79583cef924f5fb5de551bd61da7b5fdee5c690 Author: Vladimir N. Makarov <vmaka...@redhat.com> Date: Fri Nov 29 14:58:47 2024 -0500 [PR117770][LRA]: Check hard regs corresponding insn operands for hard reg clobbers When LRA processes early clobbered hard regs explicitly present in the insn description, it checks that the hard reg is also used as input. If the hard reg is not an input also, it is marked as dying. For the check LRA processed only input hard reg also explicitly present in the insn description. For given PR, the hard reg is used as input as the operand and is not present explicitly in the insn description and therefore LRA marked the hard reg as dying. This results in wrong allocation and wrong code. The patch solves the problem by processing hard regs used as the insn operand. gcc/ChangeLog: PR rtl-optimization/117770 * lra-lives.cc: Include ira-int.h. (process_bb_lives): Check hard regs corresponding insn operands for dying hard wired reg clobbers.