https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49795
--- Comment #7 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to vincenzo Innocente from comment #6) loop1, loop2, and loop4 all vectorize now at -O3. loop3 can vectorize with -O3 -fno-trapping-math (it can also be vectorize at -O3 on x86_64 with -march=skylake-avx512 or on aarch64 with SVE enabled). I almost want to say there is not much to do here. also about comment #0, the vectorizer does happen for -mavx2. So maybe this is enough these days ...