Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/gcc.dg/loop-versioning-9.c @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
131:84e7813d76e9 | 145:1830386684a0 |
---|---|
1 /* { dg-options "-O3 -fdump-tree-lversion-details" } */ | |
2 | |
3 /* Check that versioning can handle small groups of accesses. */ | |
4 | |
5 void | |
6 f1 (int *x, int *y, int step, int n) | |
7 { | |
8 for (int i = 0; i < n; ++i) | |
9 x[i] = y[i * step * 2] + y[i * step * 2 + 1]; | |
10 } | |
11 | |
12 void | |
13 f2 (int *x, int *y, __INTPTR_TYPE__ step, int n) | |
14 { | |
15 for (int i = 0; i < n; ++i) | |
16 x[i] = y[i * step * 2] + y[i * step * 2 + 1]; | |
17 } | |
18 | |
19 void | |
20 f3 (int *x, int *y, int step, int n) | |
21 { | |
22 for (int i = 0; i < n; ++i) | |
23 x[i] = y[i * step * 3] + y[i * step * 3 + 2]; | |
24 } | |
25 | |
26 void | |
27 f4 (int *x, int *y, __INTPTR_TYPE__ step, int n) | |
28 { | |
29 for (int i = 0; i < n; ++i) | |
30 x[i] = y[i * step * 3] + y[i * step * 3 + 2]; | |
31 } | |
32 | |
33 void | |
34 f5 (int *x, int *y, int step, int n) | |
35 { | |
36 for (int i = 0; i < n; ++i) | |
37 x[i] = y[i * step * 4] + y[i * step * 4 + 3]; | |
38 } | |
39 | |
40 void | |
41 f6 (int *x, int *y, __INTPTR_TYPE__ step, int n) | |
42 { | |
43 for (int i = 0; i < n; ++i) | |
44 x[i] = y[i * step * 4] + y[i * step * 4 + 3]; | |
45 } | |
46 | |
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" } } */ |