Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions llvm/lib/Target/PowerPC/PPCBoolRetToInt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -241,9 +241,11 @@ class PPCBoolRetToInt : public FunctionPass {
++NumBoolCallPromotion;
++NumBoolToIntPromotion;

for (Value *V : Defs)
if (!BoolToIntMap.count(V))
BoolToIntMap[V] = translate(V);
for (Value *V : Defs) {
auto [It, Inserted] = BoolToIntMap.try_emplace(V);
if (Inserted)
It->second = translate(V);
}

// Replace the operands of the translated instructions. They were set to
// zero in the translate function.
Expand Down