Debian Codegraph @

gcc/testsuite/gcc.dg/vect/vect-early-break_11.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 /* { dg-additional-options "-Ofast" } */
7
8 /* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
9
10 #ifndef N
11 #define N 803
12 #endif
13 unsigned vect_a[N];
14 unsigned vect_b[N];
15
16 unsigned test4(unsigned x, int y)
17 {
18 unsigned ret = 0;
19 for (int o = 0; o < y; o++)
20 {
21 ret += o;
22 for (int i = 0; i < N; i++)
23 {
24 vect_b[i] = x + i;
25 if (vect_a[i] > x)
26 break;
27 vect_a[i] = x;
28
29 }
30 }
31 return ret;
32 }