@@ -1036,7 +1036,7 @@ class LowerMatrixIntrinsics {
10361036 for (Instruction &I : *BB) {
10371037 if (match (&I, m_Intrinsic<Intrinsic::lifetime_end>()))
10381038 LifetimeEnds.push_back (cast<IntrinsicInst>(&I));
1039- if (ShapeMap.find (&I) == ShapeMap. end ( ))
1039+ if (! ShapeMap.contains (&I))
10401040 continue ;
10411041 if (match (&I, m_Intrinsic<Intrinsic::matrix_multiply>()))
10421042 MaybeFusableInsts.push_back (cast<CallInst>(&I));
@@ -1354,7 +1354,7 @@ class LowerMatrixIntrinsics {
13541354 ToRemove.push_back (Inst);
13551355 Value *Flattened = nullptr ;
13561356 for (Use &U : llvm::make_early_inc_range (Inst->uses ())) {
1357- if (ShapeMap.find (U.getUser ()) == ShapeMap. end ( )) {
1357+ if (! ShapeMap.contains (U.getUser ())) {
13581358 if (!Flattened)
13591359 Flattened = Matrix.embedInVector (Builder);
13601360 U.set (Flattened);
@@ -1401,7 +1401,7 @@ class LowerMatrixIntrinsics {
14011401 // the returned cost is < 0, the argument is cheaper to use in the
14021402 // dot-product lowering.
14031403 auto GetCostForArg = [this , &CanBeFlattened](Value *Op, unsigned N) {
1404- if (ShapeMap.find (Op) == ShapeMap. end ( ))
1404+ if (! ShapeMap.contains (Op))
14051405 return InstructionCost::getInvalid ();
14061406
14071407 if (!isa<Instruction>(Op))
@@ -1420,7 +1420,7 @@ class LowerMatrixIntrinsics {
14201420 return EmbedCost;
14211421 }
14221422
1423- if (match (Op, m_BinOp ()) && ShapeMap.find (Op) != ShapeMap. end ( )) {
1423+ if (match (Op, m_BinOp ()) && ShapeMap.contains (Op)) {
14241424 InstructionCost OriginalCost =
14251425 TTI.getArithmeticInstrCost (cast<Instruction>(Op)->getOpcode (),
14261426 EltTy) *
0 commit comments