https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115568
--- Comment #8 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:98545441308c2ae4d535f14b108ad6551fd927d5 commit r15-7379-g98545441308c2ae4d535f14b108ad6551fd927d5 Author: Vladimir N. Makarov <vmaka...@redhat.com> Date: Wed Feb 5 14:23:23 2025 -0500 [PR115568][LRA]: Use more strict output reload check in rematerialization In this PR case LRA rematerialized a value from inheritance insn instead of output reload one. This resulted in considering a rematerilization candidate value available when it was actually not. As a consequence an insn after rematerliazation used the unexpected value and this use resulted in fp exception. The patch fixes this bug. gcc/ChangeLog: PR rtl-optimization/115568 * lra-remat.cc (create_cands): Check that output reload insn is adjacent to given insn. Update a comment. gcc/testsuite/ChangeLog: PR rtl-optimization/115568 * gcc.target/i386/pr115568.c: New.