https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97330
--- 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:629e0547af33221a925f38757b52a9284148b68a commit r11-3726-g629e0547af33221a925f38757b52a9284148b68a Author: Richard Biener <rguent...@suse.de> Date: Thu Oct 8 13:18:57 2020 +0200 tree-optimization/97330 - fix bad load sinking This fixes bad placement of sunk loads. 2020-10-08 Richard Biener <rguent...@suse.de> PR tree-optimization/97330 * tree-ssa-sink.c (statement_sink_location): Avoid skipping PHIs when they dominate the insert location. * gcc.dg/torture/pr97330-1.c: New testcase. * gcc.dg/torture/pr97330-2.c: Likewise.