[PATCH] D17942: [Aarch64] Optimize test and branch sequence when the test's constant operand is power of 2
Balaram Makam via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 7 15:13:11 PST 2016
bmakam created this revision.
bmakam added reviewers: mcrosier, t.p.northover, MatzeB, jmolloy.
bmakam added a subscriber: llvm-commits.
Herald added subscribers: mcrosier, rengolin, aemerson.
Peephole optimization that generates a single TBZ/TBNZ instruction
for test and branch sequences like in the example below. This handles
the cases that miss folding of AND into TBZ/TBNZ during ISelLowering of BR_CC
Examples:
and w8, w8, #0x400
cbnz w8, L1
to
tbnz w8, #10, L1
http://reviews.llvm.org/D17942
Files:
include/llvm/Target/TargetInstrInfo.h
lib/CodeGen/PeepholeOptimizer.cpp
lib/Target/AArch64/AArch64InstrInfo.cpp
lib/Target/AArch64/AArch64InstrInfo.h
test/CodeGen/AArch64/aarch64-tbz.ll
test/CodeGen/AArch64/fast-isel-tbz.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D17942.50001.patch
Type: text/x-patch
Size: 8296 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160307/0a67ad81/attachment.bin>
More information about the llvm-commits
mailing list