| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-require-effective-target vect_int } */ |
| 3 |
/* { dg-add-options bind_pic_locally } */ |
| 4 |
|
| 5 |
int a[2048]; |
| 6 |
|
| 7 |
void |
| 8 |
f1 (int x, int y) |
| 9 |
{ |
| 10 |
int i; |
| 11 |
x &= -256; |
| 12 |
y &= -256; |
| 13 |
for (i = x + 256; i < y; i++) |
| 14 |
a[i]++; |
| 15 |
} |
| 16 |
|
| 17 |
void |
| 18 |
f2 (int x, int y) |
| 19 |
{ |
| 20 |
int i; |
| 21 |
if (x & 31) |
| 22 |
__builtin_unreachable (); |
| 23 |
if (y & 31) |
| 24 |
__builtin_unreachable (); |
| 25 |
for (i = x + 256; i < x + y; i++) |
| 26 |
a[i]++; |
| 27 |
} |
| 28 |
|
| 29 |
void |
| 30 |
f3 (int x, int y) |
| 31 |
{ |
| 32 |
int i; |
| 33 |
if (x % 256) |
| 34 |
__builtin_unreachable (); |
| 35 |
if (y % 256) |
| 36 |
__builtin_unreachable (); |
| 37 |
for (i = x + 256; i < x + y; i++) |
| 38 |
a[i]++; |
| 39 |
} |
| 40 |
|
| 41 |
void |
| 42 |
f4 (int x, int y) |
| 43 |
{ |
| 44 |
int i; |
| 45 |
if ((x % 256) != 0) |
| 46 |
__builtin_unreachable (); |
| 47 |
if ((y % 256) != 0) |
| 48 |
__builtin_unreachable (); |
| 49 |
for (i = x + 256; i < x + y; i++) |
| 50 |
a[i]++; |
| 51 |
} |
| 52 |
|
| 53 |
/* { dg-final { scan-tree-dump-not "vect_do_peeling_for_loop_bound" "vect" } } */ |
| 54 |
/* { dg-final { scan-tree-dump-not "loop peeled for vectorization" "vect" } } */ |