[llvm] [InstrRef] Preserve debug instr num in aarch64-ldst-opt. (PR #136009)

Felipe de Azevedo Piovezan via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 17 18:10:47 PDT 2025


================
@@ -1240,6 +1298,29 @@ AArch64LoadStoreOpt::mergePairedInsns(MachineBasicBlock::iterator I,
     MOp1.setReg(AArch64::Q0 + (MOp1.getReg() - AArch64::Z0));
     LLVM_DEBUG(((MachineInstr *)MIB)->print(dbgs()));
   } else {
+
+    // Restore the debug instruction numbers to the merged instruction.
+    bool UseNewDebugInstrNum = false;
+    unsigned NewDebugInstrNum;
----------------
felipepiovezan wrote:

The number of times we're calling `peekDebugInstrNum` suggest there is something we can improve on

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


More information about the llvm-commits mailing list