[llvm] [CodeGen] Check physical def kill flag in MachineInstr::isDead (PR #168684)
Luke Lau via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 19 01:13:36 PST 2025
================
@@ -1398,7 +1398,8 @@ bool MachineInstr::isDead(const MachineRegisterInfo &MRI,
Register Reg = MO.getReg();
if (Reg.isPhysical()) {
// Don't delete live physreg defs, or any reserved register defs.
- if (!LivePhysRegs || !LivePhysRegs->available(Reg) || MRI.isReserved(Reg))
+ if ((!MO.isDead() && (!LivePhysRegs || !LivePhysRegs->available(Reg))) ||
----------------
lukel97 wrote:
Thanks for catching that, fixed in 577cf9acfc5b
https://github.com/llvm/llvm-project/pull/168684
More information about the llvm-commits
mailing list