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 /gcc/tree-ssa-loop-niter.c | |
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
Diffstat (limited to 'gcc/tree-ssa-loop-niter.c')
-rw-r--r-- | gcc/tree-ssa-loop-niter.c | 4 |
1 files changed, 4 insertions, 0 deletions
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); |