------- Comment #28 from rguenth at gcc dot gnu dot org 2010-01-17 12:56 ------- sth like
@@ -3893,7 +3893,29 @@ insert_aux (basic_block block, bool do_p /* Insert expressions for hoisting. */ if (do_hoist && EDGE_COUNT (block->succs) >= 2) - new_stuff |= do_hoist_insertion (block); + { + edge e; + edge_iterator ei; + + new_stuff |= do_hoist_insertion (block); + + /* Immediately update AVAIL_OUT of immediately dominated blocks + with the hoisted expressions. */ + newset = NEW_SETS (block); + if (newset) + FOR_EACH_EDGE (e, ei, block->succs) + { + if (EDGE_COUNT (e->dest->preds) != 1) + continue; + + FOR_EACH_EXPR_ID_IN_SET (newset, i, bi) + { + pre_expr expr = expression_for_id (i); + bitmap_value_replace_in_set (NEW_SETS (e->dest), expr); + bitmap_value_replace_in_set (AVAIL_OUT (e->dest), expr); + } + } + } } } for (son = first_dom_son (CDI_DOMINATORS, block); on top of the last patch -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23286