1 # RUN: llc -mtriple=aarch64-unknown-fuchsia -run-pass=greedy -verify-machineinstrs -o - %s | FileCheck %s
3 # Check that we spill %31 and do not rematerialize it since the use operand
4 # of ADDXri is killed by the STRXui in this block.
6 # CHECK-LABEL: name: test
14 tracksRegLiveness: true
16 - { id: 0, type: variable-sized, offset: 0, alignment: 32,
20 successors: %bb.2(0x40000000), %bb.1(0x40000000)
23 %22:gpr64common = COPY $x0
27 successors: %bb.3(0x80000000)
33 successors: %bb.3(0x80000000)
39 successors: %bb.4(0x30000000), %bb.5(0x50000000)
41 %2:gpr64common = COPY %1
46 successors: %bb.5(0x80000000)
48 %31:gpr64common = SUBXri $sp, 288, 0
49 $sp = ANDXri %31, 7930
50 %2:gpr64common = COPY $xzr
53 successors: %bb.6(0x80000000)
55 %9:gpr64common = COPY $xzr
56 %35:gpr64sp = ADDXri %2, 32, 0
57 %4:gpr64common = UBFMXri %2, 3, 63
58 %37:gpr64 = MOVi64imm -506381209866536712
59 %38:gpr32 = MOVi32imm -202116109
60 %39:gpr64common = nuw ADDXri %22, 836, 0
61 %41:gpr64common = nuw ADDXri %22, 648, 0
64 %8:gpr64common = UBFMXri %39, 3, 63
65 %7:gpr64common = UBFMXri %41, 3, 63
66 %47:gpr64 = MOVi64imm 0
69 successors: %bb.8(0x30000000), %bb.7(0x50000000)
71 %44:gpr64common = ADDXrr %22, %9
72 %10:gpr64common = ADDXri %44, 648, 0
73 %11:gpr64common = ANDSXri %10, 4098, implicit-def $nzcv
74 Bcc 0, %bb.8, implicit killed $nzcv
78 successors: %bb.8(0x80000000)
80 BL 0, csr_aarch64_aapcs, implicit-def dead $lr
83 successors: %bb.9(0x04000000), %bb.24(0x7c000000)
89 successors: %bb.10(0x7ffff800), %bb.11(0x00000800)
91 %55:gpr64common = ADDXrr %22, %9
92 %56:gpr64sp = ADDXri %55, 648, 0
97 successors: %bb.11(0x80000000)
99 $x0 = ADDXri %55, 648, 0
102 $x1 = nuw ADDXri %35, 32, 0
103 BL 0, csr_aarch64_aapcs, implicit-def dead $lr
104 %66:gpr64sp = nuw ADDXri %35, 48, 0
105 $x0 = ADDXri %55, 696, 0
110 successors: %bb.15(0x7ffff800), %bb.12(0x00000800)
116 successors: %bb.13(0x00000000), %bb.14(0x80000000)
125 successors: %bb.18(0x80000000)
131 successors: %bb.16(0x00000000), %bb.17(0x80000000)
133 %76:gpr32 = LDRBBui %7, 0
140 %74:gpr64common = ADDXrr %22, %9
141 %15:gpr64sp = ADDXri %74, 648, 0
145 successors: %bb.18(0x80000000)
150 successors: %bb.19(0x80000000), %bb.20(0x00000000)
152 %79:gpr32 = LDRBBui %8, 0
157 successors: %bb.21(0x80000000), %bb.20(0x00000000)
159 %80:gpr32 = MOVi32imm 1
166 %16:gpr64sp = ADDXri %22, 836, 0
170 successors: %bb.24(0x00000000), %bb.22(0x80000000)
175 successors: %bb.26(0x80000000)
180 successors: %bb.25(0x04000000), %bb.6(0x7c000000)
182 %8:gpr64common = ADDXri %8, 24, 0
183 %7:gpr64common = ADDXri %7, 24, 0
187 successors: %bb.26(0x80000000)
189 %56:gpr64sp = COPY $xzr
192 successors: %bb.28(0x50000000), %bb.27(0x30000000)
194 undef %83.sub_32:gpr64 = MOVi32imm 1172321806
200 successors: %bb.28(0x80000000)
206 RET_ReallyLR implicit $x0