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

Chad Rosier mcrosier at apple.com
Fri Apr 27 14:00:03 PDT 2012


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