[PATCH] [AArch64] Generate tbz/tbnz when comparing against zero.

Chad Rosier mcrosier at codeaurora.org
Wed Jul 9 13:08:04 PDT 2014


Hi t.p.northover, jmolloy,

This patch generates tbz/tbnz when comparing against zero.  The tbz/tbnz checks the sign bit to convert

add/sub w1, w1, w10
cmp w1, #0
b.lt .LBB0_0

to

adds/subs w1, w1, w10
tbnz w1, #31, .LBB0_0

Please have a look.

On an A53 processor this improves the following benchmarks:
office_suite/OAv2mark +3%
 office_suite/rotatev2data* +6-10%

I also saw improvements in spec2000 parser, vortex, and vpr, but just barely above noise, so I wouldn't bank on them.  These numbers were based on the community mainline.

 Chad

http://reviews.llvm.org/D4440

Files:
  lib/Target/AArch64/AArch64ISelLowering.cpp
  test/CodeGen/AArch64/tbz-tbnz.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D4440.11215.patch
Type: text/x-patch
Size: 4874 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140709/64f782cb/attachment.bin>


More information about the llvm-commits mailing list