xref: /llvm-project/llvm/test/CodeGen/PowerPC/remove-redundant-li-implicit-reg.mir (revision 46d5d264fc66a017bbd0182b2b5fcc0f3f23d3be)
1# RUN: llc -mtriple=powerpc64-unknown-unknown -stop-after ppc-pre-emit-peephole \
2# RUN:   %s -o - -verify-machineinstrs | FileCheck %s
3
4---
5name: testRedundantLiImplicitReg
6tracksRegLiveness: true
7body: |
8  bb.0.entry:
9    liveins: $x3, $x4, $x5
10
11    STW killed $r3, killed $x5, 100
12    renamable $x5 = LI8 2
13    renamable $x4 = exact SRD killed renamable $x4, killed renamable $r5, implicit $x5
14    STD $x4, $x4, 100
15    BLR8 implicit $lr8, implicit $rm
16
17  ; CHECK-LABEL: testRedundantLiImplicitReg
18  ; CHECK: bb.0.entry:
19  ; CHECK:   STW killed $r3, killed $x5, 100
20  ; CHECK:   renamable $x4 = exact RLDICL killed renamable $x4, 62, 2
21  ; CHECK:   STD killed $x4, killed $x4, 100
22  ; CHECK:   BLR8 implicit $lr8, implicit $rm
23