aboutsummaryrefslogtreecommitdiff
path: root/gcc/fold-const.c
diff options
context:
space:
mode:
authorRoger Sayle <roger@eyesopen.com>2006-11-08 17:39:35 +0000
committerRoger Sayle <sayle@gcc.gnu.org>2006-11-08 17:39:35 +0000
commit5cdc4a2674ba9be28278e536a46c9f09c903cbee (patch)
treed5a3abe998fec0ea4665a0f7cb5687f9a693ae5f /gcc/fold-const.c
parentc794c06fef9e079ecdd14bae8ceb3d9046771979 (diff)
downloadgcc-5cdc4a2674ba9be28278e536a46c9f09c903cbee.zip
gcc-5cdc4a2674ba9be28278e536a46c9f09c903cbee.tar.gz
gcc-5cdc4a2674ba9be28278e536a46c9f09c903cbee.tar.bz2
tree-ssa-propagate.c (set_rhs): Restructure validity tests as a test for inclusion rather than as a test for...
* 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. From-SVN: r118593
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r--gcc/fold-const.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c
index d70e5b0..c74ffa3 100644
--- a/gcc/fold-const.c
+++ b/gcc/fold-const.c
@@ -6059,11 +6059,6 @@ fold_inf_compare (enum tree_code code, tree type, tree arg0, tree arg1)
return fold_build2 (neg ? GE_EXPR : LE_EXPR, type,
arg0, build_real (TREE_TYPE (arg0), max));
- /* The transformation below creates non-gimple code and thus is
- not appropriate if we are in gimple form. */
- if (in_gimple_form)
- return NULL_TREE;
-
temp = fold_build2 (neg ? LT_EXPR : GT_EXPR, type,
arg0, build_real (TREE_TYPE (arg0), max));
return fold_build1 (TRUTH_NOT_EXPR, type, temp);
@@ -11043,8 +11038,7 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1)
break;
}
- else if (!in_gimple_form
- && TREE_INT_CST_HIGH (arg1) == signed_max_hi
+ else if (TREE_INT_CST_HIGH (arg1) == signed_max_hi
&& TREE_INT_CST_LOW (arg1) == signed_max_lo
&& TYPE_UNSIGNED (TREE_TYPE (arg1))
/* signed_type does not work on pointer types. */