diff options
Diffstat (limited to 'gcc/cfgexpand.c')
-rw-r--r-- | gcc/cfgexpand.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c index e38c8e4..9965310 100644 --- a/gcc/cfgexpand.c +++ b/gcc/cfgexpand.c @@ -2503,7 +2503,10 @@ expand_gimple_cond (basic_block bb, gcond *stmt) false_edge->flags |= EDGE_FALLTHRU; new_bb->count = false_edge->count; new_bb->frequency = EDGE_FREQUENCY (false_edge); - add_bb_to_loop (new_bb, bb->loop_father); + add_bb_to_loop (new_bb, dest->loop_father); + if (bb->loop_father->latch == bb + && bb->loop_father->header == dest) + bb->loop_father->latch = new_bb; new_edge = make_edge (new_bb, dest, 0); new_edge->probability = REG_BR_PROB_BASE; new_edge->count = new_bb->count; |