[PATCH] D78063: [PowerPC] Remove extra instruction left by emitRLDICWhenLoweringJumpTables

Nemanja Ivanovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 5 03:44:18 PDT 2020


nemanjai added inline comments.


================
Comment at: llvm/test/CodeGen/PowerPC/jump-tables-collapse-rotate-remove-SrcMI.mir:95
+      blocks:          [ '%bb.2', '%bb.4', '%bb.3', '%bb.3', '%bb.4', '%bb.2' ]
+body:             |
+  bb.0.entry:
----------------
The purpose of having an mir test here is that we can specify it very concisely. This should suffice:
```
body:             |   
  bb.0.entry:
    liveins: $x3, $x4 
  
    %1:g8rc = COPY $x4 
    %0:g8rc = COPY $x3 
    %2:g8rc = RLDICL killed %1, 0, 32
    %3:g8rc = RLDICR %2, 2, 61
    $x3 = COPY %3
    BLR8 implicit $lr8, implicit $rm, implicit $x3 
```
Then we should probably have two RUN lines:
- one with `-run-pass` where we just check that the `RLDICL` is deleted
- one with `-start-before` where we ensure that we don't crash and we only emit one instruction (`rldic 3, 4, 2, 30`)


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

https://reviews.llvm.org/D78063





More information about the llvm-commits mailing list