summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/vect-cond-1.c
blob: 7cea69154d4b2f56989def5c7d44e0dd7b6df461 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/* { dg-do compile } */
/* { dg-options "-O2 -ftree-vectorize -mavx2" { target avx2 } } */

int a[1024];

int
foo (int *p)
{
  int i;
  for (i = 0; i < 1024; i++)
    {
      int t;
      if (a[i] < 30)
	t = *p;
      else
	t = a[i] + 12;
      a[i] = t;
    }
}