Skip to content

Commit 8fc8a1b

Browse files
committed
[VPlan] Revert some hunks
1 parent 98d6509 commit 8fc8a1b

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

llvm/lib/Transforms/Vectorize/VPlanUnroll.cpp

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -92,19 +92,18 @@ 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 *>());
96-
assert(V->second.size() == Part - 1 && "earlier parts not set");
97-
V->second.push_back(CopyR->getVPValue(Idx));
95+
auto Ins = VPV2Parts.insert({VPV, {}});
96+
assert(Ins.first->second.size() == Part - 1 && "earlier parts not set");
97+
Ins.first->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 *>());
105-
assert(Inserted && "uniform value already added");
103+
auto Ins = VPV2Parts.insert({R, {}});
104+
assert(Ins.second && "uniform value already added");
106105
for (unsigned Part = 0; Part != UF; ++Part)
107-
V->second.push_back(R);
106+
Ins.first->second.push_back(R);
108107
}
109108

110109
bool contains(VPValue *VPV) const { return VPV2Parts.contains(VPV); }

0 commit comments

Comments
 (0)