Skip to content

Commit 0816bb3

Browse files
committed
[Matrix] Fix heap-use-after-free after 0fa373c.
We need to skip instructions in FusedInsts, as they may have been deleted. Fixes a heap-use-after-free after #141681.
1 parent 3fe6268 commit 0816bb3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

llvm/lib/Transforms/Scalar/LowerMatrixIntrinsics.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1140,6 +1140,9 @@ class LowerMatrixIntrinsics {
11401140
// Fourth, pre-process all the PHINode's. The incoming values will be
11411141
// assigned later in VisitPHI.
11421142
for (Instruction *Inst : MatrixInsts) {
1143+
if (FusedInsts.count(Inst))
1144+
continue;
1145+
11431146
auto *PHI = dyn_cast<PHINode>(Inst);
11441147
if (!PHI)
11451148
continue;

0 commit comments

Comments
 (0)