Skip to content

Commit ec880b1

Browse files
[X86] Avoid repeated map lookups (NFC) (llvm#127374)
1 parent e81f7ca commit ec880b1

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
@@ -190,8 +190,8 @@ Value *ShapeCalculator::getRowFromCol(Instruction *II, Value *V,
190190

191191
Value *ShapeCalculator::getColFromRow(Instruction *II, Value *V,
192192
unsigned Granularity) {
193-
if (Row2Col.count(V))
194-
return Row2Col[V];
193+
if (auto It = Row2Col.find(V); It != Row2Col.end())
194+
return It->second;
195195
IRBuilder<> Builder(II);
196196
Value *RealCol = nullptr;
197197
if (isa<ConstantInt>(V))

0 commit comments

Comments
 (0)