https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115363
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to Richard Biener from comment #1) > Invariant motion doesn't do versioning for aliasing. But in fact once the > loop iterates array[k] can no longer alias this->size but this is difficult > to exploit (peeling the loop once would help). So I should mention that this was noticed from some code internally which is optimized by LLVM's polly (graphite) infrastructure and yes it is an important loop in this code.