[llvm] [CodeGen] Keep physreg copies when successors use-before-def (PR #182732)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 2 12:05:55 PST 2026


================
@@ -563,6 +563,26 @@ void MachineCopyPropagation::readSuccessorLiveIns(
   }
 }
 
+// Conservatively detect a physical-register use in a successor block before
+// the register is redefined there. This guards against stale/incomplete
+// live-in information, which can otherwise make a required copy look
+// dead at block exit
----------------
arsenm wrote:

This sounds like it's working around something that should have failed the verifier 

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


More information about the llvm-commits mailing list