libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / vect-early-break_35.c
blob4c0078fbc6758fec7db9562ba51f2cd733d97d41
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 #ifndef N
7 #define N 803
8 #endif
9 unsigned vect_a2[N];
10 unsigned vect_a1[N];
11 unsigned vect_b[N];
13 unsigned test4(unsigned x)
15 unsigned ret = 0;
16 for (int i = 0; i < N; i++)
18 vect_b[i] = x + i;
19 if (vect_a1[i]*2 > x)
20 break;
21 vect_a1[i] = x;
22 if (vect_a2[i]*4 > x)
23 break;
24 vect_a2[i] = x*x;
26 return ret;
29 /* { dg-final { scan-tree-dump "vectorized 1 loops in function" "vect" } } */