diff options
author | Richard Guenther <rguenther@suse.de> | 2010-06-09 12:48:34 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2010-06-09 12:48:34 +0000 |
commit | 76c857431e7e5887fa28ba9a50f098a9fbe2a3e9 (patch) | |
tree | f58b12d17bea68e37c033b2a78f7510cc54c9640 | |
parent | 37b28a3582e13c922213356281fcfe6f93e44d14 (diff) | |
download | gcc-76c857431e7e5887fa28ba9a50f098a9fbe2a3e9.zip gcc-76c857431e7e5887fa28ba9a50f098a9fbe2a3e9.tar.gz gcc-76c857431e7e5887fa28ba9a50f098a9fbe2a3e9.tar.bz2 |
tree-ssa-loop-niter.c (simplify_replace_tree): Do not replace constants.
2010-06-09 Richard Guenther <rguenther@suse.de>
* tree-ssa-loop-niter.c (simplify_replace_tree): Do not
replace constants.
From-SVN: r160467
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/tree-ssa-loop-niter.c | 4 |
2 files changed, 9 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index cb5ec8c..d2fa198 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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. diff --git a/gcc/tree-ssa-loop-niter.c b/gcc/tree-ssa-loop-niter.c index accf17a..170fb22 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); |