This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/70245] [6 Regression] Miscompilation of ICU on i386 with atom tuning starting with r227382
- From: "vmakarov at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 16 Mar 2016 04:10:57 +0000
- Subject: [Bug middle-end/70245] [6 Regression] Miscompilation of ICU on i386 with atom tuning starting with r227382
- Auto-submitted: auto-generated
- References: <bug-70245-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70245
--- Comment #5 from Vladimir Makarov <vmakarov at gcc dot gnu.org> ---
(In reply to Vladimir Makarov from comment #4)
>
> I see in peephole a wrong transformation:
>
> 190: cx:SI=dx:SI
> REG_DEAD dx:SI
> 95: {cx:SI=cx:SI+[cx:SI];clobber flags:CC;}
>
> into
>
> 242: cx:SI=[cx:SI]
> 243: {cx:SI=cx:SI+dx:SI;clobber flags:CC;}
The pattern in question:
(define_peephole2
[(set (match_operand:SI 0 "register_operand")
(match_operand:SI 1 "register_operand"))
(parallel [(set (match_dup 0)
(match_operator:SI 3 "commutative_operator"
[(match_dup 0)
(match_operand:SI 2 "memory_operand")]))
(clobber (reg:CC FLAGS_REG))])]
"REGNO (operands[0]) != REGNO (operands[1])
&& GENERAL_REGNO_P (REGNO (operands[0]))
&& GENERAL_REGNO_P (REGNO (operands[1]))"
[(set (match_dup 0) (match_dup 4))
(parallel [(set (match_dup 0)
(match_op_dup 3 [(match_dup 0) (match_dup 1)]))
(clobber (reg:CC FLAGS_REG))])]
"operands[4] = replace_rtx (operands[2], operands[0], operands[1]);")