https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80539
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> --- Hmm, SCEV analysis relies on loop-closed SSA form to handle expressions in outer loops that use inner loop final values. Otherwise we miss to do the required compute_overall_effects_of_inner_loop which is triggered by exit PHIs being present. That means effectively everyone doing niter analysis needs loop-closed SSA form :/ Or we make SCEV analysis more resistant, in this case instead of asserting return chrec_dont_know. Testing patch.