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 f13d3f7 commit 6ec113dCopy full SHA for 6ec113d
llvm/lib/Transforms/Utils/Local.cpp
@@ -3840,11 +3840,11 @@ static const std::optional<BitPart> &
3840
collectBitParts(Value *V, bool MatchBSwaps, bool MatchBitReversals,
3841
std::map<Value *, std::optional<BitPart>> &BPS, int Depth,
3842
bool &FoundRoot) {
3843
- auto I = BPS.find(V);
3844
- if (I != BPS.end())
+ auto [I, Inserted] = BPS.try_emplace(V);
+ if (!Inserted)
3845
return I->second;
3846
3847
- auto &Result = BPS[V] = std::nullopt;
+ auto &Result = I->second;
3848
auto BitWidth = V->getType()->getScalarSizeInBits();
3849
3850
// Can't do integer/elements > 128 bits.
0 commit comments