[PATCH] [AArch64] Generate CMN when comparing a short int with minus
    Xu Jiangwei 
    David.Xu at arm.com
       
    Mon Aug 18 18:44:41 PDT 2014
    
    
  
Hi t.p.northover, Jiangning, kevin.qin, HaoLiu,
This patch generates cmn instruction when comparing a short int with minus
ldrh	 w8, [x0]
orr	w9, wzr, #0xffff
cmp	 w8, w9
to
ldrsh	 w8, [x0]
cmn	 w8, #1
This patch fixes the issue by signed extending the operand.The performance test shows there are some improvements:
spec.cpu2000.ref.253_perlbmk -2.15%,
spec.cpu2006.ref.482_sphinx3 -1.59%.
As to why this patch just deals with short int, please look at the comments in the patch.
Please have a look.
David
http://reviews.llvm.org/D4966
Files:
  lib/Target/AArch64/AArch64ISelLowering.cpp
  test/CodeGen/AArch64/cmpwithshort.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D4966.12637.patch
Type: text/x-patch
Size: 3463 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140819/3577d141/attachment.bin>
    
    
More information about the llvm-commits
mailing list