@@ -489,7 +489,7 @@ class LowerMatrixIntrinsics {
489489 DenseMap<Value *, ShapeInfo> ShapeMap;
490490
491491 // / List of instructions to remove. While lowering, we are not replacing all
492- // / users of a lowered instruction, if shape information is available and
492+ // / users of a lowered instruction. and
493493 // / those need to be removed after we finished lowering.
494494 SmallVector<Instruction *, 16 > ToRemove;
495495
@@ -1063,14 +1063,14 @@ class LowerMatrixIntrinsics {
10631063
10641064 Value *Op1;
10651065 Value *Op2;
1066- if (match (Inst, m_Load (m_Value (Op1))))
1067- VisitLoad (cast<LoadInst>(Inst), SI, Op1, Builder);
1068- else if (match (Inst, m_Store (m_Value (Op1), m_Value (Op2))))
1069- VisitStore (cast<StoreInst>(Inst), SI, Op1, Op2, Builder);
1070- else if (auto *BinOp = dyn_cast<BinaryOperator>(Inst))
1066+ if (auto *BinOp = dyn_cast<BinaryOperator>(Inst))
10711067 VisitBinaryOperator (BinOp, SI);
10721068 else if (auto *UnOp = dyn_cast<UnaryOperator>(Inst))
10731069 VisitUnaryOperator (UnOp, SI);
1070+ else if (match (Inst, m_Load (m_Value (Op1))))
1071+ VisitLoad (cast<LoadInst>(Inst), SI, Op1, Builder);
1072+ else if (match (Inst, m_Store (m_Value (Op1), m_Value (Op2))))
1073+ VisitStore (cast<StoreInst>(Inst), SI, Op1, Op2, Builder);
10741074 else
10751075 continue ;
10761076 Changed = true ;
@@ -2109,7 +2109,7 @@ class LowerMatrixIntrinsics {
21092109 Builder);
21102110 }
21112111
2112- // / Lower load instructions, if shape information is available .
2112+ // / Lower load instructions.
21132113 void VisitLoad (LoadInst *Inst, const ShapeInfo &SI, Value *Ptr,
21142114 IRBuilder<> &Builder) {
21152115 LowerLoad (Inst, Ptr, Inst->getAlign (), Builder.getInt64 (SI.getStride ()),
@@ -2122,7 +2122,7 @@ class LowerMatrixIntrinsics {
21222122 Builder.getInt64 (SI.getStride ()), Inst->isVolatile (), SI);
21232123 }
21242124
2125- // / Lower binary operators, if shape information is available .
2125+ // / Lower binary operators.
21262126 void VisitBinaryOperator (BinaryOperator *Inst, const ShapeInfo &SI) {
21272127 Value *Lhs = Inst->getOperand (0 );
21282128 Value *Rhs = Inst->getOperand (1 );
@@ -2148,7 +2148,7 @@ class LowerMatrixIntrinsics {
21482148 Builder);
21492149 }
21502150
2151- // / Lower unary operators, if shape information is available .
2151+ // / Lower unary operators.
21522152 void VisitUnaryOperator (UnaryOperator *Inst, const ShapeInfo &SI) {
21532153 Value *Op = Inst->getOperand (0 );
21542154
0 commit comments