| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-O2 -fdisable-tree-evrp -fdump-tree-profile_estimate -fno-finite-loops -fdisable-tree-ethread" } */ |
| 3 |
|
| 4 |
/* Note: Threader causes removal of for loop. */ |
| 5 |
|
| 6 |
extern int global; |
| 7 |
extern int global2; |
| 8 |
extern int global3; |
| 9 |
|
| 10 |
void foo (int base) |
| 11 |
{ |
| 12 |
int i; |
| 13 |
while (global < 10) |
| 14 |
{ |
| 15 |
if(global || global2 || global3) |
| 16 |
return; |
| 17 |
|
| 18 |
for (i = base; i < 10; i++) |
| 19 |
if (i > 123) |
| 20 |
return; |
| 21 |
} |
| 22 |
} |
| 23 |
|
| 24 |
/* { dg-final { scan-tree-dump-times "first match heuristics: 2.20%" 3 "profile_estimate"} } */ |
| 25 |
/* { dg-final { scan-tree-dump-times "first match heuristics: 5.50%" 1 "profile_estimate"} } */ |