Skip to content

Commit 2c0f463

Browse files
[Vectorize] Simplify code with DenseMap::operator[] (NFC) (#115635)
1 parent a44ee8e commit 2c0f463

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

llvm/lib/Transforms/Vectorize/VPlanUnroll.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -297,12 +297,12 @@ void UnrollState::unrollRecipeByUF(VPRecipeBase &R) {
297297
if (auto *Red = dyn_cast<VPReductionRecipe>(&R)) {
298298
auto *Phi = cast<VPReductionPHIRecipe>(R.getOperand(0));
299299
if (Phi->isOrdered()) {
300-
auto Ins = VPV2Parts.insert({Phi, {}});
300+
auto &Parts = VPV2Parts[Phi];
301301
if (Part == 1) {
302-
Ins.first->second.clear();
303-
Ins.first->second.push_back(Red);
302+
Parts.clear();
303+
Parts.push_back(Red);
304304
}
305-
Ins.first->second.push_back(Copy->getVPSingleValue());
305+
Parts.push_back(Copy->getVPSingleValue());
306306
Phi->setOperand(1, Copy->getVPSingleValue());
307307
}
308308
}

0 commit comments

Comments
 (0)