[PATCH] D98659: [MachineCopyPropagation] Do more backward copy propagations

yshui via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Apr 18 06:07:25 PDT 2021


yshui added inline comments.


================
Comment at: llvm/lib/CodeGen/MachineCopyPropagation.cpp:935
+        if (User->isDebugValue()) {
+          MRI->updateDbgUsersToReg(Def, User);
+        } else {
----------------
yshui wrote:
> jmorse wrote:
> > I ran a stage2 RelWithDebInfo build of clang to test this (I was curious), and got an assertion failure in this function:
> > 
> >   llvm::MachineRegisterInfo::updateDbgUsersToReg(llvm::Register, ArrayRef<llvm::MachineInstr *>) const: Assertion `MI->getOperand(0).isReg()' failed.
> > 
> Interesting. I assume this is on X86? Do you happen to have the offending MIR around?
I can successfully build a RelWithDebInfo stage 2 clang with this patch applied to ab158d35b5a09b2541071ec8351a6ad57dfd7b6e.

Maybe a recent change broke this patch. I will test again after updating.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D98659



More information about the llvm-commits mailing list