Require target lra in gcc.dg/pr108095.c
[official-gcc.git] / gcc / testsuite / gcc.dg / loop-versioning-9.c
blobcfbcd821b227625cca2f55b9e905348241dbc241
1 /* { dg-options "-O3 -fdump-tree-lversion-details" } */
3 /* Check that versioning can handle small groups of accesses. */
5 void
6 f1 (int *x, int *y, int step, int n)
8 for (int i = 0; i < n; ++i)
9 x[i] = y[i * step * 2] + y[i * step * 2 + 1];
12 void
13 f2 (int *x, int *y, __INTPTR_TYPE__ step, int n)
15 for (int i = 0; i < n; ++i)
16 x[i] = y[i * step * 2] + y[i * step * 2 + 1];
19 void
20 f3 (int *x, int *y, int step, int n)
22 for (int i = 0; i < n; ++i)
23 x[i] = y[i * step * 3] + y[i * step * 3 + 2];
26 void
27 f4 (int *x, int *y, __INTPTR_TYPE__ step, int n)
29 for (int i = 0; i < n; ++i)
30 x[i] = y[i * step * 3] + y[i * step * 3 + 2];
33 void
34 f5 (int *x, int *y, int step, int n)
36 for (int i = 0; i < n; ++i)
37 x[i] = y[i * step * 4] + y[i * step * 4 + 3];
40 void
41 f6 (int *x, int *y, __INTPTR_TYPE__ step, int n)
43 for (int i = 0; i < n; ++i)
44 x[i] = y[i * step * 4] + y[i * step * 4 + 3];
47 /* { dg-final { scan-tree-dump-times {want to version containing loop} 6 "lversion" } } */
48 /* { dg-final { scan-tree-dump-times {versioned this loop} 6 "lversion" } } */