[llvm-commits] [PATCH] Replace SUB with CMP if possible on X86

Chandler Carruth chandlerc at google.com
Wed May 30 23:26:15 PDT 2012


On Wed, May 30, 2012 at 8:56 PM, Manman Ren <mren at apple.com> wrote:

>
> PING
>

Give it at least a day.... =/

I don't know the peephole optimizer well enough to really review this.


>
> On May 30, 2012, at 1:55 PM, Manman Ren wrote:
>
> >
> > SUB with memory operand should not be optimized.
> > Updated patch is attached.
> >
> > Manman
> > <convert_sub_to_cmp.patch>
> > On May 30, 2012, at 11:44 AM, Manman Ren wrote:
> >
> >>
> >> Hi All,
> >>
> >> This patch is to optimize generated code from
> >>      movq    %rdi, %rax
> >>      subq    %rsi, %rax
> >>      cmovsq  %rsi, %rdi
> >>      movq    %rdi, %rax
> >>
> >> to
> >>      cmpq    %rsi, %rdi
> >>      cmovsq  %rsi, %rdi
> >>      movq    %rdi, %rax
> >>
> >> The only criterion to perform this optimization is that the actual
> result of SUB is not used.
> >>
> >> Thanks,
> >> Manman
> >>
> >> <convert_sub_to_cmp.patch>
> >
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120530/3e9e8abb/attachment.html>


More information about the llvm-commits mailing list