https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105618
--- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-11 branch has been updated by Richard Biener <rgue...@gcc.gnu.org>: https://gcc.gnu.org/g:dba0883cbbd0ce7545041be96ae75db1d577affb commit r11-10169-gdba0883cbbd0ce7545041be96ae75db1d577affb Author: Richard Biener <rguent...@suse.de> Date: Tue May 17 09:45:02 2022 +0200 tree-optimization/105618 - restore load sinking The PR97330 fix caused some missed sinking of loads out of loops the following patch re-instantiates. 2022-05-17 Richard Biener <rguent...@suse.de> PR tree-optimization/105618 * tree-ssa-sink.c (statement_sink_location): For virtual PHI uses ignore those defining the used virtual operand. * gcc.dg/tree-ssa/ssa-sink-19.c: New testcase. (cherry picked from commit ebce0e9bd8d714a8607ae24331a3d842b0d11859)