i386.md (*addhi_1_lea): Assert that operand 0 and operand 1 are equal.
authorUros Bizjak <ubizjak@gmail.com>
Fri, 4 Jun 2010 17:55:54 +0000 (19:55 +0200)
committerUros Bizjak <uros@gcc.gnu.org>
Fri, 4 Jun 2010 17:55:54 +0000 (19:55 +0200)
* config/i386/i386.md (*addhi_1_lea) <TYPE_INCDEC, default>: Assert
that operand 0 and operand 1 are equal.
(*addqi_1_lea) <TYPE_INCDEC, default>: Ditto.
(*add<mode>_2) <TYPE_INCDEC>: Remove assert that operand 0
and operand 1 are equal.
<default>: Ditto. Remove ??? comment.
(*add<mode>_3) <TYPE_INCDEC>: Remove assert that operand 0
and operand 1 are equal.
<default>: Ditto. Remove ??? comment.
(*adddi_4) <default>:  Remove assert that operand 0 and operand 1
are equal.
(*add<mode>_4) <default>: Ditto.
(*add<mode>_5) <TYPE_INCDEC, default>: Ditto.

From-SVN: r160287

gcc/ChangeLog
gcc/config/i386/i386.md

index 12e76e211ff6a21697bee1781225bc04029d9878..978b57af9061461f023ca7cdb49610392005c240 100644 (file)
@@ -1,3 +1,19 @@
+2010-06-04  Uros Bizjak  <ubizjak@gmail.com>
+
+       * config/i386/i386.md (*addhi_1_lea) <TYPE_INCDEC, default>: Assert
+       that operand 0 and operand 1 are equal.
+       (*addqi_1_lea) <TYPE_INCDEC, default>: Ditto.
+       (*add<mode>_2) <TYPE_INCDEC>: Remove assert that operand 0
+       and operand 1 are equal.
+       <default>: Ditto. Remove ??? comment.
+       (*add<mode>_3) <TYPE_INCDEC>: Remove assert that operand 0
+       and operand 1 are equal.
+       <default>: Ditto. Remove ??? comment.
+       (*adddi_4) <default>:  Remove assert that operand 0 and operand 1
+       are equal.
+       (*add<mode>_4) <default>: Ditto.
+       (*add<mode>_5) <TYPE_INCDEC, default>: Ditto.
+
 2010-06-04  Nathan Froyd  <froydnj@codesourcery.com>
 
        * config/i386/i386-protos.h (ix86_print_operand): Declare.
@@ -19,8 +35,8 @@
 
 2010-06-04  Uros Bizjak  <ubizjak@gmail.com>
 
-       * config/i386/i386.md (*addqi_2): Do not assert operands[2] == 255
-       for TYPE_INCDEC operands.
+       * config/i386/i386.md (*addqi_2) <TYPE_INCDEC>: Do not assert that
+       operands[2] == 255.
        (*addqi_3): Ditto.
        (*addqi_4): Ditto.
        (*addqi_5): Ditto.
index 468c2391f24c42619d32fd4dcc50366512ad7139..d446633aaa1bcd2cb0cfaaba886ce219d983c4fe 100644 (file)
     {
     case TYPE_LEA:
       return "#";
+
     case TYPE_INCDEC:
+      gcc_assert (rtx_equal_p (operands[0], operands[1]));
       if (operands[2] == const1_rtx)
        return "inc{w}\t%0";
       else
        }
 
     default:
+      gcc_assert (rtx_equal_p (operands[0], operands[1]));
       if (x86_maybe_negate_const_int (&operands[2], HImode))
        return "sub{w}\t{%2, %0|%0, %2}";
 
     {
     case TYPE_LEA:
       return "#";
+
     case TYPE_INCDEC:
+      gcc_assert (rtx_equal_p (operands[0], operands[1]));
       if (operands[2] == const1_rtx)
        return widen ? "inc{l}\t%k0" : "inc{b}\t%0";
       else
        }
 
     default:
+      gcc_assert (rtx_equal_p (operands[0], operands[1]));
       if (x86_maybe_negate_const_int (&operands[2], QImode))
        {
          if (widen)
   switch (get_attr_type (insn))
     {
     case TYPE_INCDEC:
-      gcc_assert (rtx_equal_p (operands[0], operands[1]));
       if (operands[2] == const1_rtx)
         return "inc{<imodesuffix>}\t%0";
       else
        }
 
     default:
-      gcc_assert (rtx_equal_p (operands[0], operands[1]));
-      /* ???? In DImode, we ought to handle there the 32bit case too
-        - do we need new constraint?  */
       if (x86_maybe_negate_const_int (&operands[2], <MODE>mode))
         return "sub{<imodesuffix>}\t{%2, %0|%0, %2}";
 
   switch (get_attr_type (insn))
     {
     case TYPE_INCDEC:
-      gcc_assert (rtx_equal_p (operands[0], operands[1]));
       if (operands[2] == const1_rtx)
         return "inc{<imodesuffix>}\t%0";
       else
        }
 
     default:
-      gcc_assert (rtx_equal_p (operands[0], operands[1]));
-      /* ???? In DImode, we ought to handle there the 32bit case too
-        - do we need new constraint?  */
       if (x86_maybe_negate_const_int (&operands[2], <MODE>mode))
         return "sub{<imodesuffix>}\t{%2, %0|%0, %2}";
 
        }
 
     default:
-      gcc_assert (rtx_equal_p (operands[0], operands[1]));
       if (x86_maybe_negate_const_int (&operands[2], DImode))
        return "add{q}\t{%2, %0|%0, %2}";
 
        }
 
     default:
-      gcc_assert (rtx_equal_p (operands[0], operands[1]));
       if (x86_maybe_negate_const_int (&operands[2], <MODE>mode))
        return "add{<imodesuffix>}\t{%2, %0|%0, %2}";
 
   switch (get_attr_type (insn))
     {
     case TYPE_INCDEC:
-      gcc_assert (rtx_equal_p (operands[0], operands[1]));
       if (operands[2] == const1_rtx)
         return "inc{<imodesuffix>}\t%0";
       else
        }
 
     default:
-      gcc_assert (rtx_equal_p (operands[0], operands[1]));
       if (x86_maybe_negate_const_int (&operands[2], <MODE>mode))
         return "sub{<imodesuffix>}\t{%2, %0|%0, %2}";