[all-commits] [llvm/llvm-project] 750bf3: [AArch64] Increase cost of v2i64 multiplies
David Green via All-commits
all-commits at lists.llvm.org
Mon Apr 4 09:42:33 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 750bf3582a6d475e0ada22fe86cbd84cd1739eee
https://github.com/llvm/llvm-project/commit/750bf3582a6d475e0ada22fe86cbd84cd1739eee
Author: David Green <david.green at arm.com>
Date: 2022-04-04 (Mon, 04 Apr 2022)
Changed paths:
M llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
M llvm/test/Analysis/CostModel/AArch64/arith-overflow.ll
M llvm/test/Analysis/CostModel/AArch64/arith-widening.ll
M llvm/test/Analysis/CostModel/AArch64/arith.ll
M llvm/test/Analysis/CostModel/AArch64/mul.ll
Log Message:
-----------
[AArch64] Increase cost of v2i64 multiplies
The cost of a v2i64 multiply was special cased in 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) this seems to lead to better vectorization
factors and better performance.
Differential Revision: https://reviews.llvm.org/D123007
More information about the All-commits
mailing list