Debian Codegraph @

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

raw
1 /* { dg-do compile } */
2 /* { dg-add-options vect_early_break } */
3 /* { dg-require-effective-target vect_early_break } */
4 /* { dg-require-effective-target vect_int } */
5
6 /* { dg-final { scan-tree-dump "vectorizing stmts using SLP" "vect" { target { vect_partial_vectors && vect_load_lanes } } } } */
7 /* { dg-final { scan-tree-dump-not "vectorizing stmts using SLP" "vect" { target { { ! vect_partial_vectors } || { ! vect_load_lanes } } } } } */
8 /* { dg-final { scan-tree-dump "Loop contains only SLP stmts" "vect" } } */
9
10 #ifndef N
11 #define N 800
12 #endif
13 unsigned vect_a[N];
14 unsigned vect_b[N];
15
16 unsigned test4(unsigned x)
17 {
18 unsigned ret = 0;
19 for (int i = 0; i < N; i+=2)
20 {
21 vect_b[i] = x + i;
22 vect_b[i+1] = x + i+1;
23 if (vect_a[i]*2 != x)
24 break;
25 if (vect_a[i+1]*2 != x)
26 break;
27 vect_a[i] = x;
28 vect_a[i+1] = x;
29
30 }
31 return ret;
32 }