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 9f83914 commit eef0ddaCopy full SHA for eef0dda
llvm/lib/Target/PowerPC/PPCBoolRetToInt.cpp
@@ -241,9 +241,11 @@ class PPCBoolRetToInt : public FunctionPass {
241
++NumBoolCallPromotion;
242
++NumBoolToIntPromotion;
243
244
- for (Value *V : Defs)
245
- if (!BoolToIntMap.count(V))
246
- BoolToIntMap[V] = translate(V);
+ for (Value *V : Defs) {
+ auto [It, Inserted] = BoolToIntMap.try_emplace(V);
+ if (Inserted)
247
+ It->second = translate(V);
248
+ }
249
250
// Replace the operands of the translated instructions. They were set to
251
// zero in the translate function.
0 commit comments