[PATCH] D78063: Remove extra instruction left by emitRLDICWhenLoweringJumpTables

Anil Mahmud via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 21 22:40:46 PDT 2020


anil9 marked an inline comment as done.
anil9 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:
> 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.
Talked with others, at this stage SrcMI is not supposed to have implicit-def due to subreg. Will be adding an assert instead.


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