https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114942
--- Comment #6 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:9585317f0715699197b1313bbf939c6ea3c1ace6 commit r15-364-g9585317f0715699197b1313bbf939c6ea3c1ace6 Author: Vladimir N. Makarov <vmaka...@redhat.com> Date: Fri May 10 09:15:50 2024 -0400 [PR114942][LRA]: Don't reuse input reload reg of inout early clobber operand The insn in question has the same reg in inout operand and input operand. The inout operand is early clobber. LRA reused input reload reg of the inout operand for the input operand which is wrong. It were a good decision if the inout operand was not early clobber one. The patch rejects the reuse for the PR test case. gcc/ChangeLog: PR target/114942 * lra-constraints.cc (struct input_reload): Add new member early_clobber_p. (get_reload_reg): Add new arg early_clobber_p, don't reuse input reload with true early_clobber_p member value, use the arg for new element of curr_insn_input_reloads. (match_reload): Assign false to early_clobber_p member. (process_addr_reg, simplify_operand_subreg, curr_insn_transform): Adjust get_reload_reg calls. gcc/testsuite/ChangeLog: PR target/114942 * gcc.target/i386/pr114942.c: New.