[llvm] [InlineSpiller] Do not fold undef copies (PR #147392)
    Jeffrey Byrnes via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Tue Jul  8 07:13:11 PDT 2025
    
    
  
================
@@ -946,6 +946,9 @@ foldMemoryOperand(ArrayRef<std::pair<MachineInstr *, unsigned>> Ops,
     if (MO.isUse() && !MO.readsReg() && !MO.isTied())
       continue;
 
+    if (MI->isCopy() && MI->getOperand(1).isUndef())
----------------
jrbyrnes wrote:
> Oh, I now see in the other PR, this is from hacking up the failed ranges. 
Yeah -- the test case is probably misleading, since it's using the MIR mid RA (i.e. after cleanedFailedVReg has created its version of the liveness)
https://github.com/llvm/llvm-project/pull/147392
    
    
More information about the llvm-commits
mailing list