diff options
author | Kazu Hirata <kazu@cs.umass.edu> | 2005-05-29 18:28:44 +0000 |
---|---|---|
committer | Kazu Hirata <kazu@gcc.gnu.org> | 2005-05-29 18:28:44 +0000 |
commit | 615bc06a1ed8dae28697250c75183824423659cb (patch) | |
tree | 5ba8ee17cf19ab92be34d48f223a755255a48115 /gcc/tree-ssa-ccp.c | |
parent | f84d510d21d5c36219041be19f651dad4087939c (diff) | |
download | gcc-615bc06a1ed8dae28697250c75183824423659cb.tar.gz |
tree-ssa-ccp.c (ccp_fold): Return immediately after calling fold_unary and fold_binary.
* tree-ssa-ccp.c (ccp_fold): Return immediately after calling
fold_unary and fold_binary.
From-SVN: r100326
Diffstat (limited to 'gcc/tree-ssa-ccp.c')
-rw-r--r-- | gcc/tree-ssa-ccp.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/gcc/tree-ssa-ccp.c b/gcc/tree-ssa-ccp.c index 01b608bd50d..f3db346bf6b 100644 --- a/gcc/tree-ssa-ccp.c +++ b/gcc/tree-ssa-ccp.c @@ -849,12 +849,7 @@ ccp_fold (tree stmt) op0 = get_value (op0, true)->value; } - retval = fold_unary (code, TREE_TYPE (rhs), op0); - - /* If we folded, but did not create an invariant, then we can not - use this expression. */ - if (retval && ! is_gimple_min_invariant (retval)) - return NULL; + return fold_unary (code, TREE_TYPE (rhs), op0); } /* Binary and comparison operators. We know one or both of the @@ -885,12 +880,7 @@ ccp_fold (tree stmt) op1 = val->value; } - retval = fold_binary (code, TREE_TYPE (rhs), op0, op1); - - /* If we folded, but did not create an invariant, then we can not - use this expression. */ - if (retval && ! is_gimple_min_invariant (retval)) - return NULL; + return fold_binary (code, TREE_TYPE (rhs), op0, op1); } /* We may be able to fold away calls to builtin functions if their |