https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43423
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Target Milestone|--- |7.0 Status|ASSIGNED |RESOLVED --- Comment #14 from Andrew Pinski <pinskia at gcc dot gnu.org> --- So GCC 7 is able to optimize this loop fully and split it into two at -O3 (r7-3966) after my comment #12. Also starting with GCC 7, we were able to vectorize the loop at -O2 -ftree-vectorize since tree-if-conv.c can do the ifconversion (I don't have the revision). So this is all fixed anyways.