| 1 |
// { dg-do compile } |
| 2 |
// { dg-options "-O2 -fgimple -fdump-statistics" } |
| 3 |
|
| 4 |
// This is a collection of threadable paths. To simplify maintenance, |
| 5 |
// there should only be one threadable path per function. |
| 6 |
|
| 7 |
int global; |
| 8 |
|
| 9 |
// The thread from 3->4->5 crosses loops but is allowed because it |
| 10 |
// never crosses the latch (BB3) and is just an early exit out of the |
| 11 |
// loop. |
| 12 |
int __GIMPLE (ssa) |
| 13 |
foo1 (int x) |
| 14 |
{ |
| 15 |
int D_1420; |
| 16 |
int a; |
| 17 |
|
| 18 |
__BB(2): |
| 19 |
a_4 = ~x_3(D); |
| 20 |
goto __BB4; |
| 21 |
|
| 22 |
// Latch. |
| 23 |
__BB(3): |
| 24 |
global = a_1; |
| 25 |
goto __BB4; |
| 26 |
|
| 27 |
__BB(4,loop_header(1)): |
| 28 |
a_1 = __PHI (__BB2: a_4, __BB3: 0); |
| 29 |
if (a_1 != 0) |
| 30 |
goto __BB3; |
| 31 |
else |
| 32 |
goto __BB5; |
| 33 |
|
| 34 |
__BB(5): |
| 35 |
return; |
| 36 |
|
| 37 |
} |
| 38 |
|
| 39 |
// { dg-final { scan-tree-dump "Jumps threaded\" \"foo1\" 1" "statistics" } } |