https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109689
--- Comment #9 from Richard Biener <rguenth at gcc dot gnu.org> --- (In reply to Jan Hubicka from comment #8) > An easy way would be to avoid unlooping if tree_ssa_loop_ch is executed in > loop closed ssa (which happens from ch_vect pass). > > I wonder how hard would be however to get this right? > I think this means to take the basic block we turn into unreachable and look > on its predecessors that are in loop introducing new PHIs and renaming. > This is bit involved to do by hand. > > So perhaps simply: > rewrite_into_loop_closed_ssa (NULL, 0); > in case we unlooped in loop closed ssa form (which is not that common). > Would that be acceptable? Yes, we do that in other places as well.