[llvm] [MCP] Disable BackwardCopyPropagateBlock for copies with implicit registers. (PR #137687)

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 29 08:15:22 PDT 2025


================
@@ -1200,7 +1200,7 @@ void MachineCopyPropagation::BackwardCopyPropagateBlock(
     // Ignore non-trivial COPYs.
     std::optional<DestSourcePair> CopyOperands =
         isCopyInstr(MI, *TII, UseCopyInstr);
-    if (CopyOperands) {
+    if (CopyOperands && MI.getNumImplicitOperands() == 0) {
----------------
topperc wrote:

For RISC-V, we want to support the canonical copy instruction that appears after ExpandPostRAPseudos, "ADDI rd, rs, 0". What are you suggesting we use here instead of isCopyInstr?

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


More information about the llvm-commits mailing list