Debian Codegraph @

gcc/testsuite/gcc.dg/vect/vect-early-break_33.c

raw
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 } */
5
6 #ifndef N
7 #define N 803
8 #endif
9 unsigned vect_a2[N];
10 unsigned vect_a1[N];
11 unsigned vect_b[N];
12
13 unsigned test4(unsigned x, int z)
14 {
15 unsigned ret = 0;
16 for (int i = 0; i < N; i++)
17 {
18 vect_b[i] = x + i;
19 if (vect_a1[i]*2 > x)
20 {
21 for (int y = 0; y < z; y++)
22 vect_a2 [y] *= vect_a1[i];
23 break;
24 }
25 }
26 return ret;
27 }
28
29 /* { dg-final { scan-tree-dump "vectorized 2 loops in function" "vect" } } */