[llvm] [NFC][SPIRV] Remove `MachineInstr` from `DeadMIs` set after erasing it (PR #184795)
Juan Manuel Martinez CaamaƱo via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 5 05:43:43 PST 2026
https://github.com/jmmartinez created https://github.com/llvm/llvm-project/pull/184795
None
>From 8c7f7eb79c21f5f08077943b6c3d9661eb0eef57 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Juan=20Manuel=20Martinez=20Caama=C3=B1o?=
<jmartinezcaamao at gmail.com>
Date: Thu, 5 Mar 2026 14:40:38 +0100
Subject: [PATCH] [NFC][SPIRV] Remove `MachineInstr` from `DeadMIs` set after
erasing it
---
llvm/lib/Target/SPIRV/SPIRVInstructionSelector.cpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/llvm/lib/Target/SPIRV/SPIRVInstructionSelector.cpp b/llvm/lib/Target/SPIRV/SPIRVInstructionSelector.cpp
index fd5e869279fe6..fb083880dc8d6 100644
--- a/llvm/lib/Target/SPIRV/SPIRVInstructionSelector.cpp
+++ b/llvm/lib/Target/SPIRV/SPIRVInstructionSelector.cpp
@@ -837,6 +837,7 @@ bool SPIRVInstructionSelector::select(MachineInstr &I) {
// erase it
LLVM_DEBUG(dbgs() << "Instruction is folded and dead.\n");
removeDeadInstruction(I);
+ DeadMIs.erase(&I);
return true;
}
More information about the llvm-commits
mailing list