Debian Codegraph @

gcc/testsuite/gcc.dg/vect/vect-early-break_38.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 /* { dg-additional-options "-march=gfx908" { target amdgcn*-*-* } } */
6
7 #ifndef N
8 #define N 803
9 #endif
10 unsigned vect_a[N];
11 unsigned vect_b[N];
12
13 unsigned test4(unsigned x)
14 {
15 unsigned ret = 0;
16 for (int i = 0; i < N; i+=2)
17 {
18 vect_b[i] = x + i;
19 if (vect_a[i]*2 > x)
20 break;
21 vect_a[i] = x;
22
23 }
24 return ret;
25 }
26
27 /* { dg-final { scan-tree-dump "vectorized 1 loops in function" "vect" { target vect_load_lanes } } } */
28 /* { dg-final { scan-tree-dump-not "vectorized 1 loops in function" "vect" { target { ! vect_load_lanes } } } } */