[llvm] [DebugInfo][InstrRef] Copy instr-ref to replacement instrs in X86FixupSetCCPass (PR #159777)

Jeremy Morse via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 29 04:40:18 PDT 2025


================
@@ -136,6 +136,12 @@ bool X86FixupSetCCPass::runOnMachineFunction(MachineFunction &MF) {
           .addReg(ZeroReg)
           .addReg(Reg0)
           .addImm(X86::sub_8bit);
+
+      // Transfer the debug-instr-number to the setcc.
----------------
jmorse wrote:

Teeeeechhnnically we're not transferring the number, we're recording a substitution: if setcc already has a number, it'll retain it, and multiple variable locations will end up referring to the setcc. IMO "redirect" or "record a substitution" would be better phrasing?

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


More information about the llvm-commits mailing list