[llvm] Reland "RegisterCoalescer: Add implicit-def of super register when coalescing SUBREG_TO_REG" (PR #123632)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 20 07:52:06 PST 2025


================
@@ -1443,6 +1448,9 @@ bool RegisterCoalescer::reMaterializeTrivialDef(const CoalescerPair &CP,
               (MO.getSubReg() == 0 && MO.getReg() == DstOperand.getReg())) &&
              "unexpected implicit virtual register def");
       ImplicitOps.push_back(MO);
+      if (MO.isDef() && MO.getReg().isVirtual() &&
+          MRI->shouldTrackSubRegLiveness(DstReg))
+        NewMIImplicitOpsMask |= MRI->getMaxLaneMaskForVReg(MO.getReg());
----------------
arsenm wrote:

Why is this mixing MO.getReg() and DstReg? 

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


More information about the llvm-commits mailing list