We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a4819d6 commit bc7e5c2Copy full SHA for bc7e5c2
llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
@@ -2241,10 +2241,9 @@ class BoUpSLP {
2241
HashMap[NumFreeOpsHash.Hash] = std::make_pair(1, Lane);
2242
} else if (NumFreeOpsHash.NumOfAPOs == Min &&
2243
NumFreeOpsHash.NumOpsWithSameOpcodeParent == SameOpNumber) {
2244
- auto *It = HashMap.find(NumFreeOpsHash.Hash);
2245
- if (It == HashMap.end())
2246
- HashMap[NumFreeOpsHash.Hash] = std::make_pair(1, Lane);
2247
- else
+ auto [It, Inserted] =
+ HashMap.try_emplace(NumFreeOpsHash.Hash, 1, Lane);
+ if (!Inserted)
2248
++It->second.first;
2249
}
2250
0 commit comments