Require target lra in gcc.dg/pr108095.c
[official-gcc.git] / gcc / testsuite / gcc.dg / loop-versioning-3.c
blob6565122cb1e98d1d6b97ee33f8084537dc2a6fe0
1 /* { dg-options "-O3 -fdump-tree-lversion-details" } */
3 /* Versioning these loops for when both steps are 1 allows loop
4 interchange, but otherwise isn't worthwhile. At the moment we decide
5 not to version. */
7 void
8 f1 (double x[][100], int step1, int step2, int n)
10 for (int i = 0; i < n; ++i)
11 for (int j = 0; j < n; ++j)
12 x[j * step1][i * step2] = 100;
15 void
16 f2 (double x[][100], int step1, int step2, int limit)
18 for (int i = 0; i < limit; i += step1)
19 for (int j = 0; j < limit; j += step2)
20 x[j][i] = 100;
23 /* { dg-final { scan-tree-dump-not {want to version} "lversion" } } */
24 /* { dg-final { scan-tree-dump-not {versioned} "lversion" } } */