aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/CodeGenPrepare.cpp
diff options
context:
space:
mode:
authorMingming Liu <mingmingl@google.com>2022-08-03 14:20:30 -0700
committerMingming Liu <mingmingl@google.com>2022-08-04 12:58:25 -0700
commitbc8f2f36496a3fda32943f261eebb9b053e44016 (patch)
tree3f6c8454f247858e698ac1771063f84becba18d2 /llvm/lib/CodeGen/CodeGenPrepare.cpp
parent6e193b5cbb6d7591280e4d03a658bb11f9fcd4d9 (diff)
downloadllvm-bc8f2f36496a3fda32943f261eebb9b053e44016.zip
llvm-bc8f2f36496a3fda32943f261eebb9b053e44016.tar.gz
llvm-bc8f2f36496a3fda32943f261eebb9b053e44016.tar.bz2
[AArch64][TTI][NFC] Overload method 'getVectorInstrCost' to provide vector instruction itself, as a context information for cost estimation.
1) Overloaded (instruction-based) method is a wrapper around the current (opcode-based) method. 2) This patch also changes a few callsites (VectorCombine.cpp, SLPVectorizer.cpp, CodeGenPrepare.cpp) to call the overloaded method. 3) This is a split of D128302. Differential Revision: https://reviews.llvm.org/D131114
Diffstat (limited to 'llvm/lib/CodeGen/CodeGenPrepare.cpp')
-rw-r--r--llvm/lib/CodeGen/CodeGenPrepare.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/CodeGenPrepare.cpp b/llvm/lib/CodeGen/CodeGenPrepare.cpp
index b100fbe..57423ff 100644
--- a/llvm/lib/CodeGen/CodeGenPrepare.cpp
+++ b/llvm/lib/CodeGen/CodeGenPrepare.cpp
@@ -7261,7 +7261,7 @@ class VectorPromoteHelper {
// scalar to vector.
// The vector chain has to account for the combining cost.
InstructionCost ScalarCost =
- TTI.getVectorInstrCost(Transition->getOpcode(), PromotedType, Index);
+ TTI.getVectorInstrCost(Transition, PromotedType, Index);
InstructionCost VectorCost = StoreExtractCombineCost;
enum TargetTransformInfo::TargetCostKind CostKind =
TargetTransformInfo::TCK_RecipThroughput;