diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 24430b652e5c7b3e2533c015f35ba44dc19889bb..5102f813873aa230cb9058551d1999625e75fe13 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2007-07-25 Zdenek Dvorak <dvorakz@suse.cz> + + * cfghooks.c (split_block): Fix the information about loop latch. + 2007-07-25 Zdenek Dvorak <dvorakz@suse.cz> * cfgloopmanip.c (fix_loop_structure): Call force_single_succ_latches. diff --git a/gcc/cfghooks.c b/gcc/cfghooks.c index d436f011fac35409b214e4e2661d1856ff61c40a..948300c028e1ce366744cac3d72d6323e9588085 100644 --- a/gcc/cfghooks.c +++ b/gcc/cfghooks.c @@ -432,7 +432,11 @@ split_block (basic_block bb, void *i) } if (current_loops != NULL) - add_bb_to_loop (new_bb, bb->loop_father); + { + add_bb_to_loop (new_bb, bb->loop_father); + if (bb->loop_father->latch == bb) + bb->loop_father->latch = new_bb; + } return make_single_succ_edge (bb, new_bb, EDGE_FALLTHRU); }