[llvm] [CodeGen] Delete mov from imul sequence by allowing rm form (PR #190304)

Phoebe Wang via llvm-commits llvm-commits at lists.llvm.org
Sun Apr 5 21:13:02 PDT 2026


================
@@ -1148,10 +1148,28 @@ bool TwoAddressInstructionImpl::rescheduleKillAboveMI(
   } else {
     KillMI = LV->getVarInfo(Reg).findKill(MBB);
   }
-  if (!KillMI || MI == KillMI || KillMI->isCopy() || KillMI->isCopyLike())
-    // Don't mess with copies, they may be coalesced later.
+  if (!KillMI || MI == KillMI)
     return false;
 
+  bool IsCopyKill = KillMI->isCopy() || KillMI->isCopyLike();
----------------
phoebewang wrote:

Does it happen in CopyLike instructions? Maybe add a test case if it does.

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


More information about the llvm-commits mailing list