[llvm] [X86][APX] Reset SubReg for dst and check isVirtual before getInterval/getPhys (PR #191765)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 16 07:04:25 PDT 2026


================
@@ -1106,8 +1106,11 @@ foldMemoryOperand(ArrayRef<std::pair<MachineInstr *, unsigned>> Ops,
       LIS.InsertMachineInstrInMaps(MI);
 
   if (CopyMI) {
-    LiveInterval &LI = LIS.getInterval(CopyMI->getOperand(1).getReg());
-    LIS.shrinkToUses(&LI);
+    Register R = CopyMI->getOperand(1).getReg();
----------------
arsenm wrote:

This doesn't look right. You still need to update the live intervals if the source was a physreg. But how did a physreg get here in the first place? Can you add a mir test? 

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


More information about the llvm-commits mailing list