From: Richard Biener Date: Mon, 2 Feb 2015 15:01:28 +0000 (+0000) Subject: tree-ssa-ccp.c (valueize_op_1): Always allow valueizing default-defs. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7dd1f7ace308f5452d97b09e4a42db84c4eb6999;p=gcc.git tree-ssa-ccp.c (valueize_op_1): Always allow valueizing default-defs. 2015-02-02 Richard Biener * tree-ssa-ccp.c (valueize_op_1): Always allow valueizing default-defs. * tree-vrp.c (vrp_valueize_1): Likewise. From-SVN: r220346 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6453686a233..fc4ecb38e2e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2015-02-02 Richard Biener + + * tree-ssa-ccp.c (valueize_op_1): Always allow valueizing default-defs. + * tree-vrp.c (vrp_valueize_1): Likewise. + 2015-02-02 Alan Modra * config/rs6000/rs6000.c (rs6000_call_aix): Use unspec rather diff --git a/gcc/tree-ssa-ccp.c b/gcc/tree-ssa-ccp.c index a576bd118b3..d45a3ff2a83 100644 --- a/gcc/tree-ssa-ccp.c +++ b/gcc/tree-ssa-ccp.c @@ -1145,7 +1145,8 @@ valueize_op_1 (tree op) this SSA edge as the SSA propagator does not necessarily re-visit the use. */ gimple def_stmt = SSA_NAME_DEF_STMT (op); - if (prop_simulate_again_p (def_stmt)) + if (!gimple_nop_p (def_stmt) + && prop_simulate_again_p (def_stmt)) return NULL_TREE; tree tem = get_constant_value (op); if (tem) diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c index ef1c21db973..dad1830e9a1 100644 --- a/gcc/tree-vrp.c +++ b/gcc/tree-vrp.c @@ -7096,7 +7096,8 @@ vrp_valueize_1 (tree name) this SSA edge as the SSA propagator does not necessarily re-visit the use. */ gimple def_stmt = SSA_NAME_DEF_STMT (name); - if (prop_simulate_again_p (def_stmt)) + if (!gimple_nop_p (def_stmt) + && prop_simulate_again_p (def_stmt)) return NULL_TREE; value_range_t *vr = get_value_range (name); if (range_int_cst_singleton_p (vr))