[PATCH] D35075: [AArch64] Redundant copy elimination - remove more zero copies.
Chad Rosier via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 6 11:03:44 PDT 2017
mcrosier created this revision.
Herald added subscribers: kristof.beyls, javed.absar, rengolin, aemerson.
This pass removes unnecessary zero copies in BBs that are targets of b.eq/b.ne and we know the result of the compare instruction is zero. For example,
BB#0:
subs w0, w1, w2
str w0, [x1]
b.ne .LBB0_2
BB#1:
mov w0, wzr ; <-- redundant
str w0, [x2]
.LBB0_2
See test cases for additional examples.
Chad
https://reviews.llvm.org/D35075
Files:
lib/Target/AArch64/AArch64RedundantCopyElimination.cpp
test/CodeGen/AArch64/machine-zero-copy-remove.mir
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D35075.105484.patch
Type: text/x-patch
Size: 19141 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170706/9b1e984f/attachment.bin>
More information about the llvm-commits
mailing list