[Matrix] Fix heap-use-after-free after 0fa373c77d.

We need to skip instructions in FusedInsts, as they may have been
deleted. Fixes a heap-use-after-free after #141681.
This commit is contained in:
Florian Hahn
2025-06-19 17:49:33 +01:00
parent 3fe62682ef
commit 0816bb32ac

View File

@@ -1140,6 +1140,9 @@ public:
// Fourth, pre-process all the PHINode's. The incoming values will be
// assigned later in VisitPHI.
for (Instruction *Inst : MatrixInsts) {
if (FusedInsts.count(Inst))
continue;
auto *PHI = dyn_cast<PHINode>(Inst);
if (!PHI)
continue;