https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103188
--- Comment #7 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:8865133614f09caadf48c0b7d05f0331959b3bc1 commit r12-5155-g8865133614f09caadf48c0b7d05f0331959b3bc1 Author: Richard Biener <rguent...@suse.de> Date: Thu Nov 11 14:05:49 2021 +0100 tree-optimization/103188 - avoid running ranger on not-up-to-date SSA The following splits loop header copying into an analysis phase that uses ranger and a transform phase that can do without to avoid running ranger on IL that has SSA form not updated. 2021-11-11 Richard Biener <rguent...@suse.de> PR tree-optimization/103188 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): Remove query parameter, split out check for size optimization. (ch_base::m_ranger, cb_base::m_query): Remove. (ch_base::copy_headers): Split processing loop into analysis around which we allocate and use ranger and transform where we do not. (pass_ch::execute): Do not allocate/free ranger here. (pass_ch_vect::execute): Likewise. * gcc.dg/torture/pr103188.c: New testcase.