This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Fix i?86 mem += reg + comparison peephole (PR target/52086)
- From: Uros Bizjak <ubizjak at gmail dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Richard Henderson <rth at redhat dot com>, gcc-patches at gcc dot gnu dot org
- Date: Thu, 2 Feb 2012 10:02:09 +0100
- Subject: Re: [PATCH] Fix i?86 mem += reg + comparison peephole (PR target/52086)
- References: <20120202081516.GX18768@tyan-ft48-01.lab.bos.redhat.com>
On Thu, Feb 2, 2012 at 9:15 AM, Jakub Jelinek <email@example.com> wrote:
> This peephole, as shown on the testcase, happily transforms a QImode
> memory load into a register, followed by SImode addition of that reg and
> %ebp, followed by QImode store of that back into the same memory and
> QImode comparison of that with zero into a QImode addition of the register
> to the memory with setting flags instead of clobbering them. ?The problem
> with that is that for -m32 %ebp can't be used in QImode instructions.
> Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux,
> ok for trunk?
> 2012-02-02 ?Jakub Jelinek ?<firstname.lastname@example.org>
> ? ? ? ?PR target/52086
> ? ? ? ?* config/i386/i386.md (*addqi_2 peephole with SImode addition): Check
> ? ? ? ?that operands is either immediate, or q_regs_operand.
> ? ? ? ?* gcc.dg/pr52086.c: New test.
OK, probably we also need to backport this fix to other release branches.