OSDN Git Service

2010-06-09 Richard Guenther <rguenther@suse.de>
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 9 Jun 2010 12:48:34 +0000 (12:48 +0000)
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 9 Jun 2010 12:48:34 +0000 (12:48 +0000)
* tree-ssa-loop-niter.c (simplify_replace_tree): Do not
replace constants.

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

gcc/ChangeLog
gcc/tree-ssa-loop-niter.c

index cb5ec8c..d2fa198 100644 (file)
@@ -1,3 +1,8 @@
+2010-06-09  Richard Guenther  <rguenther@suse.de>
+
+       * tree-ssa-loop-niter.c (simplify_replace_tree): Do not
+       replace constants.
+
 2010-06-09  Kai Tietz  <kai.tietz@onevision.com>
 
        * c-objc-common.c (c_tree_printer): Pre-intialize t by NULL_TREE.
index accf17a..170fb22 100644 (file)
@@ -1374,6 +1374,10 @@ simplify_replace_tree (tree expr, tree old, tree new_tree)
   if (!expr)
     return NULL_TREE;
 
+  /* Do not bother to replace constants.  */
+  if (CONSTANT_CLASS_P (old))
+    return expr;
+
   if (expr == old
       || operand_equal_p (expr, old, 0))
     return unshare_expr (new_tree);