diff --git a/gcc/tree-ssa-forwprop.cc b/gcc/tree-ssa-forwprop.cc index abf71f0d3a0..44a6b5d39aa 100644 --- a/gcc/tree-ssa-forwprop.cc +++ b/gcc/tree-ssa-forwprop.cc @@ -207,6 +207,10 @@ fwprop_set_lattice_val (tree name, tree val) lattice.quick_grow_cleared (num_ssa_names); } lattice[SSA_NAME_VERSION (name)] = val; + /* As this now constitutes a copy duplicate points-to + and range info appropriately. */ + if (TREE_CODE (val) == SSA_NAME) + maybe_duplicate_ssa_info_at_copy (name, val); } } diff --git a/gcc/tree-ssa-propagate.cc b/gcc/tree-ssa-propagate.cc index a34c7618b55..d96d0a9fe19 100644 --- a/gcc/tree-ssa-propagate.cc +++ b/gcc/tree-ssa-propagate.cc @@ -789,6 +789,10 @@ substitute_and_fold_dom_walker::before_dom_children (basic_block bb) fprintf (dump_file, "\n"); } bitmap_set_bit (dceworklist, SSA_NAME_VERSION (res)); + /* As this now constitutes a copy duplicate points-to + and range info appropriately. */ + if (TREE_CODE (sprime) == SSA_NAME) + maybe_duplicate_ssa_info_at_copy (res, sprime); continue; } } @@ -831,6 +835,10 @@ substitute_and_fold_dom_walker::before_dom_children (basic_block bb) fprintf (dump_file, "\n"); } bitmap_set_bit (dceworklist, SSA_NAME_VERSION (lhs)); + /* As this now constitutes a copy duplicate points-to + and range info appropriately. */ + if (TREE_CODE (sprime) == SSA_NAME) + maybe_duplicate_ssa_info_at_copy (lhs, sprime); continue; } }