[PATCH] D48102: Improve handling of COPY instructions with identical value numbers

Tim Renouf via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 20 08:51:36 PDT 2018


tpr added a comment.

That's because this change isn't in yet:

  --- a/lib/CodeGen/RegisterCoalescer.cpp
  +++ b/lib/CodeGen/RegisterCoalescer.cpp
  @@ -1653,6 +1653,10 @@ bool RegisterCoalescer::joinCopy(MachineInstr *CopyMI, bool &Again) {
       deleteInstr(CopyMI);
       return false;  // Not coalescable.
     }
  +  if (CopyMI->getOpcode() == TargetOpcode::IMPLICIT_DEF) {
  +    // Not coalesceable; eliminateUndefCopy turned it into implicit_def.
  +    return false;
  +  }
  
     // Coalesced copies are normally removed immediately, but transformations
     // like removeCopyByCommutingDef() can inadvertently create identity copies.


Repository:
  rL LLVM

https://reviews.llvm.org/D48102





More information about the llvm-commits mailing list