aboutsummaryrefslogtreecommitdiff
path: root/gcc/fold-const.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2014-10-30 13:13:35 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2014-10-30 13:13:35 +0000
commit36a60e48f4eac678cdcf0c59c0f01b9f58c7d900 (patch)
tree503ff6868c680195720861d2ad6beb4789e69889 /gcc/fold-const.c
parent6327f612fd6631094742bdb4e4999a48bd376382 (diff)
downloadgcc-36a60e48f4eac678cdcf0c59c0f01b9f58c7d900.zip
gcc-36a60e48f4eac678cdcf0c59c0f01b9f58c7d900.tar.gz
gcc-36a60e48f4eac678cdcf0c59c0f01b9f58c7d900.tar.bz2
match.pd: Implement more patterns that simplify to a single value.
2014-10-30 Richard Biener <rguenther@suse.de> * match.pd: Implement more patterns that simplify to a single value. * fold-const.c (fold_binary_loc): Remove them here. * tree-ssa-forwprop.c (simplify_bitwise_binary): Likewise. (fwprop_ssa_val): Remove restriction on single uses. From-SVN: r216933
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r--gcc/fold-const.c11
1 files changed, 0 insertions, 11 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c
index 9b9754d..6258295 100644
--- a/gcc/fold-const.c
+++ b/gcc/fold-const.c
@@ -11089,9 +11089,6 @@ fold_binary_loc (location_t loc,
case BIT_IOR_EXPR:
bit_ior:
- if (operand_equal_p (arg0, arg1, 0))
- return non_lvalue_loc (loc, fold_convert_loc (loc, type, arg0));
-
/* ~X | X is -1. */
if (TREE_CODE (arg0) == BIT_NOT_EXPR
&& operand_equal_p (TREE_OPERAND (arg0, 0), arg1, 0))
@@ -11227,9 +11224,6 @@ fold_binary_loc (location_t loc,
goto bit_rotate;
case BIT_XOR_EXPR:
- if (integer_all_onesp (arg1))
- return fold_build1_loc (loc, BIT_NOT_EXPR, type, op0);
-
/* ~X ^ X is -1. */
if (TREE_CODE (arg0) == BIT_NOT_EXPR
&& operand_equal_p (TREE_OPERAND (arg0, 0), arg1, 0))
@@ -11384,11 +11378,6 @@ fold_binary_loc (location_t loc,
goto bit_rotate;
case BIT_AND_EXPR:
- if (integer_all_onesp (arg1))
- return non_lvalue_loc (loc, fold_convert_loc (loc, type, arg0));
- if (operand_equal_p (arg0, arg1, 0))
- return non_lvalue_loc (loc, fold_convert_loc (loc, type, arg0));
-
/* ~X & X, (X == 0) & X, and !X & X are always zero. */
if ((TREE_CODE (arg0) == BIT_NOT_EXPR
|| TREE_CODE (arg0) == TRUTH_NOT_EXPR