Skip to content

Commit 2394eb1

Browse files
[TargetParser] Avoid repeated hash lookups (NFC) (#168216)
1 parent e8cc0c3 commit 2394eb1

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

llvm/lib/TargetParser/PPCTargetParser.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,11 @@ std::optional<StringMap<bool>> getPPCDefaultTargetFeatures(const Triple &T,
138138

139139
// The target feature `quadword-atomics` is only supported for 64-bit
140140
// POWER8 and above.
141-
if (Features.find("quadword-atomics") != Features.end() && !T.isArch64Bit())
142-
Features["quadword-atomics"] = false;
141+
if (!T.isArch64Bit()) {
142+
auto It = Features.find("quadword-atomics");
143+
if (It != Features.end())
144+
It->second = false;
145+
}
143146
return Features;
144147
}
145148
} // namespace PPC

0 commit comments

Comments
 (0)