2 /* { dg-require-effective-target vect_int } */
6 int x
[1024], y
[1024], z
[1024];
8 int __attribute__((noinline
,noclone
))
12 /* Can vectorize this. */
13 for (int i
= 0; i
< n
; ++i
)
14 sum
= (y
[i
] - (x
[i
] - sum
));
18 int __attribute__((noinline
,noclone
))
22 /* Cannot vectorize this, sum is negated. */
23 for (int i
= 0; i
< n
; ++i
)
24 sum
= z
[i
] - (y
[i
] - (x
[i
] - sum
));
32 for (int i
= 0; i
< 1024; ++i
)
37 __asm__
volatile ("" : : : "memory");
39 if (foo (1024) != 1024)
41 if (bar (1023) != -1 || bar (1024) != 0)
46 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */