c-typeck.c (build_binary_op): Kill BIT_ANDTC_EXPR.
authorJosef Zlomek <zlomekj@suse.cz>
Mon, 1 Sep 2003 05:06:25 +0000 (07:06 +0200)
committerJosef Zlomek <zlomek@gcc.gnu.org>
Mon, 1 Sep 2003 05:06:25 +0000 (05:06 +0000)
* 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.

From-SVN: r70972

12 files changed:
gcc/ChangeLog
gcc/c-typeck.c
gcc/convert.c
gcc/cp/ChangeLog
gcc/cp/error.c
gcc/cp/lex.c
gcc/cp/pt.c
gcc/cp/typeck.c
gcc/f/ChangeLog
gcc/f/com.c
gcc/fold-const.c
gcc/tree.def

index 05e09f8112ac75819094dbee98cd6f7779fe9d58..ed09e54aebacd91ef954a84e02597a2602c21d40 100644 (file)
@@ -1,3 +1,11 @@
+2003-09-01  Josef Zlomek  <zlomekj@suse.cz>
+
+       * 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.
+
 2003-08-31  Nathanael Nerode  <neroden@gcc.gnu.org>
 
        * configure.in: Remove uses of "for x in .. ${foo}" idiom.
index 530ac750cd12f6b7e288b8c9796e099e36810842..1d5823c131fc1996f73ffdd4aa8679c5babeae2b 100644 (file)
@@ -6623,7 +6623,6 @@ build_binary_op (enum tree_code code, tree orig_op0, tree orig_op1,
       break;
 
     case BIT_AND_EXPR:
-    case BIT_ANDTC_EXPR:
     case BIT_IOR_EXPR:
     case BIT_XOR_EXPR:
       if (code0 == INTEGER_TYPE && code1 == INTEGER_TYPE)
index fe3f3ec2497affa216b8d1dc0ee2f6be4aa732c1..9096541fe2a110d45911b69216b38f0076dd6e43 100644 (file)
@@ -473,7 +473,6 @@ convert_to_integer (tree type, tree expr)
        case BIT_AND_EXPR:
        case BIT_IOR_EXPR:
        case BIT_XOR_EXPR:
-       case BIT_ANDTC_EXPR:
        trunc1:
          {
            tree arg0 = get_unwidened (TREE_OPERAND (expr, 0), type);
index d0664230fd27e7c8391d0bc611d8a0c847557357..55635df2024151088f7e145efc31d22b18e55655 100644 (file)
@@ -1,3 +1,11 @@
+2003-09-01  Josef Zlomek  <zlomekj@suse.cz>
+
+       * 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.
+
 2003-08-29  Mark Mitchell  <mark@codesourcery.com>
 
        PR c++/12093
index aa7534ed086e4ccb4b0e194c0cc31fb610c272b5..d8d70e7286b5a0903141837535a5c46994540383 100644 (file)
@@ -1486,7 +1486,6 @@ dump_expr (tree t, int flags)
     case BIT_IOR_EXPR:
     case BIT_XOR_EXPR:
     case BIT_AND_EXPR:
-    case BIT_ANDTC_EXPR:
     case TRUTH_ANDIF_EXPR:
     case TRUTH_ORIF_EXPR:
     case LT_EXPR:
index 49b8311bd79c99a10812ae9bfdc03eb96552b237..4e602757eedb1d04f0877513dd555351cfcf496a 100644 (file)
@@ -206,7 +206,6 @@ init_operators (void)
   operator_name_info [(int) ROUND_MOD_EXPR].name = "(round %)";
   operator_name_info [(int) ABS_EXPR].name = "abs";
   operator_name_info [(int) FFS_EXPR].name = "ffs";
-  operator_name_info [(int) BIT_ANDTC_EXPR].name = "&~";
   operator_name_info [(int) TRUTH_AND_EXPR].name = "strict &&";
   operator_name_info [(int) TRUTH_OR_EXPR].name = "strict ||";
   operator_name_info [(int) IN_EXPR].name = "in";
index 6ae091e749c633e2c8508121950f1f07439760d9..0c5714363f10a5a48bfadf470776d3e9b2659bca 100644 (file)
@@ -7302,7 +7302,6 @@ tsubst_copy (tree t, tree args, tsubst_flags_t complain, tree in_decl)
     case ROUND_DIV_EXPR:
     case EXACT_DIV_EXPR:
     case BIT_AND_EXPR:
-    case BIT_ANDTC_EXPR:
     case BIT_IOR_EXPR:
     case BIT_XOR_EXPR:
     case TRUNC_MOD_EXPR:
@@ -7985,7 +7984,6 @@ tsubst_copy_and_build (tree t,
     case ROUND_DIV_EXPR:
     case EXACT_DIV_EXPR:
     case BIT_AND_EXPR:
-    case BIT_ANDTC_EXPR:
     case BIT_IOR_EXPR:
     case BIT_XOR_EXPR:
     case TRUNC_MOD_EXPR:
index 65ce8a06c6bd54b9c5edbf45b64551003d6ce0f0..91aab2f99e8de9cb7793488b1fe9e457f25f66fd 100644 (file)
@@ -2808,7 +2808,6 @@ build_binary_op (enum tree_code code, tree orig_op0, tree orig_op1,
       break;
 
     case BIT_AND_EXPR:
-    case BIT_ANDTC_EXPR:
     case BIT_IOR_EXPR:
     case BIT_XOR_EXPR:
       if (code0 == INTEGER_TYPE && code1 == INTEGER_TYPE)
index 99ffa7f4754f83c3fbd9d047b4923170826d8b4a..62a7941aad9b667b86f71822c1fee56a5bd2cc04 100644 (file)
@@ -1,3 +1,8 @@
+2003-09-01  Josef Zlomek  <zlomekj@suse.cz>
+
+       * com.c (ffecom_overlap_): Kill BIT_ANDTC_EXPR.
+       (ffecom_tree_canonize_ref_): Kill BIT_ANDTC_EXPR.
+
 Thu Jul 31 01:47:27 2003  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
 
        * com.c (ffecom_init_0): Use `dconsthalf'.
index a6a9bf9061bbac2629079348871903d095452b51..b5e6fddb0679c33cf678606770ed36d8e34a2f6b 100644 (file)
@@ -1581,7 +1581,6 @@ ffecom_overlap_ (tree dest_decl, tree dest_offset, tree dest_size,
     case BIT_IOR_EXPR:
     case BIT_XOR_EXPR:
     case BIT_AND_EXPR:
-    case BIT_ANDTC_EXPR:
     case BIT_NOT_EXPR:
     case TRUTH_ANDIF_EXPR:
     case TRUTH_ORIF_EXPR:
@@ -8891,7 +8890,6 @@ ffecom_tree_canonize_ref_ (tree *decl, tree *offset, tree *size, tree t)
     case BIT_IOR_EXPR:
     case BIT_XOR_EXPR:
     case BIT_AND_EXPR:
-    case BIT_ANDTC_EXPR:
     case BIT_NOT_EXPR:
     case TRUTH_ANDIF_EXPR:
     case TRUTH_ORIF_EXPR:
index 68a92a2ed3837a94eee75d8e1ced40dbd2ef8b81..27a3da15e4c4fe3f97064e5f560ace9669c1b561 100644 (file)
@@ -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);
index 085f9e478571b21f57971842d0cefa3b8e88944a..553e4ed930a2fd66469cc8ca209a79db27660496 100644 (file)
@@ -638,7 +638,6 @@ DEFTREECODE (RROTATE_EXPR, "rrotate_expr", '2', 2)
 DEFTREECODE (BIT_IOR_EXPR, "bit_ior_expr", '2', 2)
 DEFTREECODE (BIT_XOR_EXPR, "bit_xor_expr", '2', 2)
 DEFTREECODE (BIT_AND_EXPR, "bit_and_expr", '2', 2)
-DEFTREECODE (BIT_ANDTC_EXPR, "bit_andtc_expr", '2', 2)
 DEFTREECODE (BIT_NOT_EXPR, "bit_not_expr", '1', 1)
 
 /* ANDIF and ORIF allow the second operand not to be computed if the