1 # RUN: llc -mtriple=powerpc64le--linux-gnu -stop-after ppc-pre-emit-peephole %s -o - -verify-machineinstrs | FileCheck %s
4 # ADDI8 + STFSX can be converted to ADDI8 + STFS even ADDI8 can not be erased.
5 name: testFwdOperandKilledAfter
6 # CHECK: name: testFwdOperandKilledAfter
7 tracksRegLiveness: true
10 liveins: $x3, $f1, $x5
12 STFSX killed $f1, $zero8, $x3
13 ; CHECK: STFS killed $f1, 100, $x5
14 STD killed $x3, killed $x5, 100
15 ; CHECK: STD killed $x3, killed $x5, 100
16 BLR8 implicit $lr8, implicit $rm
19 # No workaround needed for 64-bit register when calling readsRegister()
20 name: testReadsSubRegADDI
21 # CHECK: name: testReadsSubRegADDI
22 tracksRegLiveness: true
25 liveins: $x3, $f1, $x5
27 ; Following instruction $r3 also reads $x3, ADDI8 can not be erased
28 ; CHECK: $x3 = ADDI8 $x5, 100, implicit-def $r3
30 ; CHECK: STW killed $r3, $x5, 100
31 STFSX killed $f1, $zero8, $x3
32 ; CHECK: STFS killed $f1, 100, $x5
34 BLR8 implicit $lr8, implicit $rm