From 7d1f0f8a52db86fa860f131d32d23f1e72ecc93d Mon Sep 17 00:00:00 2001 From: Uros Bizjak Date: Fri, 4 Jun 2010 19:55:54 +0200 Subject: [PATCH] i386.md (*addhi_1_lea): Assert that operand 0 and operand 1 are equal. * config/i386/i386.md (*addhi_1_lea) : Assert that operand 0 and operand 1 are equal. (*addqi_1_lea) : Ditto. (*add_2) : Remove assert that operand 0 and operand 1 are equal. : Ditto. Remove ??? comment. (*add_3) : Remove assert that operand 0 and operand 1 are equal. : Ditto. Remove ??? comment. (*adddi_4) : Remove assert that operand 0 and operand 1 are equal. (*add_4) : Ditto. (*add_5) : Ditto. From-SVN: r160287 --- gcc/ChangeLog | 20 ++++++++++++++++++-- gcc/config/i386/i386.md | 18 ++++++------------ 2 files changed, 24 insertions(+), 14 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 12e76e211ff..978b57af906 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,19 @@ +2010-06-04 Uros Bizjak + + * config/i386/i386.md (*addhi_1_lea) : Assert + that operand 0 and operand 1 are equal. + (*addqi_1_lea) : Ditto. + (*add_2) : Remove assert that operand 0 + and operand 1 are equal. + : Ditto. Remove ??? comment. + (*add_3) : Remove assert that operand 0 + and operand 1 are equal. + : Ditto. Remove ??? comment. + (*adddi_4) : Remove assert that operand 0 and operand 1 + are equal. + (*add_4) : Ditto. + (*add_5) : Ditto. + 2010-06-04 Nathan Froyd * config/i386/i386-protos.h (ix86_print_operand): Declare. @@ -19,8 +35,8 @@ 2010-06-04 Uros Bizjak - * config/i386/i386.md (*addqi_2): Do not assert operands[2] == 255 - for TYPE_INCDEC operands. + * config/i386/i386.md (*addqi_2) : Do not assert that + operands[2] == 255. (*addqi_3): Ditto. (*addqi_4): Ditto. (*addqi_5): Ditto. diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index 468c2391f24..d446633aaa1 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -6232,7 +6232,9 @@ { 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 @@ -6242,6 +6244,7 @@ } 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}"; @@ -6320,7 +6323,9 @@ { 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 @@ -6330,6 +6335,7 @@ } default: + gcc_assert (rtx_equal_p (operands[0], operands[1])); if (x86_maybe_negate_const_int (&operands[2], QImode)) { if (widen) @@ -6407,7 +6413,6 @@ switch (get_attr_type (insn)) { case TYPE_INCDEC: - gcc_assert (rtx_equal_p (operands[0], operands[1])); if (operands[2] == const1_rtx) return "inc{}\t%0"; else @@ -6417,9 +6422,6 @@ } 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)) return "sub{}\t{%2, %0|%0, %2}"; @@ -6490,7 +6492,6 @@ switch (get_attr_type (insn)) { case TYPE_INCDEC: - gcc_assert (rtx_equal_p (operands[0], operands[1])); if (operands[2] == const1_rtx) return "inc{}\t%0"; else @@ -6500,9 +6501,6 @@ } 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)) return "sub{}\t{%2, %0|%0, %2}"; @@ -6588,7 +6586,6 @@ } 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}"; @@ -6633,7 +6630,6 @@ } default: - gcc_assert (rtx_equal_p (operands[0], operands[1])); if (x86_maybe_negate_const_int (&operands[2], mode)) return "add{}\t{%2, %0|%0, %2}"; @@ -6665,7 +6661,6 @@ switch (get_attr_type (insn)) { case TYPE_INCDEC: - gcc_assert (rtx_equal_p (operands[0], operands[1])); if (operands[2] == const1_rtx) return "inc{}\t%0"; else @@ -6675,7 +6670,6 @@ } default: - gcc_assert (rtx_equal_p (operands[0], operands[1])); if (x86_maybe_negate_const_int (&operands[2], mode)) return "sub{}\t{%2, %0|%0, %2}"; -- 2.30.2