[Bug target/41665] New: Typo in addsi_1_zext?
hjl dot tools at gmail dot com
gcc-bugzilla@gcc.gnu.org
Sat Oct 10 18:11:00 GMT 2009
There are
(define_insn "addsi_1_zext"
[(set (match_operand:DI 0 "register_operand" "=r,r")
(zero_extend:DI
(plus:SI (match_operand:SI 1 "nonimmediate_operand" "%0,r")
(match_operand:SI 2 "general_operand" "g,li"))))
(clobber (reg:CC FLAGS_REG))]
"TARGET_64BIT && ix86_binary_operator_ok (PLUS, SImode, operands)"
{
switch (get_attr_type (insn))
{
case TYPE_LEA:
operands[2] = SET_SRC (XVECEXP (PATTERN (insn), 0, 0));
return "lea{l}\t{%a2, %k0|%k0, %a2}";
case TYPE_INCDEC:
if (operands[2] == const1_rtx)
return "inc{l}\t%k0";
else
{
gcc_assert (operands[2] == constm1_rtx);
return "dec{l}\t%k0";
}
default:
/* Make things pretty and `subl $4,%eax' rather than `addl $-4, %eax'.
Exceptions: -128 encodes smaller than 128, so swap sign and op. */
if (CONST_INT_P (operands[2])
&& (INTVAL (operands[2]) == 128
|| (INTVAL (operands[2]) < 0
&& INTVAL (operands[2]) != -128)))
{
operands[2] = GEN_INT (-INTVAL (operands[2]));
return "sub{l}\t{%2, %k0|%k0, %2}";
}
return "add{l}\t{%2, %k0|%k0, %2}";
}
}
Shouldn't it be
(plus:SI (match_operand:SI 1 "nonimmediate_operand" "%0,0")
Am I missing something?
--
Summary: Typo in addsi_1_zext?
Product: gcc
Version: 4.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: hjl dot tools at gmail dot com
GCC target triplet: x86_64-*-*
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41665
More information about the Gcc-bugs
mailing list