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

yshui via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Apr 18 15:50:55 PDT 2021


yshui added inline comments.


================
Comment at: llvm/lib/CodeGen/MachineCopyPropagation.cpp:935
+        if (User->isDebugValue()) {
+          MRI->updateDbgUsersToReg(Def, User);
+        } else {
----------------
yshui wrote:
> 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.
Hmm, still cannot reproduce with this patch applied to d4528cbb0e703ee17ee6fb4abe72b7246ccb38f1


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