Debian Codegraph @

gcc/testsuite/gcc.target/i386/avx512f-vect-perm-1.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -ftree-vectorize -ffast-math -march=skylake-avx512 -mprefer-vector-width=512" } */
3 /* { dg-final { scan-assembler-times "vpermd\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
4
5 #define N 1024
6 float f1[N] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__)));
7 float f2[N] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__)));
8
9 void foo ()
10 {
11 int j;
12 for (j=0; j<N; j++)
13 f1[j] += f2[N-j];
14 }