https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68599
--- Comment #3 from Jeffrey A. Law <law at redhat dot com> --- Yea, this is a latent issue in the RTL loop optimizer. Essentially -funsafe-loop-optimizations is getting too aggressive. We've essentially got the same situation in RTL-land as we had in tree land for pr45122. I'm looking at a similar solution, namely limiting aggressiveness when the loop has multiple exits.