Skip to content

Commit 48d661f

Browse files
kazutakahiratagithub-actions[bot]
authored andcommitted
Automerge: [X86] Avoid repeated map lookups (NFC) (#127374)
2 parents 601014e + ec880b1 commit 48d661f

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)