]>
git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gcc.dg/loop-versioning-2.c
1 /* { dg-options "-O3 -fdump-tree-lversion-details" } */
2 /* { dg-require-effective-target size20plus } */
4 /* Versioning for step == 1 in these loops would allow loop interchange,
5 but otherwise isn't worthwhile. At the moment we decide not to version. */
8 f1 (double x
[][100], int step
, int n
)
10 for (int i
= 0; i
< n
; ++i
)
11 for (int j
= 0; j
< n
; ++j
)
16 f2 (double x
[][100], int step
, int n
)
18 for (int i
= 0; i
< n
; ++i
)
19 for (int j
= 0; j
< n
; ++j
)
24 f3 (double x
[][100], int step
, int limit
)
26 for (int i
= 0; i
< 100; ++i
)
27 for (int j
= 0; j
< limit
; j
+= step
)
32 f4 (double x
[][100], int step
, int limit
)
34 for (int i
= 0; i
< limit
; i
+= step
)
35 for (int j
= 0; j
< 100; ++j
)
44 for (int i
= 0; i
< n
; ++i
)
45 for (int j
= 0; j
< n
; ++j
)
52 for (int i
= 0; i
< n
; ++i
)
53 for (int j
= 0; j
< n
; ++j
)
58 g3 (int step
, int limit
)
60 for (int i
= 0; i
< 100; ++i
)
61 for (int j
= 0; j
< limit
; j
+= step
)
66 g4 (int step
, int limit
)
68 for (int i
= 0; i
< limit
; i
+= step
)
69 for (int j
= 0; j
< 100; ++j
)
73 /* { dg-final { scan-tree-dump-not {want to version} "lversion" } } */
74 /* { dg-final { scan-tree-dump-not {versioned} "lversion" } } */