------- Comment #20 from rguenth at gcc dot gnu dot org 2009-07-15 12:42 ------- One thing that is odd is that the maximal set misses a_1 and b_2 (but it does have the default defs). Adding PHI arguments to the maximal set fixes this PR...
Index: tree-ssa-pre.c =================================================================== --- tree-ssa-pre.c (revision 149663) +++ tree-ssa-pre.c (working copy) @@ -3662,6 +3662,16 @@ make_values_for_phi (gimple phi, basic_b add_to_value (get_expr_value_id (e), e); bitmap_insert_into_set (PHI_GEN (block), e); bitmap_value_insert_into_set (AVAIL_OUT (block), e); + if (!in_fre) + { + unsigned i; + for (i = 0; i < gimple_phi_num_args (phi); ++i) + { + e = get_or_alloc_expr_for (gimple_phi_arg_def (phi, i)); + add_to_value (get_expr_value_id (e), e); + bitmap_value_insert_into_set (maximal_set, e); + } + } } } I'll give this a complete round of bootstrapping / testing. Danny - does this look like an obvious mistake or are they not supposed to be in the maximal set? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40321