Debian Codegraph @

gcc/testsuite/gcc.dg/vect/vect-early-break_133_pfa9.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 /* Group size is uneven and second group is misaligned. Needs partial vectors. */
9 /* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" { target { vect_partial_vectors && vect_load_lanes } } } } */
10 /* { dg-final { scan-tree-dump-not "LOOP VECTORIZED" "vect" { target { { ! vect_partial_vectors } || { ! vect_load_lanes } } } } } */
11 /* { dg-final { scan-tree-dump-not "Alignment of access forced using peeling" "vect" } } */
12
13
14 char vect_a[1025];
15 char vect_b[1025];
16
17 unsigned test4(char x, int n)
18 {
19 unsigned ret = 0;
20 for (int i = 1; i < (n - 2); i+=2)
21 {
22 if (vect_a[i-1] > x || vect_a[i+2] > x)
23 return 1;
24
25 vect_b[i] = x;
26 vect_b[i+1] = x+1;
27 }
28 return ret;
29 }