diff options
author | Richard Guenther <rguenther@suse.de> | 2011-06-16 08:41:50 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2011-06-16 08:41:50 +0000 |
commit | 12430896397b7477294814403674d75e668f9f22 (patch) | |
tree | b02d925dc44622ca4d0a8f09518f68c6859d3dce /gcc/fold-const.c | |
parent | e641e49532dd7a8ad66611de27c8f76abb17dfc3 (diff) | |
download | gcc-12430896397b7477294814403674d75e668f9f22.zip gcc-12430896397b7477294814403674d75e668f9f22.tar.gz gcc-12430896397b7477294814403674d75e668f9f22.tar.bz2 |
gimple.c (canonicalize_cond_expr_cond): (bool)x is not the same as x != 0.
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.
From-SVN: r175096
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r-- | gcc/fold-const.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c index e1a497e..c39d33e 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -12357,14 +12357,6 @@ fold_binary_loc (location_t loc, } } - /* If this is an NE comparison of zero with an AND of one, remove the - comparison since the AND will give the correct value. */ - if (code == NE_EXPR - && integer_zerop (arg1) - && TREE_CODE (arg0) == BIT_AND_EXPR - && integer_onep (TREE_OPERAND (arg0, 1))) - return fold_convert_loc (loc, type, arg0); - /* If we have (A & C) == C where C is a power of 2, convert this into (A & C) != 0. Similarly for NE_EXPR. */ if (TREE_CODE (arg0) == BIT_AND_EXPR |