https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102725
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- You need -fno-tree-loop-distribution -fno-tree-loop-distribute-patterns to turn it off. There is another older bug about this for memcpy.