From 615bc06a1ed8dae28697250c75183824423659cb Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Sun, 29 May 2005 18:28:44 +0000 Subject: 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 --- gcc/tree-ssa-ccp.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'gcc/tree-ssa-ccp.c') diff --git a/gcc/tree-ssa-ccp.c b/gcc/tree-ssa-ccp.c index 01b608b..f3db346 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 -- cgit v1.1