Debian Codegraph @

gcc/testsuite/gcc.dg/vect/vect-early-break_117-pr113734.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 /* { dg-additional-options "-O3" } */
5
6 /* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
7
8 #include "tree-vect.h"
9
10 #define N 306
11 #define NEEDLE 136
12
13 int table[N];
14
15 __attribute__ ((noipa))
16 int foo (int i, unsigned short parse_tables_n)
17 {
18 parse_tables_n >>= 9;
19 parse_tables_n += 11;
20 while (i < N && parse_tables_n--)
21 table[i++] = 0;
22
23 return table[NEEDLE];
24 }
25
26 int main ()
27 {
28 check_vect ();
29
30 for (int j = 0; j < N; j++)
31 table[j] = -1;
32
33 if (foo (0, 0xFFFF) != 0)
34 __builtin_abort ();
35
36 return 0;
37 }