Recommit r218010 [FastISel][AArch64] Fold bit test and branch into TBZ and TBNZ.
authorJuergen Ributzka <juergen@apple.com>
Tue, 30 Sep 2014 19:59:35 +0000 (19:59 +0000)
committerJuergen Ributzka <juergen@apple.com>
Tue, 30 Sep 2014 19:59:35 +0000 (19:59 +0000)
commit9952c922c2b5cf27fc75a148902c8ac0042b8bb2
treeda1cf79e1ed307e8c6645ad806eb04a2c9bb68d0
parent28233d3a63f958f80ebd6f8095405420ba3dd3fa
Recommit r218010 [FastISel][AArch64] Fold bit test and branch into TBZ and TBNZ.

Note: This version fixed an issue with the TBZ/TBNZ instructions that were
generated in FastISel. The issue was that the 64bit version of TBZ (TBZX)
automagically sets the upper bit of the immediate field that is used to specify
the bit we want to test. To test for any of the lower 32bits we have to first
extract the subregister and use the 32bit version of the TBZ instruction (TBZW).

Original commit message:
Teach selectBranch to fold bit test and branch into a single instruction (TBZ or
TBNZ).

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