libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / vect-early-break_16.c
blob6bb71555be2079c3f45092d1f3e604226ba271e3
1 /* { dg-add-options vect_early_break } */
2 /* { dg-do compile } */
3 /* { dg-require-effective-target vect_early_break } */
4 /* { dg-require-effective-target vect_int } */
6 /* { dg-additional-options "-Ofast" } */
8 /* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
10 #define N 1024
11 unsigned vect_a[N];
12 unsigned vect_b[N];
14 unsigned test4(unsigned x)
16 unsigned ret = 0;
17 for (int i = 0; i < N; i++)
19 vect_b[i] = x + i;
20 if (vect_a[i] > x)
21 return vect_a[i];
22 vect_a[i] = x;
23 ret += vect_a[i] + vect_b[i];
25 return ret;