[PATCH] D80460: [AArch64][GlobalISel] When generating SUBS for compares, don't write to wzr/xzr.
Amara Emerson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri May 22 15:34:20 PDT 2020
aemerson created this revision.
aemerson added a reviewer: paquette.
aemerson added a project: LLVM.
Herald added subscribers: danielkiss, hiraditya, kristof.beyls, rovka.
Although writing to wzr/xzr is correct since we don't care about the result of the sub, only the flags, doing so causes tail merge blocks to fail.
Writing to an unused virtual register instead allows the optimization to fire, improving performance significantly on 256.bzip2.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D80460
Files:
llvm/lib/Target/AArch64/AArch64InstructionSelector.cpp
llvm/test/CodeGen/AArch64/GlobalISel/opt-fold-compare.mir
llvm/test/CodeGen/AArch64/GlobalISel/select-arith-immed-compare.mir
llvm/test/CodeGen/AArch64/GlobalISel/select-cmp.mir
llvm/test/CodeGen/AArch64/GlobalISel/select.mir
llvm/test/CodeGen/AArch64/GlobalISel/tbnz-slt.mir
llvm/test/CodeGen/AArch64/GlobalISel/tbz-sgt.mir
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D80460.265811.patch
Type: text/x-patch
Size: 9075 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200522/1de8d5d0/attachment.bin>
More information about the llvm-commits
mailing list