diff options
author | zlomek <zlomek@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-09-01 05:06:25 +0000 |
---|---|---|
committer | zlomek <zlomek@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-09-01 05:06:25 +0000 |
commit | 734c48bb1a0a3e309ad570e890f15cf2b6e05325 (patch) | |
tree | 5b0d203422dc44311fe3d048d9db6a130f319b7f /gcc/fold-const.c | |
parent | f9d88e1166427c5a7016a7467568bef80555d081 (diff) | |
download | gcc-734c48bb1a0a3e309ad570e890f15cf2b6e05325.tar.gz |
* c-typeck.c (build_binary_op): Kill BIT_ANDTC_EXPR.
* convert.c (convert_to_integer): Kill BIT_ANDTC_EXPR.
* fold-const.c (int_const_binop): Kill BIT_ANDTC_EXPR.
(fold): Kill BIT_ANDTC_EXPR and label bit_and.
* tree.def (BIT_ANDTC_EXPR): Kill.
* error.c (dump_expr): Kill BIT_ANDTC_EXPR.
* lex.c (init_operators): Kill BIT_ANDTC_EXPR.
* pt.c (tsubst_copy): Kill BIT_ANDTC_EXPR.
* typeck.c (build_binary_op): Kill BIT_ANDTC_EXPR.
(tsubst_copy_and_build): Kill BIT_ANDTC_EXPR.
* com.c (ffecom_overlap_): Kill BIT_ANDTC_EXPR.
(ffecom_tree_canonize_ref_): Kill BIT_ANDTC_EXPR.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@70972 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r-- | gcc/fold-const.c | 32 |
1 files changed, 9 insertions, 23 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c index 68a92a2ed38..27a3da15e4c 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -1108,10 +1108,6 @@ int_const_binop (enum tree_code code, tree arg1, tree arg2, int notrunc) low = int1l & int2l, hi = int1h & int2h; break; - case BIT_ANDTC_EXPR: - low = int1l & ~int2l, hi = int1h & ~int2h; - break; - case RSHIFT_EXPR: int2l = -int2l; case LSHIFT_EXPR: @@ -6316,7 +6312,6 @@ fold (tree expr) goto bit_rotate; case BIT_AND_EXPR: - bit_and: if (integer_all_onesp (arg1)) return non_lvalue (convert (type, arg0)); if (integer_zerop (arg1)) @@ -6354,19 +6349,6 @@ fold (tree expr) goto associate; - case BIT_ANDTC_EXPR: - if (integer_all_onesp (arg0)) - return non_lvalue (convert (type, arg1)); - if (integer_zerop (arg0)) - return omit_one_operand (type, arg0, arg1); - if (TREE_CODE (arg1) == INTEGER_CST) - { - arg1 = fold (build1 (BIT_NOT_EXPR, type, arg1)); - code = BIT_AND_EXPR; - goto bit_and; - } - goto binary; - case RDIV_EXPR: /* Don't touch a floating-point divide by zero unless the mode of the constant can represent infinity. */ @@ -6649,7 +6631,6 @@ fold (tree expr) permute the two operations. */ if (code == RROTATE_EXPR && TREE_CODE (arg1) == INTEGER_CST && (TREE_CODE (arg0) == BIT_AND_EXPR - || TREE_CODE (arg0) == BIT_ANDTC_EXPR || TREE_CODE (arg0) == BIT_IOR_EXPR || TREE_CODE (arg0) == BIT_XOR_EXPR) && TREE_CODE (TREE_OPERAND (arg0, 1)) == INTEGER_CST) @@ -7418,8 +7399,11 @@ fold (tree expr) && TREE_CODE (arg1) == INTEGER_CST && TREE_CODE (TREE_OPERAND (arg0, 1)) == INTEGER_CST) { - tree dandnotc = fold (build (BIT_ANDTC_EXPR, TREE_TYPE (arg0), - arg1, TREE_OPERAND (arg0, 1))); + tree dandnotc + = fold (build (BIT_AND_EXPR, TREE_TYPE (arg0), + arg1, build1 (BIT_NOT_EXPR, + TREE_TYPE (TREE_OPERAND (arg0, 1)), + TREE_OPERAND (arg0, 1)))); tree rslt = code == EQ_EXPR ? integer_zero_node : integer_one_node; if (integer_nonzerop (dandnotc)) return omit_one_operand (type, rslt, arg0); @@ -7432,8 +7416,10 @@ fold (tree expr) && TREE_CODE (arg1) == INTEGER_CST && TREE_CODE (TREE_OPERAND (arg0, 1)) == INTEGER_CST) { - tree candnotd = fold (build (BIT_ANDTC_EXPR, TREE_TYPE (arg0), - TREE_OPERAND (arg0, 1), arg1)); + tree candnotd + = fold (build (BIT_AND_EXPR, TREE_TYPE (arg0), + TREE_OPERAND (arg0, 1), + build1 (BIT_NOT_EXPR, TREE_TYPE (arg1), arg1))); tree rslt = code == EQ_EXPR ? integer_zero_node : integer_one_node; if (integer_nonzerop (candnotd)) return omit_one_operand (type, rslt, arg0); |