https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97559
--- Comment #5 from CVS 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:a294e6368f80ac27c5150414027d1cf2a21bd9b7 commit r11-5840-ga294e6368f80ac27c5150414027d1cf2a21bd9b7 Author: Richard Biener <rguent...@suse.de> Date: Tue Dec 8 09:45:57 2020 +0100 tree-optimization/97559 - fix sinking in irreducible regions This fixes sinking of loads when irreducible regions are involved and the heuristics to find stores on the path along the sink breaks down since that uses dominator queries. 2020-12-08 Richard Biener <rguent...@suse.de> PR tree-optimization/97559 * tree-ssa-sink.c (statement_sink_location): Never ignore PHIs on sink paths in irreducible regions. * gcc.dg/torture/pr97559-1.c: New testcase. * gcc.dg/torture/pr97559-2.c: Likewise.