From 7dd1f7ace308f5452d97b09e4a42db84c4eb6999 Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Mon, 2 Feb 2015 15:01:28 +0000 Subject: [PATCH] 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 --- gcc/ChangeLog | 5 +++++ gcc/tree-ssa-ccp.c | 3 ++- gcc/tree-vrp.c | 3 ++- 3 files changed, 9 insertions(+), 2 deletions(-) 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)) -- 2.30.2