[llvm] AMDGPU: Avoid unnecessary copy of DebugLoc (PR #156389)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 1 19:35:17 PDT 2025


================
@@ -1491,7 +1491,7 @@ MachineBasicBlock::iterator SILoadStoreOptimizer::mergeWrite2Pair(
          (NewOffset0 != NewOffset1) && "Computed offset doesn't fit");
 
   const MCInstrDesc &Write2Desc = TII->get(Opc);
-  DebugLoc DL = CI.I->getDebugLoc();
+  const DebugLoc &DL = CI.I->getDebugLoc();
----------------
arsenm wrote:

This should really be doing that combine-DebugLoc thing 

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


More information about the llvm-commits mailing list