[PATCH] D78063: Remove extra instruction left by emitRLDICWhenLoweringJumpTables

Kai Luo via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 15 19:19:37 PDT 2020


lkail added inline comments.


================
Comment at: llvm/lib/Target/PowerPC/PPCMIPeephole.cpp:1594
+  // delete its def SrcMI. Otherwise keep it.
+  if (MRI->use_nodbg_empty(SrcReg) && !SrcMI->hasImplicitDef())
+    SrcMI->eraseFromParent();
----------------
lkail wrote:
> I think it's safe to remove `!SrcMI->hasImplicitDef()` since we have known `SrcMI`'s opcode is `RLDICL` and is not a record form, should not have implicit definitions.
Ooops, I made a mistake here, `SrcMI` might have implicit-def due to subreg. Overall LGTM.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D78063





More information about the llvm-commits mailing list