2011-12-01 Jakub Jelinek <jakub@redhat.com>
+ PR tree-optimization/51246
+ * tree-predcom.c (replace_ref_with): Handle also clobber on the
+ rhs.
+
PR rtl-optimization/51014
* loop-unroll.c (apply_opt_in_copies): Ignore label DEBUG_INSNs
both from bb and orig_bb.
2011-12-01 Jakub Jelinek <jakub@redhat.com>
+ PR tree-optimization/51246
+ * gcc.c-torture/compile/pr51246.c: New test.
+
PR rtl-optimization/51014
* g++.dg/opt/pr51014.C: New test.
val = gimple_assign_lhs (stmt);
if (TREE_CODE (val) != SSA_NAME)
{
- gcc_assert (gimple_assign_copy_p (stmt));
val = gimple_assign_rhs1 (stmt);
+ gcc_assert (gimple_assign_single_p (stmt));
+ if (TREE_CLOBBER_P (val))
+ {
+ val = gimple_default_def (cfun, SSA_NAME_VAR (new_tree));
+ if (val == NULL_TREE)
+ {
+ val = make_ssa_name (SSA_NAME_VAR (new_tree),
+ gimple_build_nop ());
+ set_default_def (SSA_NAME_VAR (new_tree), val);
+ }
+ }
+ else
+ gcc_assert (gimple_assign_copy_p (stmt));
}
}
else