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

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Thu May 2 22:22:02 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());
----------------
arsenm wrote:

Use initializer list for this 

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


More information about the llvm-commits mailing list