[PATCH] D132347: [RISCV] Use analyzeBranch in RISCVRedundantCopyElimination.

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 22 08:00:47 PDT 2022


reames accepted this revision.
reames added a comment.
This revision is now accepted and ready to land.

LGTM w/the comment change already pointed out.



================
Comment at: llvm/lib/Target/RISCV/RISCVRedundantCopyElimination.cpp:123
 
       if (SrcReg == RISCV::X0 && !MRI->isReserved(DefReg) &&
           TargetReg == DefReg) {
----------------
The reserved register check can be pulled out of the loop and become an early return.  Not related to this change, just noticed while glancing at the code.  Might be worth a separate cleanup change.  



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D132347



More information about the llvm-commits mailing list