diff --git a/llvm/include/llvm/Analysis/TargetTransformInfo.h b/llvm/include/llvm/Analysis/TargetTransformInfo.h index 0c3a6b3742c735..cefce93f9e25c5 100644 --- a/llvm/include/llvm/Analysis/TargetTransformInfo.h +++ b/llvm/include/llvm/Analysis/TargetTransformInfo.h @@ -1397,7 +1397,7 @@ class TargetTransformInfo { InstructionCost getReplicationShuffleCost(Type *EltTy, int ReplicationFactor, int VF, const APInt &DemandedDstElts, - TTI::TargetCostKind CostKind); + TTI::TargetCostKind CostKind) const; /// \return The cost of Load and Store instructions. InstructionCost diff --git a/llvm/lib/Analysis/TargetTransformInfo.cpp b/llvm/lib/Analysis/TargetTransformInfo.cpp index f6a458f7ded466..82b6d7e7c48338 100644 --- a/llvm/lib/Analysis/TargetTransformInfo.cpp +++ b/llvm/lib/Analysis/TargetTransformInfo.cpp @@ -1037,7 +1037,7 @@ TargetTransformInfo::getVectorInstrCost(const Instruction &I, Type *Val, InstructionCost TargetTransformInfo::getReplicationShuffleCost( Type *EltTy, int ReplicationFactor, int VF, const APInt &DemandedDstElts, - TTI::TargetCostKind CostKind) { + TTI::TargetCostKind CostKind) const { InstructionCost Cost = TTIImpl->getReplicationShuffleCost( EltTy, ReplicationFactor, VF, DemandedDstElts, CostKind); assert(Cost >= 0 && "TTI should not produce negative costs!");