comparison gcc/testsuite/gcc.dg/predict-2.c @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children
comparison
equal deleted inserted replaced
68:561a7518be6b 111:04ced10e8804
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 {
13 if (i > bound * bound)
14 global += bar (i);
15 if (i > bound + 10)
16 global += bar (i);
17 if (i <= bound + 10)
18 global += bar (i);
19 if (i > base + 10)
20 global += bar (i);
21 if (i < base - 10)
22 global += bar (i);
23 }
24 }
25
26 /* { dg-final { scan-tree-dump-not "guess loop iv compare heuristics of edge\[^:\]*:" "profile_estimate"} } */