https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118552
--- Comment #3 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:1265afa91d51606605f85e732344e86e4e4dae9b commit r15-7059-g1265afa91d51606605f85e732344e86e4e4dae9b Author: Richard Biener <rguent...@suse.de> Date: Mon Jan 20 11:50:53 2025 +0100 tree-optimization/118552 - failed LC SSA update after unrolling When unrolling changes nesting relationship of loops we fail to mark blocks as in need to change for LC SSA update. Specifically the LC SSA PHI on a former inner loop exit might be misplaced if that loop becomes a sibling of its outer loop. PR tree-optimization/118552 * cfgloopmanip.cc (fix_loop_placement): Properly mark exit source blocks as to be scanned for LC SSA update when the loops nesting relationship changed. (fix_loop_placements): Adjust. (fix_bb_placements): Likewise. * gcc.dg/torture/pr118552.c: New testcase.