1 ; RUN: llc -mcpu=corei7 -no-stack-coloring=false < %s | FileCheck %s --check-prefix=YESCOLOR --check-prefix=CHECK
2 ; RUN: llc -mcpu=corei7 -no-stack-coloring=false -stackcoloring-lifetime-start-on-first-use=false < %s | FileCheck %s --check-prefix=NOFIRSTUSE --check-prefix=CHECK
3 ; RUN: llc -mcpu=corei7 -no-stack-coloring=true < %s | FileCheck %s --check-prefix=NOCOLOR --check-prefix=CHECK
5 target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128"
6 target triple = "x86_64-apple-macosx10.8.0"
8 ;CHECK-LABEL: myCall_w2:
9 ;YESCOLOR: subq $144, %rsp
10 ;NOCOLOR: subq $272, %rsp
12 define i32 @myCall_w2(i32 %in) {
14 %a = alloca [17 x ptr], align 8
15 %a2 = alloca [16 x ptr], align 8
16 call void @llvm.lifetime.start.p0(i64 -1, ptr %a)
17 %t1 = call i32 @foo(i32 %in, ptr %a)
18 %t2 = call i32 @foo(i32 %in, ptr %a)
19 call void @llvm.lifetime.end.p0(i64 -1, ptr %a)
20 call void @llvm.lifetime.start.p0(i64 -1, ptr %a2)
21 %t3 = call i32 @foo(i32 %in, ptr %a2)
22 %t4 = call i32 @foo(i32 %in, ptr %a2)
23 call void @llvm.lifetime.end.p0(i64 -1, ptr %a2)
24 %t5 = add i32 %t1, %t2
25 %t6 = add i32 %t3, %t4
26 %t7 = add i32 %t5, %t6
31 ;CHECK-LABEL: myCall2_no_merge
32 ;YESCOLOR: subq $272, %rsp
33 ;NOCOLOR: subq $272, %rsp
35 define i32 @myCall2_no_merge(i32 %in, i1 %d) {
37 %a = alloca [17 x ptr], align 8
38 %a2 = alloca [16 x ptr], align 8
39 call void @llvm.lifetime.start.p0(i64 -1, ptr %a)
40 %t1 = call i32 @foo(i32 %in, ptr %a)
41 %t2 = call i32 @foo(i32 %in, ptr %a)
42 br i1 %d, label %bb2, label %bb3
44 call void @llvm.lifetime.start.p0(i64 -1, ptr %a2)
45 %t3 = call i32 @foo(i32 %in, ptr %a2)
46 %t4 = call i32 @foo(i32 %in, ptr %a2)
47 call void @llvm.lifetime.end.p0(i64 -1, ptr %a2)
48 %t5 = add i32 %t1, %t2
49 %t6 = add i32 %t3, %t4
50 %t7 = add i32 %t5, %t6
51 call void @llvm.lifetime.end.p0(i64 -1, ptr %a)
54 call void @llvm.lifetime.end.p0(i64 -1, ptr %a)
58 ;CHECK-LABEL: myCall2_w2
59 ;YESCOLOR: subq $144, %rsp
60 ;NOCOLOR: subq $272, %rsp
62 define i32 @myCall2_w2(i32 %in, i1 %d) {
64 %a = alloca [17 x ptr], align 8
65 %a2 = alloca [16 x ptr], align 8
66 call void @llvm.lifetime.start.p0(i64 -1, ptr %a)
67 %t1 = call i32 @foo(i32 %in, ptr %a)
68 %t2 = call i32 @foo(i32 %in, ptr %a)
69 call void @llvm.lifetime.end.p0(i64 -1, ptr %a)
70 br i1 %d, label %bb2, label %bb3
72 call void @llvm.lifetime.start.p0(i64 -1, ptr %a2)
73 %t3 = call i32 @foo(i32 %in, ptr %a2)
74 %t4 = call i32 @foo(i32 %in, ptr %a2)
75 call void @llvm.lifetime.end.p0(i64 -1, ptr %a2)
76 %t5 = add i32 %t1, %t2
77 %t6 = add i32 %t3, %t4
78 %t7 = add i32 %t5, %t6
84 ;CHECK-LABEL: myCall_w4:
85 ;YESCOLOR: subq $112, %rsp
86 ;NOFIRSTUSE: subq $208, %rsp
87 ;NOCOLOR: subq $400, %rsp
89 define i32 @myCall_w4(i32 %in) {
91 %a1 = alloca [14 x ptr], align 8
92 %a2 = alloca [13 x ptr], align 8
93 %a3 = alloca [12 x ptr], align 8
94 %a4 = alloca [11 x ptr], align 8
95 call void @llvm.lifetime.start.p0(i64 -1, ptr %a4)
96 call void @llvm.lifetime.start.p0(i64 -1, ptr %a1)
97 %t1 = call i32 @foo(i32 %in, ptr %a1)
98 %t2 = call i32 @foo(i32 %in, ptr %a1)
99 call void @llvm.lifetime.end.p0(i64 -1, ptr %a1)
100 call void @llvm.lifetime.start.p0(i64 -1, ptr %a2)
101 %t9 = call i32 @foo(i32 %in, ptr %a2)
102 %t8 = call i32 @foo(i32 %in, ptr %a2)
103 call void @llvm.lifetime.end.p0(i64 -1, ptr %a2)
104 call void @llvm.lifetime.start.p0(i64 -1, ptr %a3)
105 %t3 = call i32 @foo(i32 %in, ptr %a3)
106 %t4 = call i32 @foo(i32 %in, ptr %a3)
107 call void @llvm.lifetime.end.p0(i64 -1, ptr %a3)
108 %t11 = call i32 @foo(i32 %in, ptr %a4)
109 call void @llvm.lifetime.end.p0(i64 -1, ptr %a4)
110 %t5 = add i32 %t1, %t2
111 %t6 = add i32 %t3, %t4
112 %t7 = add i32 %t5, %t6
116 ;CHECK-LABEL: myCall2_w4:
117 ;YESCOLOR: subq $112, %rsp
118 ;NOCOLOR: subq $400, %rsp
120 define i32 @myCall2_w4(i32 %in) {
122 %a1 = alloca [14 x ptr], align 8
123 %a2 = alloca [13 x ptr], align 8
124 %a3 = alloca [12 x ptr], align 8
125 %a4 = alloca [11 x ptr], align 8
126 call void @llvm.lifetime.start.p0(i64 -1, ptr %a1)
127 %t1 = call i32 @foo(i32 %in, ptr %a1)
128 %t2 = call i32 @foo(i32 %in, ptr %a1)
129 call void @llvm.lifetime.end.p0(i64 -1, ptr %a1)
130 call void @llvm.lifetime.start.p0(i64 -1, ptr %a2)
131 %t9 = call i32 @foo(i32 %in, ptr %a2)
132 %t8 = call i32 @foo(i32 %in, ptr %a2)
133 call void @llvm.lifetime.end.p0(i64 -1, ptr %a2)
134 call void @llvm.lifetime.start.p0(i64 -1, ptr %a3)
135 %t3 = call i32 @foo(i32 %in, ptr %a3)
136 %t4 = call i32 @foo(i32 %in, ptr %a3)
137 call void @llvm.lifetime.end.p0(i64 -1, ptr %a3)
138 br i1 undef, label %bb2, label %bb3
140 call void @llvm.lifetime.start.p0(i64 -1, ptr %a4)
141 %t11 = call i32 @foo(i32 %in, ptr %a4)
142 call void @llvm.lifetime.end.p0(i64 -1, ptr %a4)
143 %t5 = add i32 %t1, %t2
144 %t6 = add i32 %t3, %t4
145 %t7 = add i32 %t5, %t6
152 ;CHECK-LABEL: myCall2_noend:
153 ;YESCOLOR: subq $144, %rsp
154 ;NOCOLOR: subq $272, %rsp
157 define i32 @myCall2_noend(i32 %in, i1 %d) {
159 %a = alloca [17 x ptr], align 8
160 %a2 = alloca [16 x ptr], align 8
161 call void @llvm.lifetime.start.p0(i64 -1, ptr %a)
162 %t1 = call i32 @foo(i32 %in, ptr %a)
163 %t2 = call i32 @foo(i32 %in, ptr %a)
164 call void @llvm.lifetime.end.p0(i64 -1, ptr %a)
165 br i1 %d, label %bb2, label %bb3
167 call void @llvm.lifetime.start.p0(i64 -1, ptr %a2)
168 %t3 = call i32 @foo(i32 %in, ptr %a2)
169 %t4 = call i32 @foo(i32 %in, ptr %a2)
170 %t5 = add i32 %t1, %t2
171 %t6 = add i32 %t3, %t4
172 %t7 = add i32 %t5, %t6
178 ;CHECK-LABEL: myCall2_noend2:
179 ;YESCOLOR: subq $144, %rsp
180 ;NOCOLOR: subq $272, %rsp
181 define i32 @myCall2_noend2(i32 %in, i1 %d) {
183 %a = alloca [17 x ptr], align 8
184 %a2 = alloca [16 x ptr], align 8
185 call void @llvm.lifetime.start.p0(i64 -1, ptr %a)
186 %t1 = call i32 @foo(i32 %in, ptr %a)
187 %t2 = call i32 @foo(i32 %in, ptr %a)
188 br i1 %d, label %bb2, label %bb3
190 call void @llvm.lifetime.end.p0(i64 -1, ptr %a)
191 call void @llvm.lifetime.start.p0(i64 -1, ptr %a2)
192 %t3 = call i32 @foo(i32 %in, ptr %a2)
193 %t4 = call i32 @foo(i32 %in, ptr %a2)
194 %t5 = add i32 %t1, %t2
195 %t6 = add i32 %t3, %t4
196 %t7 = add i32 %t5, %t6
203 ;CHECK-LABEL: myCall2_nostart:
204 ;YESCOLOR: subq $272, %rsp
205 ;NOCOLOR: subq $272, %rsp
206 define i32 @myCall2_nostart(i32 %in, i1 %d) {
208 %a = alloca [17 x ptr], align 8
209 %a2 = alloca [16 x ptr], align 8
210 %t1 = call i32 @foo(i32 %in, ptr %a)
211 %t2 = call i32 @foo(i32 %in, ptr %a)
212 call void @llvm.lifetime.end.p0(i64 -1, ptr %a)
213 br i1 %d, label %bb2, label %bb3
215 call void @llvm.lifetime.start.p0(i64 -1, ptr %a2)
216 %t3 = call i32 @foo(i32 %in, ptr %a2)
217 %t4 = call i32 @foo(i32 %in, ptr %a2)
218 %t5 = add i32 %t1, %t2
219 %t6 = add i32 %t3, %t4
220 %t7 = add i32 %t5, %t6
226 ; Adopt the test from Transforms/Inline/array_merge.ll'
227 ;CHECK-LABEL: array_merge:
228 ;YESCOLOR: subq $808, %rsp
229 ;NOCOLOR: subq $1608, %rsp
230 define void @array_merge() nounwind ssp {
232 %A.i1 = alloca [100 x i32], align 4
233 %B.i2 = alloca [100 x i32], align 4
234 %A.i = alloca [100 x i32], align 4
235 %B.i = alloca [100 x i32], align 4
236 call void @llvm.lifetime.start.p0(i64 -1, ptr %A.i) nounwind
237 call void @llvm.lifetime.start.p0(i64 -1, ptr %B.i) nounwind
238 call void @bar(ptr %A.i, ptr %B.i) nounwind
239 call void @llvm.lifetime.end.p0(i64 -1, ptr %A.i) nounwind
240 call void @llvm.lifetime.end.p0(i64 -1, ptr %B.i) nounwind
241 call void @llvm.lifetime.start.p0(i64 -1, ptr %A.i1) nounwind
242 call void @llvm.lifetime.start.p0(i64 -1, ptr %B.i2) nounwind
243 call void @bar(ptr %A.i1, ptr %B.i2) nounwind
244 call void @llvm.lifetime.end.p0(i64 -1, ptr %A.i1) nounwind
245 call void @llvm.lifetime.end.p0(i64 -1, ptr %B.i2) nounwind
249 ;CHECK-LABEL: func_phi_lifetime:
250 ;YESCOLOR: subq $272, %rsp
251 ;NOCOLOR: subq $272, %rsp
252 define i32 @func_phi_lifetime(i32 %in, i1 %d) {
254 %a = alloca [17 x ptr], align 8
255 %a2 = alloca [16 x ptr], align 8
256 %t1 = call i32 @foo(i32 %in, ptr %a)
257 %t2 = call i32 @foo(i32 %in, ptr %a)
258 call void @llvm.lifetime.end.p0(i64 -1, ptr %a)
259 br i1 %d, label %bb0, label %bb1
268 %split = phi ptr [ %a, %bb0 ], [ %a2, %bb1 ]
269 call void @llvm.lifetime.start.p0(i64 -1, ptr %split)
270 %t3 = call i32 @foo(i32 %in, ptr %a2)
271 %t4 = call i32 @foo(i32 %in, ptr %a2)
272 %t5 = add i32 %t1, %t2
273 %t6 = add i32 %t3, %t4
274 %t7 = add i32 %t5, %t6
275 call void @llvm.lifetime.end.p0(i64 -1, ptr %split)
282 ;CHECK-LABEL: multi_region_bb:
283 ;YESCOLOR: subq $272, %rsp
284 ;NOCOLOR: subq $272, %rsp
286 define void @multi_region_bb() nounwind ssp {
288 %A.i1 = alloca [100 x i32], align 4
289 %B.i2 = alloca [100 x i32], align 4
290 %A.i = alloca [100 x i32], align 4
291 %B.i = alloca [100 x i32], align 4
292 call void @llvm.lifetime.start.p0(i64 -1, ptr %A.i) nounwind ; <---- start #1
293 call void @llvm.lifetime.start.p0(i64 -1, ptr %B.i) nounwind
294 call void @bar(ptr %A.i, ptr %B.i) nounwind
295 call void @llvm.lifetime.end.p0(i64 -1, ptr %A.i) nounwind
296 call void @llvm.lifetime.end.p0(i64 -1, ptr %B.i) nounwind
297 call void @llvm.lifetime.start.p0(i64 -1, ptr %A.i1) nounwind
298 call void @llvm.lifetime.start.p0(i64 -1, ptr %B.i2) nounwind
299 call void @llvm.lifetime.start.p0(i64 -1, ptr %A.i) nounwind ; <---- start #2
300 call void @bar(ptr %A.i1, ptr %B.i2) nounwind
301 call void @llvm.lifetime.end.p0(i64 -1, ptr %A.i1) nounwind
302 call void @llvm.lifetime.end.p0(i64 -1, ptr %A.i) nounwind
303 call void @llvm.lifetime.end.p0(i64 -1, ptr %B.i2) nounwind
307 define i32 @myCall_end_before_begin(i32 %in, i1 %d) {
309 %a = alloca [17 x ptr], align 8
310 %a2 = alloca [16 x ptr], align 8
311 %t1 = call i32 @foo(i32 %in, ptr %a)
312 %t2 = call i32 @foo(i32 %in, ptr %a)
313 call void @llvm.lifetime.end.p0(i64 -1, ptr %a)
314 call void @llvm.lifetime.start.p0(i64 -1, ptr %a)
315 br i1 %d, label %bb2, label %bb3
317 call void @llvm.lifetime.start.p0(i64 -1, ptr %a2)
318 %t3 = call i32 @foo(i32 %in, ptr %a2)
319 %t4 = call i32 @foo(i32 %in, ptr %a2)
320 %t5 = add i32 %t1, %t2
321 %t6 = add i32 %t3, %t4
322 %t7 = add i32 %t5, %t6
329 ; Regression test for PR15707. %buf1 and %buf2 should not be merged
331 ;CHECK-LABEL: myCall_pr15707:
332 ;NOFIRSTUSE: subq $200008, %rsp
333 ;NOCOLOR: subq $200008, %rsp
334 define void @myCall_pr15707() {
335 %buf1 = alloca i8, i32 100000, align 16
336 %buf2 = alloca i8, i32 100000, align 16
338 call void @llvm.lifetime.start.p0(i64 -1, ptr %buf1)
339 call void @llvm.lifetime.end.p0(i64 -1, ptr %buf1)
341 call void @llvm.lifetime.start.p0(i64 -1, ptr %buf1)
342 call void @llvm.lifetime.start.p0(i64 -1, ptr %buf2)
343 %result1 = call i32 @foo(i32 0, ptr %buf1)
344 %result2 = call i32 @foo(i32 0, ptr %buf2)
349 ; Check that we don't assert and crash even when there are allocas
350 ; outside the declared lifetime regions.
351 ;CHECK-LABEL: bad_range:
352 define void @bad_range() nounwind ssp {
354 %A.i1 = alloca [100 x i32], align 4
355 %B.i2 = alloca [100 x i32], align 4
356 %A.i = alloca [100 x i32], align 4
357 %B.i = alloca [100 x i32], align 4
358 call void @llvm.lifetime.start.p0(i64 -1, ptr %A.i) nounwind
359 call void @llvm.lifetime.start.p0(i64 -1, ptr %B.i) nounwind
360 call void @bar(ptr %A.i, ptr %B.i) nounwind
361 call void @llvm.lifetime.end.p0(i64 -1, ptr %A.i) nounwind
362 call void @llvm.lifetime.end.p0(i64 -1, ptr %B.i) nounwind
366 ; I am used outside the marked lifetime.
367 call void @bar(ptr %A.i, ptr %B.i) nounwind
372 ; Check that we don't assert and crash even when there are usages
373 ; of allocas which do not read or write outside the declared lifetime regions.
374 ;CHECK-LABEL: shady_range:
376 %struct.Klass = type { i32, i32 }
378 define i32 @shady_range(i32 %argc, ptr nocapture %argv) uwtable {
379 %a.i = alloca [4 x %struct.Klass], align 16
380 %b.i = alloca [4 x %struct.Klass], align 16
381 ; I am used outside the lifetime zone below:
382 call void @llvm.lifetime.start.p0(i64 -1, ptr %a.i)
383 call void @llvm.lifetime.start.p0(i64 -1, ptr %b.i)
384 %z3 = load i32, ptr %a.i, align 16
385 %r = call i32 @foo(i32 %z3, ptr %a.i)
386 %r2 = call i32 @foo(i32 %z3, ptr %b.i)
387 call void @llvm.lifetime.end.p0(i64 -1, ptr %a.i)
388 call void @llvm.lifetime.end.p0(i64 -1, ptr %b.i)
392 ; In this case 'itar1' and 'itar2' can't be overlapped if we treat
393 ; lifetime.start as the beginning of the lifetime, but we can
394 ; overlap if we consider first use of the slot as lifetime
395 ; start. See llvm bug 25776.
397 ;CHECK-LABEL: ifthen_twoslots:
398 ;YESCOLOR: subq $1544, %rsp
399 ;NOFIRSTUSE: subq $2056, %rsp
400 ;NOCOLOR: subq $2568, %rsp
402 define i32 @ifthen_twoslots(i32 %x) #0 {
404 %b1 = alloca [128 x i32], align 16
405 %b2 = alloca [128 x i32], align 16
406 %b3 = alloca [128 x i32], align 16
407 %b4 = alloca [128 x i32], align 16
408 %b5 = alloca [128 x i32], align 16
409 call void @llvm.lifetime.start.p0(i64 512, ptr %b1)
410 call void @llvm.lifetime.start.p0(i64 512, ptr %b2)
412 %tobool = icmp eq i32 %and, 0
413 br i1 %tobool, label %if.else, label %if.then
415 if.then: ; preds = %entry
416 call void @llvm.lifetime.start.p0(i64 512, ptr %b3)
417 call void @initb(ptr %b1, ptr %b3, ptr null)
418 call void @llvm.lifetime.end.p0(i64 512, ptr %b3)
421 if.else: ; preds = %entry
422 call void @llvm.lifetime.start.p0(i64 512, ptr %b4)
423 call void @llvm.lifetime.start.p0(i64 512, ptr %b5)
424 call void @initb(ptr %b2, ptr %b4, ptr %b5) #3
425 call void @llvm.lifetime.end.p0(i64 512, ptr %b5)
426 call void @llvm.lifetime.end.p0(i64 512, ptr %b4)
429 if.end: ; preds = %if.else, %if.then
430 call void @llvm.lifetime.end.p0(i64 512, ptr %b2)
431 call void @llvm.lifetime.end.p0(i64 512, ptr %b1)
436 ; This function is intended to test the case where you
437 ; have a reference to a stack slot that lies outside of
438 ; the START/END lifetime markers-- the flow analysis
439 ; should catch this and build the lifetime based on the
442 ;CHECK-LABEL: while_loop:
443 ;YESCOLOR: subq $1032, %rsp
444 ;NOFIRSTUSE: subq $1544, %rsp
445 ;NOCOLOR: subq $1544, %rsp
447 define i32 @while_loop(i32 %x) #0 {
449 %b1 = alloca [128 x i32], align 16
450 %b2 = alloca [128 x i32], align 16
451 %b3 = alloca [128 x i32], align 16
452 call void @llvm.lifetime.start.p0(i64 512, ptr %b1) #3
453 call void @llvm.lifetime.start.p0(i64 512, ptr %b2) #3
455 %tobool = icmp eq i32 %and, 0
456 br i1 %tobool, label %if.else, label %if.then
458 if.then: ; preds = %entry
459 call void @inita(ptr %b2) #3
462 if.else: ; preds = %entry
463 call void @inita(ptr %b1) #3
464 call void @inita(ptr %b3) #3
465 %tobool25 = icmp eq i32 %x, 0
466 br i1 %tobool25, label %if.end, label %while.body.lr.ph
468 while.body.lr.ph: ; preds = %if.else
471 while.body: ; preds = %while.body.lr.ph, %while.body
472 %x.addr.06 = phi i32 [ %x, %while.body.lr.ph ], [ %dec, %while.body ]
473 %dec = add nsw i32 %x.addr.06, -1
474 call void @llvm.lifetime.start.p0(i64 512, ptr %b3) #3
475 call void @inita(ptr %b3) #3
476 call void @llvm.lifetime.end.p0(i64 512, ptr %b3) #3
477 %tobool2 = icmp eq i32 %dec, 0
478 br i1 %tobool2, label %if.end.loopexit, label %while.body
480 if.end.loopexit: ; preds = %while.body
483 if.end: ; preds = %if.end.loopexit, %if.else, %if.then
484 call void @llvm.lifetime.end.p0(i64 512, ptr %b2) #3
485 call void @llvm.lifetime.end.p0(i64 512, ptr %b1) #3
489 ; Test case motivated by PR27903. Same routine inlined multiple times
490 ; into a caller results in a multi-segment lifetime, but the second
491 ; lifetime has no explicit references to the stack slot. Such slots
492 ; have to be treated conservatively.
494 ;CHECK-LABEL: twobod_b27903:
495 ;YESCOLOR: subq $96, %rsp
496 ;NOFIRSTUSE: subq $96, %rsp
497 ;NOCOLOR: subq $96, %rsp
499 define i32 @twobod_b27903(i32 %y, i32 %x) {
501 %buffer.i = alloca [12 x i32], align 16
502 %abc = alloca [12 x i32], align 16
503 call void @llvm.lifetime.start.p0(i64 48, ptr %buffer.i)
504 %idxprom.i = sext i32 %y to i64
505 %arrayidx.i = getelementptr inbounds [12 x i32], ptr %buffer.i, i64 0, i64 %idxprom.i
506 call void @inita(ptr %arrayidx.i)
507 %add.i = add nsw i32 %x, %y
508 call void @llvm.lifetime.end.p0(i64 48, ptr %buffer.i)
509 %tobool = icmp eq i32 %y, 0
510 br i1 %tobool, label %if.end, label %if.then
512 if.then: ; preds = %entry
513 call void @llvm.lifetime.start.p0(i64 48, ptr %abc)
514 %arrayidx = getelementptr inbounds [12 x i32], ptr %abc, i64 0, i64 %idxprom.i
515 call void @inita(ptr %arrayidx)
516 call void @llvm.lifetime.start.p0(i64 48, ptr %buffer.i)
517 call void @inita(ptr %arrayidx.i)
518 %add.i9 = add nsw i32 %add.i, %y
519 call void @llvm.lifetime.end.p0(i64 48, ptr %buffer.i)
520 call void @llvm.lifetime.end.p0(i64 48, ptr %abc)
523 if.end: ; preds = %if.then, %entry
524 %x.addr.0 = phi i32 [ %add.i9, %if.then ], [ %add.i, %entry ]
528 ;CHECK-LABEL: multi_segment:
529 ;YESCOLOR: subq $256, %rsp
530 ;NOFIRSTUSE: subq $256, %rsp
531 ;NOCOLOR: subq $512, %rsp
532 define i1 @multi_segment(i1, i1)
535 %foo = alloca [32 x i64]
536 %bar = alloca [32 x i64]
537 call void @llvm.lifetime.start.p0(i64 256, ptr %bar)
538 call void @baz(ptr %bar, i32 1)
539 call void @llvm.lifetime.end.p0(i64 256, ptr %bar)
540 call void @llvm.lifetime.start.p0(i64 256, ptr %foo)
541 call void @baz(ptr %foo, i32 1)
542 call void @llvm.lifetime.end.p0(i64 256, ptr %foo)
543 call void @llvm.lifetime.start.p0(i64 256, ptr %bar)
544 call void @baz(ptr %bar, i32 1)
545 call void @llvm.lifetime.end.p0(i64 256, ptr %bar)
549 ;CHECK-LABEL: pr32488:
550 ;YESCOLOR: subq $256, %rsp
551 ;NOFIRSTUSE: subq $256, %rsp
552 ;NOCOLOR: subq $512, %rsp
553 define i1 @pr32488(i1, i1)
556 %foo = alloca [32 x i64]
557 %bar = alloca [32 x i64]
558 br i1 %0, label %if_false, label %if_true
560 call void @llvm.lifetime.start.p0(i64 256, ptr %bar)
561 call void @baz(ptr %bar, i32 0)
562 br i1 %1, label %if_false.1, label %onerr
564 call void @llvm.lifetime.end.p0(i64 256, ptr %bar)
567 call void @llvm.lifetime.start.p0(i64 256, ptr %foo)
568 call void @baz(ptr %foo, i32 1)
569 br i1 %1, label %if_true.1, label %onerr
571 call void @llvm.lifetime.end.p0(i64 256, ptr %foo)
576 call void @llvm.lifetime.end.p0(i64 256, ptr %foo)
577 call void @llvm.lifetime.end.p0(i64 256, ptr %bar)
578 call void @destructor()
582 %Data = type { [32 x i64] }
584 declare void @destructor()
586 declare void @inita(ptr)
588 declare void @initb(ptr,ptr,ptr)
590 declare void @bar(ptr , ptr) nounwind
592 declare void @baz(ptr, i32)
594 declare void @llvm.lifetime.start.p0(i64, ptr nocapture) nounwind
596 declare void @llvm.lifetime.end.p0(i64, ptr nocapture) nounwind
598 declare i32 @foo(i32, ptr)