Skip to content

Commit c489d33

Browse files
[Vectorize] Simplify code with DenseMap::operator[] (NFC)
1 parent b5bcdb5 commit c489d33

File tree

1 file changed

+1
-2
lines changed
  • llvm/lib/Transforms/Vectorize

1 file changed

+1
-2
lines changed

llvm/lib/Transforms/Vectorize/VPlan.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -291,8 +291,7 @@ struct VPTransformState {
291291

292292
/// Set the generated scalar \p V for \p Def and the given \p Lane.
293293
void set(VPValue *Def, Value *V, const VPLane &Lane) {
294-
auto Iter = Data.VPV2Scalars.insert({Def, {}});
295-
auto &Scalars = Iter.first->second;
294+
auto &Scalars = Data.VPV2Scalars[Def];
296295
unsigned CacheIdx = Lane.mapToCacheIndex(VF);
297296
if (Scalars.size() <= CacheIdx)
298297
Scalars.resize(CacheIdx + 1);

0 commit comments

Comments
 (0)