[llvm-commits] [PATCH] optimization of x == -y for X86

manman ren mren at apple.com
Fri Apr 27 15:18:57 PDT 2012


Patch is updated with PR number.

Thanks,
Manman
-------------- next part --------------
A non-text attachment was scrubbed...
Name: x_eq_negy.patch
Type: application/octet-stream
Size: 3275 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120427/833b6c05/attachment.obj>
-------------- next part --------------

On Apr 27, 2012, at 2:00 PM, Chad Rosier wrote:

> Manman,
> 
> On Apr 27, 2012, at 11:22 AM, Jay Foad wrote:
> 
>> On 27 April 2012 19:12, manman ren <mren at apple.com> wrote:
>>> 
>>> This patch optimizes codegen for if(x==-y) on x86
>>> from
>>>   negl    %esi
>>>   cmpl    %esi, %edi
>>>   je    .LBB0_2
>>> to
>>>   addl    %esi, %edi
>>>   je    .L4
>> 
>>> Index: test/CodeGen/X86/neg_cmp.ll
>>> ===================================================================
>>> --- test/CodeGen/X86/neg_cmp.ll	(revision 0)
>>> +++ test/CodeGen/X86/neg_cmp.ll	(revision 0)
>>> @@ -0,0 +1,21 @@
>>> +; RUN: llc < %s -march=x86-64 | FileCheck %s
>>> +
>>> +; rdar://11245199
>> 
>> Can you mention PR 12545 please? I don't think I have access to rdar:// (do I?).
> 
> LGTM; Once you've added the PR number, I'd be happy to commit.  Also, please make sure to update the status of both the radar and the PR (see: http://llvm.org/bugs/show_bug.cgi?id=12545).  You'll need to setup a Bugzilla account if you haven't already done so.
> 
> Jay,
> Thanks for pointing this out as radar information is not publicly viewable.
> 
> Chad
> 
> 
>> Thanks for fixing it!
>> 
>> Jay.
>> 
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
> 



More information about the llvm-commits mailing list