[llvm] RegAllocFast: Mark unspilled implicit_def physreg defs dead (PR #226295)

Jay Foad via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 25 04:04:41 PDT 2026


================
@@ -1180,6 +1180,9 @@ bool RegAllocFastImpl::defineVirtReg(MachineInstr &MI, unsigned OpNum,
       }
 
       LRI->LastUse = nullptr;
+    } else if (!LRI->LastUse) {
+      // No spill was inserted, so nothing below reads this def.
+      MO.setIsDead(true);
----------------
jayfoad wrote:

```suggestion
      MO.setIsDead();
```

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


More information about the llvm-commits mailing list