| 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-not "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 |
#pragma GCC novector |
| 21 |
while (i < N && parse_tables_n--) |
| 22 |
table[i++] = 0; |
| 23 |
|
| 24 |
return table[NEEDLE]; |
| 25 |
} |
| 26 |
|
| 27 |
int main () |
| 28 |
{ |
| 29 |
check_vect (); |
| 30 |
|
| 31 |
#pragma GCC novector |
| 32 |
for (int j = 0; j < N; j++) |
| 33 |
table[j] = -1; |
| 34 |
|
| 35 |
if (foo (0, 0xFFFF) != 0) |
| 36 |
__builtin_abort (); |
| 37 |
|
| 38 |
return 0; |
| 39 |
} |