aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimple.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2011-06-16 08:41:50 +0000
committerRichard Guenther <rguenther@suse.de>2011-06-16 08:41:50 +0000
commit4a997928ad0ce5e3fa2505917850581d7cc4534a (patch)
treeb02d925dc44622ca4d0a8f09518f68c6859d3dce /gcc/gimple.c
parentdf349f7bbb6c93a44632a884d234ecff4fcf0942 (diff)
2011-06-16 Richard Guenther <rguenther@suse.de>
* gimple.c (canonicalize_cond_expr_cond): (bool)x is not the same as x != 0. * fold-const.c (fold_binary_loc): Do not fold X & 1 != 0 to (bool) X & 1. * ipa-prop.c (ipa_analyze_indirect_call_uses): Also allow equality compares against zero for the lower bit. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@175096 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gimple.c')
-rw-r--r--gcc/gimple.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/gcc/gimple.c b/gcc/gimple.c
index 6a9b58d6023..fd9757908f0 100644
--- a/gcc/gimple.c
+++ b/gcc/gimple.c
@@ -3139,16 +3139,8 @@ canonicalize_cond_expr_cond (tree t)
&& truth_value_p (TREE_CODE (TREE_OPERAND (t, 0))))
t = TREE_OPERAND (t, 0);
- /* For (bool)x use x != 0. */
- if (CONVERT_EXPR_P (t)
- && TREE_CODE (TREE_TYPE (t)) == BOOLEAN_TYPE)
- {
- tree top0 = TREE_OPERAND (t, 0);
- t = build2 (NE_EXPR, TREE_TYPE (t),
- top0, build_int_cst (TREE_TYPE (top0), 0));
- }
/* For !x use x == 0. */
- else if (TREE_CODE (t) == TRUTH_NOT_EXPR)
+ if (TREE_CODE (t) == TRUTH_NOT_EXPR)
{
tree top0 = TREE_OPERAND (t, 0);
t = build2 (EQ_EXPR, TREE_TYPE (t),