2015-02-02 Richard Biener <rguenther@suse.de>
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 2 Feb 2015 15:01:28 +0000 (15:01 +0000)
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 2 Feb 2015 15:01:28 +0000 (15:01 +0000)
* tree-ssa-ccp.c (valueize_op_1): Always allow valueizing default-defs.
* tree-vrp.c (vrp_valueize_1): Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@220346 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/tree-ssa-ccp.c
gcc/tree-vrp.c

index 6453686..fc4ecb3 100644 (file)
@@ -1,3 +1,8 @@
+2015-02-02  Richard Biener  <rguenther@suse.de>
+
+       * tree-ssa-ccp.c (valueize_op_1): Always allow valueizing default-defs.
+       * tree-vrp.c (vrp_valueize_1): Likewise.
+
 2015-02-02  Alan Modra  <amodra@gmail.com>
 
        * config/rs6000/rs6000.c (rs6000_call_aix): Use unspec rather
index a576bd1..d45a3ff 100644 (file)
@@ -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)
index ef1c21d..dad1830 100644 (file)
@@ -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))