1 #RUN: llc -o - %s -mtriple=s390x-ibm-linux -run-pass=greedy
2 #PR34502. Check HoistSpill works properly after the live range of spilled
3 #virtual register is cleared.
5 ; ModuleID = 'hoistspills_crash.ll'
6 source_filename = "bugpoint-output-07170c2.bc"
7 target datalayout = "E-m:e-i1:8:16-i8:8:16-i64:64-f128:64-v128:64-a:8:16-n32:64"
8 target triple = "s390x-ibm-linux"
10 @best8x8mode = external local_unnamed_addr global [4 x i16], align 2
11 @best8x8fwref = external local_unnamed_addr global [15 x [4 x i16]], align 2
12 @rec_mbY8x8 = external local_unnamed_addr global [16 x [16 x i16]], align 2
13 @bi_pred_me = external local_unnamed_addr global i32, align 4
15 declare signext i32 @Get_Direct_Cost8x8(i32 signext, i32*) local_unnamed_addr #0
16 declare void @store_coding_state(i32*) local_unnamed_addr #0
17 declare void @reset_coding_state(i32*) local_unnamed_addr #0
18 declare void @SetRefAndMotionVectors(i32 signext, i32 signext, i32 signext, i32 signext, i32 signext) local_unnamed_addr #2
19 declare signext i32 @Get_Direct_CostMB(double) local_unnamed_addr #0
20 declare void @SetModesAndRefframeForBlocks(i32 signext) local_unnamed_addr #1
22 define void @encode_one_macroblock() { ret void }
24 name: encode_one_macroblock
26 tracksRegLiveness: true
28 - { id: 0, class: addr64bit }
29 - { id: 1, class: addr64bit }
30 - { id: 2, class: grx32bit }
31 - { id: 3, class: grx32bit }
32 - { id: 4, class: gr32bit }
33 - { id: 5, class: gr32bit }
34 - { id: 6, class: addr64bit }
35 - { id: 7, class: addr64bit }
36 - { id: 8, class: gr64bit }
37 - { id: 9, class: grx32bit }
38 - { id: 10, class: gr32bit }
39 - { id: 11, class: grx32bit }
40 - { id: 12, class: gr32bit }
41 - { id: 13, class: grx32bit }
42 - { id: 14, class: gr32bit }
43 - { id: 15, class: grx32bit }
44 - { id: 16, class: grx32bit }
45 - { id: 17, class: gr32bit }
46 - { id: 18, class: gr32bit }
47 - { id: 19, class: gr64bit }
48 - { id: 20, class: grx32bit }
49 - { id: 21, class: grx32bit }
50 - { id: 22, class: addr64bit }
51 - { id: 23, class: grx32bit }
52 - { id: 24, class: grx32bit }
53 - { id: 25, class: grx32bit }
54 - { id: 26, class: grx32bit }
55 - { id: 27, class: grx32bit }
56 - { id: 28, class: grx32bit }
57 - { id: 29, class: grx32bit }
58 - { id: 30, class: grx32bit }
59 - { id: 31, class: grx32bit }
60 - { id: 32, class: grx32bit }
61 - { id: 33, class: grx32bit }
62 - { id: 34, class: grx32bit }
63 - { id: 35, class: grx32bit }
64 - { id: 36, class: grx32bit }
65 - { id: 37, class: gr64bit }
66 - { id: 38, class: gr32bit }
67 - { id: 39, class: grx32bit }
68 - { id: 40, class: addr64bit }
69 - { id: 41, class: addr64bit }
70 - { id: 42, class: gr64bit }
71 - { id: 43, class: gr32bit }
72 - { id: 44, class: gr32bit }
73 - { id: 45, class: gr32bit }
74 - { id: 46, class: gr32bit }
75 - { id: 47, class: gr32bit }
76 - { id: 48, class: grx32bit }
77 - { id: 49, class: gr64bit }
78 - { id: 50, class: gr64bit }
79 - { id: 51, class: gr64bit }
80 - { id: 52, class: gr32bit }
81 - { id: 53, class: gr32bit }
82 - { id: 54, class: grx32bit }
83 - { id: 55, class: gr32bit }
84 - { id: 56, class: grx32bit }
85 - { id: 57, class: grx32bit }
86 - { id: 58, class: gr64bit }
87 - { id: 59, class: gr64bit }
88 - { id: 60, class: gr32bit }
89 - { id: 61, class: grx32bit }
90 - { id: 62, class: addr64bit }
91 - { id: 63, class: addr64bit }
92 - { id: 64, class: addr64bit }
93 - { id: 65, class: addr64bit }
94 - { id: 66, class: addr64bit }
95 - { id: 67, class: addr64bit }
96 - { id: 68, class: addr64bit }
97 - { id: 69, class: addr64bit }
98 - { id: 70, class: addr64bit }
99 - { id: 71, class: gr64bit }
100 - { id: 72, class: addr64bit }
101 - { id: 73, class: grx32bit }
102 - { id: 74, class: gr64bit }
103 - { id: 75, class: addr64bit }
104 - { id: 76, class: addr64bit }
105 - { id: 77, class: addr64bit }
106 - { id: 78, class: addr64bit }
107 - { id: 79, class: gr32bit }
108 - { id: 80, class: grx32bit }
109 - { id: 81, class: gr64bit }
110 - { id: 82, class: addr64bit }
111 - { id: 83, class: grx32bit }
112 - { id: 84, class: addr64bit }
113 - { id: 85, class: addr64bit }
114 - { id: 86, class: addr64bit }
115 - { id: 87, class: grx32bit }
116 - { id: 88, class: addr64bit }
117 - { id: 89, class: addr64bit }
118 - { id: 90, class: gr64bit }
119 - { id: 91, class: addr64bit }
120 - { id: 92, class: addr64bit }
121 - { id: 93, class: addr64bit }
122 - { id: 94, class: addr64bit }
123 - { id: 95, class: addr64bit }
124 - { id: 96, class: addr64bit }
125 - { id: 97, class: addr64bit }
126 - { id: 98, class: gr64bit }
127 - { id: 99, class: gr64bit }
128 - { id: 100, class: addr64bit }
129 - { id: 101, class: gr64bit }
130 - { id: 102, class: gr64bit }
131 - { id: 103, class: gr64bit }
132 - { id: 104, class: gr64bit }
133 - { id: 105, class: addr64bit }
134 - { id: 106, class: grx32bit }
135 - { id: 107, class: grx32bit }
136 - { id: 108, class: vr64bit }
137 - { id: 109, class: gr64bit }
138 - { id: 110, class: gr64bit }
139 - { id: 111, class: grx32bit }
140 - { id: 112, class: grx32bit }
141 - { id: 113, class: fp64bit }
142 - { id: 114, class: grx32bit }
143 - { id: 115, class: fp64bit }
144 - { id: 116, class: fp64bit }
145 - { id: 117, class: addr64bit }
146 - { id: 118, class: grx32bit }
147 - { id: 119, class: grx32bit }
148 - { id: 120, class: addr64bit }
149 - { id: 121, class: grx32bit }
150 - { id: 122, class: grx32bit }
151 - { id: 123, class: gr32bit }
152 - { id: 124, class: gr32bit }
153 - { id: 125, class: gr32bit }
154 - { id: 126, class: gr32bit }
155 - { id: 127, class: gr32bit }
156 - { id: 128, class: grx32bit }
157 - { id: 129, class: grx32bit }
158 - { id: 130, class: fp64bit }
163 successors: %bb.2(0x00000001), %bb.1(0x7fffffff)
165 CHIMux undef %20, 3, implicit-def $cc
166 BRC 14, 8, %bb.2, implicit killed $cc
170 successors: %bb.2(0x00000001), %bb.3(0x7fffffff)
172 CHIMux undef %21, 0, implicit-def $cc
173 BRC 14, 6, %bb.3, implicit killed $cc
179 successors: %bb.6(0x00000001), %bb.4(0x7fffffff)
181 CHIMux undef %23, 2, implicit-def $cc
182 BRC 14, 8, %bb.6, implicit killed $cc
186 successors: %bb.5(0x00000001), %bb.7(0x7fffffff)
188 CHIMux undef %24, 1, implicit-def $cc
189 BRC 14, 6, %bb.7, implicit killed $cc
197 successors: %bb.47(0x00000001), %bb.8(0x7fffffff)
199 CHIMux undef %25, 1, implicit-def $cc
200 BRC 14, 8, %bb.47, implicit killed $cc
204 successors: %bb.46(0x00000001), %bb.48(0x7fffffff)
206 CHIMux undef %26, 2, implicit-def $cc
207 BRC 14, 8, %bb.46, implicit killed $cc
211 successors: %bb.36(0x00000001), %bb.10(0x7fffffff)
213 CHIMux undef %31, 1, implicit-def $cc
214 BRC 14, 8, %bb.36, implicit killed $cc
218 successors: %bb.35(0x00000001), %bb.37(0x7fffffff)
220 CHIMux undef %32, 2, implicit-def $cc
221 BRC 14, 8, %bb.35, implicit killed $cc
226 %6 = SLLG %120, $noreg, 1
228 %6 = AGR %6, %42, implicit-def dead $cc
229 %45 = SRLK %120.subreg_l32, $noreg, 31
230 %45 = AR %45, %120.subreg_l32, implicit-def dead $cc
231 %45 = NIFMux %45, 536870910, implicit-def dead $cc
232 %47 = SRK %120.subreg_l32, %45, implicit-def dead $cc
233 %47 = SLL %47, $noreg, 3
237 successors: %bb.56, %bb.13
239 CHIMux %38, 0, implicit-def $cc
240 BRC 14, 8, %bb.13, implicit killed $cc
246 successors: %bb.14(0x7fffffff), %bb.15(0x00000001)
248 ADJCALLSTACKDOWN 0, 0
249 %49 = LGFR %120.subreg_l32
251 CallBRASL @Get_Direct_Cost8x8, killed $r2d, undef $r3d, csr_systemz, implicit-def dead $r14d, implicit-def dead $cc, implicit-def $r2d
253 %51 = COPY killed $r2d
254 MVHHI %7, 0, 0 :: (store 2)
255 %12 = ARK %51.subreg_l32, %125, implicit-def dead $cc
256 CFIMux %51.subreg_l32, 2147483647, implicit-def $cc
257 %12 = LOCRMux %12, %126, 14, 8, implicit killed $cc
258 CFIMux %125, 2147483647, implicit-def $cc
259 %12 = LOCRMux %12, %126, 14, 8, implicit killed $cc
260 CHIMux undef %56, 0, implicit-def $cc
261 BRC 14, 6, %bb.15, implicit killed $cc
265 %124 = AHIMux %124, 1, implicit-def dead $cc
266 ADJCALLSTACKDOWN 0, 0
267 CallBRASL @store_coding_state, undef $r2d, csr_systemz, implicit-def dead $r14d, implicit-def dead $cc
275 successors: %bb.12(0x7c000000), %bb.17(0x04000000)
277 CLGFI undef %59, 4, implicit-def $cc
278 BRC 14, 4, %bb.12, implicit killed $cc
282 successors: %bb.18, %bb.19
284 MVHI %0, 332, 2 :: (store 4)
286 %60 = AR %60, %4, implicit-def dead $cc
287 %18 = LHMux %6, 0, $noreg :: (load 2)
288 CHIMux %38, 0, implicit-def $cc
289 BRC 14, 6, %bb.19, implicit killed $cc
293 %62 = SLLG %81, $noreg, 1
295 %65 = LG undef %66, 0, $noreg :: (load 8)
296 %67 = LGF undef %68, 0, $noreg :: (load 4)
297 MVC undef %69, 0, 2, %64, 0 :: (store 2), (load 2)
299 %70 = OILL64 %70, 3, implicit-def dead $cc
300 %71 = LA %70, 2, $noreg
301 %72 = SLLG %71, $noreg, 1
302 %73 = LHMux %72, 0, %63 :: (load 2)
304 %75 = SLLG %74, $noreg, 1
305 %76 = LG %65, 0, $noreg :: (load 8)
306 STHMux %73, %76, 0, %75 :: (store 2)
307 %77 = LG undef %78, 0, $noreg :: (load 8)
308 %79 = LHRL @rec_mbY8x8 :: (load 2)
309 STHMux %79, %77, 0, $noreg :: (store 2)
310 %80 = LHMux %72, 0, %63 :: (load 2)
311 STHMux %80, %77, 0, %75 :: (store 2)
312 %81 = OILL64 %81, 7, implicit-def dead $cc
313 %82 = SLLG %81, $noreg, 1
314 %83 = LHMux %82, 0, %63 :: (load 2)
315 STHMux %83, %77, 0, $noreg :: (store 2)
316 %84 = LA %62, 64, %63
317 MVC undef %85, 0, 2, %84, 0 :: (store 2), (load 2)
318 %86 = SLLG %70, $noreg, 1
319 %87 = LHMux %86, 64, %63 :: (load 2)
320 %88 = SLLG %67, $noreg, 3
321 %89 = LG %65, 16, %88 :: (load 8)
323 %91 = SLLG %90, $noreg, 1
324 STHMux %87, %89, 0, %91 :: (store 2)
325 %92 = LA %72, 64, %63
326 MVC undef %93, 0, 2, %92, 0 :: (store 2), (load 2)
328 MVC undef %95, 0, 2, %94, 0 :: (store 2), (load 2)
330 MVC undef %97, 0, 2, %96, 0 :: (store 2), (load 2)
333 successors: %bb.20(0x04000000), %bb.11(0x7c000000)
335 %98 = LGH %7, 0, $noreg :: (load 2)
336 %99 = LGH undef %100, 0, $noreg :: (load 2)
337 ADJCALLSTACKDOWN 0, 0
338 %101 = LGFR %120.subreg_l32
345 CallBRASL @SetRefAndMotionVectors, killed $r2d, killed $r3d, killed $r4d, killed $r5d, killed $r6d, csr_systemz, implicit-def dead $r14d, implicit-def dead $cc
347 ADJCALLSTACKDOWN 0, 0
348 CallBRASL @reset_coding_state, undef $r2d, csr_systemz, implicit-def dead $r14d, implicit-def dead $cc
350 %120 = LA %120, 1, $noreg
351 CGHI %120, 4, implicit-def $cc
352 BRC 14, 6, %bb.11, implicit killed $cc
356 successors: %bb.22(0x00000001), %bb.21(0x7fffffff)
358 MVHI undef %105, 0, 0 :: (store 4)
359 CHIMux undef %106, 3, implicit-def $cc
360 BRC 14, 8, %bb.22, implicit killed $cc
364 successors: %bb.22(0x00000001), %bb.23(0x7fffffff)
366 CHIMux undef %107, 0, implicit-def $cc
367 BRC 14, 6, %bb.23, implicit killed $cc
373 successors: %bb.26(0x00000001), %bb.24(0x7fffffff)
375 ADJCALLSTACKDOWN 0, 0
376 CallBRASL @Get_Direct_CostMB, undef $f0d, csr_systemz, implicit-def dead $r14d, implicit-def dead $cc, implicit-def dead $r2d
378 ADJCALLSTACKDOWN 0, 0
380 CallBRASL @SetModesAndRefframeForBlocks, killed $r2d, csr_systemz, implicit-def dead $r14d, implicit-def dead $cc
382 CHIMux undef %111, 13, implicit-def $cc
383 BRC 14, 8, %bb.26, implicit killed $cc
387 successors: %bb.25(0x00000001), %bb.27(0x7fffffff)
389 CHIMux undef %112, 8, implicit-def $cc
390 BRC 14, 6, %bb.27, implicit killed $cc
398 successors: %bb.28, %bb.29
400 CHIMux undef %114, 0, implicit-def $cc
401 BRC 14, 6, %bb.29, implicit killed $cc
404 %130 = CDFBR %60, implicit $fpc
411 successors: %bb.33(0x00000001), %bb.31(0x7fffffff)
413 VST64 %130, undef %117, 0, $noreg :: (store 8)
414 CHIMux undef %118, 2, implicit-def $cc
415 BRC 14, 8, %bb.33, implicit killed $cc
419 successors: %bb.32(0x00000001), %bb.34(0x7fffffff)
421 CHIMux undef %119, 1, implicit-def $cc
422 BRC 14, 6, %bb.34, implicit killed $cc
437 successors: %bb.40(0x00000001), %bb.38(0x7fffffff)
439 CHIMux undef %33, 1, implicit-def $cc
440 BRC 14, 8, %bb.40, implicit killed $cc
444 successors: %bb.39(0x00000001), %bb.41(0x7fffffff)
446 CHIMux undef %34, 2, implicit-def $cc
447 BRC 14, 6, %bb.41, implicit killed $cc
455 successors: %bb.44(0x00000001), %bb.42(0x7fffffff)
457 CHIMux undef %35, 1, implicit-def $cc
458 BRC 14, 8, %bb.44, implicit killed $cc
462 successors: %bb.43(0x00000001), %bb.45(0x7fffffff)
464 CHIMux undef %36, 2, implicit-def $cc
465 BRC 14, 6, %bb.45, implicit killed $cc
473 %0 = LG undef %22, 0, $noreg :: (load 8)
475 STRL %38, @bi_pred_me :: (store 4)
477 %41 = LARL @best8x8fwref
478 %42 = LARL @best8x8mode
479 %63 = LARL @rec_mbY8x8
480 %126 = IIFMux 2147483647
491 successors: %bb.51(0x00000001), %bb.49(0x7fffffff)
493 CHIMux undef %27, 1, implicit-def $cc
494 BRC 14, 8, %bb.51, implicit killed $cc
498 successors: %bb.50(0x00000001), %bb.52(0x7fffffff)
500 CHIMux undef %28, 2, implicit-def $cc
501 BRC 14, 6, %bb.52, implicit killed $cc
509 successors: %bb.55(0x00000001), %bb.53(0x7fffffff)
511 CHIMux undef %29, 1, implicit-def $cc
512 BRC 14, 8, %bb.55, implicit killed $cc
516 successors: %bb.54(0x00000001), %bb.9(0x7fffffff)
518 CHIMux undef %30, 2, implicit-def $cc
519 BRC 14, 6, %bb.9, implicit killed $cc