summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/avx512f-vect-perm-1.c
blob: ea6760d481cd2d1962f09b073fd1224ed86cb2d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/* { dg-do compile } */
/* { dg-options "-O2 -ftree-vectorize -ffast-math -march=knl" } */
/* { dg-final { scan-assembler-times "vpermps\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */

#define N 1024
float f1[N] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__)));
float f2[N] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__)));

void foo ()
{
  int j;
  for (j=0; j<N; j++)
    f1[j] += f2[N-j];
}