@@ -1036,7 +1036,7 @@ class LowerMatrixIntrinsics {
1036
1036
for (Instruction &I : *BB) {
1037
1037
if (match (&I, m_Intrinsic<Intrinsic::lifetime_end>()))
1038
1038
LifetimeEnds.push_back (cast<IntrinsicInst>(&I));
1039
- if (ShapeMap.find (&I) == ShapeMap. end ( ))
1039
+ if (! ShapeMap.contains (&I))
1040
1040
continue ;
1041
1041
if (match (&I, m_Intrinsic<Intrinsic::matrix_multiply>()))
1042
1042
MaybeFusableInsts.push_back (cast<CallInst>(&I));
@@ -1354,7 +1354,7 @@ class LowerMatrixIntrinsics {
1354
1354
ToRemove.push_back (Inst);
1355
1355
Value *Flattened = nullptr ;
1356
1356
for (Use &U : llvm::make_early_inc_range (Inst->uses ())) {
1357
- if (ShapeMap.find (U.getUser ()) == ShapeMap. end ( )) {
1357
+ if (! ShapeMap.contains (U.getUser ())) {
1358
1358
if (!Flattened)
1359
1359
Flattened = Matrix.embedInVector (Builder);
1360
1360
U.set (Flattened);
@@ -1401,7 +1401,7 @@ class LowerMatrixIntrinsics {
1401
1401
// the returned cost is < 0, the argument is cheaper to use in the
1402
1402
// dot-product lowering.
1403
1403
auto GetCostForArg = [this , &CanBeFlattened](Value *Op, unsigned N) {
1404
- if (ShapeMap.find (Op) == ShapeMap. end ( ))
1404
+ if (! ShapeMap.contains (Op))
1405
1405
return InstructionCost::getInvalid ();
1406
1406
1407
1407
if (!isa<Instruction>(Op))
@@ -1420,7 +1420,7 @@ class LowerMatrixIntrinsics {
1420
1420
return EmbedCost;
1421
1421
}
1422
1422
1423
- if (match (Op, m_BinOp ()) && ShapeMap.find (Op) != ShapeMap. end ( )) {
1423
+ if (match (Op, m_BinOp ()) && ShapeMap.contains (Op)) {
1424
1424
InstructionCost OriginalCost =
1425
1425
TTI.getArithmeticInstrCost (cast<Instruction>(Op)->getOpcode (),
1426
1426
EltTy) *
0 commit comments