blob: 12ae771038e9e3f9017c2660b11817edc72e2e00 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
/* { 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;
}
}
/* { dg-final { cleanup-tree-dump "vect" } } */
|