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

manman ren mren at apple.com
Fri Apr 27 11:12:21 PDT 2012


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

This case is correctly handled for ARM with "cmn".
The patch modified one source file: lib/Target/X86/X86ISelLowering.cpp

Please review & provide feedback.
Thanks,
Manman
-------------- next part --------------
A non-text attachment was scrubbed...
Name: x_eq_negy.patch
Type: application/octet-stream
Size: 3264 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120427/5eb95194/attachment.obj>


More information about the llvm-commits mailing list