[llvm] [AArch64] Fix an incorrect handling of debug values in MachineSink (PR #68107)
Momchil Velikov via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 3 07:20:34 PDT 2023
================
@@ -528,7 +528,10 @@ bool MachineSinking::PerformSinkAndFold(MachineInstr &MI,
continue;
MachineInstr *NewDbgMI = SinkDst->getMF()->CloneMachineInstr(DbgMI);
SinkMBB.insertAfter(InsertPt, NewDbgMI);
- NewDbgMI->getOperand(0).setReg(DstReg);
----------------
momchil-velikov wrote:
To clarify, that `getOperand(0)` works for `DBG_VALUE`s only, other debug instructions can have operands using `DefReg` at other positions.
https://github.com/llvm/llvm-project/pull/68107
More information about the llvm-commits
mailing list