Debian Codegraph @

gcc/testsuite/gcc.dg/vect/vect-early-break_140-pr122868_4.c

raw
1 /* { dg-add-options vect_early_break } */
2 /* { dg-require-effective-target vect_early_break_hw } */
3 /* { dg-require-effective-target vect_int } */
4
5 /* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
6
7 #include "tree-vect.h"
8
9 __attribute__ ((noipa))
10 int f (int a[12], int b[12], int n)
11 {
12 for (int i = 0; i < n; i++)
13 {
14 if (a[0] > b[i])
15 return 0;
16 if (b[i] == 0)
17 return 0;
18 }
19 return 2;
20 }
21
22 int main ()
23 {
24 check_vect ();
25
26 int a[12] = {1};
27 int b[12] = {0};
28 return f (a, b, 10);
29 }
30
31 /* { dg-final { scan-tree-dump-times "not hoisting invariant load due to early break" 0 "vect" } } */