Skip to content

Commit a62ef50

Browse files
committed
also use getInsertionPointAtDef() for non-inst phi operand reshape placement
1 parent a760840 commit a62ef50

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/Transforms/Scalar/LowerMatrixIntrinsics.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2272,8 +2272,8 @@ class LowerMatrixIntrinsics {
22722272
if (auto *MatrixInst = dyn_cast<Instruction>(MatrixVal)) {
22732273
if (auto MaybeIP = MatrixInst->getInsertionPointAfterDef())
22742274
Builder.SetInsertPoint(*MaybeIP);
2275-
} else
2276-
Builder.SetInsertPoint(Inst->getIterator());
2275+
} else if (auto MaybeIP = Inst->getInsertionPointAfterDef())
2276+
Builder.SetInsertPoint(*MaybeIP);
22772277

22782278
return this->getMatrix(MatrixVal, SI, Builder);
22792279
};

0 commit comments

Comments
 (0)