[PATCH] D153838: [MCP] Optimize copies from undef

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 27 15:16:30 PDT 2023


arsenm added inline comments.


================
Comment at: llvm/lib/CodeGen/MachineCopyPropagation.cpp:486-487
+  if (!CopyOperands->Source->isUndef()) {
+    PrevCopy->getOperand(PrevCopyOperands->Source->getOperandNo())
+        .setIsUndef(false);
+  }
----------------
Pierre-vh wrote:
> foad wrote:
> > Doesn't `PrevCopyOperands->Source->setIsUndef(false)` work?
> The reference to the MachineOperand is const, unfortunately
You can change that?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D153838/new/

https://reviews.llvm.org/D153838



More information about the llvm-commits mailing list