Skip to content

Commit eaa7b38

Browse files
[Transforms] Avoid repeated hash lookups (NFC) (#113120)
1 parent 766bd6f commit eaa7b38

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

llvm/lib/Transforms/Scalar/LowerMatrixIntrinsics.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1462,9 +1462,12 @@ class LowerMatrixIntrinsics {
14621462
if (!CanBeFlattened(Op))
14631463
return;
14641464

1465-
if (match(Op, m_BinOp()) && ShapeMap.find(Op) != ShapeMap.end()) {
1466-
ShapeMap[Op] = ShapeMap[Op].t();
1467-
return;
1465+
if (match(Op, m_BinOp())) {
1466+
auto It = ShapeMap.find(Op);
1467+
if (It != ShapeMap.end()) {
1468+
It->second = It->second.t();
1469+
return;
1470+
}
14681471
}
14691472

14701473
FusedInsts.insert(cast<Instruction>(Op));

0 commit comments

Comments
 (0)