| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-O3 -fdump-tree-ldist-details" } */ |
| 3 |
|
| 4 |
int x[1000]; |
| 5 |
|
| 6 |
void foo (int n) |
| 7 |
{ |
| 8 |
int i; |
| 9 |
|
| 10 |
for (i = 0; i < n; ++i) |
| 11 |
{ |
| 12 |
x[2*i] = 0; |
| 13 |
x[2*i + 1] = 1; |
| 14 |
} |
| 15 |
} |
| 16 |
|
| 17 |
/* We should not apply loop distribution as it is not beneficial from |
| 18 |
a data locality point of view. Also it is not possible to generate |
| 19 |
a memset (0) as the write has a stride of 2. */ |
| 20 |
|
| 21 |
/* { dg-final { scan-tree-dump-not "distributed: split to" "ldist" } } */ |
| 22 |
/* { dg-final { scan-tree-dump-not "__builtin_memset" "ldist" } } */ |