https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102997
--- Comment #10 from hubicka at kam dot mff.cuni.cz --- > > Hmmm, this commit disables problematic threads we've agreed are detrimental to > loop form. So it's not something the threader did, but something it's not > allowed to do. This PR may need a loop expert to analyze. > > I guess, technically it could be something we could catch past the loop > optimizers, but that's usually rarer. In the patch you introduce crossed_loop_header variable which is only set to true when loop header is visited but it does not seem to be cleared when the loop is leaved. I would expect that one wants to keep track of outermost loop entered and check if the path left it later. Honza