From: rguenth Date: Wed, 9 Jun 2010 12:48:34 +0000 (+0000) Subject: 2010-06-09 Richard Guenther X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4b9edb63d74b46c67657accfdb1a16318ae6afba;p=thirdparty%2Fgcc.git 2010-06-09 Richard Guenther * 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index cb5ec8ca0fda..d2fa1988a177 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2010-06-09 Richard Guenther + + * tree-ssa-loop-niter.c (simplify_replace_tree): Do not + replace constants. + 2010-06-09 Kai Tietz * c-objc-common.c (c_tree_printer): Pre-intialize t by NULL_TREE. diff --git a/gcc/tree-ssa-loop-niter.c b/gcc/tree-ssa-loop-niter.c index accf17a4c237..170fb22ca4c6 100644 --- a/gcc/tree-ssa-loop-niter.c +++ b/gcc/tree-ssa-loop-niter.c @@ -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);