Skip to content

Commit c236dbc

Browse files
[Vectorize] Simplify code with MapVector::operator[] (NFC) (llvm#115592)
1 parent ccb40b0 commit c236dbc

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6858,8 +6858,8 @@ void LoopVectorizationCostModel::collectValuesToIgnore() {
68586858
if ((SI = dyn_cast<StoreInst>(&I)) &&
68596859
Legal->isInvariantAddressOfReduction(SI->getPointerOperand())) {
68606860
ValuesToIgnore.insert(&I);
6861-
auto I = DeadInvariantStoreOps.insert({SI->getPointerOperand(), {}});
6862-
I.first->second.push_back(SI->getValueOperand());
6861+
DeadInvariantStoreOps[SI->getPointerOperand()].push_back(
6862+
SI->getValueOperand());
68636863
}
68646864

68656865
if (VecValuesToIgnore.contains(&I) || ValuesToIgnore.contains(&I))
@@ -8084,9 +8084,9 @@ void VPRecipeBuilder::createSwitchEdgeMasks(SwitchInst *SI) {
80848084
// ignored - they will get there anyhow.
80858085
if (Dst == DefaultDst)
80868086
continue;
8087-
auto I = Dst2Compares.insert({Dst, {}});
8087+
auto &Compares = Dst2Compares[Dst];
80888088
VPValue *V = getVPValueOrAddLiveIn(C.getCaseValue());
8089-
I.first->second.push_back(Builder.createICmp(CmpInst::ICMP_EQ, Cond, V));
8089+
Compares.push_back(Builder.createICmp(CmpInst::ICMP_EQ, Cond, V));
80908090
}
80918091

80928092
// We need to handle 2 separate cases below for all entries in Dst2Compares,

0 commit comments

Comments
 (0)