1 # RUN: llc -o - %s -mtriple=powerpc64le--linux-gnu -run-pass=branch-folder | FileCheck %s
2 # The branch-folder should merge bb.1 and bb.5 below and therefore recalculate
3 # the liveins list of the merged block. This test is checking whether this
4 # recalculated list if okay and contains all the non-saved and saved CSRs.
5 # CHECK-LABEL: name: func
7 # CHECK-NEXT: liveins: $x30, $x29, $x3, $x6
8 # CHECK: $x4 = RLDICR killed $x6, 16, 47
9 # CHECK: $x3 = OR8 killed $x4, killed $x3
10 # CHECK: BLR8 implicit $lr8, implicit $rm, implicit $x3
13 tracksRegLiveness: true
15 - { id: 0, type: spill-slot, offset: -16, size: 8, alignment: 16, callee-saved-register: '$x30' }
16 - { id: 1, type: spill-slot, offset: -24, size: 8, alignment: 8, callee-saved-register: '$x29' }
17 - { id: 2, offset: -8, size: 8, alignment: 8, isImmutable: true, isAliased: false }
20 liveins: $x3, $x5, $x29, $x30
22 $x6 = RLWINM8 $x3, 16, 16, 31
23 $x3 = RLDICL killed $x3, 0, 48
24 BC undef $cr5lt, %bb.3
27 liveins: $x3, $x6, $x29, $x30
29 $x4 = RLDICR killed $x6, 16, 47
30 $x3 = OR8 killed $x4, killed $x3
31 BLR8 implicit $lr8, implicit $rm, implicit $x3
34 liveins: $x3, $x5, $x6, $x29, $x30
36 dead $x5 = ADD8 $x5, $x6
37 BC undef $cr5lt, %bb.1
40 liveins: $x3, $x6, $x29, $x30
41 STD killed $x29, -24, $x1 :: (store 8 into %fixed-stack.1)
42 STD killed $x30, -16, $x1 :: (store 8 into %fixed-stack.0, align 16)
43 NOP implicit-def dead $x29
44 NOP implicit-def dead $x30
46 $x30 = LD -16, $x1 :: (load 8 from %fixed-stack.0, align 16)
47 $x29 = LD -24, $x1 :: (load 8 from %fixed-stack.1)
49 $x4 = RLDICR killed $x6, 16, 47
50 $x3 = OR8 killed $x4, killed $x3
51 BLR8 implicit $lr8, implicit $rm, implicit $x3