Skip to content

Commit 28e8e25

Browse files
committed
[VPlan] Use different try_emplace overload
1 parent 0ac01dc commit 28e8e25

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

llvm/lib/Transforms/Vectorize/VPlanUnroll.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,16 +92,15 @@ class UnrollState {
9292
void addRecipeForPart(VPRecipeBase *OrigR, VPRecipeBase *CopyR,
9393
unsigned Part) {
9494
for (const auto &[Idx, VPV] : enumerate(OrigR->definedValues())) {
95-
const auto &[V, _] = VPV2Parts.try_emplace(VPV, SmallVector<VPValue *>());
95+
const auto &[V, _] = VPV2Parts.try_emplace(VPV);
9696
assert(V->second.size() == Part - 1 && "earlier parts not set");
9797
V->second.push_back(CopyR->getVPValue(Idx));
9898
}
9999
}
100100

101101
/// Given a uniform recipe \p R, add it for all parts.
102102
void addUniformForAllParts(VPSingleDefRecipe *R) {
103-
const auto &[V, Inserted] =
104-
VPV2Parts.try_emplace(R, SmallVector<VPValue *>());
103+
const auto &[V, Inserted] = VPV2Parts.try_emplace(R);
105104
assert(Inserted && "uniform value already added");
106105
for (unsigned Part = 0; Part != UF; ++Part)
107106
V->second.push_back(R);

0 commit comments

Comments
 (0)