| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-O2 -fdump-tree-thread2-stats -fdump-tree-optimized -fno-ssa-phiopt" } */ |
| 3 |
|
| 4 |
long a; |
| 5 |
int b; |
| 6 |
void bar64_(void); |
| 7 |
void foo(); |
| 8 |
int main() { |
| 9 |
char c = 0; |
| 10 |
unsigned d = 10; |
| 11 |
int e = 2; |
| 12 |
for (; d; d--) { |
| 13 |
bar64_(); |
| 14 |
b = d; |
| 15 |
e && (c = (e = 0) != 4) > 1; |
| 16 |
} |
| 17 |
if (c < 1) |
| 18 |
foo(); |
| 19 |
a = b; |
| 20 |
} |
| 21 |
|
| 22 |
/* Disable phiopt as the threading opportunity goes away. */ |
| 23 |
/* We need to perform a non-multi-way branch FSM thread creating an |
| 24 |
irreducible loop in thread2 to allow followup threading to |
| 25 |
remove the call to foo (). */ |
| 26 |
/* { dg-final { scan-tree-dump "Jumps threaded: 1" "thread2" } } */ |
| 27 |
/* { dg-final { scan-tree-dump-not "foo" "optimized" } } */ |