https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68398
--- Comment #4 from Sebastian Pop <spop at gcc dot gnu.org> --- Thanks Jeff for looking into this issue. I was thinking about a heuristic as you mentioned in comment #2: what about allowing creation of irreducible loops, multiple latches, etc. after the loop optimizers are done?