Skip to content

Commit 5a056f9

Browse files
[SystemZ] Avoid repeated hash lookups (NFC) (#126005)
Co-authored-by: Nikita Popov <[email protected]>
1 parent 7788617 commit 5a056f9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/Target/SystemZ/SystemZISelLowering.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6173,8 +6173,8 @@ SystemZTargetLowering::buildVector(SelectionDAG &DAG, const SDLoc &DL, EVT VT,
61736173
for (unsigned I = 0; I < NumElements; ++I)
61746174
if (isVectorElementLoad(Elems[I])) {
61756175
SDNode *Ld = Elems[I].getNode();
6176-
UseCounts[Ld]++;
6177-
if (LoadMaxUses == nullptr || UseCounts[LoadMaxUses] < UseCounts[Ld])
6176+
unsigned Count = ++UseCounts[Ld];
6177+
if (LoadMaxUses == nullptr || UseCounts[LoadMaxUses] < Count)
61786178
LoadMaxUses = Ld;
61796179
}
61806180
if (LoadMaxUses != nullptr) {

0 commit comments

Comments
 (0)