https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87214
--- Comment #22 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Even more reduced testcase: typedef long long int V __attribute__((vector_size (4 * sizeof (long long int)))); __attribute__((noipa)) void foo (V *p) { p[0] = __builtin_shuffle (p[1], p[2], (V) { 2, 3, 5, 6 }); } int main () { V a[3] = { { 0, 0, 0, 0 }, { 10, 11, 12, 13 }, { 14, 15, 16, 17 } }; foo (a); if (a[0][0] != 12 || a[0][1] != 13 || a[0][2] != 15 || a[0][3] != 16) __builtin_abort (); return 0; } Works with -O2 -mavx2, aborts with -O2 -mavx512vl.