[llvm] [GlobalISel] Call `setInstrAndDebugLoc` before `tryCombineAll` (PR #86993)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 28 23:21:20 PDT 2024


================
@@ -162,6 +162,7 @@ bool Combiner::combineMachineInstrs() {
     while (!WorkList.empty()) {
       MachineInstr *CurrInst = WorkList.pop_back_val();
       LLVM_DEBUG(dbgs() << "\nTry combining " << *CurrInst;);
+      Builder->setInstrAndDebugLoc(*CurrInst);
----------------
arsenm wrote:

I envisioned this as happening before an apply function, not in the outermost combiner loop. Is it possible to sink this to after the match function has succeeded? 

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


More information about the llvm-commits mailing list