Skip to content

Commit 93507f6

Browse files
[PowerPC] Avoid repeated hash lookups (NFC) (#132145)
1 parent bc9cee1 commit 93507f6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

llvm/lib/Target/PowerPC/PPCLoopInstrFormPrep.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -936,9 +936,9 @@ bool PPCLoopInstrFormPrep::prepareBaseForDispFormChain(Bucket &BucketChain,
936936
// 1 X form.
937937
unsigned MaxCountRemainder = 0;
938938
for (unsigned j = 0; j < (unsigned)Form; j++)
939-
if ((RemainderOffsetInfo.contains(j)) &&
940-
RemainderOffsetInfo[j].second >
941-
RemainderOffsetInfo[MaxCountRemainder].second)
939+
if (auto It = RemainderOffsetInfo.find(j);
940+
It != RemainderOffsetInfo.end() &&
941+
It->second.second > RemainderOffsetInfo[MaxCountRemainder].second)
942942
MaxCountRemainder = j;
943943

944944
// Abort when there are too few insts with common base.

0 commit comments

Comments
 (0)