[PATCH] D123007: [AArch64] Increase cost of v2i64 multiplies
Dave Green via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Apr 3 13:56:47 PDT 2022
dmgreen created this revision.
dmgreen added reviewers: jaykang10, NickGuy, SjoerdMeijer, fhahn.
Herald added subscribers: hiraditya, kristof.beyls.
Herald added a project: All.
dmgreen requested review of this revision.
Herald added a project: LLVM.
The cost of a v2i64 multiply was special cased in D92208 <https://reviews.llvm.org/D92208> as scalarized into 4*extract + 2*insert + 2*mul. Scalarizing to/from gpr registers are expensive though, and the cost wasn't high enough to prevent vectorizing in places where it can be detrimental for performance. This increases it so that the costs of copying to/from GPRs is increased to 2 each, with the total cost increasing to 14. So long as umull/smull are handled correctly (as in D123006 <https://reviews.llvm.org/D123006>) this seems to lead to better vectorization factors and better performance.
https://reviews.llvm.org/D123007
Files:
llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
llvm/test/Analysis/CostModel/AArch64/arith-overflow.ll
llvm/test/Analysis/CostModel/AArch64/arith-widening.ll
llvm/test/Analysis/CostModel/AArch64/arith.ll
llvm/test/Analysis/CostModel/AArch64/mul.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D123007.420087.patch
Type: text/x-patch
Size: 33517 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220403/aa69c399/attachment.bin>
More information about the llvm-commits
mailing list