[llvm] 9d0ac39 - [ARM] Use CostKind in getShuffleCost getMVEVectorCostFactor.
David Green via llvm-commits
llvm-commits at lists.llvm.org
Sun Jul 13 00:05:56 PDT 2025
Author: David Green
Date: 2025-07-13T08:05:51+01:00
New Revision: 9d0ac3980d2a3ccab90ab49ac2f8359d4c4752c7
URL: https://github.com/llvm/llvm-project/commit/9d0ac3980d2a3ccab90ab49ac2f8359d4c4752c7
DIFF: https://github.com/llvm/llvm-project/commit/9d0ac3980d2a3ccab90ab49ac2f8359d4c4752c7.diff
LOG: [ARM] Use CostKind in getShuffleCost getMVEVectorCostFactor.
These calls pre-date CostKind being added to getShuffleCost in
5263155d5be64b435a97fd4fa12f7f0aa97f88a8.
Added:
Modified:
llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp b/llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp
index 05d4069a686ab..6f37eca2b00a5 100644
--- a/llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp
+++ b/llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp
@@ -1330,8 +1330,7 @@ InstructionCost ARMTTIImpl::getShuffleCost(TTI::ShuffleKind Kind,
std::pair<InstructionCost, MVT> LT = getTypeLegalizationCost(SrcTy);
if (const auto *Entry = CostTableLookup(MVEDupTbl, ISD::VECTOR_SHUFFLE,
LT.second))
- return LT.first * Entry->Cost *
- ST->getMVEVectorCostFactor(TTI::TCK_RecipThroughput);
+ return LT.first * Entry->Cost * ST->getMVEVectorCostFactor(CostKind);
}
if (!Mask.empty()) {
@@ -1340,7 +1339,7 @@ InstructionCost ARMTTIImpl::getShuffleCost(TTI::ShuffleKind Kind,
Mask.size() <= LT.second.getVectorNumElements() &&
(isVREVMask(Mask, LT.second, 16) || isVREVMask(Mask, LT.second, 32) ||
isVREVMask(Mask, LT.second, 64)))
- return ST->getMVEVectorCostFactor(TTI::TCK_RecipThroughput) * LT.first;
+ return ST->getMVEVectorCostFactor(CostKind) * LT.first;
}
}
@@ -1348,7 +1347,7 @@ InstructionCost ARMTTIImpl::getShuffleCost(TTI::ShuffleKind Kind,
if (IsExtractSubvector)
Kind = TTI::SK_ExtractSubvector;
int BaseCost = ST->hasMVEIntegerOps() && SrcTy->isVectorTy()
- ? ST->getMVEVectorCostFactor(TTI::TCK_RecipThroughput)
+ ? ST->getMVEVectorCostFactor(CostKind)
: 1;
return BaseCost * BaseT::getShuffleCost(Kind, DstTy, SrcTy, Mask, CostKind,
Index, SubTp);
More information about the llvm-commits
mailing list