[PATCH] D133345: [AArch64] Increase AddedComplexity of BIC
Alexander Shaposhnikov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 6 03:10:23 PDT 2022
alexander-shaposhnikov created this revision.
alexander-shaposhnikov added reviewers: eli.friedman, dmgreen.
alexander-shaposhnikov created this object with visibility "All Users".
Herald added subscribers: hiraditya, kristof.beyls.
Herald added a project: All.
alexander-shaposhnikov requested review of this revision.
Herald added a project: LLVM.
This diff adjusts AddedComplexity of BIC to bump its position in the list of patterns to make LLVM pick it instead of MVN + AND.
MVN + AND requires 2 cycles, so does e.g. MOV + BIC, but the latter outperforms the former if the instructions producing the operands of BIC can be issued in parallel. One may consider the following example:
ldur x15, [x0, #2] # 4 cycles
mvn x10, x15 # 1 cycle (depends on ldur)
and x9, x10, #0x8080808080808080
vs.
ldur x15, [x0, #2] # 4 cycles
mov x9, #0x8080808080808080 # 1 cycle (can be executed in parallel with ldur)
bic x9, x9, x15. # 1 cycle
Test plan: ninja check-all
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D133345
Files:
llvm/lib/Target/AArch64/AArch64InstrFormats.td
llvm/lib/Target/AArch64/AArch64InstrInfo.td
llvm/test/CodeGen/AArch64/addsub.ll
llvm/test/CodeGen/AArch64/dag-combine-setcc.ll
llvm/test/CodeGen/AArch64/select_const.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D133345.458124.patch
Type: text/x-patch
Size: 5304 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220906/4b9f292e/attachment.bin>
More information about the llvm-commits
mailing list