[PATCH] D22226: [AArch64][CodeGen] Peephole optimization of Cmp+Bcc sequences with unconditional branch
Evgeny Astigeevich via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 11 10:23:34 PDT 2016
eastig created this revision.
eastig added a reviewer: t.p.northover.
eastig added a subscriber: llvm-commits.
Herald added subscribers: rengolin, aemerson.
This is a peephole optimization of Cmp+Bcc sequences with an unconditional branch. Such sequences can appear after the patch: http://reviews.llvm.org/D18838
When we compare with zero a result can be known. We can figure out which path is taken by Bcc and substitute Bcc by an unconditional branch to that path.
Rules:
SUBS reg, 0; B.LO => B <false path>
SUBS reg, 0; B.HS <label> => B <label>
http://reviews.llvm.org/D22226
Files:
lib/Target/AArch64/AArch64InstrInfo.cpp
lib/Target/AArch64/AArch64InstrInfo.h
test/CodeGen/AArch64/cmp-bcc-opt.mir
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D22226.63530.patch
Type: text/x-patch
Size: 8923 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160711/d17f410a/attachment.bin>
More information about the llvm-commits
mailing list