[AArch64] Generate tbz/tbnz when comparing against zero.
authorChad Rosier <mcrosier@codeaurora.org>
Fri, 1 Aug 2014 14:48:56 +0000 (14:48 +0000)
committerChad Rosier <mcrosier@codeaurora.org>
Fri, 1 Aug 2014 14:48:56 +0000 (14:48 +0000)
commit4175e2f59775579bea958b7be4c630630aac47e6
treec681280831019b96e12b18fe2db4734cb6ad872c
parenta45d218f1568fef49c7863ebeaf4e96d6030661a
[AArch64] Generate tbz/tbnz when comparing against zero.

The tbz/tbnz checks the sign bit to convert

op w1, w1, w10
cmp w1, #0
b.lt .LBB0_0

to

op w1, w1, w10
tbnz w1, #31, .LBB0_0

Differential Revision: http://reviews.llvm.org/D4440

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214518 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/AArch64/AArch64ISelLowering.cpp
test/CodeGen/AArch64/tbz-tbnz.ll [new file with mode: 0644]