1 /* { dg-do run } */
2
3 #include "tree-vect.h"
4
5 int a[1024];
6 int b[1024];
7
8 int
9 foo ()
10 {
11 int tem;
12 for (int i = 0; i < 1024; ++i)
13 {
14 if (a[i] < 0)
15 tem = -a[i] - 1;
16 else
17 tem = a[i];
18 b[i] = tem + 10;
19 }
20 return tem;
21 }
22
23 int main()
24 {
25 check_vect ();
26
27 for (int i = 0; i < 1024; ++i)
28 {
29 a[i] = i - 333;
30 __asm__ volatile ("" ::: "memory");
31 }
32 int res = foo ();
33 if (res != 1023 - 333)
34 abort ();
35 return 0;
36 }
37
38 /* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { target vect_condition } } } */