[llvm] [MCP] Skip invalidating def constant regs during forward propagation (PR #111129)

Vladimir Radosavljevic via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 10 05:04:13 PDT 2024


================
@@ -885,6 +885,10 @@ void MachineCopyPropagation::ForwardCopyPropagateBlock(MachineBasicBlock &MBB) {
       assert(!Reg.isVirtual() &&
              "MachineCopyPropagation should be run after register allocation!");
 
+      // Skip invalidating constant registers.
+      if (MRI->isReserved(Reg) && MRI->isConstantPhysReg(Reg))
----------------
vladimirradosavljevic wrote:

Removed reserved check and moved `isConstantPhysReg` check inside the def handling.

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


More information about the llvm-commits mailing list