https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86735
--- Comment #5 from janus at gcc dot gnu.org --- (In reply to Alexander Monakov from comment #3) > An observation in case it might help to narrow down the problem: gcc-8 > changed to prefer 256-bit-wide vectors on skylake-avx512, so adding > -mprefer-vector-width=512 option for gcc-8/trunk should make vectorization > behave a bit closer to gcc-7. Indeed adding the flag "-mprefer-vector-width=512" makes the problem disappear. Thanks for the comment.