summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/predict-loop-exit-1.C
blob: 88262eb9d00c10f1a812a34c866ce2042560bd28 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-profile_estimate" } */

int g;
int foo();
void test() {
  while (foo() && g < 10)
    g++;
  return;
}

/* { dg-final { scan-tree-dump-times "extra loop exit heuristics of edge\[^:\]*:" 2 "profile_estimate"} } */
/* { dg-final { scan-tree-dump-times "loop exit heuristics of edge\[^:\]*:" 3 "profile_estimate"} } */