[llvm] [AMDGPU] Do not erase KILLs that redefine a register in SIPostRABundler (PR #218349)

Jay Foad via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 27 02:23:32 PDT 2026


================
@@ -222,6 +222,12 @@ bool SIPostRABundler::run(MachineFunction &MF) {
 
           while (Next != E && Next->isKill()) {
             MachineInstr &Kill = *Next;
+
+            // KILL from an undef-source COPY keeps its def; must not erase it.
----------------
jayfoad wrote:

> KILL instructions can't have defs?

MachineVerifier does not appear to enforce that. Should it?

https://github.com/llvm/llvm-project/pull/218349


More information about the llvm-commits mailing list