[llvm] [RISCV][MCP] Remove redundant move from tail duplication (PR #89865)

Eli Friedman via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 29 14:45:01 PDT 2024


================
@@ -1053,7 +1053,7 @@ void MachineCopyPropagation::BackwardCopyPropagateBlock(
     // Ignore non-trivial COPYs.
     std::optional<DestSourcePair> CopyOperands =
         isCopyInstr(MI, *TII, UseCopyInstr);
-    if (CopyOperands && MI.getNumOperands() == 2) {
+    if (CopyOperands) {
----------------
efriedma-quic wrote:

Obviously the immediate is irrelevant... but can we have implicit register operands here?  Do we care if we do?  It looks like isCopyInstrImpl() doesn't check for them.

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


More information about the llvm-commits mailing list