Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/gcc.dg/predict-6.c @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | 84e7813d76e9 |
children |
rev | line source |
---|---|
111 | 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 base, int bound) | |
9 { | |
10 int i, ret = 0; | |
11 for (i = base; i <= bound; i++) | |
12 { | |
131 | 13 if (i <= base) |
111 | 14 global += bar (i); |
131 | 15 if (i < base + 2) |
111 | 16 global += bar (i); |
17 if (i <= base + 3) | |
18 global += bar (i); | |
19 if (i - 1 < base) | |
20 global += bar (i); | |
21 } | |
22 } | |
23 | |
131 | 24 /* { dg-final { scan-tree-dump-times "guess loop iv compare heuristics of edge\[^:\]*: 36.00%" 4 "profile_estimate"} } */ |