[llvm] Merge sourcelocation in CSEMIRBuilder::getDominatingInstrForID. (PR #90922)

Adrian Prantl via llvm-commits llvm-commits at lists.llvm.org
Fri May 3 08:39:16 PDT 2024


================
@@ -99,8 +99,12 @@ class LegalizationArtifactCombiner {
       const LLT DstTy = MRI.getType(DstReg);
       if (isInstLegal({TargetOpcode::G_CONSTANT, {DstTy}})) {
         auto &CstVal = SrcMI->getOperand(1);
+        SmallVector<DILocation *> Locs;
+        Locs.push_back(MI.getDebugLoc().get());
+        Locs.push_back(SrcMI->getDebugLoc().get());
----------------
adrian-prantl wrote:

Why don't we just merge here and pass in a DILocation instead of a vector?

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


More information about the llvm-commits mailing list