Skip to content

Commit 70af83f

Browse files
[X86] Avoid repeated hash lookups (NFC) (llvm#129360)
1 parent f892dc7 commit 70af83f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/Target/X86/X86LowerAMXType.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,8 @@ class ShapeCalculator {
154154

155155
Value *ShapeCalculator::getRowFromCol(Instruction *II, Value *V,
156156
unsigned Granularity) {
157-
if (Col2Row.count(V))
158-
return Col2Row[V];
157+
if (auto It = Col2Row.find(V); It != Col2Row.end())
158+
return It->second;
159159
IRBuilder<> Builder(II);
160160
Value *RealRow = nullptr;
161161
if (isa<ConstantInt>(V))

0 commit comments

Comments
 (0)