diff options
author | sayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-11-08 17:39:35 +0000 |
---|---|---|
committer | sayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-11-08 17:39:35 +0000 |
commit | f2532264859701aa0768c8b00e61456ac9ab22a3 (patch) | |
tree | d5a3abe998fec0ea4665a0f7cb5687f9a693ae5f /gcc/tree-ssa-ccp.c | |
parent | 41c555b54c5dc5fc2e27fd5c1cbb5c9b241e6dcf (diff) | |
download | gcc-f2532264859701aa0768c8b00e61456ac9ab22a3.tar.gz |
* tree-ssa-propagate.c (set_rhs): Restructure validity tests as a
test for inclusion rather than as a test for exclusion.
* tree-ssa-ccp.c (fold_stmt_r) <COND_EXPR>: Use set_rhs to modify
the condition after calling fold_binary.
* fold-const.c (fold_inf_compare): Remove in_gimple_form check.
(fold_binary) <LT_EXPR, GT_EXPR, LE_EXPR, GE_EXPR>: Likewise.
* builtins.c (fold_builtin_isascii): Likewise.
(fold_builtin_isdigit): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@118593 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-ccp.c')
-rw-r--r-- | gcc/tree-ssa-ccp.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/gcc/tree-ssa-ccp.c b/gcc/tree-ssa-ccp.c index 3be926d9cce..0ecd221b30d 100644 --- a/gcc/tree-ssa-ccp.c +++ b/gcc/tree-ssa-ccp.c @@ -2048,12 +2048,15 @@ fold_stmt_r (tree *expr_p, int *walk_subtrees, void *data) { tree op0 = TREE_OPERAND (expr, 0); tree tem = fold_binary (TREE_CODE (op0), TREE_TYPE (op0), - TREE_OPERAND (op0, 0), TREE_OPERAND (op0, 1)); - if (tem && is_gimple_condexpr (tem)) - TREE_OPERAND (expr, 0) = tem; - t = expr; - break; + TREE_OPERAND (op0, 0), + TREE_OPERAND (op0, 1)); + if (tem && set_rhs (expr_p, tem)) + { + t = *expr_p; + break; + } } + return NULL_TREE; default: return NULL_TREE; |