[llvm] [InlineSpiller] Do not fold undef copies (PR #147392)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 7 21:24:03 PDT 2025
================
@@ -946,6 +946,9 @@ foldMemoryOperand(ArrayRef<std::pair<MachineInstr *, unsigned>> Ops,
if (MO.isUse() && !MO.readsReg() && !MO.isTied())
continue;
+ if (MI->isCopy() && MI->getOperand(1).isUndef())
----------------
arsenm wrote:
Copy shouldn't be special, the undef read case is already handled above here by the !readsReg check?
https://github.com/llvm/llvm-project/pull/147392
More information about the llvm-commits
mailing list