https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86393
--- Comment #4 from Mikael Slevinsky <mrslevinsky at hotmail dot com> --- I'm not sure if this answers your question, but compiling the same program (modifying 8 to 128 to tease the compiler into using zmm registers) with clang-6 works fine.