Commit 615bc06a by Kazu Hirata Committed by Kazu Hirata

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
parent f84d510d
2005-05-29 Kazu Hirata <kazu@cs.umass.edu>
* tree-ssa-ccp.c (ccp_fold): Return immediately after calling
fold_unary and fold_binary.
2005-05-29 Roger Sayle <roger@eyesopen.com>
* reg-stack.c (propagate_stack): Always copy the source stack to
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment