https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54089
--- Comment #75 from Alexander Klepikov <klepikov.alex+bugs at gmail dot com> --- I found that patch incorrectly works when '-O0 -fmove-loop-invariants' flags are set. Stock loop optimization passes do not run when '-O0' is specified desipte '-fmove-loop-invariants' is set. I'll do the same and recheck again.