[PATCH] D78063: [PowerPC] Remove extra instruction left by emitRLDICWhenLoweringJumpTables
Anil Mahmud via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 5 03:12:01 PDT 2020
anil9 marked 2 inline comments as done.
anil9 added inline comments.
================
Comment at: llvm/test/CodeGen/PowerPC/jump-tables-collapse-rotate-remove-SrcMI.mir:153
+ %30:g8rc = ADD8 %29, %28
+ MTCTR8 %30, implicit-def $ctr8
+ BCTR8 implicit $ctr8
----------------
lkail wrote:
> What if there is a use of `%4:g8rc` here? Like
> ```
> %30:g8rc = ADD8 %29, %28
> %31:g8rc = ADD8 %30, %4
> MTCTR8 %31, implicit-def $ctr8
> ```
> I suppose the folding still happened and line148 turned to
> ```
> %26:g8rc_and_g8rc_nox0 = RLDIC %16:g8rc, 2, 30
> ```
> and line147 wouldn't be erased.
Yes that should be the case since we delete SrcMI only when there is no other nondebug use.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D78063/new/
https://reviews.llvm.org/D78063
More information about the llvm-commits
mailing list