| 1 |
/* { dg-do compile { target {{ i?86-*-* x86_64-*-* } && lp64 } } } */ |
| 2 |
/* { dg-options "-O2 -m64 -fdump-tree-ivopts-details" } */ |
| 3 |
|
| 4 |
#ifndef TYPE |
| 5 |
#define TYPE char* |
| 6 |
#endif |
| 7 |
|
| 8 |
extern char a[]; |
| 9 |
|
| 10 |
/* Can not infer loop iteration from array -- exit test can not be |
| 11 |
replaced by the array address. */ |
| 12 |
void foo (unsigned int i_width, TYPE dst) |
| 13 |
{ |
| 14 |
unsigned long long i = 0; |
| 15 |
unsigned long long j = 0; |
| 16 |
for ( ; j < i_width; ) |
| 17 |
{ |
| 18 |
*dst = a[i]; |
| 19 |
dst++; |
| 20 |
i += 2; |
| 21 |
j += 1; |
| 22 |
} |
| 23 |
} |
| 24 |
|
| 25 |
/* { dg-final { scan-tree-dump-times "\[^:\]*if \\(.*j_\[0-9\]+.*\\)" 1 "ivopts"} } */ |