[PATCH] D78063: Remove extra instruction left by emitRLDICWhenLoweringJumpTables

Kai Luo via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 25 22:18:10 PDT 2020


lkail added a comment.

Please rephrase the title by adding `[PowerPC]` at the front.



================
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
----------------
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.


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

https://reviews.llvm.org/D78063





More information about the llvm-commits mailing list