Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1202,7 +1202,7 @@ class LoopVectorizationCostModel {
CallWideningDecision getCallWideningDecision(CallInst *CI,
ElementCount VF) const {
assert(!VF.isScalar() && "Expected vector VF");
return CallWideningDecisions.at(std::make_pair(CI, VF));
return CallWideningDecisions.at({CI, VF});
}

/// Return True if instruction \p I is an optimizable truncate whose operand
Expand Down Expand Up @@ -2815,7 +2815,7 @@ LoopVectorizationCostModel::getVectorCallCost(CallInst *CI,
// We only need to calculate a cost if the VF is scalar; for actual vectors
// we should already have a pre-calculated cost at each VF.
if (!VF.isScalar())
return CallWideningDecisions.at(std::make_pair(CI, VF)).Cost;
return getCallWideningDecision(CI, VF).Cost;

Type *RetTy = CI->getType();
if (RecurrenceDescriptor::isFMulAddIntrinsic(CI))
Expand Down Expand Up @@ -3214,8 +3214,7 @@ bool LoopVectorizationCostModel::isScalarWithPredication(
case Instruction::Call:
if (VF.isScalar())
return true;
return CallWideningDecisions.at(std::make_pair(cast<CallInst>(I), VF))
.Kind == CM_Scalarize;
return getCallWideningDecision(cast<CallInst>(I), VF).Kind == CM_Scalarize;
case Instruction::Load:
case Instruction::Store: {
auto *Ptr = getLoadStorePointerOperand(I);
Expand Down
Loading