| 1 |
/* { dg-do run } */ |
| 2 |
/* { dg-options "-O3 -fdump-tree-ldist-details" } */ |
| 3 |
|
| 4 |
extern void abort (void); |
| 5 |
|
| 6 |
int a[128], b[128], c[128], d[128]; |
| 7 |
|
| 8 |
void __attribute__((noinline,noclone)) |
| 9 |
foo (void) |
| 10 |
{ |
| 11 |
int i; |
| 12 |
for (i = 0; i < 128; ++i) |
| 13 |
{ |
| 14 |
a[i] = a[i] + 1; |
| 15 |
b[i] = d[i]; |
| 16 |
c[i] = a[i] / d[i]; |
| 17 |
} |
| 18 |
} |
| 19 |
int main() |
| 20 |
{ |
| 21 |
int i; |
| 22 |
for (i = 0; i < 128; ++i) |
| 23 |
a[i] = i; |
| 24 |
for (i = 0; i < 128; ++i) |
| 25 |
d[i] = 1; |
| 26 |
foo (); |
| 27 |
if (c[0] != 1) |
| 28 |
abort (); |
| 29 |
return 0; |
| 30 |
} |
| 31 |
|
| 32 |
/* XFAILed due to the fix for PR79245. */ |
| 33 |
/* { dg-final { scan-tree-dump "split to 1 loops and 1 library call" "ldist" { xfail *-*-* } } } */ |
| 34 |
/* { dg-final { scan-tree-dump "generated memcpy" "ldist" { xfail *-*-* } } } */ |