https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97623
--- Comment #21 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-10 branch has been updated by Richard Biener <rgue...@gcc.gnu.org>: https://gcc.gnu.org/g:0fd6247a3014038af349db3a01748b5dc17d87a0 commit r10-9245-g0fd6247a3014038af349db3a01748b5dc17d87a0 Author: Richard Biener <rguent...@suse.de> Date: Fri Oct 30 13:32:32 2020 +0100 tree-optimization/97623 - avoid excessive insert iteration for hoisting This avoids requiring insert iteration for back-to-back hoisting opportunities as seen in the added testcase. For the PR at hand this halves the number of insert iterations retaining only the hard to avoid PRE / hoist insert back-to-backs. 2020-10-30 Richard Biener <rguent...@suse.de> PR tree-optimization/97623 * tree-ssa-pre.c (insert): First do hoist insertion in a backward walk. * gcc.dg/tree-ssa/ssa-hoist-7.c: New testcase. (cherry picked from commit 82ff7e3426ea926d090777173977f8bedd086816)