repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Small ChangeLog tweak.
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.dg
/
predict-1.c
blob
65f6bad9d7c9595cdd90f7a83d0601d274a28a66
1
/* { dg-do compile } */
2
/* { dg-options "-O2 -fdump-tree-profile_estimate" } */
3
4
extern
int
global
;
5
6
int
bar
(
int
);
7
8
void
foo
(
int
bound
)
9
{
10
int
i
,
ret
=
0
;
11
for
(
i
=
0
;
i
<
bound
;
i
++)
12
{
13
if
(
i
>
bound
)
14
global
+=
bar
(
i
);
15
if
(
i
>=
bound
+
2
)
16
global
+=
bar
(
i
);
17
if
(
i
>
bound
-
2
)
18
global
+=
bar
(
i
);
19
if
(
i
+
2
>
bound
)
20
global
+=
bar
(
i
);
21
if
(
i
==
10
)
22
global
+=
bar
(
i
);
23
}
24
}
25
26
/* { dg-final { scan-tree-dump-times "guess loop iv compare heuristics of edge\[^:\]*: 2.0%" 4 "profile_estimate"} } */