https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115568
--- Comment #10 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Richard Biener <rgue...@gcc.gnu.org>: https://gcc.gnu.org/g:088887de7717a22b1503760e9b79dfbe22a0f428 commit r15-9334-g088887de7717a22b1503760e9b79dfbe22a0f428 Author: Richard Biener <rguent...@suse.de> Date: Wed Apr 9 14:36:19 2025 +0200 rtl-optimization/119689 - compare-debug failure with LRA The previous change to fix LRA rematerialization broke compare-debug for i586 bootstrap. Fixed by using prev_nonnote_nondebug_insn instead of prev_nonnote_insn. PR rtl-optimization/119689 PR rtl-optimization/115568 * lra-remat.cc (create_cands): Use prev_nonnote_nondebug_insn to check whether insn2 is directly before insn. * g++.target/i386/pr119689.C: New testcase.