Skip to content

Commit 38fca7b

Browse files
[Vectorize] Simplify code with DenseMap::operator[] (NFC) (#113246)
1 parent b3edc76 commit 38fca7b

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
@@ -292,8 +292,7 @@ struct VPTransformState {
292292

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

0 commit comments

Comments
 (0)