| 1 |
/* { dg-options "-O3 -fdump-tree-lversion-details" } */ |
| 2 |
|
| 3 |
/* There's no information about whether STEP1 or STEP2 is innermost, |
| 4 |
so we should assume the code is sensible and version for the inner |
| 5 |
evolution, i.e. when STEP2 is 1. */ |
| 6 |
|
| 7 |
void |
| 8 |
f1 (double *x, int step1, int step2, int n) |
| 9 |
{ |
| 10 |
for (int i = 0; i < n; ++i) |
| 11 |
for (int j = 0; j < n; ++j) |
| 12 |
x[i * step1 + j * step2] = 100; |
| 13 |
} |
| 14 |
|
| 15 |
/* { dg-final { scan-tree-dump-times {want to version containing loop for when step2} 1 "lversion" } } */ |
| 16 |
/* { dg-final { scan-tree-dump-times {want to version containing loop} 1 "lversion" } } */ |
| 17 |
/* { dg-final { scan-tree-dump-times {versioned this loop} 1 "lversion" } } */ |