llvm.org GIT mirror llvm / bdbe828
Add address space mangling to lifetime intrinsics In preparation for allowing allocas to have non-0 addrspace. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299876 91177308-0d34-0410-b5e6-96231b3b80d8 Matt Arsenault 2 years ago
117 changed file(s) with 910 addition(s) and 884 deletion(s). Raw diff Collapse all Expand all
601601 //===------------------------- Memory Use Markers -------------------------===//
602602 //
603603 def int_lifetime_start : Intrinsic<[],
604 [llvm_i64_ty, llvm_ptr_ty],
604 [llvm_i64_ty, llvm_anyptr_ty],
605605 [IntrArgMemOnly, NoCapture<1>]>;
606606 def int_lifetime_end : Intrinsic<[],
607 [llvm_i64_ty, llvm_ptr_ty],
607 [llvm_i64_ty, llvm_anyptr_ty],
608608 [IntrArgMemOnly, NoCapture<1>]>;
609609 def int_invariant_start : Intrinsic<[llvm_descriptor_ty],
610610 [llvm_i64_ty, llvm_anyptr_ty],
655655
656656 // Coroutine Structure Intrinsics.
657657
658 def int_coro_id : Intrinsic<[llvm_token_ty], [llvm_i32_ty, llvm_ptr_ty,
659 llvm_ptr_ty, llvm_ptr_ty],
660 [IntrArgMemOnly, IntrReadMem,
658 def int_coro_id : Intrinsic<[llvm_token_ty], [llvm_i32_ty, llvm_ptr_ty,
659 llvm_ptr_ty, llvm_ptr_ty],
660 [IntrArgMemOnly, IntrReadMem,
661661 ReadNone<1>, ReadOnly<2>, NoCapture<2>]>;
662662 def int_coro_alloc : Intrinsic<[llvm_i1_ty], [llvm_token_ty], []>;
663663 def int_coro_begin : Intrinsic<[llvm_ptr_ty], [llvm_token_ty, llvm_ptr_ty],
664664 [WriteOnly<1>]>;
665665
666 def int_coro_free : Intrinsic<[llvm_ptr_ty], [llvm_token_ty, llvm_ptr_ty],
667 [IntrReadMem, IntrArgMemOnly, ReadOnly<1>,
666 def int_coro_free : Intrinsic<[llvm_ptr_ty], [llvm_token_ty, llvm_ptr_ty],
667 [IntrReadMem, IntrArgMemOnly, ReadOnly<1>,
668668 NoCapture<1>]>;
669669 def int_coro_end : Intrinsic<[llvm_i1_ty], [llvm_ptr_ty, llvm_i1_ty], []>;
670670
411411 }
412412 break;
413413 }
414 case 'i': {
415 if (Name.startswith("invariant.start")) {
414 case 'i':
415 case 'l': {
416 bool IsLifetimeStart = Name.startswith("lifetime.start");
417 if (IsLifetimeStart || Name.startswith("invariant.start")) {
418 Intrinsic::ID ID = IsLifetimeStart ?
419 Intrinsic::lifetime_start : Intrinsic::invariant_start;
416420 auto Args = F->getFunctionType()->params();
417421 Type* ObjectPtr[1] = {Args[1]};
418 if (F->getName() !=
419 Intrinsic::getName(Intrinsic::invariant_start, ObjectPtr)) {
422 if (F->getName() != Intrinsic::getName(ID, ObjectPtr)) {
420423 rename(F);
421 NewFn = Intrinsic::getDeclaration(
422 F->getParent(), Intrinsic::invariant_start, ObjectPtr);
424 NewFn = Intrinsic::getDeclaration(F->getParent(), ID, ObjectPtr);
423425 return true;
424426 }
425427 }
426 if (Name.startswith("invariant.end")) {
428
429 bool IsLifetimeEnd = Name.startswith("lifetime.end");
430 if (IsLifetimeEnd || Name.startswith("invariant.end")) {
431 Intrinsic::ID ID = IsLifetimeEnd ?
432 Intrinsic::lifetime_end : Intrinsic::invariant_end;
433
427434 auto Args = F->getFunctionType()->params();
428 Type* ObjectPtr[1] = {Args[2]};
429 if (F->getName() !=
430 Intrinsic::getName(Intrinsic::invariant_end, ObjectPtr)) {
435 Type* ObjectPtr[1] = {Args[IsLifetimeEnd ? 1 : 2]};
436 if (F->getName() != Intrinsic::getName(ID, ObjectPtr)) {
431437 rename(F);
432 NewFn = Intrinsic::getDeclaration(F->getParent(),
433 Intrinsic::invariant_end, ObjectPtr);
438 NewFn = Intrinsic::getDeclaration(F->getParent(), ID, ObjectPtr);
434439 return true;
435440 }
436441 }
171171 "lifetime.start requires the size to be an i64");
172172 Value *Ops[] = { Size, Ptr };
173173 Module *M = BB->getParent()->getParent();
174 Value *TheFn = Intrinsic::getDeclaration(M, Intrinsic::lifetime_start);
174 Value *TheFn = Intrinsic::getDeclaration(M, Intrinsic::lifetime_start,
175 { Ptr->getType() });
175176 return createCallHelper(TheFn, Ops, this);
176177 }
177178
186187 "lifetime.end requires the size to be an i64");
187188 Value *Ops[] = { Size, Ptr };
188189 Module *M = BB->getParent()->getParent();
189 Value *TheFn = Intrinsic::getDeclaration(M, Intrinsic::lifetime_end);
190 Value *TheFn = Intrinsic::getDeclaration(M, Intrinsic::lifetime_end,
191 { Ptr->getType() });
190192 return createCallHelper(TheFn, Ops, this);
191193 }
192194
0 ; RUN: opt < %s -basicaa -gvn -dse -S | FileCheck %s
11 target datalayout = "E-p:64:64:64-a0:0:8-f32:32:32-f64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-v64:64:64-v128:128:128"
22
3 declare void @llvm.lifetime.end(i64, i8* nocapture)
3 declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture)
44
55 declare void @external(i32*)
66
6666 %P2 = getelementptr i8, i8* %P, i32 2
6767 store i8 %Y, i8* %P2 ;; Not read by lifetime.end, should be removed.
6868 ; CHECK: store i8 2, i8* %P2
69 call void @llvm.lifetime.end(i64 1, i8* %P)
69 call void @llvm.lifetime.end.p0i8(i64 1, i8* %P)
7070 store i8 2, i8* %P2
7171 ; CHECK-NOT: store
7272 ret void
8080 %P2 = getelementptr i8, i8* %P, i32 2
8181 store i8 %Y, i8* %P2
8282 ; CHECK-NEXT: call void @llvm.lifetime.end
83 call void @llvm.lifetime.end(i64 10, i8* %P)
83 call void @llvm.lifetime.end.p0i8(i64 10, i8* %P)
8484 ret void
8585 ; CHECK-NEXT: ret void
8686 }
2828
2929 @.str = private unnamed_addr constant [8 x i8] c"a = %l\0A\00", align 1
3030
31 declare void @llvm.lifetime.start(i64, i8* nocapture)
31 declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture)
3232
3333 declare void @hoo(i64*)
3434
3535 declare i32 @printf(i8* nocapture readonly, ...)
3636
37 declare void @llvm.lifetime.end(i64, i8* nocapture)
37 declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture)
3838
3939 define void @goo(i32 %N, i64* %b) {
4040 entry:
4949 br i1 %cmp, label %for.body, label %for.end
5050
5151 for.body: ; preds = %for.cond
52 call void @llvm.lifetime.start(i64 8, i8* %tmp)
52 call void @llvm.lifetime.start.p0i8(i64 8, i8* %tmp)
5353 call void @hoo(i64* %a.i)
5454 call void @hoo(i64* %c)
5555 %tmp1 = load volatile i64, i64* %a.i, align 8
5656 %call.i = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i64 %tmp1)
57 call void @llvm.lifetime.end(i64 8, i8* %tmp)
57 call void @llvm.lifetime.end.p0i8(i64 8, i8* %tmp)
5858 %inc = add nsw i32 %i.0, 1
5959 br label %for.cond
6060
109109 ret void
110110 }
111111
112 declare void @llvm.lifetime.start(i64, i8* nocapture) nounwind readonly
113 declare void @llvm.lifetime.end(i64, i8* nocapture) nounwind
114
115 define void @tests.lifetime.start.end() {
116 ; CHECK-LABEL: @tests.lifetime.start.end(
117 %a = alloca i8
118 call void @llvm.lifetime.start(i64 1, i8* %a)
119 ; CHECK: call void @llvm.lifetime.start.p0i8(i64 1, i8* %a)
120 store i8 0, i8* %a
121 call void @llvm.lifetime.end(i64 1, i8* %a)
122 ; CHECK: call void @llvm.lifetime.end.p0i8(i64 1, i8* %a)
123 ret void
124 }
125
126
112127 ; This is part of @test.objectsize(), since llvm.objectsize declaration gets
113128 ; emitted at the end.
114129 ; CHECK: declare i32 @llvm.objectsize.i32.p0i8
130
131
132 ; CHECK: declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture)
133 ; CHECK: declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture)
12431243 ret float %res
12441244 }
12451245
1246 declare void @llvm.lifetime.start(i64, i8*)
1247 declare void @llvm.lifetime.end(i64, i8*)
1246 declare void @llvm.lifetime.start.p0i8(i64, i8*)
1247 declare void @llvm.lifetime.end.p0i8(i64, i8*)
12481248 define void @test_lifetime_intrin() {
12491249 ; CHECK-LABEL: name: test_lifetime_intrin
12501250 ; CHECK: RET_ReallyLR
12511251 %slot = alloca i8, i32 4
1252 call void @llvm.lifetime.start(i64 0, i8* %slot)
1253 call void @llvm.lifetime.end(i64 0, i8* %slot)
1252 call void @llvm.lifetime.start.p0i8(i64 0, i8* %slot)
1253 call void @llvm.lifetime.end.p0i8(i64 0, i8* %slot)
12541254 ret void
12551255 }
12561256
2828 entry:
2929 %a1 = alloca [256 x i32], align 4
3030 %0 = bitcast [256 x i32]* %a1 to i8*
31 call void @llvm.lifetime.start(i64 1024, i8* %0)
31 call void @llvm.lifetime.start.p0i8(i64 1024, i8* %0)
3232 %arraydecay = getelementptr inbounds [256 x i32], [256 x i32]* %a1, i64 0, i64 0
3333 call void @foo3(i32* %arraydecay)
3434 call void asm sideeffect "foo2", "~{w0},~{w1},~{w2},~{w3},~{w4},~{w5},~{w6},~{w7},~{w8},~{w9},~{w10},~{w11},~{w12},~{w13},~{w14},~{w15},~{w16},~{w17},~{w18},~{w19},~{w20},~{w21},~{w22},~{w23},~{w24},~{w25},~{w26},~{w27},~{w28},~{w29},~{w30}"()
35 call void @llvm.lifetime.end(i64 1024, i8* %0)
35 call void @llvm.lifetime.end.p0i8(i64 1024, i8* %0)
3636 ret i32 0
3737 }
3838
3939 ; Function Attrs: nounwind
40 declare void @llvm.lifetime.start(i64, i8* nocapture)
40 declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture)
4141
4242 declare void @foo3(i32*)
4343
4444 ; Function Attrs: nounwind
45 declare void @llvm.lifetime.end(i64, i8* nocapture)
45 declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture)
4646
4747 attributes #0 = { nounwind sspstrong "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
55 define amdgpu_kernel void @store_fi_lifetime(i32 addrspace(1)* %out, i32 %in) #0 {
66 entry:
77 %b = alloca i8
8 call void @llvm.lifetime.start(i64 1, i8* %b)
8 call void @llvm.lifetime.start.p0i8(i64 1, i8* %b)
99 store volatile i8* %b, i8* addrspace(1)* undef
10 call void @llvm.lifetime.end(i64 1, i8* %b)
10 call void @llvm.lifetime.end.p0i8(i64 1, i8* %b)
1111 ret void
1212 }
1313
195195 ret void
196196 }
197197
198 declare void @llvm.lifetime.start(i64, i8* nocapture) #1
199 declare void @llvm.lifetime.end(i64, i8* nocapture) #1
198 declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) #1
199 declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) #1
200200
201201 attributes #0 = { nounwind }
202202 attributes #1 = { argmemonly nounwind }
0 ; RUN: opt -S -mtriple=amdgcn-unknown-amdhsa -amdgpu-promote-alloca %s | FileCheck -check-prefix=OPT %s
11
2 declare void @llvm.lifetime.start(i64, i8* nocapture) #0
3 declare void @llvm.lifetime.end(i64, i8* nocapture) #0
2 declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) #0
3 declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) #0
44
55 ; OPT-LABEL: @use_lifetime_promotable_lds(
66 ; OPT-NOT: alloca i32
1010 bb:
1111 %tmp = alloca i32, align 4
1212 %tmp1 = bitcast i32* %tmp to i8*
13 call void @llvm.lifetime.start(i64 4, i8* %tmp1)
13 call void @llvm.lifetime.start.p0i8(i64 4, i8* %tmp1)
1414 %tmp2 = getelementptr inbounds i32, i32 addrspace(1)* %arg, i64 1
1515 %tmp3 = load i32, i32 addrspace(1)* %tmp2
1616 store i32 %tmp3, i32* %tmp
17 call void @llvm.lifetime.end(i64 4, i8* %tmp1)
17 call void @llvm.lifetime.end.p0i8(i64 4, i8* %tmp1)
1818 ret void
1919 }
2020
108108 }
109109
110110 ; Function Attrs: argmemonly nounwind
111 declare void @llvm.lifetime.start(i64, i8* nocapture) #0
111 declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) #0
112112
113113 declare %class.StaticSocketDataProvider.6.231.281.1306.2331* @_ZN24StaticSocketDataProviderC1EP13MockReadWritejS1_j(%class.StaticSocketDataProvider.6.231.281.1306.2331* returned, %struct.MockReadWrite.7.232.282.1307.2332*, i32, %struct.MockReadWrite.7.232.282.1307.2332*, i32) unnamed_addr
114114
129129 declare %class.AssertHelper.10.235.285.1310.2335* @_ZN12AssertHelperD1Ev(%class.AssertHelper.10.235.285.1310.2335* returned) unnamed_addr
130130
131131 ; Function Attrs: argmemonly nounwind
132 declare void @llvm.lifetime.end(i64, i8* nocapture) #0
132 declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) #0
133133
134134 declare void @_ZN18ClientSocketHandle5m_fn3IPiEEvRK25Trans_NS___1_basic_stringIciiE13scoped_refptr15RequestPriorityN16ClientSocketPool13RespectLimitsERiT_11BoundNetLog(%class.ClientSocketHandle.14.239.289.1314.2339*, %class.Trans_NS___1_basic_string.18.243.293.1318.2343* dereferenceable(12), %class.scoped_refptr.19.244.294.1319.2344*, i32, i32, i32* dereferenceable(4), i32*, %class.BoundNetLog.20.245.295.1320.2345*)
135135
7979
8080 ; CHECK-LABEL: Func1:
8181 define void @Func1() nounwind ssp "no-frame-pointer-elim"="true" {
82 entry:
82 entry:
8383 ; A8: movw [[BASE:r[0-9]+]], :lower16:{{.*}}TestVar{{.*}}
8484 ; A8: movt [[BASE]], :upper16:{{.*}}TestVar{{.*}}
8585 ; A8: ldrd [[FIELD1:r[0-9]+]], [[FIELD2:r[0-9]+]], {{\[}}[[BASE]], #4]
8787 ; A8-NEXT: str [[FIELD1]], {{\[}}[[BASE]]{{\]}}
8888 ; CONSERVATIVE-NOT: ldrd
8989 %orig_blocks = alloca [256 x i16], align 2
90 %0 = bitcast [256 x i16]* %orig_blocks to i8*call void @llvm.lifetime.start(i64 512, i8* %0) nounwind
90 %0 = bitcast [256 x i16]* %orig_blocks to i8*call void @llvm.lifetime.start.p0i8(i64 512, i8* %0) nounwind
9191 %tmp1 = load i32, i32* getelementptr inbounds (%struct.Test, %struct.Test* @TestVar, i32 0, i32 1), align 4
9292 %tmp2 = load i32, i32* getelementptr inbounds (%struct.Test, %struct.Test* @TestVar, i32 0, i32 2), align 4
9393 %add = add nsw i32 %tmp2, %tmp1
9494 store i32 %add, i32* getelementptr inbounds (%struct.Test, %struct.Test* @TestVar, i32 0, i32 0), align 4
95 call void @llvm.lifetime.end(i64 512, i8* %0) nounwind
95 call void @llvm.lifetime.end.p0i8(i64 512, i8* %0) nounwind
9696 ret void
9797 }
9898
206206 ret void
207207 }
208208
209 declare void @llvm.lifetime.start(i64, i8* nocapture) nounwind
210 declare void @llvm.lifetime.end(i64, i8* nocapture) nounwind
209 declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) nounwind
210 declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) nounwind
5050 define i32 @test_stack_guard_remat() #0 {
5151 %a1 = alloca [256 x i32], align 4
5252 %1 = bitcast [256 x i32]* %a1 to i8*
53 call void @llvm.lifetime.start(i64 1024, i8* %1)
53 call void @llvm.lifetime.start.p0i8(i64 1024, i8* %1)
5454 %2 = getelementptr inbounds [256 x i32], [256 x i32]* %a1, i32 0, i32 0
5555 call void @foo3(i32* %2) #3
5656 call void asm sideeffect "foo2", "~{r0},~{r1},~{r2},~{r3},~{r4},~{r5},~{r6},~{r7},~{r8},~{r9},~{r10},~{r11},~{r12},~{sp},~{lr}"()
57 call void @llvm.lifetime.end(i64 1024, i8* %1)
57 call void @llvm.lifetime.end.p0i8(i64 1024, i8* %1)
5858 ret i32 0
5959 }
6060
6161 ; Function Attrs: nounwind
62 declare void @llvm.lifetime.start(i64, i8* nocapture)
62 declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture)
6363
6464 declare void @foo3(i32*)
6565
6666 ; Function Attrs: nounwind
67 declare void @llvm.lifetime.end(i64, i8* nocapture)
67 declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture)
6868
6969 attributes #0 = { nounwind ssp "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
33 define void @nowarn() local_unnamed_addr #0 !dbg !6 {
44 %1 = alloca [504 x i8], align 1
55 %2 = getelementptr inbounds [504 x i8], [504 x i8]* %1, i64 0, i64 0, !dbg !15
6 call void @llvm.lifetime.start(i64 504, i8* nonnull %2) #4, !dbg !15
6 call void @llvm.lifetime.start.p0i8(i64 504, i8* nonnull %2) #4, !dbg !15
77 tail call void @llvm.dbg.declare(metadata [504 x i8]* %1, metadata !10, metadata !16), !dbg !17
88 call void @doit(i8* nonnull %2) #4, !dbg !18
9 call void @llvm.lifetime.end(i64 504, i8* nonnull %2) #4, !dbg !19
9 call void @llvm.lifetime.end.p0i8(i64 504, i8* nonnull %2) #4, !dbg !19
1010 ret void, !dbg !19
1111 }
1212
1313 ; Function Attrs: argmemonly nounwind
14 declare void @llvm.lifetime.start(i64, i8* nocapture) #1
14 declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) #1
1515
1616 ; Function Attrs: nounwind readnone
1717 declare void @llvm.dbg.declare(metadata, metadata, metadata) #2
1919 declare void @doit(i8*) local_unnamed_addr #3
2020
2121 ; Function Attrs: argmemonly nounwind
22 declare void @llvm.lifetime.end(i64, i8* nocapture) #1
22 declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) #1
2323
2424 ; CHECK: error: warn_stack.c
2525 ; CHECK: BPF stack limit
2626 define void @warn() local_unnamed_addr #0 !dbg !20 {
2727 %1 = alloca [512 x i8], align 1
2828 %2 = getelementptr inbounds [512 x i8], [512 x i8]* %1, i64 0, i64 0, !dbg !26
29 call void @llvm.lifetime.start(i64 512, i8* nonnull %2) #4, !dbg !26
29 call void @llvm.lifetime.start.p0i8(i64 512, i8* nonnull %2) #4, !dbg !26
3030 tail call void @llvm.dbg.declare(metadata [512 x i8]* %1, metadata !22, metadata !16), !dbg !27
3131 call void @doit(i8* nonnull %2) #4, !dbg !28
32 call void @llvm.lifetime.end(i64 512, i8* nonnull %2) #4, !dbg !29
32 call void @llvm.lifetime.end.p0i8(i64 512, i8* nonnull %2) #4, !dbg !29
3333 ret void, !dbg !29
3434 }
3535
186186 declare i32 @llvm.hexagon.S2.clbnorm(i32) #2
187187 declare i32 @llvm.hexagon.S2.lsr.r.r(i32, i32) #2
188188 declare i64 @llvm.hexagon.M2.mpyd.ll.s1(i32, i32) #2
189 declare void @llvm.lifetime.end(i64, i8* nocapture) #1
190 declare void @llvm.lifetime.start(i64, i8* nocapture) #1
189 declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) #1
190 declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) #1
191191
192192 attributes #0 = { norecurse nounwind "target-cpu"="hexagonv60" "target-features"="+hvx,-hvx-double" "unsafe-fp-math"="false" "use-soft-float"="false" }
193193 attributes #1 = { argmemonly nounwind }
1111 %array = alloca [100 x i32], align 8
1212 %doublearray = alloca [100 x [100 x i32]], align 8
1313 %0 = bitcast [100 x i32]* %array to i8*
14 call void @llvm.lifetime.start(i64 400, i8* %0) #1
14 call void @llvm.lifetime.start.p0i8(i64 400, i8* %0) #1
1515 %1 = bitcast [100 x [100 x i32]]* %doublearray to i8*
16 call void @llvm.lifetime.start(i64 40000, i8* %1) #1
16 call void @llvm.lifetime.start.p0i8(i64 40000, i8* %1) #1
1717 %arrayidx1 = getelementptr inbounds [100 x [100 x i32]], [100 x [100 x i32]]* %doublearray, i32 0, i32 10, i32 10
1818 %arrayidx2.gep = getelementptr [100 x i32], [100 x i32]* %array, i32 0, i32 0
1919 br label %for.body
5555
5656 for.end17:
5757 %3 = load i32, i32* %arrayidx1, align 8
58 call void @llvm.lifetime.end(i64 40000, i8* %1) #1
59 call void @llvm.lifetime.end(i64 400, i8* %0) #1
58 call void @llvm.lifetime.end.p0i8(i64 40000, i8* %1) #1
59 call void @llvm.lifetime.end.p0i8(i64 400, i8* %0) #1
6060 ret i32 %3
6161 }
6262
63 declare void @llvm.lifetime.start(i64, i8* nocapture) #1
63 declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) #1
6464
65 declare void @llvm.lifetime.end(i64, i8* nocapture) #1
65 declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) #1
88 entry:
99 %x = alloca i32, align 4
1010 %0 = bitcast i32* %x to i8*
11 call void @llvm.lifetime.start(i64 4, i8* %0) #3
11 call void @llvm.lifetime.start.p0i8(i64 4, i8* %0) #3
1212 call void @foo(i32* nonnull %x) #3
1313 %1 = load i32, i32* %x, align 4, !tbaa !1
1414 %inc = add nsw i32 %1, 1
1515 store i32 %inc, i32* %x, align 4, !tbaa !1
1616 call void @foo(i32* nonnull %x) #3
17 call void @llvm.lifetime.end(i64 4, i8* %0) #3
17 call void @llvm.lifetime.end.p0i8(i64 4, i8* %0) #3
1818 ret void
1919 }
2020
2424 entry:
2525 %x = alloca i32, align 4
2626 %0 = bitcast i32* %x to i8*
27 call void @llvm.lifetime.start(i64 4, i8* %0) #3
27 call void @llvm.lifetime.start.p0i8(i64 4, i8* %0) #3
2828 call void @foo(i32* nonnull %x) #3
2929 %1 = load i32, i32* %x, align 4, !tbaa !1
3030 %inc = sub nsw i32 %1, 1
3131 store i32 %inc, i32* %x, align 4, !tbaa !1
3232 call void @foo(i32* nonnull %x) #3
33 call void @llvm.lifetime.end(i64 4, i8* %0) #3
33 call void @llvm.lifetime.end.p0i8(i64 4, i8* %0) #3
3434 ret void
3535 }
3636
4040 entry:
4141 %x = alloca i32, align 4
4242 %0 = bitcast i32* %x to i8*
43 call void @llvm.lifetime.start(i64 4, i8* %0) #3
43 call void @llvm.lifetime.start.p0i8(i64 4, i8* %0) #3
4444 call void @foo(i32* nonnull %x) #3
4545 %1 = load i32, i32* %x, align 4, !tbaa !1
4646 %inc = or i32 %1, 1
4747 store i32 %inc, i32* %x, align 4, !tbaa !1
4848 call void @foo(i32* nonnull %x) #3
49 call void @llvm.lifetime.end(i64 4, i8* %0) #3
49 call void @llvm.lifetime.end.p0i8(i64 4, i8* %0) #3
5050 ret void
5151 }
5252
5656 entry:
5757 %x = alloca i32, align 4
5858 %0 = bitcast i32* %x to i8*
59 call void @llvm.lifetime.start(i64 4, i8* %0) #3
59 call void @llvm.lifetime.start.p0i8(i64 4, i8* %0) #3
6060 call void @foo(i32* nonnull %x) #3
6161 %1 = load i32, i32* %x, align 4, !tbaa !1
6262 %inc = and i32 %1, -2
6363 store i32 %inc, i32* %x, align 4, !tbaa !1
6464 call void @foo(i32* nonnull %x) #3
65 call void @llvm.lifetime.end(i64 4, i8* %0) #3
65 call void @llvm.lifetime.end.p0i8(i64 4, i8* %0) #3
6666 ret void
6767 }
6868
7272 entry:
7373 %x = alloca i32, align 4
7474 %0 = bitcast i32* %x to i8*
75 call void @llvm.lifetime.start(i64 4, i8* %0) #3
75 call void @llvm.lifetime.start.p0i8(i64 4, i8* %0) #3
7676 call void @foo(i32* nonnull %x) #3
7777 %1 = load i32, i32* %x, align 4, !tbaa !1
7878 %inc = add nsw i32 %1, %a
7979 store i32 %inc, i32* %x, align 4, !tbaa !1
8080 call void @foo(i32* nonnull %x) #3
81 call void @llvm.lifetime.end(i64 4, i8* %0) #3
81 call void @llvm.lifetime.end.p0i8(i64 4, i8* %0) #3
8282 ret void
8383 }
8484
8888 entry:
8989 %x = alloca i32, align 4
9090 %0 = bitcast i32* %x to i8*
91 call void @llvm.lifetime.start(i64 4, i8* %0) #3
91 call void @llvm.lifetime.start.p0i8(i64 4, i8* %0) #3
9292 call void @foo(i32* nonnull %x) #3
9393 %1 = load i32, i32* %x, align 4, !tbaa !1
9494 %inc = sub nsw i32 %1, %a
9595 store i32 %inc, i32* %x, align 4, !tbaa !1
9696 call void @foo(i32* nonnull %x) #3
97 call void @llvm.lifetime.end(i64 4, i8* %0) #3
97 call void @llvm.lifetime.end.p0i8(i64 4, i8* %0) #3
9898 ret void
9999 }
100100
104104 entry:
105105 %x = alloca i32, align 4
106106 %0 = bitcast i32* %x to i8*
107 call void @llvm.lifetime.start(i64 4, i8* %0) #3
107 call void @llvm.lifetime.start.p0i8(i64 4, i8* %0) #3
108108 call void @foo(i32* nonnull %x) #3
109109 %1 = load i32, i32* %x, align 4, !tbaa !1
110110 %inc = or i32 %1, %a
111111 store i32 %inc, i32* %x, align 4, !tbaa !1
112112 call void @foo(i32* nonnull %x) #3
113 call void @llvm.lifetime.end(i64 4, i8* %0) #3
113 call void @llvm.lifetime.end.p0i8(i64 4, i8* %0) #3
114114 ret void
115115 }
116116
120120 entry:
121121 %x = alloca i32, align 4
122122 %0 = bitcast i32* %x to i8*
123 call void @llvm.lifetime.start(i64 4, i8* %0) #3
123 call void @llvm.lifetime.start.p0i8(i64 4, i8* %0) #3
124124 call void @foo(i32* nonnull %x) #3
125125 %1 = load i32, i32* %x, align 4, !tbaa !1
126126 %inc = and i32 %1, %a
127127 store i32 %inc, i32* %x, align 4, !tbaa !1
128128 call void @foo(i32* nonnull %x) #3
129 call void @llvm.lifetime.end(i64 4, i8* %0) #3
129 call void @llvm.lifetime.end.p0i8(i64 4, i8* %0) #3
130130 ret void
131131 }
132132
133133
134134 declare void @foo(i32*) #2
135 declare void @llvm.lifetime.start(i64, i8* nocapture) #1
136 declare void @llvm.lifetime.end(i64, i8* nocapture) #1
135 declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) #1
136 declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) #1
137137
138138 attributes #0 = { nounwind "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="hexagonv60" "target-features"="+hvx,-hvx-double" "unsafe-fp-math"="false" "use-soft-float"="false" }
139139 attributes #1 = { argmemonly nounwind }
1010 entry:
1111 %x = alloca i32, align 4
1212 %x.0.x.0..sroa_cast = bitcast i32* %x to i8*
13 call void @llvm.lifetime.start(i64 4, i8* %x.0.x.0..sroa_cast)
13 call void @llvm.lifetime.start.p0i8(i64 4, i8* %x.0.x.0..sroa_cast)
1414 store volatile i32 0, i32* %x, align 4
1515 %call = tail call i32 bitcast (i32 (...)* @bar to i32 ()*)() #0
1616 %x.0.x.0. = load volatile i32, i32* %x, align 4
1717 %add = add nsw i32 %x.0.x.0., %a
18 call void @llvm.lifetime.end(i64 4, i8* %x.0.x.0..sroa_cast)
18 call void @llvm.lifetime.end.p0i8(i64 4, i8* %x.0.x.0..sroa_cast)
1919 ret i32 %add
2020 }
2121
22 declare void @llvm.lifetime.start(i64, i8* nocapture) #1
23 declare void @llvm.lifetime.end(i64, i8* nocapture) #1
22 declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) #1
23 declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) #1
2424
2525 declare i32 @bar(...) #0
2626
22
33 target triple = "hexagon"
44
5 declare void @llvm.lifetime.start(i64, i8* nocapture) #0
6 declare void @llvm.lifetime.end(i64, i8* nocapture) #0
5 declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) #0
6 declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) #0
77 declare signext i16 @cat(i16 signext) #1
88 declare void @danny(i16 signext, i16 signext, i16 signext, i16* nocapture readonly, i16 signext, i16* nocapture) #1
99 declare void @sammy(i16* nocapture readonly, i16* nocapture readonly, i16* nocapture readonly, i32* nocapture, i16* nocapture, i16 signext, i16 signext, i16 signext) #1
1212 entry:
1313 %arg1 = alloca i32, align 4
1414 %0 = bitcast i32* %arg1 to i8*
15 call void @llvm.lifetime.start(i64 4, i8* %0) #2
15 call void @llvm.lifetime.start.p0i8(i64 4, i8* %0) #2
1616 store i32 %status, i32* %arg1, align 4, !tbaa !1
1717 %1 = call i32 asm sideeffect "r0 = #$1\0Ar1 = $2\0Ar2 = $4\0Atrap0 (#0)\0A$0 = r0", "=r,i,r,*m,r,~{r0},~{r1},~{r2}"(i32 24, i32* nonnull %arg1, i32* nonnull %arg1, i32 %status) #2, !srcloc !5
18 call void @llvm.lifetime.end(i64 4, i8* %0) #2
18 call void @llvm.lifetime.end.p0i8(i64 4, i8* %0) #2
1919 ret i32 %1
2020 }
2121
2222 ; Function Attrs: argmemonly nounwind
23 declare void @llvm.lifetime.start(i64, i8* nocapture) #1
23 declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) #1
2424
2525 ; Function Attrs: argmemonly nounwind
26 declare void @llvm.lifetime.end(i64, i8* nocapture) #1
26 declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) #1
2727
2828 attributes #0 = { nounwind "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="hexagonv5" "target-features"="-hvx,-hvx-double" "unsafe-fp-math"="false" "use-soft-float"="false" }
2929 attributes #1 = { argmemonly nounwind }
66
77 %struct.0 = type { i32, i16, i8* }
88
9 declare void @llvm.lifetime.start(i64, i8* nocapture) #1
10 declare void @llvm.lifetime.end(i64, i8* nocapture) #1
9 declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) #1
10 declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) #1
1111
1212 define i32 @fred(i8* readonly %p0, i32* %p1) local_unnamed_addr #0 {
1313 entry:
3131
3232 if.else: ; preds = %lor.lhs.false
3333 %v6 = bitcast i16* %v0 to i8*
34 call void @llvm.lifetime.start(i64 2, i8* nonnull %v6) #0
34 call void @llvm.lifetime.start.p0i8(i64 2, i8* nonnull %v6) #0
3535 store i16 0, i16* %v0, align 2
3636 %v7 = call i32 @foo(%struct.0* nonnull %v3, i16* nonnull %v0) #0
3737 %v8 = icmp eq i32* %p1, null
4444 br label %if.end7
4545
4646 if.end7: ; preds = %if.else, %if.then6
47 call void @llvm.lifetime.end(i64 2, i8* nonnull %v6) #0
47 call void @llvm.lifetime.end.p0i8(i64 2, i8* nonnull %v6) #0
4848 br label %cleanup
4949
5050 cleanup: ; preds = %if.then3, %if.then,
55 entry:
66 %local = alloca [1024 x i32], align 8
77 %0 = bitcast [1024 x i32]* %local to i8*
8 call void @llvm.lifetime.start(i64 4096, i8* %0) #1
8 call void @llvm.lifetime.start.p0i8(i64 4096, i8* %0) #1
99 %arraydecay = getelementptr inbounds [1024 x i32], [1024 x i32]* %local, i32 0, i32 0
1010 call void @baz_1(i32* %arraydecay) #3
1111 %arrayidx = getelementptr inbounds [1024 x i32], [1024 x i32]* %local, i32 0, i32 %n
1212 %1 = load i32, i32* %arrayidx, align 4
13 call void @llvm.lifetime.end(i64 4096, i8* %0) #1
13 call void @llvm.lifetime.end.p0i8(i64 4096, i8* %0) #1
1414 ret i32 %1
1515 }
1616
2020 entry:
2121 %local = alloca [2048 x i32], align 8
2222 %0 = bitcast [2048 x i32]* %local to i8*
23 call void @llvm.lifetime.start(i64 8192, i8* %0) #1
23 call void @llvm.lifetime.start.p0i8(i64 8192, i8* %0) #1
2424 %arraydecay = getelementptr inbounds [2048 x i32], [2048 x i32]* %local, i32 0, i32 0
2525 call void @baz_2(i32* %y, i32* %arraydecay) #3
2626 %1 = load i32, i32* %y, align 4
2727 %add = add nsw i32 %n, %1
2828 %arrayidx = getelementptr inbounds [2048 x i32], [2048 x i32]* %local, i32 0, i32 %add
2929 %2 = load i32, i32* %arrayidx, align 4
30 call void @llvm.lifetime.end(i64 8192, i8* %0) #1
30 call void @llvm.lifetime.end.p0i8(i64 8192, i8* %0) #1
3131 ret i32 %2
3232 }
3333
3434 declare void @baz_1(i32*) #2
3535 declare void @baz_2(i32*, i32*) #2
36 declare void @llvm.lifetime.start(i64, i8* nocapture) #1
37 declare void @llvm.lifetime.end(i64, i8* nocapture) #1
36 declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) #1
37 declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) #1
3838
3939 attributes #0 = { nounwind optsize "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
4040 attributes #1 = { nounwind }
1010 entry:
1111 %b = alloca [16 x i32], align 4
1212 %0 = bitcast [16 x i32]* %b to i8*
13 call void @llvm.lifetime.start(i64 64, i8* %0)
13 call void @llvm.lifetime.start.p0i8(i64 64, i8* %0)
1414 %arraydecay = getelementptr inbounds [16 x i32], [16 x i32]* %b, i32 0, i32 0
1515 br label %for.body
1616
2727 br i1 %exitcond, label %for.end, label %for.body
2828
2929 for.end: ; preds = %for.body
30 call void @llvm.lifetime.end(i64 64, i8* %0)
30 call void @llvm.lifetime.end.p0i8(i64 64, i8* %0)
3131 ret i32 %add
3232 }
3333
34 declare void @llvm.lifetime.start(i64, i8* nocapture)
34 declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture)
3535
3636 declare i32 @foo2(i32, i32*)
3737
38 declare void @llvm.lifetime.end(i64, i8* nocapture)
38 declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture)
3333 ; 16_h: lh ${{[0-9]+}}, [[offset2]](${{[0-9]+}})
3434 }
3535
36 declare void @llvm.lifetime.start(i64, i8* nocapture) nounwind
36 declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) nounwind
3737
38 declare void @llvm.lifetime.end(i64, i8* nocapture) nounwind
38 declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) nounwind
3939
1616 %4 = add nsw i32 %2, %3
1717 %5 = zext i32 %4 to i64
1818 %6 = bitcast float* %ret_vec.sroa.8.i to i8*
19 call void @llvm.lifetime.start(i64 4, i8* %6)
19 call void @llvm.lifetime.start.p0i8(i64 4, i8* %6)
2020 %7 = and i32 %4, 15
2121 %8 = icmp eq i32 %7, 0
2222 %9 = select i1 %8, float 0.000000e+00, float -1.000000e+00
2525 %10 = fcmp olt float %9, 0.000000e+00
2626 %ret_vec.sroa.8.i.val = load float, float* %ret_vec.sroa.8.i, align 4
2727 %11 = select i1 %10, float 0.000000e+00, float %ret_vec.sroa.8.i.val
28 call void @llvm.lifetime.end(i64 4, i8* %6)
28 call void @llvm.lifetime.end.p0i8(i64 4, i8* %6)
2929 %12 = getelementptr inbounds %class.float3, %class.float3* %dst, i64 %5, i32 0
3030 store float 0.000000e+00, float* %12, align 4
3131 %13 = getelementptr inbounds %class.float3, %class.float3* %dst, i64 %5, i32 1
4545 declare i32 @llvm.nvvm.read.ptx.sreg.tid.x() #1
4646
4747 ; Function Attrs: nounwind
48 declare void @llvm.lifetime.start(i64, i8* nocapture) #2
48 declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) #2
4949
5050 ; Function Attrs: nounwind
51 declare void @llvm.lifetime.end(i64, i8* nocapture) #2
51 declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) #2
5252
5353 attributes #0 = { nounwind "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="true" "no-nans-fp-math"="true" "stack-protector-buffer-size"="8" "unsafe-fp-math"="true" "use-soft-float"="false" }
5454 attributes #1 = { nounwind readnone }
264264 }
265265
266266 ; Function Attrs: nounwind argmemonly
267 declare void @llvm.lifetime.start(i64, i8* nocapture) #2
267 declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) #2
268268
269269 declare void @_ZN5clang6format17WhitespaceManager24replaceWhitespaceInTokenERKNS0_11FormatTokenEjjN4llvm9StringRefES6_bjji(%"class.clang::format::WhitespaceManager"*, %"struct.clang::format::FormatToken"* dereferenceable(272), i32 zeroext, i32 zeroext, [2 x i64], [2 x i64], i1 zeroext, i32 zeroext, i32 zeroext, i32 signext) #3
270270
271271 ; Function Attrs: nounwind argmemonly
272 declare void @llvm.lifetime.end(i64, i8* nocapture) #2
272 declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) #2
273273
274274 attributes #9 = { nounwind }
275275
88 %x = alloca [2048 x float], align 4
99 %y = alloca [2048 x float], align 4
1010 %0 = bitcast [2048 x float]* %x to i8*
11 call void @llvm.lifetime.start(i64 8192, i8* %0) #2
11 call void @llvm.lifetime.start.p0i8(i64 8192, i8* %0) #2
1212 %1 = bitcast [2048 x float]* %y to i8*
13 call void @llvm.lifetime.start(i64 8192, i8* %1) #2
13 call void @llvm.lifetime.start.p0i8(i64 8192, i8* %1) #2
1414 br label %for.body.i
1515
1616 ; CHECK-LABEL: @foo
4949 }
5050
5151 ; Function Attrs: nounwind
52 declare void @llvm.lifetime.start(i64, i8* nocapture) #2
52 declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) #2
5353
5454 declare void @bar(float*, float*)
5555
5656 ; Function Attrs: nounwind
57 declare void @llvm.lifetime.end(i64, i8* nocapture) #2
57 declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) #2
5858
5959 attributes #0 = { nounwind readonly }
6060 attributes #1 = { nounwind }
1616 @.str.11.98 = external hidden unnamed_addr constant [3 x i8], align 1
1717
1818 ; Function Attrs: nounwind
19 declare void @llvm.lifetime.start(i64, i8* nocapture) #0
20
21 ; Function Attrs: nounwind
22 declare void @llvm.lifetime.end(i64, i8* nocapture) #0
19 declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) #0
20
21 ; Function Attrs: nounwind
22 declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) #0
2323
2424 ; Function Attrs: nounwind
2525 declare i8* @halide_string_to_string(i8*, i8*, i8*) #1
3535 %buf = alloca [512 x i8], align 1
3636 store double %arg, double* %arg.addr, align 8, !tbaa !4
3737 %0 = bitcast i64* %bits to i8*
38 call void @llvm.lifetime.start(i64 8, i8* %0) #0
38 call void @llvm.lifetime.start.p0i8(i64 8, i8* %0) #0
3939 store i64 0, i64* %bits, align 8, !tbaa !8
4040 %1 = bitcast double* %arg.addr to i8*
4141 %call = call i8* @memcpy(i8* %0, i8* %1, i64 8) #2
244244 %integer_exponent.0 = phi i32 [ 0, %if.end.84 ], [ %sub70, %if.end.66 ]
245245 %fractional_part.2 = phi i64 [ %.fractional_part.0, %if.end.84 ], [ 0, %if.end.66 ]
246246 %7 = bitcast [512 x i8]* %buf to i8*
247 call void @llvm.lifetime.start(i64 512, i8* %7) #0
247 call void @llvm.lifetime.start.p0i8(i64 512, i8* %7) #0
248248 %add.ptr = getelementptr inbounds [512 x i8], [512 x i8]* %buf, i64 0, i64 512
249249 %add.ptr106 = getelementptr inbounds [512 x i8], [512 x i8]* %buf, i64 0, i64 480
250250 %call109 = call i8* @halide_int64_to_string(i8* %add.ptr106, i8* %add.ptr, i64 %integer_part.2, i32 1) #3
271271 %call142 = call i8* @halide_string_to_string(i8* %dst.addr.0, i8* %end, i8* %int_part_ptr.0.lcssa) #3
272272 %call143 = call i8* @halide_string_to_string(i8* %call142, i8* %end, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9.96, i64 0, i64 0)) #3
273273 %call144 = call i8* @halide_int64_to_string(i8* %call143, i8* %end, i64 %fractional_part.2, i32 6) #3
274 call void @llvm.lifetime.end(i64 512, i8* %9) #0
274 call void @llvm.lifetime.end.p0i8(i64 512, i8* %9) #0
275275 br label %cleanup.148
276276
277277 for.cond.cleanup.115: ; preds = %for.body.116
314314 cleanup.148: ; preds = %for.cond.cleanup, %if.then.64, %if.end.59, %if.else.30, %if.then.28, %if.else.24, %if.then.22, %if.else.13, %if.then.11, %if.else, %if.then.6
315315 %retval.1 = phi i8* [ %call7, %if.then.6 ], [ %call8, %if.else ], [ %call12, %if.then.11 ], [ %call14, %if.else.13 ], [ %call23, %if.then.22 ], [ %call25, %if.else.24 ], [ %call29, %if.then.28 ], [ %call31, %if.else.30 ], [ %call65, %if.then.64 ], [ %call61, %if.end.59 ], [ %call144, %for.cond.cleanup ]
316316 %13 = bitcast i64* %bits to i8*
317 call void @llvm.lifetime.end(i64 8, i8* %13) #0
317 call void @llvm.lifetime.end.p0i8(i64 8, i8* %13) #0
318318 ret i8* %retval.1
319319 }
320320
77 %w = alloca [8200 x i32], align 4
88 %q = alloca [8200 x i32], align 4
99 %0 = bitcast [8200 x i32]* %v to i8*
10 call void @llvm.lifetime.start(i64 32800, i8* %0) #0
10 call void @llvm.lifetime.start.p0i8(i64 32800, i8* %0) #0
1111 %1 = bitcast [8200 x i32]* %w to i8*
12 call void @llvm.lifetime.start(i64 32800, i8* %1) #0
12 call void @llvm.lifetime.start.p0i8(i64 32800, i8* %1) #0
1313 %2 = bitcast [8200 x i32]* %q to i8*
14 call void @llvm.lifetime.start(i64 32800, i8* %2) #0
14 call void @llvm.lifetime.start.p0i8(i64 32800, i8* %2) #0
1515 %arraydecay = getelementptr inbounds [8200 x i32], [8200 x i32]* %q, i64 0, i64 0
1616 %arraydecay1 = getelementptr inbounds [8200 x i32], [8200 x i32]* %v, i64 0, i64 0
1717 %arraydecay2 = getelementptr inbounds [8200 x i32], [8200 x i32]* %w, i64 0, i64 0
2727 ; CHECK: blr
2828
2929 %add = add nsw i32 %4, %3
30 call void @llvm.lifetime.end(i64 32800, i8* %2) #0
31 call void @llvm.lifetime.end(i64 32800, i8* %1) #0
32 call void @llvm.lifetime.end(i64 32800, i8* %0) #0
30 call void @llvm.lifetime.end.p0i8(i64 32800, i8* %2) #0
31 call void @llvm.lifetime.end.p0i8(i64 32800, i8* %1) #0
32 call void @llvm.lifetime.end.p0i8(i64 32800, i8* %0) #0
3333 ret i32 %add
3434 }
3535
36 declare void @llvm.lifetime.start(i64, i8* nocapture) #0
36 declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) #0
3737
3838 declare void @bar(i32*, i32*, i32*)
3939
40 declare void @llvm.lifetime.end(i64, i8* nocapture) #0
40 declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) #0
4141
4242 attributes #0 = { nounwind }
22 top:
33 %0 = alloca i8, align 2
44 %1 = bitcast i8* %0 to i8*
5 call void @llvm.lifetime.start(i64 2, i8* %1)
5 call void @llvm.lifetime.start.p0i8(i64 2, i8* %1)
66 store i8 -1, i8* %0, align 2
77 %2 = atomicrmw min i8* %0, i8 0 acq_rel
88 %3 = load atomic i8, i8* %0 acquire, align 8
9 call void @llvm.lifetime.end(i64 2, i8* %1)
9 call void @llvm.lifetime.end.p0i8(i64 2, i8* %1)
1010 ret i8 %3
1111 ; CHECK-LABEL: atomic_min_i8
1212 ; CHECK: lbarx [[DST:[0-9]+]],
1818 top:
1919 %0 = alloca i16, align 2
2020 %1 = bitcast i16* %0 to i8*
21 call void @llvm.lifetime.start(i64 2, i8* %1)
21 call void @llvm.lifetime.start.p0i8(i64 2, i8* %1)
2222 store i16 -1, i16* %0, align 2
2323 %2 = atomicrmw min i16* %0, i16 0 acq_rel
2424 %3 = load atomic i16, i16* %0 acquire, align 8
25 call void @llvm.lifetime.end(i64 2, i8* %1)
25 call void @llvm.lifetime.end.p0i8(i64 2, i8* %1)
2626 ret i16 %3
2727 ; CHECK-LABEL: atomic_min_i16
2828 ; CHECK: lharx [[DST:[0-9]+]],
3535 top:
3636 %0 = alloca i8, align 2
3737 %1 = bitcast i8* %0 to i8*
38 call void @llvm.lifetime.start(i64 2, i8* %1)
38 call void @llvm.lifetime.start.p0i8(i64 2, i8* %1)
3939 store i8 -1, i8* %0, align 2
4040 %2 = atomicrmw max i8* %0, i8 0 acq_rel
4141 %3 = load atomic i8, i8* %0 acquire, align 8
42 call void @llvm.lifetime.end(i64 2, i8* %1)
42 call void @llvm.lifetime.end.p0i8(i64 2, i8* %1)
4343 ret i8 %3
4444 ; CHECK-LABEL: atomic_max_i8
4545 ; CHECK: lbarx [[DST:[0-9]+]],
5151 top:
5252 %0 = alloca i16, align 2
5353 %1 = bitcast i16* %0 to i8*
54 call void @llvm.lifetime.start(i64 2, i8* %1)
54 call void @llvm.lifetime.start.p0i8(i64 2, i8* %1)
5555 store i16 -1, i16* %0, align 2
5656 %2 = atomicrmw max i16* %0, i16 0 acq_rel
5757 %3 = load atomic i16, i16* %0 acquire, align 8
58 call void @llvm.lifetime.end(i64 2, i8* %1)
58 call void @llvm.lifetime.end.p0i8(i64 2, i8* %1)
5959 ret i16 %3
6060 ; CHECK-LABEL: atomic_max_i16
6161 ; CHECK: lharx [[DST:[0-9]+]],
6464 ; CHECK-NEXT: ble 0
6565 }
6666
67 declare void @llvm.lifetime.start(i64, i8*)
68 declare void @llvm.lifetime.end(i64, i8*)
67 declare void @llvm.lifetime.start.p0i8(i64, i8*)
68 declare void @llvm.lifetime.end.p0i8(i64, i8*)
77 entry:
88 %x = alloca <2 x i64>, align 16
99 %0 = bitcast <2 x i64>* %x to i8*
10 call void @llvm.lifetime.start(i64 16, i8* %0)
10 call void @llvm.lifetime.start.p0i8(i64 16, i8* %0)
1111 %arrayidx = getelementptr inbounds <2 x i64>, <2 x i64>* %x, i64 0, i64 0
1212 store <2 x i64> , <2 x i64>* %x, align 16
1313 call void @foo(i64* %arrayidx)
14 call void @llvm.lifetime.end(i64 16, i8* %0)
14 call void @llvm.lifetime.end.p0i8(i64 16, i8* %0)
1515 ret void
1616 }
1717
2020 ; CHECK: stxvd2x
2121 ; CHECK-NOT: xxswapd
2222
23 declare void @llvm.lifetime.start(i64, i8* nocapture)
23 declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture)
2424 declare void @foo(i64*)
25 declare void @llvm.lifetime.end(i64, i8* nocapture)
25 declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture)
2626
22 target triple = "powerpc64-unknown-linux-gnu"
33
44 ; Function Attrs: nounwind
5 declare void @llvm.lifetime.end(i64, i8* nocapture) #0
5 declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) #0
66
77 declare void @f1()
88 declare void @f2()
5353 br label %dup2
5454
5555 dup1: ; preds = %sw.0, %sw.1
56 call void @llvm.lifetime.end(i64 8, i8* nonnull undef) #0
56 call void @llvm.lifetime.end.p0i8(i64 8, i8* nonnull undef) #0
5757 unreachable
5858
5959 dup2: ; preds = %if.then, %if.else
60 call void @llvm.lifetime.end(i64 8, i8* nonnull undef) #0
60 call void @llvm.lifetime.end.p0i8(i64 8, i8* nonnull undef) #0
6161 unreachable
6262 }
6363
222222 %10 = getelementptr inbounds %"class.std::allocator", %"class.std::allocator"* %ref.tmp.i.i2.i, i64 0, i32 0
223223 %11 = bitcast %"class.llvm::SMDiagnostic"* %ref.tmp to i8*
224224 call void @llvm.memset.p0i8.i64(i8* %11, i8 0, i64 16, i32 8, i1 false) #3
225 call void @llvm.lifetime.start(i64 1, i8* %10) #3
225 call void @llvm.lifetime.start.p0i8(i64 1, i8* %10) #3
226226 %tobool.i.i4.i = icmp eq i8* %4, null
227227 br i1 %tobool.i.i4.i, label %if.then.i.i6.i, label %if.end.i.i8.i
228228
236236 br label %_ZNK4llvm9StringRefcvSsEv.exit9.i
237237
238238 _ZNK4llvm9StringRefcvSsEv.exit9.i: ; preds = %if.end.i.i8.i, %if.then.i.i6.i
239 call void @llvm.lifetime.end(i64 1, i8* %10) #3
239 call void @llvm.lifetime.end.p0i8(i64 1, i8* %10) #3
240240 %LineNo.i = getelementptr inbounds %"class.llvm::SMDiagnostic", %"class.llvm::SMDiagnostic"* %ref.tmp, i64 0, i32 3
241241 store i32 -1, i32* %LineNo.i, align 8, !tbaa !14
242242 %ColumnNo.i = getelementptr inbounds %"class.llvm::SMDiagnostic", %"class.llvm::SMDiagnostic"* %ref.tmp, i64 0, i32 4
245245 store i32 0, i32* %Kind.i, align 8, !tbaa !22
246246 %Message.i = getelementptr inbounds %"class.llvm::SMDiagnostic", %"class.llvm::SMDiagnostic"* %ref.tmp, i64 0, i32 6
247247 %12 = getelementptr inbounds %"class.std::allocator", %"class.std::allocator"* %ref.tmp.i.i.i, i64 0, i32 0
248 call void @llvm.lifetime.start(i64 1, i8* %12) #3
248 call void @llvm.lifetime.start.p0i8(i64 1, i8* %12) #3
249249 %tobool.i.i.i = icmp eq i8* %8, null
250250 br i1 %tobool.i.i.i, label %if.then.i.i.i, label %if.end.i.i.i
251251
259259 br label %_ZN4llvm12SMDiagnosticC2ENS_9StringRefENS_9SourceMgr8DiagKindES1_.exit
260260
261261 _ZN4llvm12SMDiagnosticC2ENS_9StringRefENS_9SourceMgr8DiagKindES1_.exit: ; preds = %if.then.i.i.i, %if.end.i.i.i
262 call void @llvm.lifetime.end(i64 1, i8* %12) #3
262 call void @llvm.lifetime.end.p0i8(i64 1, i8* %12) #3
263263 %_M_p.i.i.i.i.i = getelementptr inbounds %"class.llvm::SMDiagnostic", %"class.llvm::SMDiagnostic"* %ref.tmp, i64 0, i32 7, i32 0, i32 0
264264 store i8* bitcast (i64* getelementptr inbounds ([0 x i64], [0 x i64]* @_ZNSs4_Rep20_S_empty_rep_storageE, i64 0, i64 3) to i8*), i8** %_M_p.i.i.i.i.i, align 8, !tbaa !13
265265 %Ranges.i = getelementptr inbounds %"class.llvm::SMDiagnostic", %"class.llvm::SMDiagnostic"* %ref.tmp, i64 0, i32 8
319319 %call2.i.i42 = call dereferenceable(48) %"class.llvm::SmallVectorImpl.85"* @_ZN4llvm15SmallVectorImplINS_7SMFixItEEaSEOS2_(%"class.llvm::SmallVectorImpl.85"* %24, %"class.llvm::SmallVectorImpl.85"* dereferenceable(48) %25) #3
320320 call void @_ZN4llvm12SMDiagnosticD2Ev(%"class.llvm::SMDiagnostic"* %ref.tmp) #3
321321 %26 = getelementptr inbounds %"class.std::allocator", %"class.std::allocator"* %ref.tmp.i.i, i64 0, i32 0
322 call void @llvm.lifetime.start(i64 1, i8* %26) #3
322 call void @llvm.lifetime.start.p0i8(i64 1, i8* %26) #3
323323 %27 = bitcast i8* %arrayidx.i.i.i36 to %"struct.std::basic_string, std::allocator >::_Rep"*
324324 %cmp.i.i.i = icmp eq i8* %arrayidx.i.i.i36, bitcast ([0 x i64]* @_ZNSs4_Rep20_S_empty_rep_storageE to i8*)
325325 br i1 %cmp.i.i.i, label %_ZNSsD1Ev.exit, label %if.then.i.i.i45, !prof !28
331331
332332 if.then.i.i.i.i: ; preds = %if.then.i.i.i45
333333 %.atomicdst.i.i.i.i.i.0..atomicdst.i.i.i.i.0..atomicdst.i.i.i.0..atomicdst.i.i.0..atomicdst.i.0..sroa_cast = bitcast i32* %.atomicdst.i.i.i.i.i to i8*
334 call void @llvm.lifetime.start(i64 4, i8* %.atomicdst.i.i.i.i.i.0..atomicdst.i.i.i.i.0..atomicdst.i.i.i.0..atomicdst.i.i.0..atomicdst.i.0..sroa_cast)
334 call void @llvm.lifetime.start.p0i8(i64 4, i8* %.atomicdst.i.i.i.i.i.0..atomicdst.i.i.i.i.0..atomicdst.i.i.i.0..atomicdst.i.i.0..atomicdst.i.0..sroa_cast)
335335 %29 = atomicrmw volatile add i32* %28, i32 -1 acq_rel
336336 store i32 %29, i32* %.atomicdst.i.i.i.i.i, align 4
337337 %.atomicdst.i.i.i.i.i.0..atomicdst.i.i.i.i.0..atomicdst.i.i.i.0..atomicdst.i.i.0..atomicdst.i.0..atomicdst.0..atomicdst.0..i.i.i.i.i = load volatile i32, i32* %.atomicdst.i.i.i.i.i, align 4
338 call void @llvm.lifetime.end(i64 4, i8* %.atomicdst.i.i.i.i.i.0..atomicdst.i.i.i.i.0..atomicdst.i.i.i.0..atomicdst.i.i.0..atomicdst.i.0..sroa_cast)
338 call void @llvm.lifetime.end.p0i8(i64 4, i8* %.atomicdst.i.i.i.i.i.0..atomicdst.i.i.i.i.0..atomicdst.i.i.i.0..atomicdst.i.i.0..atomicdst.i.0..sroa_cast)
339339 br label %_ZN9__gnu_cxxL27__exchange_and_add_dispatchEPii.exit.i.i.i
340340
341341 if.else.i.i.i.i: ; preds = %if.then.i.i.i45
354354 br label %_ZNSsD1Ev.exit
355355
356356 _ZNSsD1Ev.exit: ; preds = %_ZN4llvm12SMDiagnosticaSEOS0_.exit, %_ZN9__gnu_cxxL27__exchange_and_add_dispatchEPii.exit.i.i.i, %if.then4.i.i.i
357 call void @llvm.lifetime.end(i64 1, i8* %26) #3
357 call void @llvm.lifetime.end.p0i8(i64 1, i8* %26) #3
358358 %31 = getelementptr inbounds %"class.std::allocator", %"class.std::allocator"* %ref.tmp.i.i47, i64 0, i32 0
359 call void @llvm.lifetime.start(i64 1, i8* %31) #3
359 call void @llvm.lifetime.start.p0i8(i64 1, i8* %31) #3
360360 %_M_p.i.i.i.i48 = getelementptr inbounds %"class.std::basic_string", %"class.std::basic_string"* %ref.tmp5, i64 0, i32 0, i32 0
361361 %32 = load i8*, i8** %_M_p.i.i.i.i48, align 8, !tbaa !1
362362 %arrayidx.i.i.i49 = getelementptr inbounds i8, i8* %32, i64 -24
371371
372372 if.then.i.i.i.i55: ; preds = %if.then.i.i.i52
373373 %.atomicdst.i.i.i.i.i46.0..atomicdst.i.i.i.i.0..atomicdst.i.i.i.0..atomicdst.i.i.0..atomicdst.i.0..sroa_cast = bitcast i32* %.atomicdst.i.i.i.i.i46 to i8*
374 call void @llvm.lifetime.start(i64 4, i8* %.atomicdst.i.i.i.i.i46.0..atomicdst.i.i.i.i.0..atomicdst.i.i.i.0..atomicdst.i.i.0..atomicdst.i.0..sroa_cast)
374 call void @llvm.lifetime.start.p0i8(i64 4, i8* %.atomicdst.i.i.i.i.i46.0..atomicdst.i.i.i.i.0..atomicdst.i.i.i.0..atomicdst.i.i.0..atomicdst.i.0..sroa_cast)
375375 %35 = atomicrmw volatile add i32* %34, i32 -1 acq_rel
376376 store i32 %35, i32* %.atomicdst.i.i.i.i.i46, align 4
377377 %.atomicdst.i.i.i.i.i46.0..atomicdst.i.i.i.i.0..atomicdst.i.i.i.0..atomicdst.i.i.0..atomicdst.i.0..atomicdst.0..atomicdst.0..i.i.i.i.i54 = load volatile i32, i32* %.atomicdst.i.i.i.i.i46, align 4
378 call void @llvm.lifetime.end(i64 4, i8* %.atomicdst.i.i.i.i.i46.0..atomicdst.i.i.i.i.0..atomicdst.i.i.i.0..atomicdst.i.i.0..atomicdst.i.0..sroa_cast)
378 call void @llvm.lifetime.end.p0i8(i64 4, i8* %.atomicdst.i.i.i.i.i46.0..atomicdst.i.i.i.i.0..atomicdst.i.i.i.0..atomicdst.i.i.0..atomicdst.i.0..sroa_cast)
379379 br label %_ZN9__gnu_cxxL27__exchange_and_add_dispatchEPii.exit.i.i.i60
380380
381381 if.else.i.i.i.i57: ; preds = %if.then.i.i.i52
394394 br label %_ZNSsD1Ev.exit62
395395
396396 _ZNSsD1Ev.exit62: ; preds = %_ZNSsD1Ev.exit, %_ZN9__gnu_cxxL27__exchange_and_add_dispatchEPii.exit.i.i.i60, %if.then4.i.i.i61
397 call void @llvm.lifetime.end(i64 1, i8* %31) #3
397 call void @llvm.lifetime.end.p0i8(i64 1, i8* %31) #3
398398 br label %cleanup
399399
400400 cond.false.i.i: ; preds = %_ZNK4llvm7ErrorOrISt10unique_ptrINS_12MemoryBufferESt14default_deleteIS2_EEE8getErrorEv.exit
437437 }
438438
439439 ; Function Attrs: nounwind
440 declare void @llvm.lifetime.start(i64, i8* nocapture) #3
441
442 ; Function Attrs: nounwind
443 declare void @llvm.lifetime.end(i64, i8* nocapture) #3
440 declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) #3
441
442 ; Function Attrs: nounwind
443 declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) #3
444444
445445 ; Function Attrs: noreturn nounwind
446446 declare void @__assert_fail(i8*, i8*, i32 zeroext, i8*) #4
1616 entry:
1717 %a1 = alloca [256 x i32], align 4
1818 %0 = bitcast [256 x i32]* %a1 to i8*
19 call void @llvm.lifetime.start(i64 1024, i8* %0)
19 call void @llvm.lifetime.start.p0i8(i64 1024, i8* %0)
2020 %arraydecay = getelementptr inbounds [256 x i32], [256 x i32]* %a1, i64 0, i64 0
2121 call void @foo3(i32* %arraydecay)
22 call void @llvm.lifetime.end(i64 1024, i8* %0)
22 call void @llvm.lifetime.end.p0i8(i64 1024, i8* %0)
2323 ret i32 0
2424 }
2525
2626 ; Function Attrs: nounwind
27 declare void @llvm.lifetime.start(i64, i8* nocapture)
27 declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture)
2828
2929 declare void @foo3(i32*)
3030
3131 ; Function Attrs: nounwind
32 declare void @llvm.lifetime.end(i64, i8* nocapture)
32 declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture)
3333
3434 attributes #0 = { sspstrong }
1010 entry:
1111 %c = alloca %struct.C, align 1
1212 %0 = getelementptr inbounds %struct.C, %struct.C* %c, i32 0, i32 0, i32 0
13 call void @llvm.lifetime.start(i64 1000, i8* %0) #1
13 call void @llvm.lifetime.start.p0i8(i64 1000, i8* %0) #1
1414 call void @use_C(%struct.C* byval %c) #3
15 call void @llvm.lifetime.end(i64 1000, i8* %0) #1
15 call void @llvm.lifetime.end.p0i8(i64 1000, i8* %0) #1
1616 ret void
1717 }
1818
2323 entry:
2424 %s = alloca %struct.S, align 2
2525 %0 = bitcast %struct.S* %s to i8*
26 call void @llvm.lifetime.start(i64 2000, i8* %0) #1
26 call void @llvm.lifetime.start.p0i8(i64 2000, i8* %0) #1
2727 call void @use_S(%struct.S* byval %s) #3
28 call void @llvm.lifetime.end(i64 2000, i8* %0) #1
28 call void @llvm.lifetime.end.p0i8(i64 2000, i8* %0) #1
2929 ret void
3030 }
3131
3636 entry:
3737 %i = alloca %struct.I, align 4
3838 %0 = bitcast %struct.I* %i to i8*
39 call void @llvm.lifetime.start(i64 4000, i8* %0) #1
39 call void @llvm.lifetime.start.p0i8(i64 4000, i8* %0) #1
4040 call void @use_I(%struct.I* byval %i) #3
41 call void @llvm.lifetime.end(i64 4000, i8* %0) #1
41 call void @llvm.lifetime.end.p0i8(i64 4000, i8* %0) #1
4242 ret void
4343 }
4444
4646 declare void @use_S(%struct.S* byval) #2
4747 declare void @use_I(%struct.I* byval) #2
4848
49 declare void @llvm.lifetime.start(i64, i8* nocapture) #1
50 declare void @llvm.lifetime.end(i64, i8* nocapture) #1
49 declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) #1
50 declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) #1
5151
5252
5353 attributes #0 = { nounwind optsize "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-frame-pointer-elim-non-leaf"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
1111
1212 %0 = bitcast %deque* %var3 to i8*
1313 %1 = bitcast %iterator* %var1 to i8*
14 call void @llvm.lifetime.start(i64 16, i8* %1) nounwind
14 call void @llvm.lifetime.start.p0i8(i64 16, i8* %1) nounwind
1515 call void @llvm.memcpy.p0i8.p0i8.i32(i8* %1, i8* %0, i32 16, i32 4, i1 false)
16 call void @llvm.lifetime.end(i64 16, i8* %1) nounwind
16 call void @llvm.lifetime.end.p0i8(i64 16, i8* %1) nounwind
1717
1818 %2 = bitcast %insert_iterator* %var2 to i8*
19 call void @llvm.lifetime.start(i64 20, i8* %2) nounwind
19 call void @llvm.lifetime.start.p0i8(i64 20, i8* %2) nounwind
2020
2121 ret i32 0
2222 }
2323
2424 declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32, i1) nounwind
2525
26 declare void @llvm.lifetime.start(i64, i8* nocapture) nounwind
26 declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) nounwind
2727
28 declare void @llvm.lifetime.end(i64, i8* nocapture) nounwind
28 declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) nounwind
2626 define i32 @test_stack_guard_remat() #0 {
2727 %a1 = alloca [256 x i32], align 4
2828 %1 = bitcast [256 x i32]* %a1 to i8*
29 call void @llvm.lifetime.start(i64 1024, i8* %1)
29 call void @llvm.lifetime.start.p0i8(i64 1024, i8* %1)
3030 %2 = getelementptr inbounds [256 x i32], [256 x i32]* %a1, i32 0, i32 0
3131 call void @foo3(i32* %2) #3
3232 call void asm sideeffect "foo2", "~{r0},~{r1},~{r2},~{r3},~{r4},~{r5},~{r6},~{r7},~{r8},~{r9},~{r10},~{r11},~{r12},~{sp},~{lr}"()
33 call void @llvm.lifetime.end(i64 1024, i8* %1)
33 call void @llvm.lifetime.end.p0i8(i64 1024, i8* %1)
3434 ret i32 0
3535 }
3636
3737 ; Function Attrs: nounwind
38 declare void @llvm.lifetime.start(i64, i8* nocapture)
38 declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture)
3939
4040 declare void @foo3(i32*)
4141
4242 ; Function Attrs: nounwind
43 declare void @llvm.lifetime.end(i64, i8* nocapture)
43 declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture)
4444
4545 attributes #0 = { nounwind ssp "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
22 target triple = "thumbv7-unknown-linux-gnueabihf"
33
44 ; Function Attrs: argmemonly nounwind
5 declare void @llvm.lifetime.start(i64, i8* nocapture) #0
5 declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) #0
66
77 ; Function Attrs: nounwind
88 declare void @_ZNSaIcEC2Ev() unnamed_addr #0 align 2
2424 br label %3
2525
2626 ;
27 call void @llvm.lifetime.start(i64 1, i8* undef) #0
27 call void @llvm.lifetime.start.p0i8(i64 1, i8* undef) #0
2828 call void @_ZNSaIcEC2Ev() #0
2929 br label %3
3030
2323 define i32 @test_stack_guard_remat() #0 {
2424 %a1 = alloca [256 x i32], align 4
2525 %1 = bitcast [256 x i32]* %a1 to i8*
26 call void @llvm.lifetime.start(i64 1024, i8* %1)
26 call void @llvm.lifetime.start.p0i8(i64 1024, i8* %1)
2727 %2 = getelementptr inbounds [256 x i32], [256 x i32]* %a1, i32 0, i32 0
2828 call void @foo3(i32* %2) #3
2929 call void asm sideeffect "foo2", "~{r0},~{r1},~{r2},~{r3},~{r4},~{r5},~{r6},~{r7},~{r8},~{r9},~{r10},~{r11},~{r12},~{sp},~{lr}"()
30 call void @llvm.lifetime.end(i64 1024, i8* %1)
30 call void @llvm.lifetime.end.p0i8(i64 1024, i8* %1)
3131 ret i32 0
3232 }
3333
3434 ; Function Attrs: nounwind
35 declare void @llvm.lifetime.start(i64, i8* nocapture)
35 declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture)
3636
3737 declare void @foo3(i32*)
3838
3939 ; Function Attrs: nounwind
40 declare void @llvm.lifetime.end(i64, i8* nocapture)
40 declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture)
4141
4242 attributes #0 = { nounwind ssp "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
1414 br label %for.body
1515
1616 for.body:
17 call void @llvm.lifetime.end(i64 -1, i8* %0) nounwind
18 call void @llvm.lifetime.start(i64 -1, i8* %x.i) nounwind
17 call void @llvm.lifetime.end.p0i8(i64 -1, i8* %0) nounwind
18 call void @llvm.lifetime.start.p0i8(i64 -1, i8* %x.i) nounwind
1919 call void @llvm.dbg.declare(metadata i8* %x.i, metadata !22, metadata !DIExpression()) nounwind, !dbg !DILocation(scope: !2)
2020 br label %for.body
2121 }
2222
2323
24 declare void @llvm.lifetime.start(i64, i8* nocapture) nounwind
24 declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) nounwind
2525
26 declare void @llvm.lifetime.end(i64, i8* nocapture) nounwind
26 declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) nounwind
2727
2828 !llvm.dbg.cu = !{!0}
2929 !llvm.module.flags = !{!23}
1414 %a2 = alloca [16 x i8*], align 8
1515 %b = bitcast [17 x i8*]* %a to i8*
1616 %b2 = bitcast [16 x i8*]* %a2 to i8*
17 call void @llvm.lifetime.start(i64 -1, i8* %b)
18 %t1 = call i32 @foo(i32 %in, i8* %b)
19 %t2 = call i32 @foo(i32 %in, i8* %b)
20 call void @llvm.lifetime.end(i64 -1, i8* %b)
21 call void @llvm.lifetime.start(i64 -1, i8* %b2)
22 %t3 = call i32 @foo(i32 %in, i8* %b2)
23 %t4 = call i32 @foo(i32 %in, i8* %b2)
24 call void @llvm.lifetime.end(i64 -1, i8* %b2)
17 call void @llvm.lifetime.start.p0i8(i64 -1, i8* %b)
18 %t1 = call i32 @foo(i32 %in, i8* %b)
19 %t2 = call i32 @foo(i32 %in, i8* %b)
20 call void @llvm.lifetime.end.p0i8(i64 -1, i8* %b)
21 call void @llvm.lifetime.start.p0i8(i64 -1, i8* %b2)
22 %t3 = call i32 @foo(i32 %in, i8* %b2)
23 %t4 = call i32 @foo(i32 %in, i8* %b2)
24 call void @llvm.lifetime.end.p0i8(i64 -1, i8* %b2)
2525 %t5 = add i32 %t1, %t2
2626 %t6 = add i32 %t3, %t4
2727 %t7 = add i32 %t5, %t6
3939 %a2 = alloca [16 x i8*], align 8
4040 %b = bitcast [17 x i8*]* %a to i8*
4141 %b2 = bitcast [16 x i8*]* %a2 to i8*
42 call void @llvm.lifetime.start(i64 -1, i8* %b)
42 call void @llvm.lifetime.start.p0i8(i64 -1, i8* %b)
4343 %t1 = call i32 @foo(i32 %in, i8* %b)
4444 %t2 = call i32 @foo(i32 %in, i8* %b)
4545 br i1 %d, label %bb2, label %bb3
4646 bb2:
47 call void @llvm.lifetime.start(i64 -1, i8* %b2)
48 %t3 = call i32 @foo(i32 %in, i8* %b2)
49 %t4 = call i32 @foo(i32 %in, i8* %b2)
50 call void @llvm.lifetime.end(i64 -1, i8* %b2)
51 %t5 = add i32 %t1, %t2
52 %t6 = add i32 %t3, %t4
53 %t7 = add i32 %t5, %t6
54 call void @llvm.lifetime.end(i64 -1, i8* %b)
55 ret i32 %t7
56 bb3:
57 call void @llvm.lifetime.end(i64 -1, i8* %b)
47 call void @llvm.lifetime.start.p0i8(i64 -1, i8* %b2)
48 %t3 = call i32 @foo(i32 %in, i8* %b2)
49 %t4 = call i32 @foo(i32 %in, i8* %b2)
50 call void @llvm.lifetime.end.p0i8(i64 -1, i8* %b2)
51 %t5 = add i32 %t1, %t2
52 %t6 = add i32 %t3, %t4
53 %t7 = add i32 %t5, %t6
54 call void @llvm.lifetime.end.p0i8(i64 -1, i8* %b)
55 ret i32 %t7
56 bb3:
57 call void @llvm.lifetime.end.p0i8(i64 -1, i8* %b)
5858 ret i32 0
5959 }
6060
6868 %a2 = alloca [16 x i8*], align 8
6969 %b = bitcast [17 x i8*]* %a to i8*
7070 %b2 = bitcast [16 x i8*]* %a2 to i8*
71 call void @llvm.lifetime.start(i64 -1, i8* %b)
72 %t1 = call i32 @foo(i32 %in, i8* %b)
73 %t2 = call i32 @foo(i32 %in, i8* %b)
74 call void @llvm.lifetime.end(i64 -1, i8* %b)
71 call void @llvm.lifetime.start.p0i8(i64 -1, i8* %b)
72 %t1 = call i32 @foo(i32 %in, i8* %b)
73 %t2 = call i32 @foo(i32 %in, i8* %b)
74 call void @llvm.lifetime.end.p0i8(i64 -1, i8* %b)
7575 br i1 %d, label %bb2, label %bb3
7676 bb2:
77 call void @llvm.lifetime.start(i64 -1, i8* %b2)
78 %t3 = call i32 @foo(i32 %in, i8* %b2)
79 %t4 = call i32 @foo(i32 %in, i8* %b2)
80 call void @llvm.lifetime.end(i64 -1, i8* %b2)
77 call void @llvm.lifetime.start.p0i8(i64 -1, i8* %b2)
78 %t3 = call i32 @foo(i32 %in, i8* %b2)
79 %t4 = call i32 @foo(i32 %in, i8* %b2)
80 call void @llvm.lifetime.end.p0i8(i64 -1, i8* %b2)
8181 %t5 = add i32 %t1, %t2
8282 %t6 = add i32 %t3, %t4
8383 %t7 = add i32 %t5, %t6
101101 %b2 = bitcast [13 x i8*]* %a2 to i8*
102102 %b3 = bitcast [12 x i8*]* %a3 to i8*
103103 %b4 = bitcast [11 x i8*]* %a4 to i8*
104 call void @llvm.lifetime.start(i64 -1, i8* %b4)
105 call void @llvm.lifetime.start(i64 -1, i8* %b1)
104 call void @llvm.lifetime.start.p0i8(i64 -1, i8* %b4)
105 call void @llvm.lifetime.start.p0i8(i64 -1, i8* %b1)
106106 %t1 = call i32 @foo(i32 %in, i8* %b1)
107107 %t2 = call i32 @foo(i32 %in, i8* %b1)
108 call void @llvm.lifetime.end(i64 -1, i8* %b1)
109 call void @llvm.lifetime.start(i64 -1, i8* %b2)
108 call void @llvm.lifetime.end.p0i8(i64 -1, i8* %b1)
109 call void @llvm.lifetime.start.p0i8(i64 -1, i8* %b2)
110110 %t9 = call i32 @foo(i32 %in, i8* %b2)
111111 %t8 = call i32 @foo(i32 %in, i8* %b2)
112 call void @llvm.lifetime.end(i64 -1, i8* %b2)
113 call void @llvm.lifetime.start(i64 -1, i8* %b3)
112 call void @llvm.lifetime.end.p0i8(i64 -1, i8* %b2)
113 call void @llvm.lifetime.start.p0i8(i64 -1, i8* %b3)
114114 %t3 = call i32 @foo(i32 %in, i8* %b3)
115115 %t4 = call i32 @foo(i32 %in, i8* %b3)
116 call void @llvm.lifetime.end(i64 -1, i8* %b3)
116 call void @llvm.lifetime.end.p0i8(i64 -1, i8* %b3)
117117 %t11 = call i32 @foo(i32 %in, i8* %b4)
118 call void @llvm.lifetime.end(i64 -1, i8* %b4)
118 call void @llvm.lifetime.end.p0i8(i64 -1, i8* %b4)
119119 %t5 = add i32 %t1, %t2
120120 %t6 = add i32 %t3, %t4
121121 %t7 = add i32 %t5, %t6
136136 %b2 = bitcast [13 x i8*]* %a2 to i8*
137137 %b3 = bitcast [12 x i8*]* %a3 to i8*
138138 %b4 = bitcast [11 x i8*]* %a4 to i8*
139 call void @llvm.lifetime.start(i64 -1, i8* %b1)
139 call void @llvm.lifetime.start.p0i8(i64 -1, i8* %b1)
140140 %t1 = call i32 @foo(i32 %in, i8* %b1)
141141 %t2 = call i32 @foo(i32 %in, i8* %b1)
142 call void @llvm.lifetime.end(i64 -1, i8* %b1)
143 call void @llvm.lifetime.start(i64 -1, i8* %b2)
142 call void @llvm.lifetime.end.p0i8(i64 -1, i8* %b1)
143 call void @llvm.lifetime.start.p0i8(i64 -1, i8* %b2)
144144 %t9 = call i32 @foo(i32 %in, i8* %b2)
145145 %t8 = call i32 @foo(i32 %in, i8* %b2)
146 call void @llvm.lifetime.end(i64 -1, i8* %b2)
147 call void @llvm.lifetime.start(i64 -1, i8* %b3)
146 call void @llvm.lifetime.end.p0i8(i64 -1, i8* %b2)
147 call void @llvm.lifetime.start.p0i8(i64 -1, i8* %b3)
148148 %t3 = call i32 @foo(i32 %in, i8* %b3)
149149 %t4 = call i32 @foo(i32 %in, i8* %b3)
150 call void @llvm.lifetime.end(i64 -1, i8* %b3)
150 call void @llvm.lifetime.end.p0i8(i64 -1, i8* %b3)
151151 br i1 undef, label %bb2, label %bb3
152152 bb2:
153 call void @llvm.lifetime.start(i64 -1, i8* %b4)
153 call void @llvm.lifetime.start.p0i8(i64 -1, i8* %b4)
154154 %t11 = call i32 @foo(i32 %in, i8* %b4)
155 call void @llvm.lifetime.end(i64 -1, i8* %b4)
155 call void @llvm.lifetime.end.p0i8(i64 -1, i8* %b4)
156156 %t5 = add i32 %t1, %t2
157157 %t6 = add i32 %t3, %t4
158158 %t7 = add i32 %t5, %t6
173173 %a2 = alloca [16 x i8*], align 8
174174 %b = bitcast [17 x i8*]* %a to i8*
175175 %b2 = bitcast [16 x i8*]* %a2 to i8*
176 call void @llvm.lifetime.start(i64 -1, i8* %b)
177 %t1 = call i32 @foo(i32 %in, i8* %b)
178 %t2 = call i32 @foo(i32 %in, i8* %b)
179 call void @llvm.lifetime.end(i64 -1, i8* %b)
176 call void @llvm.lifetime.start.p0i8(i64 -1, i8* %b)
177 %t1 = call i32 @foo(i32 %in, i8* %b)
178 %t2 = call i32 @foo(i32 %in, i8* %b)
179 call void @llvm.lifetime.end.p0i8(i64 -1, i8* %b)
180180 br i1 %d, label %bb2, label %bb3
181181 bb2:
182 call void @llvm.lifetime.start(i64 -1, i8* %b2)
182 call void @llvm.lifetime.start.p0i8(i64 -1, i8* %b2)
183183 %t3 = call i32 @foo(i32 %in, i8* %b2)
184184 %t4 = call i32 @foo(i32 %in, i8* %b2)
185185 %t5 = add i32 %t1, %t2
199199 %a2 = alloca [16 x i8*], align 8
200200 %b = bitcast [17 x i8*]* %a to i8*
201201 %b2 = bitcast [16 x i8*]* %a2 to i8*
202 call void @llvm.lifetime.start(i64 -1, i8* %b)
202 call void @llvm.lifetime.start.p0i8(i64 -1, i8* %b)
203203 %t1 = call i32 @foo(i32 %in, i8* %b)
204204 %t2 = call i32 @foo(i32 %in, i8* %b)
205205 br i1 %d, label %bb2, label %bb3
206206 bb2:
207 call void @llvm.lifetime.end(i64 -1, i8* %b)
208 call void @llvm.lifetime.start(i64 -1, i8* %b2)
207 call void @llvm.lifetime.end.p0i8(i64 -1, i8* %b)
208 call void @llvm.lifetime.start.p0i8(i64 -1, i8* %b2)
209209 %t3 = call i32 @foo(i32 %in, i8* %b2)
210210 %t4 = call i32 @foo(i32 %in, i8* %b2)
211211 %t5 = add i32 %t1, %t2
228228 %b2 = bitcast [16 x i8*]* %a2 to i8*
229229 %t1 = call i32 @foo(i32 %in, i8* %b)
230230 %t2 = call i32 @foo(i32 %in, i8* %b)
231 call void @llvm.lifetime.end(i64 -1, i8* %b)
231 call void @llvm.lifetime.end.p0i8(i64 -1, i8* %b)
232232 br i1 %d, label %bb2, label %bb3
233233 bb2:
234 call void @llvm.lifetime.start(i64 -1, i8* %b2)
234 call void @llvm.lifetime.start.p0i8(i64 -1, i8* %b2)
235235 %t3 = call i32 @foo(i32 %in, i8* %b2)
236236 %t4 = call i32 @foo(i32 %in, i8* %b2)
237237 %t5 = add i32 %t1, %t2
253253 %A.i = alloca [100 x i32], align 4
254254 %B.i = alloca [100 x i32], align 4
255255 %0 = bitcast [100 x i32]* %A.i to i8*
256 call void @llvm.lifetime.start(i64 -1, i8* %0) nounwind
256 call void @llvm.lifetime.start.p0i8(i64 -1, i8* %0) nounwind
257257 %1 = bitcast [100 x i32]* %B.i to i8*
258 call void @llvm.lifetime.start(i64 -1, i8* %1) nounwind
258 call void @llvm.lifetime.start.p0i8(i64 -1, i8* %1) nounwind
259259 call void @bar([100 x i32]* %A.i, [100 x i32]* %B.i) nounwind
260 call void @llvm.lifetime.end(i64 -1, i8* %0) nounwind
261 call void @llvm.lifetime.end(i64 -1, i8* %1) nounwind
260 call void @llvm.lifetime.end.p0i8(i64 -1, i8* %0) nounwind
261 call void @llvm.lifetime.end.p0i8(i64 -1, i8* %1) nounwind
262262 %2 = bitcast [100 x i32]* %A.i1 to i8*
263 call void @llvm.lifetime.start(i64 -1, i8* %2) nounwind
263 call void @llvm.lifetime.start.p0i8(i64 -1, i8* %2) nounwind
264264 %3 = bitcast [100 x i32]* %B.i2 to i8*
265 call void @llvm.lifetime.start(i64 -1, i8* %3) nounwind
265 call void @llvm.lifetime.start.p0i8(i64 -1, i8* %3) nounwind
266266 call void @bar([100 x i32]* %A.i1, [100 x i32]* %B.i2) nounwind
267 call void @llvm.lifetime.end(i64 -1, i8* %2) nounwind
268 call void @llvm.lifetime.end(i64 -1, i8* %3) nounwind
267 call void @llvm.lifetime.end.p0i8(i64 -1, i8* %2) nounwind
268 call void @llvm.lifetime.end.p0i8(i64 -1, i8* %3) nounwind
269269 ret void
270270 }
271271
280280 %b2 = bitcast [16 x i8*]* %a2 to i8*
281281 %t1 = call i32 @foo(i32 %in, i8* %b)
282282 %t2 = call i32 @foo(i32 %in, i8* %b)
283 call void @llvm.lifetime.end(i64 -1, i8* %b)
283 call void @llvm.lifetime.end.p0i8(i64 -1, i8* %b)
284284 br i1 %d, label %bb0, label %bb1
285285
286286 bb0:
293293
294294 bb2:
295295 %split = phi i8* [ %I1, %bb0 ], [ %I2, %bb1 ]
296 call void @llvm.lifetime.start(i64 -1, i8* %split)
297 %t3 = call i32 @foo(i32 %in, i8* %b2)
298 %t4 = call i32 @foo(i32 %in, i8* %b2)
299 %t5 = add i32 %t1, %t2
300 %t6 = add i32 %t3, %t4
301 %t7 = add i32 %t5, %t6
302 call void @llvm.lifetime.end(i64 -1, i8* %split)
296 call void @llvm.lifetime.start.p0i8(i64 -1, i8* %split)
297 %t3 = call i32 @foo(i32 %in, i8* %b2)
298 %t4 = call i32 @foo(i32 %in, i8* %b2)
299 %t5 = add i32 %t1, %t2
300 %t6 = add i32 %t3, %t4
301 %t7 = add i32 %t5, %t6
302 call void @llvm.lifetime.end.p0i8(i64 -1, i8* %split)
303303 ret i32 %t7
304304 bb3:
305305 ret i32 0
317317 %A.i = alloca [100 x i32], align 4
318318 %B.i = alloca [100 x i32], align 4
319319 %0 = bitcast [100 x i32]* %A.i to i8*
320 call void @llvm.lifetime.start(i64 -1, i8* %0) nounwind ; <---- start #1
320 call void @llvm.lifetime.start.p0i8(i64 -1, i8* %0) nounwind ; <---- start #1
321321 %1 = bitcast [100 x i32]* %B.i to i8*
322 call void @llvm.lifetime.start(i64 -1, i8* %1) nounwind
322 call void @llvm.lifetime.start.p0i8(i64 -1, i8* %1) nounwind
323323 call void @bar([100 x i32]* %A.i, [100 x i32]* %B.i) nounwind
324 call void @llvm.lifetime.end(i64 -1, i8* %0) nounwind
325 call void @llvm.lifetime.end(i64 -1, i8* %1) nounwind
324 call void @llvm.lifetime.end.p0i8(i64 -1, i8* %0) nounwind
325 call void @llvm.lifetime.end.p0i8(i64 -1, i8* %1) nounwind
326326 %2 = bitcast [100 x i32]* %A.i1 to i8*
327 call void @llvm.lifetime.start(i64 -1, i8* %2) nounwind
327 call void @llvm.lifetime.start.p0i8(i64 -1, i8* %2) nounwind
328328 %3 = bitcast [100 x i32]* %B.i2 to i8*
329 call void @llvm.lifetime.start(i64 -1, i8* %3) nounwind
330 call void @llvm.lifetime.start(i64 -1, i8* %0) nounwind ; <---- start #2
329 call void @llvm.lifetime.start.p0i8(i64 -1, i8* %3) nounwind
330 call void @llvm.lifetime.start.p0i8(i64 -1, i8* %0) nounwind ; <---- start #2
331331 call void @bar([100 x i32]* %A.i1, [100 x i32]* %B.i2) nounwind
332 call void @llvm.lifetime.end(i64 -1, i8* %2) nounwind
333 call void @llvm.lifetime.end(i64 -1, i8* %0) nounwind
334 call void @llvm.lifetime.end(i64 -1, i8* %3) nounwind
332 call void @llvm.lifetime.end.p0i8(i64 -1, i8* %2) nounwind
333 call void @llvm.lifetime.end.p0i8(i64 -1, i8* %0) nounwind
334 call void @llvm.lifetime.end.p0i8(i64 -1, i8* %3) nounwind
335335 ret void
336336 }
337337
343343 %b2 = bitcast [16 x i8*]* %a2 to i8*
344344 %t1 = call i32 @foo(i32 %in, i8* %b)
345345 %t2 = call i32 @foo(i32 %in, i8* %b)
346 call void @llvm.lifetime.end(i64 -1, i8* %b)
347 call void @llvm.lifetime.start(i64 -1, i8* %b)
346 call void @llvm.lifetime.end.p0i8(i64 -1, i8* %b)
347 call void @llvm.lifetime.start.p0i8(i64 -1, i8* %b)
348348 br i1 %d, label %bb2, label %bb3
349349 bb2:
350 call void @llvm.lifetime.start(i64 -1, i8* %b2)
350 call void @llvm.lifetime.start.p0i8(i64 -1, i8* %b2)
351351 %t3 = call i32 @foo(i32 %in, i8* %b2)
352352 %t4 = call i32 @foo(i32 %in, i8* %b2)
353353 %t5 = add i32 %t1, %t2
368368 %buf1 = alloca i8, i32 100000, align 16
369369 %buf2 = alloca i8, i32 100000, align 16
370370
371 call void @llvm.lifetime.start(i64 -1, i8* %buf1)
372 call void @llvm.lifetime.end(i64 -1, i8* %buf1)
373
374 call void @llvm.lifetime.start(i64 -1, i8* %buf1)
375 call void @llvm.lifetime.start(i64 -1, i8* %buf2)
371 call void @llvm.lifetime.start.p0i8(i64 -1, i8* %buf1)
372 call void @llvm.lifetime.end.p0i8(i64 -1, i8* %buf1)
373
374 call void @llvm.lifetime.start.p0i8(i64 -1, i8* %buf1)
375 call void @llvm.lifetime.start.p0i8(i64 -1, i8* %buf2)
376376 %result1 = call i32 @foo(i32 0, i8* %buf1)
377377 %result2 = call i32 @foo(i32 0, i8* %buf2)
378378 ret void
389389 %A.i = alloca [100 x i32], align 4
390390 %B.i = alloca [100 x i32], align 4
391391 %0 = bitcast [100 x i32]* %A.i to i8*
392 call void @llvm.lifetime.start(i64 -1, i8* %0) nounwind
392 call void @llvm.lifetime.start.p0i8(i64 -1, i8* %0) nounwind
393393 %1 = bitcast [100 x i32]* %B.i to i8*
394 call void @llvm.lifetime.start(i64 -1, i8* %1) nounwind
394 call void @llvm.lifetime.start.p0i8(i64 -1, i8* %1) nounwind
395395 call void @bar([100 x i32]* %A.i, [100 x i32]* %B.i) nounwind
396 call void @llvm.lifetime.end(i64 -1, i8* %0) nounwind
397 call void @llvm.lifetime.end(i64 -1, i8* %1) nounwind
396 call void @llvm.lifetime.end.p0i8(i64 -1, i8* %0) nounwind
397 call void @llvm.lifetime.end.p0i8(i64 -1, i8* %1) nounwind
398398 br label %block2
399399
400400 block2:
417417 %b8 = bitcast [4 x %struct.Klass]* %b.i to i8*
418418 ; I am used outside the lifetime zone below:
419419 %z2 = getelementptr inbounds [4 x %struct.Klass], [4 x %struct.Klass]* %a.i, i64 0, i64 0, i32 0
420 call void @llvm.lifetime.start(i64 -1, i8* %a8)
421 call void @llvm.lifetime.start(i64 -1, i8* %b8)
420 call void @llvm.lifetime.start.p0i8(i64 -1, i8* %a8)
421 call void @llvm.lifetime.start.p0i8(i64 -1, i8* %b8)
422422 %z3 = load i32, i32* %z2, align 16
423423 %r = call i32 @foo(i32 %z3, i8* %a8)
424424 %r2 = call i32 @foo(i32 %z3, i8* %b8)
425 call void @llvm.lifetime.end(i64 -1, i8* %a8)
426 call void @llvm.lifetime.end(i64 -1, i8* %b8)
425 call void @llvm.lifetime.end.p0i8(i64 -1, i8* %a8)
426 call void @llvm.lifetime.end.p0i8(i64 -1, i8* %b8)
427427 ret i32 9
428428 }
429429
445445 %b4 = alloca [128 x i32], align 16
446446 %b5 = alloca [128 x i32], align 16
447447 %tmp = bitcast [128 x i32]* %b1 to i8*
448 call void @llvm.lifetime.start(i64 512, i8* %tmp)
448 call void @llvm.lifetime.start.p0i8(i64 512, i8* %tmp)
449449 %tmp1 = bitcast [128 x i32]* %b2 to i8*
450 call void @llvm.lifetime.start(i64 512, i8* %tmp1)
450 call void @llvm.lifetime.start.p0i8(i64 512, i8* %tmp1)
451451 %and = and i32 %x, 1
452452 %tobool = icmp eq i32 %and, 0
453453 br i1 %tobool, label %if.else, label %if.then
454454
455455 if.then: ; preds = %entry
456456 %tmp2 = bitcast [128 x i32]* %b3 to i8*
457 call void @llvm.lifetime.start(i64 512, i8* %tmp2)
457 call void @llvm.lifetime.start.p0i8(i64 512, i8* %tmp2)
458458 %a1 = getelementptr inbounds [128 x i32], [128 x i32]* %b1, i64 0, i64 0
459459 %a2 = getelementptr inbounds [128 x i32], [128 x i32]* %b3, i64 0, i64 0
460460 call void @initb(i32* %a1, i32* %a2, i32* null)
461 call void @llvm.lifetime.end(i64 512, i8* %tmp2)
461 call void @llvm.lifetime.end.p0i8(i64 512, i8* %tmp2)
462462 br label %if.end
463463
464464 if.else: ; preds = %entry
465465 %tmp3 = bitcast [128 x i32]* %b4 to i8*
466 call void @llvm.lifetime.start(i64 512, i8* %tmp3)
466 call void @llvm.lifetime.start.p0i8(i64 512, i8* %tmp3)
467467 %tmp4 = bitcast [128 x i32]* %b5 to i8*
468 call void @llvm.lifetime.start(i64 512, i8* %tmp4)
468 call void @llvm.lifetime.start.p0i8(i64 512, i8* %tmp4)
469469 %a3 = getelementptr inbounds [128 x i32], [128 x i32]* %b2, i64 0, i64 0
470470 %a4 = getelementptr inbounds [128 x i32], [128 x i32]* %b4, i64 0, i64 0
471471 %a5 = getelementptr inbounds [128 x i32], [128 x i32]* %b5, i64 0, i64 0
472472 call void @initb(i32* %a3, i32* %a4, i32* %a5) #3
473 call void @llvm.lifetime.end(i64 512, i8* %tmp4)
474 call void @llvm.lifetime.end(i64 512, i8* %tmp3)
473 call void @llvm.lifetime.end.p0i8(i64 512, i8* %tmp4)
474 call void @llvm.lifetime.end.p0i8(i64 512, i8* %tmp3)
475475 br label %if.end
476476
477477 if.end: ; preds = %if.else, %if.then
478 call void @llvm.lifetime.end(i64 512, i8* %tmp1)
479 call void @llvm.lifetime.end(i64 512, i8* %tmp)
478 call void @llvm.lifetime.end.p0i8(i64 512, i8* %tmp1)
479 call void @llvm.lifetime.end.p0i8(i64 512, i8* %tmp)
480480 ret i32 0
481481
482482 }
498498 %b2 = alloca [128 x i32], align 16
499499 %b3 = alloca [128 x i32], align 16
500500 %tmp = bitcast [128 x i32]* %b1 to i8*
501 call void @llvm.lifetime.start(i64 512, i8* %tmp) #3
501 call void @llvm.lifetime.start.p0i8(i64 512, i8* %tmp) #3
502502 %tmp1 = bitcast [128 x i32]* %b2 to i8*
503 call void @llvm.lifetime.start(i64 512, i8* %tmp1) #3
503 call void @llvm.lifetime.start.p0i8(i64 512, i8* %tmp1) #3
504504 %and = and i32 %x, 1
505505 %tobool = icmp eq i32 %and, 0
506506 br i1 %tobool, label %if.else, label %if.then
525525 while.body: ; preds = %while.body.lr.ph, %while.body
526526 %x.addr.06 = phi i32 [ %x, %while.body.lr.ph ], [ %dec, %while.body ]
527527 %dec = add nsw i32 %x.addr.06, -1
528 call void @llvm.lifetime.start(i64 512, i8* %tmp2) #3
528 call void @llvm.lifetime.start.p0i8(i64 512, i8* %tmp2) #3
529529 call void @inita(i32* %arraydecay3) #3
530 call void @llvm.lifetime.end(i64 512, i8* %tmp2) #3
530 call void @llvm.lifetime.end.p0i8(i64 512, i8* %tmp2) #3
531531 %tobool2 = icmp eq i32 %dec, 0
532532 br i1 %tobool2, label %if.end.loopexit, label %while.body
533533
535535 br label %if.end
536536
537537 if.end: ; preds = %if.end.loopexit, %if.else, %if.then
538 call void @llvm.lifetime.end(i64 512, i8* %tmp1) #3
539 call void @llvm.lifetime.end(i64 512, i8* %tmp) #3
538 call void @llvm.lifetime.end.p0i8(i64 512, i8* %tmp1) #3
539 call void @llvm.lifetime.end.p0i8(i64 512, i8* %tmp) #3
540540 ret i32 0
541541 }
542542
555555 %buffer.i = alloca [12 x i32], align 16
556556 %abc = alloca [12 x i32], align 16
557557 %tmp = bitcast [12 x i32]* %buffer.i to i8*
558 call void @llvm.lifetime.start(i64 48, i8* %tmp)
558 call void @llvm.lifetime.start.p0i8(i64 48, i8* %tmp)
559559 %idxprom.i = sext i32 %y to i64
560560 %arrayidx.i = getelementptr inbounds [12 x i32], [12 x i32]* %buffer.i, i64 0, i64 %idxprom.i
561561 call void @inita(i32* %arrayidx.i)
562562 %add.i = add nsw i32 %x, %y
563 call void @llvm.lifetime.end(i64 48, i8* %tmp)
563 call void @llvm.lifetime.end.p0i8(i64 48, i8* %tmp)
564564 %tobool = icmp eq i32 %y, 0
565565 br i1 %tobool, label %if.end, label %if.then
566566
567567 if.then: ; preds = %entry
568568 %tmp1 = bitcast [12 x i32]* %abc to i8*
569 call void @llvm.lifetime.start(i64 48, i8* %tmp1)
569 call void @llvm.lifetime.start.p0i8(i64 48, i8* %tmp1)
570570 %arrayidx = getelementptr inbounds [12 x i32], [12 x i32]* %abc, i64 0, i64 %idxprom.i
571571 call void @inita(i32* %arrayidx)
572 call void @llvm.lifetime.start(i64 48, i8* %tmp)
572 call void @llvm.lifetime.start.p0i8(i64 48, i8* %tmp)
573573 call void @inita(i32* %arrayidx.i)
574574 %add.i9 = add nsw i32 %add.i, %y
575 call void @llvm.lifetime.end(i64 48, i8* %tmp)
576 call void @llvm.lifetime.end(i64 48, i8* %tmp1)
575 call void @llvm.lifetime.end.p0i8(i64 48, i8* %tmp)
576 call void @llvm.lifetime.end.p0i8(i64 48, i8* %tmp1)
577577 br label %if.end
578578
579579 if.end: ; preds = %if.then, %entry
587587
588588 declare void @bar([100 x i32]* , [100 x i32]*) nounwind
589589
590 declare void @llvm.lifetime.start(i64, i8* nocapture) nounwind
591
592 declare void @llvm.lifetime.end(i64, i8* nocapture) nounwind
590 declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) nounwind
591
592 declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) nounwind
593593
594594 declare i32 @foo(i32, i8*)
877877 %3 = bitcast <4 x float>* %1 to i8*
878878 %4 = bitcast <4 x float>* %2 to i8*
879879
880 call void @llvm.lifetime.start(i64 16, i8* %3)
880 call void @llvm.lifetime.start.p0i8(i64 16, i8* %3)
881881 call void @gfunc(<4 x float>* %1)
882882 %5 = load <4 x float>, <4 x float>* %1, align 16
883 call void @llvm.lifetime.end(i64 16, i8* %3)
884
885 call void @llvm.lifetime.start(i64 16, i8* %4)
883 call void @llvm.lifetime.end.p0i8(i64 16, i8* %3)
884
885 call void @llvm.lifetime.start.p0i8(i64 16, i8* %4)
886886 call void @gfunc(<4 x float>* %2)
887887 %6 = load <4 x float>, <4 x float>* %2, align 16
888 call void @llvm.lifetime.end(i64 16, i8* %4)
888 call void @llvm.lifetime.end.p0i8(i64 16, i8* %4)
889889
890890 %7 = extractelement <4 x float> %5, i32 1
891891 %8 = extractelement <4 x float> %6, i32 1
894894 }
895895
896896 declare void @gfunc(<4 x float>*)
897 declare void @llvm.lifetime.start(i64, i8*)
898 declare void @llvm.lifetime.end(i64, i8*)
897 declare void @llvm.lifetime.start.p0i8(i64, i8*)
898 declare void @llvm.lifetime.end.p0i8(i64, i8*)
2525 %cp = catchpad within %cs [i8* null, i32 0, i8** %alloca1]
2626 store volatile i8* null, i8** %alloca1
2727 %bc1 = bitcast i8** %alloca1 to i8*
28 call void @llvm.lifetime.end(i64 4, i8* nonnull %bc1)
28 call void @llvm.lifetime.end.p0i8(i64 4, i8* nonnull %bc1)
2929 %bc2 = bitcast i8** %alloca2 to i8*
30 call void @llvm.lifetime.start(i64 4, i8* %bc2)
30 call void @llvm.lifetime.start.p0i8(i64 4, i8* %bc2)
3131 store volatile i8* null, i8** %alloca1
3232 unreachable
3333
6262 %cp = catchpad within %cs [i8* null, i32 0, i8** null]
6363 store volatile i8* null, i8** %alloca1
6464 %bc1 = bitcast i8** %alloca1 to i8*
65 call void @llvm.lifetime.end(i64 4, i8* nonnull %bc1)
65 call void @llvm.lifetime.end.p0i8(i64 4, i8* nonnull %bc1)
6666 %bc2 = bitcast i8** %alloca2 to i8*
67 call void @llvm.lifetime.start(i64 4, i8* %bc2)
67 call void @llvm.lifetime.start.p0i8(i64 4, i8* %bc2)
6868 store volatile i8* null, i8** %alloca1
6969 unreachable
7070
8282
8383
8484 ; Function Attrs: argmemonly nounwind
85 declare void @llvm.lifetime.start(i64, i8* nocapture) #0
85 declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) #0
8686
8787 ; Function Attrs: argmemonly nounwind
88 declare void @llvm.lifetime.end(i64, i8* nocapture) #0
88 declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) #0
8989
9090 attributes #0 = { argmemonly nounwind }
2525 entry:
2626 %o = alloca %struct.HasDtor, align 1
2727 %0 = getelementptr inbounds %struct.HasDtor, %struct.HasDtor* %o, i64 0, i32 0
28 call void @llvm.lifetime.start(i64 1, i8* %0) #4
28 call void @llvm.lifetime.start.p0i8(i64 1, i8* %0) #4
2929 invoke void @"\01?may_throw@@YAXXZ"()
3030 to label %try.cont unwind label %catch.dispatch
3131
3838
3939 try.cont: ; preds = %entry, %catch, %catch.3, %catch.5
4040 call void @"\01??1HasDtor@@QEAA@XZ"(%struct.HasDtor* nonnull %o) #4
41 call void @llvm.lifetime.end(i64 1, i8* %0) #4
41 call void @llvm.lifetime.end.p0i8(i64 1, i8* %0) #4
4242 ret i32 0
4343
4444 catch.dispatch.1: ; preds = %catch.dispatch
6262 }
6363
6464 ; Function Attrs: nounwind argmemonly
65 declare void @llvm.lifetime.start(i64, i8* nocapture) #1
65 declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) #1
6666
6767 declare void @"\01?may_throw@@YAXXZ"() #2
6868
7272 declare void @"\01??1HasDtor@@QEAA@XZ"(%struct.HasDtor*) #3
7373
7474 ; Function Attrs: nounwind argmemonly
75 declare void @llvm.lifetime.end(i64, i8* nocapture) #1
75 declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) #1
7676
7777 attributes #0 = { uwtable "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+mmx,+sse,+sse2" "unsafe-fp-math"="false" "use-soft-float"="false" }
7878 attributes #1 = { nounwind argmemonly }
313313
314314 declare void @_ZNSt6vectorIN4llvm11MachineMoveESaIS1_EE13_M_insert_auxEN9__gnu_cxx17__normal_iteratorIPS1_S3_EERKS1_(%t10*, %t21* byval align 4, %t13*)
315315
316 declare void @llvm.lifetime.start(i64, i8* nocapture) nounwind
317
318 declare void @llvm.lifetime.end(i64, i8* nocapture) nounwind
316 declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) nounwind
317
318 declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) nounwind
319319
320320 ; PR10463
321321 ; Spilling a virtual register with uses.
6464
6565 if.end: ; preds = %entry, %if.then
6666 %0 = getelementptr inbounds %struct.AAA3, %struct.AAA3* %var1, i64 0, i32 0, i64 0, !dbg !56
67 call void @llvm.lifetime.start(i64 4, i8* %0) #4, !dbg !56
67 call void @llvm.lifetime.start.p0i8(i64 4, i8* %0) #4, !dbg !56
6868 tail call void @llvm.dbg.value(metadata %struct.AAA3* %var1, i64 0, metadata !32, metadata !57), !dbg !58
6969 tail call void @llvm.dbg.value(metadata %struct.AAA3* %var1, i64 0, metadata !36, metadata !46), !dbg !59
7070 tail call void @llvm.dbg.value(metadata i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i64 0, metadata !38, metadata !46), !dbg !62
7171 call void @_Z3fooPcjPKc(i8* %0, i32 4, i8* nonnull getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0)), !dbg !63
7272 %1 = getelementptr inbounds %struct.AAA3, %struct.AAA3* %var2, i64 0, i32 0, i64 0, !dbg !65
73 call void @llvm.lifetime.start(i64 4, i8* %1) #4, !dbg !65
73 call void @llvm.lifetime.start.p0i8(i64 4, i8* %1) #4, !dbg !65
7474 call void @llvm.dbg.value(metadata %struct.AAA3* %var2, i64 0, metadata !33, metadata !57), !dbg !66
7575 call void @llvm.dbg.value(metadata %struct.AAA3* %var2, i64 0, metadata !36, metadata !46), !dbg !67
7676 call void @llvm.dbg.value(metadata i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i64 0, metadata !38, metadata !46), !dbg !69
9595 call void @llvm.dbg.value(metadata %struct.AAA3* %var1, i64 0, metadata !41, metadata !46), !dbg !82
9696 call void @llvm.dbg.value(metadata i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i64 0, metadata !42, metadata !46), !dbg !84
9797 call void @_Z3fooPcjPKc(i8* %0, i32 4, i8* nonnull getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0)), !dbg !85
98 call void @llvm.lifetime.end(i64 4, i8* %1) #4, !dbg !86
99 call void @llvm.lifetime.end(i64 4, i8* %0) #4, !dbg !87
98 call void @llvm.lifetime.end.p0i8(i64 4, i8* %1) #4, !dbg !86
99 call void @llvm.lifetime.end.p0i8(i64 4, i8* %0) #4, !dbg !87
100100 ret void, !dbg !86
101101 }
102102
103103 ; Function Attrs: argmemonly nounwind
104 declare void @llvm.lifetime.start(i64, i8* nocapture) #1
104 declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) #1
105105
106106 declare i8* @_Z5i2stri(i32) #2
107107
108108 ; Function Attrs: argmemonly nounwind
109 declare void @llvm.lifetime.end(i64, i8* nocapture) #1
109 declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) #1
110110
111111 declare void @_Z3fooPcjPKc(i8*, i32, i8*) #2
112112
99 target triple = "i386-apple-macosx10.10.0"
1010
1111 ; Function Attrs: nounwind
12 declare void @llvm.lifetime.start(i64, i8* nocapture) #0
12 declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) #0
1313
1414 ; Function Attrs: nounwind
15 declare void @llvm.lifetime.end(i64, i8* nocapture) #0
15 declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) #0
1616
1717 ; Function Attrs: ssp
1818 define void @foo(i1 %cond1, i1 %cond2) #1 {
2929
3030 if.else130: ; preds = %bb1
3131 %tmp = getelementptr inbounds [8192 x i8], [8192 x i8]* %bitmapBuffer, i32 0, i32 0
32 call void @llvm.lifetime.start(i64 8192, i8* %tmp) #0
33 call void @llvm.lifetime.end(i64 8192, i8* %tmp) #0
32 call void @llvm.lifetime.start.p0i8(i64 8192, i8* %tmp) #0
33 call void @llvm.lifetime.end.p0i8(i64 8192, i8* %tmp) #0
3434 %tmp25 = getelementptr inbounds [8192 x i8], [8192 x i8]* %bitmapBuffer229, i32 0, i32 0
35 call void @llvm.lifetime.start(i64 8192, i8* %tmp25) #0
36 call void @llvm.lifetime.end(i64 8192, i8* %tmp25) #0
35 call void @llvm.lifetime.start.p0i8(i64 8192, i8* %tmp25) #0
36 call void @llvm.lifetime.end.p0i8(i64 8192, i8* %tmp25) #0
3737 br label %end1
3838 }
3939
8282 %tmp = alloca { <2 x float>, float }, align 8
8383 store i32 0, i32* %retval, align 4
8484 %0 = bitcast %struct.FVector* %v to i8*
85 call void @llvm.lifetime.start(i64 12, i8* %0) nounwind
85 call void @llvm.lifetime.start.p0i8(i64 12, i8* %0) nounwind
8686 %x.i = getelementptr inbounds %struct.FVector, %struct.FVector* %v, i64 0, i32 0
8787 store float 1.000000e+00, float* %x.i, align 4
8888 %y.i = getelementptr inbounds %struct.FVector, %struct.FVector* %v, i64 0, i32 1
135135 %5 = bitcast %struct.FVector* %ref.tmp to i8*
136136 call void @llvm.memcpy.p0i8.p0i8.i64(i8* %4, i8* %5, i64 12, i32 4, i1 false)
137137 %6 = bitcast %struct.FVector* %v to i8*
138 call void @llvm.lifetime.end(i64 12, i8* %6) nounwind
138 call void @llvm.lifetime.end.p0i8(i64 12, i8* %6) nounwind
139139 ret i32 0
140140 }
141141
142 declare void @llvm.lifetime.start(i64, i8* nocapture) argmemonly nounwind
142 declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) argmemonly nounwind
143143
144144 declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture, i8* nocapture readonly, i64, i32, i1) argmemonly nounwind
145145
146 declare void @llvm.lifetime.end(i64, i8* nocapture) argmemonly nounwind
146 declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) argmemonly nounwind
106106 ret void
107107 }
108108
109 declare void @llvm.lifetime.start(i64, i8* nocapture) nounwind
109 declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) nounwind
110110
111111 define i64* @life() nounwind {
112112 %a1 = alloca i64*, align 8
113113 %a2 = bitcast i64** %a1 to i8*
114 call void @llvm.lifetime.start(i64 -1, i8* %a2) nounwind
114 call void @llvm.lifetime.start.p0i8(i64 -1, i8* %a2) nounwind
115115 %a3 = load i64*, i64** %a1, align 8
116116 ret i64* %a3
117117 }
7272 declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture, i8* nocapture readonly, i64, i32, i1) #1
7373
7474 ; Function Attrs: nounwind
75 declare void @llvm.lifetime.start(i64, i8* nocapture)
75 declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture)
7676
7777 ; Function Attrs: nounwind
78 declare void @llvm.lifetime.end(i64, i8* nocapture)
78 declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture)
7979
8080 ; Check that we do not read outside of the chunk of bits of the original loads.
8181 ;
114114 %d = alloca i32, align 4
115115 %aaa = alloca [1000 x i32], align 16
116116 %0 = bitcast i32* %f to i8*
117 call void @llvm.lifetime.start(i64 4, i8* %0) #1
117 call void @llvm.lifetime.start.p0i8(i64 4, i8* %0) #1
118118 %1 = bitcast [30 x i32]* %a to i8*
119 call void @llvm.lifetime.start(i64 120, i8* %1) #1
119 call void @llvm.lifetime.start.p0i8(i64 120, i8* %1) #1
120120 %2 = bitcast [1000 x i32]* %aa to i8*
121 call void @llvm.lifetime.start(i64 4000, i8* %2) #1
121 call void @llvm.lifetime.start.p0i8(i64 4000, i8* %2) #1
122122 %3 = bitcast i32* %e to i8*
123 call void @llvm.lifetime.start(i64 4, i8* %3) #1
123 call void @llvm.lifetime.start.p0i8(i64 4, i8* %3) #1
124124 %4 = bitcast [1000 x i32]* %cc to i8*
125 call void @llvm.lifetime.start(i64 4000, i8* %4) #1
125 call void @llvm.lifetime.start.p0i8(i64 4000, i8* %4) #1
126126 %5 = bitcast i32* %b to i8*
127 call void @llvm.lifetime.start(i64 4, i8* %5) #1
127 call void @llvm.lifetime.start.p0i8(i64 4, i8* %5) #1
128128 %6 = bitcast i32* %d to i8*
129 call void @llvm.lifetime.start(i64 4, i8* %6) #1
129 call void @llvm.lifetime.start.p0i8(i64 4, i8* %6) #1
130130 %7 = bitcast [1000 x i32]* %aaa to i8*
131 call void @llvm.lifetime.start(i64 4000, i8* %7) #1
131 call void @llvm.lifetime.start.p0i8(i64 4000, i8* %7) #1
132132 %call = call i32 ([30 x i32]*, ...) bitcast (i32 (...)* @check_a to i32 ([30 x i32]*, ...)*)([30 x i32]* %a)
133133 %call1 = call i32 ([1000 x i32]*, ...) bitcast (i32 (...)* @bar1 to i32 ([1000 x i32]*, ...)*)([1000 x i32]* %aaa)
134134 call void asm sideeffect "", "~{esi},~{edi},~{ebp},~{ebx},~{rbx},~{r12},~{r13},~{r14},~{r15},~{rbp},~{dirflag},~{fpsr},~{flags}"() #1
155155 %call15 = call i32 (i32*, i32*, i32*, ...) bitcast (i32 (...)* @bar3 to i32 (i32*, i32*, i32*, ...)*)(i32* %d, i32* %e, i32* %f)
156156 call void asm sideeffect "", "~{esi},~{edi},~{ebp},~{ebx},~{rbx},~{r12},~{r13},~{r14},~{r15},~{rbp},~{dirflag},~{fpsr},~{flags}"() #1
157157 %call16 = call i32 ([30 x i32]*, ...) bitcast (i32 (...)* @bar1 to i32 ([30 x i32]*, ...)*)([30 x i32]* %a)
158 call void @llvm.lifetime.end(i64 4000, i8* %7) #1
159 call void @llvm.lifetime.end(i64 4, i8* %6) #1
160 call void @llvm.lifetime.end(i64 4, i8* %5) #1
161 call void @llvm.lifetime.end(i64 4000, i8* %4) #1
162 call void @llvm.lifetime.end(i64 4, i8* %3) #1
163 call void @llvm.lifetime.end(i64 4000, i8* %2) #1
164 call void @llvm.lifetime.end(i64 120, i8* %1) #1
165 call void @llvm.lifetime.end(i64 4, i8* %0) #1
158 call void @llvm.lifetime.end.p0i8(i64 4000, i8* %7) #1
159 call void @llvm.lifetime.end.p0i8(i64 4, i8* %6) #1
160 call void @llvm.lifetime.end.p0i8(i64 4, i8* %5) #1
161 call void @llvm.lifetime.end.p0i8(i64 4000, i8* %4) #1
162 call void @llvm.lifetime.end.p0i8(i64 4, i8* %3) #1
163 call void @llvm.lifetime.end.p0i8(i64 4000, i8* %2) #1
164 call void @llvm.lifetime.end.p0i8(i64 120, i8* %1) #1
165 call void @llvm.lifetime.end.p0i8(i64 4, i8* %0) #1
166166 ret void
167167 }
168168
169169 ; Function Attrs: nounwind
170 declare void @llvm.lifetime.start(i64, i8* nocapture) #1
170 declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) #1
171171
172172 declare i32 @check_a(...) #2
173173 declare i32 @bar1(...) #2
179179 declare i32 @check_d(...) #2
180180
181181 ; Function Attrs: nounwind
182 declare void @llvm.lifetime.end(i64, i8* nocapture) #1
182 declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) #1
183183
3030 %add.i = fadd fast float %add, %n0
3131 store float %add.i, float* undef, align 4
3232 %n1 = bitcast %struct.A* %i to i8*
33 call void @llvm.lifetime.start(i64 16, i8* %n1)
33 call void @llvm.lifetime.start.p0i8(i64 16, i8* %n1)
3434 %n2 = load <2 x float>, <2 x float>* undef, align 8
3535 %conv = uitofp i1 %tobool to float
3636 %bitcast = extractelement <2 x float> %n2, i32 0
4444
4545 declare void @bar(float)
4646 declare void @foo(%struct.A*)
47 declare void @llvm.lifetime.start(i64, i8* nocapture)
47 declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture)
4848 declare void @llvm.dbg.value(metadata, i64, metadata, metadata)
4949
5050 !llvm.dbg.cu = !{!0}
142142 declare void @__assert_fail(i8*, i8*, i32, i8*) #0
143143
144144 ; Function Attrs: nounwind
145 declare void @llvm.lifetime.start(i64, i8* nocapture) #1
145 declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) #1
146146
147147 ; Function Attrs: nounwind
148 declare void @llvm.lifetime.end(i64, i8* nocapture) #1
148 declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) #1
149149
150150 ; Function Attrs: nounwind uwtable
151151 define hidden { %"class.llvm::SDNode.10.610.970.1930.2050.2290.4090"*, i32 } @_ZN4llvm16DAGTypeLegalizer18WidenVecRes_BinaryEPNS_6SDNodeE(%"class.llvm::DAGTypeLegalizer.117.717.1077.2037.2157.2397.4197"* %this, %"class.llvm::SDNode.10.610.970.1930.2050.2290.4090"* %N) #2 align 2 {
154154 %ref.tmp.i = alloca %"struct.std::pair.112.119.719.1079.2039.2159.2399.4199", align 8
155155 %Op.i = alloca %"class.llvm::SDValue.3.603.963.1923.2043.2283.4083", align 8
156156 %0 = bitcast %"struct.std::pair.112.119.719.1079.2039.2159.2399.4199"* %ref.tmp.i to i8*
157 call void @llvm.lifetime.start(i64 24, i8* %0) #1
157 call void @llvm.lifetime.start.p0i8(i64 24, i8* %0) #1
158158 %retval.sroa.0.0.idx.i36 = getelementptr inbounds %"struct.std::pair.112.119.719.1079.2039.2159.2399.4199", %"struct.std::pair.112.119.719.1079.2039.2159.2399.4199"* %ref.tmp.i, i64 0, i32 1, i32 0, i32 0
159159 %retval.sroa.0.0.copyload.i37 = load i32, i32* %retval.sroa.0.0.idx.i36, align 8
160 call void @llvm.lifetime.end(i64 24, i8* %0) #1
160 call void @llvm.lifetime.end.p0i8(i64 24, i8* %0) #1
161161 %agg.tmp8.sroa.2.0.copyload = load i32, i32* undef, align 8
162162 %1 = bitcast %"class.llvm::SDValue.3.603.963.1923.2043.2283.4083"* %Op.i to i8*
163 call void @llvm.lifetime.start(i64 16, i8* %1) #1
163 call void @llvm.lifetime.start.p0i8(i64 16, i8* %1) #1
164164 %2 = getelementptr %"class.llvm::SDValue.3.603.963.1923.2043.2283.4083", %"class.llvm::SDValue.3.603.963.1923.2043.2283.4083"* %Op.i, i64 0, i32 1
165165 store i32 %agg.tmp8.sroa.2.0.copyload, i32* %2, align 8
166166
6868 define x86_stdcallcc void @test5(%struct.sixteen* byval nocapture readonly align 4 %s) #0 {
6969 %d.sroa.0 = alloca [16 x i8], align 1
7070 %1 = getelementptr inbounds [16 x i8], [16 x i8]* %d.sroa.0, i32 0, i32 0
71 call void @llvm.lifetime.start(i64 16, i8* %1)
71 call void @llvm.lifetime.start.p0i8(i64 16, i8* %1)
7272 %2 = getelementptr inbounds %struct.sixteen, %struct.sixteen* %s, i32 0, i32 0, i32 0
7373 call void @llvm.memcpy.p0i8.p0i8.i32(i8* %1, i8* %2, i32 16, i32 1, i1 true)
74 call void @llvm.lifetime.end(i64 16, i8* %1)
74 call void @llvm.lifetime.end.p0i8(i64 16, i8* %1)
7575 ret void
7676 ; CHECK-LABEL: test5:
7777 ; CHECK: and
8181 ; CHECK-NEXT: movsd
8282 }
8383
84 declare void @llvm.lifetime.start(i64, i8* nocapture) argmemonly nounwind
84 declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) argmemonly nounwind
8585
8686 declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture readonly, i32, i32, i1) argmemonly nounwind
8787
88 declare void @llvm.lifetime.end(i64, i8* nocapture) argmemonly nounwind
88 declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) argmemonly nounwind
8989
9090 attributes #0 = { nounwind alignstack=16 "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" }
3030 entry:
3131 %a = alloca [128 x i32], align 16
3232 %0 = bitcast [128 x i32]* %a to i8*
33 call void @llvm.lifetime.start(i64 512, i8* %0)
33 call void @llvm.lifetime.start.p0i8(i64 512, i8* %0)
3434 %arraydecay = getelementptr inbounds [128 x i32], [128 x i32]* %a, i64 0, i64 0
3535 call void @foo2(i32* %arraydecay)
3636 %idxprom = sext i32 %n to i64
3737 %arrayidx = getelementptr inbounds [128 x i32], [128 x i32]* %a, i64 0, i64 %idxprom
3838 %1 = load i32, i32* %arrayidx, align 4
39 call void @llvm.lifetime.end(i64 512, i8* %0)
39 call void @llvm.lifetime.end.p0i8(i64 512, i8* %0)
4040 ret i32 %1
4141 }
4242
43 declare void @llvm.lifetime.start(i64, i8* nocapture)
43 declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture)
4444
4545 declare void @foo2(i32*)
4646
47 declare void @llvm.lifetime.end(i64, i8* nocapture)
47 declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture)
4848
4949 attributes #0 = { sspstrong "stack-protector-buffer-size"="8" }
88 entry:
99 %a1 = alloca [256 x i32], align 16
1010 %0 = bitcast [256 x i32]* %a1 to i8*
11 call void @llvm.lifetime.start(i64 1024, i8* %0)
11 call void @llvm.lifetime.start.p0i8(i64 1024, i8* %0)
1212 %arraydecay = getelementptr inbounds [256 x i32], [256 x i32]* %a1, i64 0, i64 0
1313 call void @foo3(i32* %arraydecay)
1414 call void asm sideeffect "foo2", "~{r12},~{r13},~{r14},~{r15},~{ebx},~{esi},~{edi},~{dirflag},~{fpsr},~{flags}"()
15 call void @llvm.lifetime.end(i64 1024, i8* %0)
15 call void @llvm.lifetime.end.p0i8(i64 1024, i8* %0)
1616 ret i32 0
1717 }
1818
1919 ; Function Attrs: nounwind
20 declare void @llvm.lifetime.start(i64, i8* nocapture)
20 declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture)
2121
2222 declare void @foo3(i32*)
2323
2424 ; Function Attrs: nounwind
25 declare void @llvm.lifetime.end(i64, i8* nocapture)
25 declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture)
2626
2727 attributes #0 = { nounwind ssp uwtable "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
2323 entry:
2424 %n = alloca [8 x [8 x i32]], align 16
2525 %tmp = bitcast [8 x [8 x i32]]* %n to i8*
26 call void @llvm.lifetime.start(i64 256, i8* %tmp) #3
26 call void @llvm.lifetime.start.p0i8(i64 256, i8* %tmp) #3
2727 %tmp1 = bitcast [8 x [8 x i32]]* %n to i8*
2828 %arraydecay.1 = getelementptr inbounds [8 x [8 x i32]], [8 x [8 x i32]]* %n, i64 0, i64 1, i64 0
2929 %tmp2 = bitcast i32* %arraydecay.1 to i8*
221221
222222 for.end75: ; preds = %for.inc73
223223 %m.4.lcssa = phi i32 [ %m.4, %for.inc73 ]
224 call void @llvm.lifetime.end(i64 256, i8* %tmp) #3
224 call void @llvm.lifetime.end.p0i8(i64 256, i8* %tmp) #3
225225 ret i32 %m.4.lcssa
226226 }
227227
228228 ; Function Attrs: argmemonly nounwind
229 declare void @llvm.lifetime.start(i64, i8* nocapture) #1
229 declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) #1
230230
231231 declare void @LumaPrediction4x4(i32, i32, i32, i32, i32, i16 signext, i16 signext) #2
232232
236236 declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture, i8* nocapture readonly, i64, i32, i1) #1
237237
238238 ; Function Attrs: argmemonly nounwind
239 declare void @llvm.lifetime.end(i64, i8* nocapture) #1
239 declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) #1
240240
241241 attributes #0 = { nounwind uwtable "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2" "unsafe-fp-math"="false" "use-soft-float"="false" }
242242 attributes #1 = { argmemonly nounwind }
122122 store i64 %16, i64* %private_2, align 8
123123 call void @llvm.memcpy.p0i8.p0i8.i64(i8* %2, i8* %3, i64 240, i32 8, i1 false)
124124 %17 = bitcast %struct._Unwind_FrameState* %fs.i to i8*
125 call void @llvm.lifetime.start(i64 -1, i8* %17)
125 call void @llvm.lifetime.start.p0i8(i64 -1, i8* %17)
126126 %personality.i = getelementptr inbounds %struct._Unwind_FrameState, %struct._Unwind_FrameState* %fs.i, i64 0, i32 6
127127 %retaddr_column.i22 = getelementptr inbounds %struct._Unwind_FrameState, %struct._Unwind_FrameState* %fs.i, i64 0, i32 9
128128 br label %while.body.i
210210 br label %while.body.i
211211
212212 do.body19: ; preds = %if.then3.i
213 call void @llvm.lifetime.end(i64 -1, i8* %17)
213 call void @llvm.lifetime.end.p0i8(i64 -1, i8* %17)
214214 %call20 = call fastcc i64 @uw_install_context_1(%struct._Unwind_Context* %this_context, %struct._Unwind_Context* %cur_context)
215215 %32 = load i8*, i8** %ra.i, align 8
216216 call void @llvm.eh.return.i64(i64 %call20, i8* %32)
241241
242242 declare fastcc void @uw_update_context_1(%struct._Unwind_Context*, %struct._Unwind_FrameState* nocapture) uwtable
243243
244 declare void @llvm.lifetime.start(i64, i8* nocapture) nounwind
245
246 declare void @llvm.lifetime.end(i64, i8* nocapture) nounwind
244 declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) nounwind
245
246 declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) nounwind
2323 entry:
2424 %ap = alloca [1 x %struct.__va_list_tag], align 16
2525 %0 = bitcast [1 x %struct.__va_list_tag]* %ap to i8*
26 call void @llvm.lifetime.start(i64 16, i8* %0) #2
26 call void @llvm.lifetime.start.p0i8(i64 16, i8* %0) #2
2727 call void @llvm.va_start(i8* %0)
2828 ; SSE: subl $72, %esp
2929 ; SSE: testb %al, %al
7878 %vaarg.addr = bitcast i8* %vaarg.addr.in to i32*
7979 %4 = load i32, i32* %vaarg.addr, align 4
8080 call void @llvm.va_end(i8* %0)
81 call void @llvm.lifetime.end(i64 16, i8* %0) #2
81 call void @llvm.lifetime.end.p0i8(i64 16, i8* %0) #2
8282 ret i32 %4
8383 ; SSE: movl ([[ADDR]]), %eax
8484 ; SSE: retq
8585 }
8686
8787 ; Function Attrs: nounwind argmemonly
88 declare void @llvm.lifetime.start(i64, i8* nocapture) nounwind
88 declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) nounwind
8989
9090 ; Function Attrs: nounwind
9191 declare void @llvm.va_start(i8*) nounwind
9494 declare void @llvm.va_end(i8*) nounwind
9595
9696 ; Function Attrs: nounwind argmemonly
97 declare void @llvm.lifetime.end(i64, i8* nocapture) nounwind
97 declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) nounwind
9898
2222 ; Poison memory in prologue: F1F1F1F1F8F3F3F3
2323 ; CHECK: store i64 -868082052615769615, i64* %{{[0-9]+}}
2424
25 call void @llvm.lifetime.start(i64 4, i8* %0)
25 call void @llvm.lifetime.start.p0i8(i64 4, i8* %0)
2626 ; CHECK: store i8 4, i8* %{{[0-9]+}}
2727 ; CHECK-NEXT: @llvm.lifetime.start
2828
3636 %1 = landingpad { i8*, i32 }
3737 cleanup
3838 call void @_ZN3ABCD2Ev(%struct.ABC* nonnull %x)
39 call void @llvm.lifetime.end(i64 4, i8* %0)
39 call void @llvm.lifetime.end.p0i8(i64 4, i8* %0)
4040 ; CHECK: store i8 -8, i8* %{{[0-9]+}}
4141 ; CHECK-NEXT: @llvm.lifetime.end
4242
7676 ; Poison memory in prologue: F1F1F1F1F8F304F2
7777 ; CHECK: store i64 -935355671561244175, i64* %{{[0-9]+}}
7878
79 call void @llvm.lifetime.start(i64 4, i8* %0)
79 call void @llvm.lifetime.start.p0i8(i64 4, i8* %0)
8080 ; CHECK: store i8 4, i8* %{{[0-9]+}}
8181 ; CHECK-NEXT: @llvm.lifetime.start
8282
8989 ehcleanup:
9090 %2 = cleanuppad within none []
9191 call void @"\01??1ABC@@QEAA@XZ"(%struct.ABC* nonnull %x) [ "funclet"(token %2) ]
92 call void @llvm.lifetime.end(i64 4, i8* %0)
92 call void @llvm.lifetime.end.p0i8(i64 4, i8* %0)
9393 ; CHECK: store i8 -8, i8* %{{[0-9]+}}
9494 ; CHECK-NEXT: @llvm.lifetime.end
9595
103103
104104
105105 declare i32 @__gxx_personality_v0(...)
106 declare void @llvm.lifetime.start(i64, i8* nocapture)
107 declare void @llvm.lifetime.end(i64, i8* nocapture)
106 declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture)
107 declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture)
108108 declare void @__cxa_throw(i8*, i8*, i8*) local_unnamed_addr
109109 declare i8* @__cxa_allocate_exception(i64) local_unnamed_addr
110110 declare void @_ZN3ABCD2Ev(%struct.ABC* %this) unnamed_addr
55
66 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"
77
8 declare void @llvm.lifetime.start(i64, i8* nocapture) nounwind
9 declare void @llvm.lifetime.end(i64, i8* nocapture) nounwind
8 declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) nounwind
9 declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) nounwind
1010
1111 define i32 @basic_test() sanitize_address {
1212 ; CHECK-LABEL: define i32 @basic_test()
1818 ; Memory is poisoned in prologue: F1F1F1F104F3F8F2
1919 ; CHECK-UAS: store i64 -866676825215864335, i64* %{{[0-9]+}}
2020
21 call void @llvm.lifetime.start(i64 1, i8* %c)
21 call void @llvm.lifetime.start.p0i8(i64 1, i8* %c)
2222 ; Memory is unpoisoned at llvm.lifetime.start: 01
2323 ; CHECK-UAS: store i8 1, i8* %{{[0-9]+}}
2424
2525 store volatile i32 0, i32* %retval
2626 store volatile i8 0, i8* %c, align 1
2727
28 call void @llvm.lifetime.end(i64 1, i8* %c)
28 call void @llvm.lifetime.end.p0i8(i64 1, i8* %c)
2929 ; Memory is poisoned at llvm.lifetime.end: F8
3030 ; CHECK-UAS: store i8 -8, i8* %{{[0-9]+}}
3131
44 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"
55 target triple = "x86_64-unknown-linux-gnu"
66
7 declare void @llvm.lifetime.start(i64, i8* nocapture) nounwind
8 declare void @llvm.lifetime.end(i64, i8* nocapture) nounwind
7 declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) nounwind
8 declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) nounwind
99
1010 define void @lifetime_no_size() sanitize_address {
1111 ; CHECK-LABEL: define void @lifetime_no_size()
1616 ; Poison memory in prologue: F1F1F1F104F3F3F3
1717 ; CHECK: store i64 -868083100587789839, i64* %{{[0-9]+}}
1818
19 call void @llvm.lifetime.start(i64 -1, i8* %i.ptr)
19 call void @llvm.lifetime.start.p0i8(i64 -1, i8* %i.ptr)
2020 ; Check that lifetime with no size are ignored.
2121 ; CHECK-NOT: store
2222 ; CHECK: call void @llvm.lifetime.start
2424 store volatile i8 0, i8* %i.ptr
2525 ; CHECK: store volatile
2626
27 call void @llvm.lifetime.end(i64 -1, i8* %i.ptr)
27 call void @llvm.lifetime.end.p0i8(i64 -1, i8* %i.ptr)
2828 ; Check that lifetime with no size are ignored.
2929 ; CHECK-NOT: store
3030 ; CHECK: call void @llvm.lifetime.end
4747 ; CHECK: store i64 -868082052615769615, i64* %{{[0-9]+}}
4848
4949 ; Memory is unpoisoned at llvm.lifetime.start
50 call void @llvm.lifetime.start(i64 3, i8* %i.ptr)
50 call void @llvm.lifetime.start.p0i8(i64 3, i8* %i.ptr)
5151 ; CHECK: store i8 4, i8* %{{[0-9]+}}
5252 ; CHECK-NEXT: llvm.lifetime.start
5353
5454 store volatile i8 0, i8* %i.ptr
5555 ; CHECK: store volatile
5656
57 call void @llvm.lifetime.end(i64 4, i8* %i.ptr)
57 call void @llvm.lifetime.end.p0i8(i64 4, i8* %i.ptr)
5858 ; CHECK: store i8 -8, i8* %{{[0-9]+}}
5959 ; CHECK-NEXT: call void @llvm.lifetime.end
6060
6161 ; Memory is poisoned at every call to llvm.lifetime.end
62 call void @llvm.lifetime.end(i64 2, i8* %i.ptr)
62 call void @llvm.lifetime.end.p0i8(i64 2, i8* %i.ptr)
6363 ; CHECK: store i8 -8, i8* %{{[0-9]+}}
6464 ; CHECK-NEXT: call void @llvm.lifetime.end
6565
6767 %arr = alloca [10 x i32], align 16
6868 %arr.ptr = bitcast [10 x i32]* %arr to i8*
6969
70 call void @llvm.lifetime.start(i64 40, i8* %arr.ptr)
70 call void @llvm.lifetime.start.p0i8(i64 40, i8* %arr.ptr)
7171 ; CHECK-DEFAULT: call void @__asan_unpoison_stack_memory(i64 %{{[^ ]+}}, i64 40)
7272 ; CHECK-NO-DYNAMIC-NOT: call void @__asan_unpoison_stack_memory(i64 %{{[^ ]+}}, i64 40)
7373
7474 store volatile i8 0, i8* %arr.ptr
7575 ; CHECK: store volatile
7676
77 call void @llvm.lifetime.end(i64 40, i8* %arr.ptr)
77 call void @llvm.lifetime.end.p0i8(i64 40, i8* %arr.ptr)
7878 ; CHECK-DEFAULT: call void @__asan_poison_stack_memory(i64 %{{[^ ]+}}, i64 40)
7979 ; CHECK-NO-DYNAMIC-NOT: call void @__asan_poison_stack_memory(i64 %{{[^ ]+}}, i64 40)
8080
8181 ; One more lifetime start/end for the same variable %i.
82 call void @llvm.lifetime.start(i64 2, i8* %i.ptr)
82 call void @llvm.lifetime.start.p0i8(i64 2, i8* %i.ptr)
8383 ; CHECK: store i8 4, i8* %{{[0-9]+}}
8484 ; CHECK-NEXT: llvm.lifetime.start
8585
8686 store volatile i8 0, i8* %i.ptr
8787 ; CHECK: store volatile
8888
89 call void @llvm.lifetime.end(i64 4, i8* %i.ptr)
89 call void @llvm.lifetime.end.p0i8(i64 4, i8* %i.ptr)
9090 ; CHECK: store i8 -8, i8* %{{[0-9]+}}
9191 ; CHECK-NEXT: llvm.lifetime.end
9292
107107 ; Poison memory in prologue: F1F1F1F1F8F3F3F3
108108 ; CHECK: store i64 -868082052615769615, i64* %{{[0-9]+}}
109109
110 call void @llvm.lifetime.start(i64 8, i8* %i.ptr)
110 call void @llvm.lifetime.start.p0i8(i64 8, i8* %i.ptr)
111111 ; CHECK: store i8 0, i8* %{{[0-9]+}}
112112 ; CHECK-NEXT: llvm.lifetime.start
113113
122122
123123 bb1:
124124 %i.phi = phi i8* [ %i.ptr, %entry ], [ %i.ptr2, %bb0 ]
125 call void @llvm.lifetime.end(i64 8, i8* %i.phi)
125 call void @llvm.lifetime.end.p0i8(i64 8, i8* %i.phi)
126126 ; CHECK: store i8 -8, i8* %{{[0-9]+}}
127127 ; CHECK-NEXT: llvm.lifetime.end
128128
146146 ; CHECK: store i64 -868082074056920077, i64* %{{[0-9]+}}
147147
148148 %0 = getelementptr inbounds [1024 x i8], [1024 x i8]* %x, i64 0, i64 0
149 call void @llvm.lifetime.start(i64 1024, i8* %0)
149 call void @llvm.lifetime.start.p0i8(i64 1024, i8* %0)
150150 ; CHECK: call void @__asan_set_shadow_00(i64 %{{[0-9]+}}, i64 128)
151151 ; CHECK-NEXT: call void @llvm.lifetime.start
152152
153153 store i8* %0, i8** %d, align 8
154154 ; CHECK: store i8
155155
156 call void @llvm.lifetime.end(i64 1024, i8* %0)
156 call void @llvm.lifetime.end.p0i8(i64 1024, i8* %0)
157157 ; CHECK: call void @__asan_set_shadow_f8(i64 %{{[0-9]+}}, i64 128)
158158 ; CHECK-NEXT: call void @llvm.lifetime.end
159159
171171 store i64 %a, i64* %a.addr, align 8
172172
173173 %0 = bitcast [0 x i8]* %b to i8*
174 call void @llvm.lifetime.start(i64 0, i8* %0) #2
174 call void @llvm.lifetime.start.p0i8(i64 0, i8* %0) #2
175175 ; CHECK: %{{[0-9]+}} = bitcast
176176 ; CHECK-NEXT: call void @llvm.lifetime.start
177177
178178 %1 = bitcast [0 x i8]* %b to i8*
179 call void @llvm.lifetime.end(i64 0, i8* %1) #2
179 call void @llvm.lifetime.end.p0i8(i64 0, i8* %1) #2
180180 ; CHECK-NEXT: %{{[0-9]+}} = bitcast
181181 ; CHECK-NEXT: call void @llvm.lifetime.end
182182
9090 ; CHECK-NEXT: %zz = getelementptr inbounds
9191
9292
93 call void @llvm.lifetime.start(i64 650, i8* %xx)
93 call void @llvm.lifetime.start.p0i8(i64 650, i8* %xx)
9494 ; 0000...
9595 ; ENTRY-UAS-NEXT: [[OFFSET:%[0-9]+]] = add i64 [[SHADOW_BASE]], 4
9696 ; ENTRY-UAS-NEXT: call void @__asan_set_shadow_00(i64 [[OFFSET]], i64 81)
9999 ; ENTRY-UAS-NEXT: [[PTR:%[0-9]+]] = inttoptr i64 [[OFFSET]] to [[TYPE:i8]]*
100100 ; ENTRY-UAS-NEXT: store [[TYPE]] 2, [[TYPE]]* [[PTR]], align 1
101101
102 ; CHECK-NEXT: call void @llvm.lifetime.start(i64 650, i8* %xx)
102 ; CHECK-NEXT: call void @llvm.lifetime.start.p0i8(i64 650, i8* %xx)
103103
104104 call void @Foo(i8* %xx)
105105 ; CHECK-NEXT: call void @Foo(i8* %xx)
106106
107 call void @llvm.lifetime.end(i64 650, i8* %xx)
107 call void @llvm.lifetime.end.p0i8(i64 650, i8* %xx)
108108 ; ENTRY-UAS-NEXT: [[OFFSET:%[0-9]+]] = add i64 [[SHADOW_BASE]], 4
109109 ; ENTRY-UAS-NEXT: call void @__asan_set_shadow_f8(i64 [[OFFSET]], i64 82)
110110
111 ; CHECK-NEXT: call void @llvm.lifetime.end(i64 650, i8* %xx)
112
113
114 call void @llvm.lifetime.start(i64 13, i8* %yy)
111 ; CHECK-NEXT: call void @llvm.lifetime.end.p0i8(i64 650, i8* %xx)
112
113
114 call void @llvm.lifetime.start.p0i8(i64 13, i8* %yy)
115115 ; 0005
116116 ; ENTRY-UAS-NEXT: [[OFFSET:%[0-9]+]] = add i64 [[SHADOW_BASE]], 102
117117 ; ENTRY-UAS-NEXT: [[PTR:%[0-9]+]] = inttoptr i64 [[OFFSET]] to [[TYPE:i16]]*
118118 ; ENTRY-UAS-NEXT: store [[TYPE]] 5, [[TYPE]]* [[PTR]], align 1
119119
120 ; CHECK-NEXT: call void @llvm.lifetime.start(i64 13, i8* %yy)
120 ; CHECK-NEXT: call void @llvm.lifetime.start.p0i8(i64 13, i8* %yy)
121121
122122 call void @Foo(i8* %yy)
123123 ; CHECK-NEXT: call void @Foo(i8* %yy)
124124
125 call void @llvm.lifetime.end(i64 13, i8* %yy)
125 call void @llvm.lifetime.end.p0i8(i64 13, i8* %yy)
126126 ; F8F8
127127 ; ENTRY-UAS-NEXT: [[OFFSET:%[0-9]+]] = add i64 [[SHADOW_BASE]], 102
128128 ; ENTRY-UAS-NEXT: [[PTR:%[0-9]+]] = inttoptr i64 [[OFFSET]] to [[TYPE:i16]]*
129129 ; ENTRY-UAS-NEXT: store [[TYPE]] -1800, [[TYPE]]* [[PTR]], align 1
130130
131 ; CHECK-NEXT: call void @llvm.lifetime.end(i64 13, i8* %yy)
132
133
134 call void @llvm.lifetime.start(i64 40, i8* %zz)
131 ; CHECK-NEXT: call void @llvm.lifetime.end.p0i8(i64 13, i8* %yy)
132
133
134 call void @llvm.lifetime.start.p0i8(i64 40, i8* %zz)
135135 ; 00000000
136136 ; ENTRY-UAS-NEXT: [[OFFSET:%[0-9]+]] = add i64 [[SHADOW_BASE]], 106
137137 ; ENTRY-UAS-NEXT: [[PTR:%[0-9]+]] = inttoptr i64 [[OFFSET]] to [[TYPE:i32]]*
141141 ; ENTRY-UAS-NEXT: [[PTR:%[0-9]+]] = inttoptr i64 [[OFFSET]] to [[TYPE:i8]]*
142142 ; ENTRY-UAS-NEXT: store [[TYPE]] 0, [[TYPE]]* [[PTR]], align 1
143143
144 ; CHECK-NEXT: call void @llvm.lifetime.start(i64 40, i8* %zz)
144 ; CHECK-NEXT: call void @llvm.lifetime.start.p0i8(i64 40, i8* %zz)
145145
146146 call void @Foo(i8* %zz)
147147 ; CHECK-NEXT: call void @Foo(i8* %zz)
148148
149 call void @llvm.lifetime.end(i64 40, i8* %zz)
149 call void @llvm.lifetime.end.p0i8(i64 40, i8* %zz)
150150 ; F8F8F8F8
151151 ; ENTRY-UAS-NEXT: [[OFFSET:%[0-9]+]] = add i64 [[SHADOW_BASE]], 106
152152 ; ENTRY-UAS-NEXT: [[PTR:%[0-9]+]] = inttoptr i64 [[OFFSET]] to [[TYPE:i32]]*
156156 ; ENTRY-UAS-NEXT: [[PTR:%[0-9]+]] = inttoptr i64 [[OFFSET]] to [[TYPE:i8]]*
157157 ; ENTRY-UAS-NEXT: store [[TYPE]] -8, [[TYPE]]* [[PTR]], align 1
158158
159 ; CHECK-NEXT: call void @llvm.lifetime.end(i64 40, i8* %zz)
159 ; CHECK-NEXT: call void @llvm.lifetime.end.p0i8(i64 40, i8* %zz)
160160
161161 ; CHECK-LABEL:
162162
208208 ; CHECK: ret void
209209 }
210210
211 declare void @llvm.lifetime.start(i64, i8* nocapture)
212 declare void @llvm.lifetime.end(i64, i8* nocapture)
211 declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture)
212 declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture)
213213
214214 ; CHECK-ON: declare void @__asan_set_shadow_00(i64, i64)
215215 ; CHECK-ON: declare void @__asan_set_shadow_f1(i64, i64)
9090 ; CHECK-NEXT: %zz = getelementptr inbounds
9191
9292
93 call void @llvm.lifetime.start(i64 650, i8* %xx)
93 call void @llvm.lifetime.start.p0i8(i64 650, i8* %xx)
9494 ; 0000...
9595 ; ENTRY-UAS-NEXT: [[OFFSET:%[0-9]+]] = add i64 [[SHADOW_BASE]], 4
9696 ; ENTRY-UAS-NEXT: call void @__asan_set_shadow_00(i64 [[OFFSET]], i64 81)
9999 ; ENTRY-UAS-NEXT: [[PTR:%[0-9]+]] = inttoptr i64 [[OFFSET]] to [[TYPE:i8]]*
100100 ; ENTRY-UAS-NEXT: store [[TYPE]] 2, [[TYPE]]* [[PTR]], align 1
101101
102 ; CHECK-NEXT: call void @llvm.lifetime.start(i64 650, i8* %xx)
102 ; CHECK-NEXT: call void @llvm.lifetime.start.p0i8(i64 650, i8* %xx)
103103
104104 call void @Foo(i8* %xx)
105105 ; CHECK-NEXT: call void @Foo(i8* %xx)
106106
107 call void @llvm.lifetime.end(i64 650, i8* %xx)
107 call void @llvm.lifetime.end.p0i8(i64 650, i8* %xx)
108108 ; ENTRY-UAS-NEXT: [[OFFSET:%[0-9]+]] = add i64 [[SHADOW_BASE]], 4
109109 ; ENTRY-UAS-NEXT: call void @__asan_set_shadow_f8(i64 [[OFFSET]], i64 82)
110110
111 ; CHECK-NEXT: call void @llvm.lifetime.end(i64 650, i8* %xx)
112
113
114 call void @llvm.lifetime.start(i64 13, i8* %yy)
111 ; CHECK-NEXT: call void @llvm.lifetime.end.p0i8(i64 650, i8* %xx)
112
113
114 call void @llvm.lifetime.start.p0i8(i64 13, i8* %yy)
115115 ; 0005
116116 ; ENTRY-UAS-NEXT: [[OFFSET:%[0-9]+]] = add i64 [[SHADOW_BASE]], 102
117117 ; ENTRY-UAS-NEXT: [[PTR:%[0-9]+]] = inttoptr i64 [[OFFSET]] to [[TYPE:i16]]*
118118 ; ENTRY-UAS-NEXT: store [[TYPE]] 1280, [[TYPE]]* [[PTR]], align 1
119119
120 ; CHECK-NEXT: call void @llvm.lifetime.start(i64 13, i8* %yy)
120 ; CHECK-NEXT: call void @llvm.lifetime.start.p0i8(i64 13, i8* %yy)
121121
122122 call void @Foo(i8* %yy)
123123 ; CHECK-NEXT: call void @Foo(i8* %yy)
124124
125 call void @llvm.lifetime.end(i64 13, i8* %yy)
125 call void @llvm.lifetime.end.p0i8(i64 13, i8* %yy)
126126 ; F8F8
127127 ; ENTRY-UAS-NEXT: [[OFFSET:%[0-9]+]] = add i64 [[SHADOW_BASE]], 102
128128 ; ENTRY-UAS-NEXT: [[PTR:%[0-9]+]] = inttoptr i64 [[OFFSET]] to [[TYPE:i16]]*
129129 ; ENTRY-UAS-NEXT: store [[TYPE]] -1800, [[TYPE]]* [[PTR]], align 1
130130
131 ; CHECK-NEXT: call void @llvm.lifetime.end(i64 13, i8* %yy)
132
133
134 call void @llvm.lifetime.start(i64 40, i8* %zz)
131 ; CHECK-NEXT: call void @llvm.lifetime.end.p0i8(i64 13, i8* %yy)
132
133
134 call void @llvm.lifetime.start.p0i8(i64 40, i8* %zz)
135135 ; 00000000
136136 ; ENTRY-UAS-NEXT: [[OFFSET:%[0-9]+]] = add i64 [[SHADOW_BASE]], 106
137137 ; ENTRY-UAS-NEXT: [[PTR:%[0-9]+]] = inttoptr i64 [[OFFSET]] to [[TYPE:i32]]*
141141 ; ENTRY-UAS-NEXT: [[PTR:%[0-9]+]] = inttoptr i64 [[OFFSET]] to [[TYPE:i8]]*
142142 ; ENTRY-UAS-NEXT: store [[TYPE]] 0, [[TYPE]]* [[PTR]], align 1
143143
144 ; CHECK-NEXT: call void @llvm.lifetime.start(i64 40, i8* %zz)
144 ; CHECK-NEXT: call void @llvm.lifetime.start.p0i8(i64 40, i8* %zz)
145145
146146 call void @Foo(i8* %zz)
147147 ; CHECK-NEXT: call void @Foo(i8* %zz)
148148
149 call void @llvm.lifetime.end(i64 40, i8* %zz)
149 call void @llvm.lifetime.end.p0i8(i64 40, i8* %zz)
150150 ; F8F8F8F8
151151 ; ENTRY-UAS-NEXT: [[OFFSET:%[0-9]+]] = add i64 [[SHADOW_BASE]], 106
152152 ; ENTRY-UAS-NEXT: [[PTR:%[0-9]+]] = inttoptr i64 [[OFFSET]] to [[TYPE:i32]]*
156156 ; ENTRY-UAS-NEXT: [[PTR:%[0-9]+]] = inttoptr i64 [[OFFSET]] to [[TYPE:i8]]*
157157 ; ENTRY-UAS-NEXT: store [[TYPE]] -8, [[TYPE]]* [[PTR]], align 1
158158
159 ; CHECK-NEXT: call void @llvm.lifetime.end(i64 40, i8* %zz)
159 ; CHECK-NEXT: call void @llvm.lifetime.end.p0i8(i64 40, i8* %zz)
160160
161161 ; CHECK-LABEL:
162162
208208 ; CHECK: ret void
209209 }
210210
211 declare void @llvm.lifetime.start(i64, i8* nocapture)
212 declare void @llvm.lifetime.end(i64, i8* nocapture)
211 declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture)
212 declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture)
213213
214214 ; CHECK-ON: declare void @__asan_set_shadow_00(i64, i64)
215215 ; CHECK-ON: declare void @__asan_set_shadow_f1(i64, i64)
88 target triple = "x86_64-unknown-linux-gnu"
99
1010 declare void @Use(i8*)
11 declare void @llvm.lifetime.start(i64, i8* nocapture) nounwind
12 declare void @llvm.lifetime.end(i64, i8* nocapture) nounwind
11 declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) nounwind
12 declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) nounwind
1313
1414 ; CHECK: private unnamed_addr constant{{.*}}3 32 10 3 XXX 64 20 3 YYY 128 30 3 ZZZ\0
1515 ; CHECK: private unnamed_addr constant{{.*}}3 32 5 3 AAA 64 55 3 BBB 160 555 3 CCC\0
8686 %AAA = alloca i32, align 4 ; File is not the same as !11
8787 %BBB = alloca i32, align 4 ; File is the same as !11
8888 %BBB.ptr = bitcast i32* %BBB to i8*
89 call void @llvm.lifetime.start(i64 4, i8* nonnull %BBB.ptr), !dbg !12
89 call void @llvm.lifetime.start.p0i8(i64 4, i8* nonnull %BBB.ptr), !dbg !12
9090 store volatile i32 5, i32* %BBB, align 4
9191 %AAA.ptr = bitcast i32* %AAA to i8*
92 call void @llvm.lifetime.start(i64 4, i8* nonnull %AAA.ptr), !dbg !14
92 call void @llvm.lifetime.start.p0i8(i64 4, i8* nonnull %AAA.ptr), !dbg !14
9393 store volatile i32 3, i32* %AAA, align 4
94 call void @llvm.lifetime.end(i64 4, i8* nonnull %AAA.ptr), !dbg !17
95 call void @llvm.lifetime.end(i64 4, i8* nonnull %BBB.ptr), !dbg !18
94 call void @llvm.lifetime.end.p0i8(i64 4, i8* nonnull %AAA.ptr), !dbg !17
95 call void @llvm.lifetime.end.p0i8(i64 4, i8* nonnull %BBB.ptr), !dbg !18
9696 ret void
9797 }
9898
77 define i32 @foo(i32 %guard, ...) {
88 %vl = alloca %struct.__va_list, align 8
99 %1 = bitcast %struct.__va_list* %vl to i8*
10 call void @llvm.lifetime.start(i64 32, i8* %1)
10 call void @llvm.lifetime.start.p0i8(i64 32, i8* %1)
1111 call void @llvm.va_start(i8* %1)
1212 call void @llvm.va_end(i8* %1)
13 call void @llvm.lifetime.end(i64 32, i8* %1)
13 call void @llvm.lifetime.end.p0i8(i64 32, i8* %1)
1414 ret i32 0
1515 }
1616
4545 ; CHECK: [[STACK:%.*]] = getelementptr inbounds i8, i8* {{%.*}}, i32 192
4646 ; CHECK: call void @llvm.memcpy.p0i8.p0i8.i64(i8* {{%.*}}, i8* [[STACK]], i64 {{%.*}}, i32 16, i1 false)
4747
48 declare void @llvm.lifetime.start(i64, i8* nocapture) #1
48 declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) #1
4949 declare void @llvm.va_start(i8*) #2
5050 declare void @llvm.va_end(i8*) #2
51 declare void @llvm.lifetime.end(i64, i8* nocapture) #1
51 declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) #1
5252
5353 define i32 @bar() {
5454 %1 = call i32 (i32, ...) @foo(i32 0, i32 1, i32 2, double 3.000000e+00,
55 define i32 @foo(i32 %guard, ...) {
66 %vl = alloca i8*, align 8
77 %1 = bitcast i8** %vl to i8*
8 call void @llvm.lifetime.start(i64 32, i8* %1)
8 call void @llvm.lifetime.start.p0i8(i64 32, i8* %1)
99 call void @llvm.va_start(i8* %1)
1010 call void @llvm.va_end(i8* %1)
11 call void @llvm.lifetime.end(i64 32, i8* %1)
11 call void @llvm.lifetime.end.p0i8(i64 32, i8* %1)
1212 ret i32 0
1313 }
1414
2222 ; CHECK: [[STACK:%.*]] = bitcast {{.*}} @__msan_va_arg_tls to i8*
2323 ; CHECK: call void @llvm.memcpy.p0i8.p0i8.i64(i8* [[C]], i8* [[STACK]], i64 [[B]], i32 8, i1 false)
2424
25 declare void @llvm.lifetime.start(i64, i8* nocapture) #1
25 declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) #1
2626 declare void @llvm.va_start(i8*) #2
2727 declare void @llvm.va_end(i8*) #2
28 declare void @llvm.lifetime.end(i64, i8* nocapture) #1
28 declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) #1
2929
3030 define i32 @bar() {
3131 %1 = call i32 (i32, ...) @foo(i32 0, i32 1, i64 2, double 3.000000e+00)
55 define i32 @foo(i32 %guard, ...) {
66 %vl = alloca i8*, align 8
77 %1 = bitcast i8** %vl to i8*
8 call void @llvm.lifetime.start(i64 32, i8* %1)
8 call void @llvm.lifetime.start.p0i8(i64 32, i8* %1)
99 call void @llvm.va_start(i8* %1)
1010 call void @llvm.va_end(i8* %1)
11 call void @llvm.lifetime.end(i64 32, i8* %1)
11 call void @llvm.lifetime.end.p0i8(i64 32, i8* %1)
1212 ret i32 0
1313 }
1414
2222 ; CHECK: [[STACK:%.*]] = bitcast {{.*}} @__msan_va_arg_tls to i8*
2323 ; CHECK: call void @llvm.memcpy.p0i8.p0i8.i64(i8* [[C]], i8* [[STACK]], i64 [[B]], i32 8, i1 false)
2424
25 declare void @llvm.lifetime.start(i64, i8* nocapture) #1
25 declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) #1
2626 declare void @llvm.va_start(i8*) #2
2727 declare void @llvm.va_end(i8*) #2
28 declare void @llvm.lifetime.end(i64, i8* nocapture) #1
28 declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) #1
2929
3030 define i32 @bar() {
3131 %1 = call i32 (i32, ...) @foo(i32 0, i32 1, i64 2, double 3.000000e+00)
55 define i32 @foo(i32 %guard, ...) {
66 %vl = alloca i8*, align 8
77 %1 = bitcast i8** %vl to i8*
8 call void @llvm.lifetime.start(i64 32, i8* %1)
8 call void @llvm.lifetime.start.p0i8(i64 32, i8* %1)
99 call void @llvm.va_start(i8* %1)
1010 call void @llvm.va_end(i8* %1)
11 call void @llvm.lifetime.end(i64 32, i8* %1)
11 call void @llvm.lifetime.end.p0i8(i64 32, i8* %1)
1212 ret i32 0
1313 }
1414
2222 ; CHECK: [[STACK:%.*]] = bitcast {{.*}} @__msan_va_arg_tls to i8*
2323 ; CHECK: call void @llvm.memcpy.p0i8.p0i8.i64(i8* [[C]], i8* [[STACK]], i64 [[B]], i32 8, i1 false)
2424
25 declare void @llvm.lifetime.start(i64, i8* nocapture) #1
25 declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) #1
2626 declare void @llvm.va_start(i8*) #2
2727 declare void @llvm.va_end(i8*) #2
28 declare void @llvm.lifetime.end(i64, i8* nocapture) #1
28 declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) #1
2929
3030 define i32 @bar() {
3131 %1 = call i32 (i32, ...) @foo(i32 0, i32 1, i64 2, double 3.000000e+00)
55 define i32 @foo(i32 %guard, ...) {
66 %vl = alloca i8*, align 8
77 %1 = bitcast i8** %vl to i8*
8 call void @llvm.lifetime.start(i64 32, i8* %1)
8 call void @llvm.lifetime.start.p0i8(i64 32, i8* %1)
99 call void @llvm.va_start(i8* %1)
1010 call void @llvm.va_end(i8* %1)
11 call void @llvm.lifetime.end(i64 32, i8* %1)
11 call void @llvm.lifetime.end.p0i8(i64 32, i8* %1)
1212 ret i32 0
1313 }
1414
2222 ; CHECK: [[STACK:%.*]] = bitcast {{.*}} @__msan_va_arg_tls to i8*
2323 ; CHECK: call void @llvm.memcpy.p0i8.p0i8.i64(i8* [[C]], i8* [[STACK]], i64 [[B]], i32 8, i1 false)
2424
25 declare void @llvm.lifetime.start(i64, i8* nocapture) #1
25 declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) #1
2626 declare void @llvm.va_start(i8*) #2
2727 declare void @llvm.va_end(i8*) #2
28 declare void @llvm.lifetime.end(i64, i8* nocapture) #1
28 declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) #1
2929
3030 define i32 @bar() {
3131 %1 = call i32 (i32, ...) @foo(i32 0, i32 1, i64 2, double 3.000000e+00)
1313 ; CHECK: call void @_Z3barv(), !dbg ![[CALL0:[0-9]+]]
1414 %a = alloca [100 x i8], align 16
1515 %b = bitcast [100 x i8]* %a to i8*
16 call void @llvm.lifetime.start(i64 100, i8* %b), !dbg !11
17 call void @llvm.lifetime.end(i64 100, i8* %b), !dbg !11
16 call void @llvm.lifetime.start.p0i8(i64 100, i8* %b), !dbg !11
17 call void @llvm.lifetime.end.p0i8(i64 100, i8* %b), !dbg !11
1818 call void @_Z3barv(), !dbg !11
1919 ; CHECK: call void @_Z3barv(), !dbg ![[CALL1:[0-9]+]]
2020 call void @_Z3barv(), !dbg !12
2323 }
2424
2525 declare void @_Z3barv() #1
26 declare void @llvm.lifetime.start(i64, i8* nocapture) nounwind argmemonly
27 declare void @llvm.lifetime.end(i64, i8* nocapture) nounwind argmemonly
26 declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) nounwind argmemonly
27 declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) nounwind argmemonly
2828
2929 attributes #0 = { uwtable "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2" "unsafe-fp-math"="false" "use-soft-float"="false" }
3030 attributes #1 = { "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2" "unsafe-fp-math"="false" "use-soft-float"="false" }
4242 ; CHECK: %1 = bitcast i16* %arg to i8*
4343 ; CHECK: %2 = alloca i16, align 2
4444 ; CHECK: %3 = bitcast i16* %2 to i8*
45 ; CHECK: call void @llvm.lifetime.start(i64 2, i8* %3)
45 ; CHECK: call void @llvm.lifetime.start.p0i8(i64 2, i8* %3)
4646 ; CHECK: store i16 %old, i16* %2, align 2
4747 ; CHECK: %4 = call zeroext i1 @__atomic_compare_exchange_2(i8* %1, i8* %3, i16 %new, i32 5, i32 0)
4848 ; CHECK: %5 = load i16, i16* %2, align 2
49 ; CHECK: call void @llvm.lifetime.end(i64 2, i8* %3)
49 ; CHECK: call void @llvm.lifetime.end.p0i8(i64 2, i8* %3)
5050 ; CHECK: %6 = insertvalue { i16, i1 } undef, i16 %5, 0
5151 ; CHECK: %7 = insertvalue { i16, i1 } %6, i1 %4, 1
5252 ; CHECK: %ret = extractvalue { i16, i1 } %7, 0
7575 ; CHECK: %1 = bitcast i128* %arg to i8*
7676 ; CHECK: %2 = alloca i128, align 8
7777 ; CHECK: %3 = bitcast i128* %2 to i8*
78 ; CHECK: call void @llvm.lifetime.start(i64 16, i8* %3)
78 ; CHECK: call void @llvm.lifetime.start.p0i8(i64 16, i8* %3)
7979 ; CHECK: call void @__atomic_load(i32 16, i8* %1, i8* %3, i32 5)
8080 ; CHECK: %4 = load i128, i128* %2, align 8
81 ; CHECK: call void @llvm.lifetime.end(i64 16, i8* %3)
81 ; CHECK: call void @llvm.lifetime.end.p0i8(i64 16, i8* %3)
8282 ; CHECK: ret i128 %4
8383 define i128 @test_load_i128(i128* %arg) {
8484 %ret = load atomic i128, i128* %arg seq_cst, align 16
8989 ; CHECK: %1 = bitcast i128* %arg to i8*
9090 ; CHECK: %2 = alloca i128, align 8
9191 ; CHECK: %3 = bitcast i128* %2 to i8*
92 ; CHECK: call void @llvm.lifetime.start(i64 16, i8* %3)
92 ; CHECK: call void @llvm.lifetime.start.p0i8(i64 16, i8* %3)
9393 ; CHECK: store i128 %val, i128* %2, align 8
9494 ; CHECK: call void @__atomic_store(i32 16, i8* %1, i8* %3, i32 5)
95 ; CHECK: call void @llvm.lifetime.end(i64 16, i8* %3)
95 ; CHECK: call void @llvm.lifetime.end.p0i8(i64 16, i8* %3)
9696 ; CHECK: ret void
9797 define void @test_store_i128(i128* %arg, i128 %val) {
9898 store atomic i128 %val, i128* %arg seq_cst, align 16
103103 ; CHECK: %1 = bitcast i128* %arg to i8*
104104 ; CHECK: %2 = alloca i128, align 8
105105 ; CHECK: %3 = bitcast i128* %2 to i8*
106 ; CHECK: call void @llvm.lifetime.start(i64 16, i8* %3)
106 ; CHECK: call void @llvm.lifetime.start.p0i8(i64 16, i8* %3)
107107 ; CHECK: store i128 %val, i128* %2, align 8
108108 ; CHECK: %4 = alloca i128, align 8
109109 ; CHECK: %5 = bitcast i128* %4 to i8*
110 ; CHECK: call void @llvm.lifetime.start(i64 16, i8* %5)
110 ; CHECK: call void @llvm.lifetime.start.p0i8(i64 16, i8* %5)
111111 ; CHECK: call void @__atomic_exchange(i32 16, i8* %1, i8* %3, i8* %5, i32 5)
112 ; CHECK: call void @llvm.lifetime.end(i64 16, i8* %3)
112 ; CHECK: call void @llvm.lifetime.end.p0i8(i64 16, i8* %3)
113113 ; CHECK: %6 = load i128, i128* %4, align 8
114 ; CHECK: call void @llvm.lifetime.end(i64 16, i8* %5)
114 ; CHECK: call void @llvm.lifetime.end.p0i8(i64 16, i8* %5)
115115 ; CHECK: ret i128 %6
116116 define i128 @test_exchange_i128(i128* %arg, i128 %val) {
117117 %ret = atomicrmw xchg i128* %arg, i128 %val seq_cst
122122 ; CHECK: %1 = bitcast i128* %arg to i8*
123123 ; CHECK: %2 = alloca i128, align 8
124124 ; CHECK: %3 = bitcast i128* %2 to i8*
125 ; CHECK: call void @llvm.lifetime.start(i64 16, i8* %3)
125 ; CHECK: call void @llvm.lifetime.start.p0i8(i64 16, i8* %3)
126126 ; CHECK: store i128 %old, i128* %2, align 8
127127 ; CHECK: %4 = alloca i128, align 8
128128 ; CHECK: %5 = bitcast i128* %4 to i8*
129 ; CHECK: call void @llvm.lifetime.start(i64 16, i8* %5)
129 ; CHECK: call void @llvm.lifetime.start.p0i8(i64 16, i8* %5)
130130 ; CHECK: store i128 %new, i128* %4, align 8
131131 ; CHECK: %6 = call zeroext i1 @__atomic_compare_exchange(i32 16, i8* %1, i8* %3, i8* %5, i32 5, i32 0)
132 ; CHECK: call void @llvm.lifetime.end(i64 16, i8* %5)
132 ; CHECK: call void @llvm.lifetime.end.p0i8(i64 16, i8* %5)
133133 ; CHECK: %7 = load i128, i128* %2, align 8
134 ; CHECK: call void @llvm.lifetime.end(i64 16, i8* %3)
134 ; CHECK: call void @llvm.lifetime.end.p0i8(i64 16, i8* %3)
135135 ; CHECK: %8 = insertvalue { i128, i1 } undef, i128 %7, 0
136136 ; CHECK: %9 = insertvalue { i128, i1 } %8, i1 %6, 1
137137 ; CHECK: %ret = extractvalue { i128, i1 } %9, 0
156156 ; CHECK: %new = add i128 %loaded, %val
157157 ; CHECK: %4 = bitcast i128* %arg to i8*
158158 ; CHECK: %5 = bitcast i128* %1 to i8*
159 ; CHECK: call void @llvm.lifetime.start(i64 16, i8* %5)
159 ; CHECK: call void @llvm.lifetime.start.p0i8(i64 16, i8* %5)
160160 ; CHECK: store i128 %loaded, i128* %1, align 8
161161 ; CHECK: %6 = bitcast i128* %2 to i8*
162 ; CHECK: call void @llvm.lifetime.start(i64 16, i8* %6)
162 ; CHECK: call void @llvm.lifetime.start.p0i8(i64 16, i8* %6)
163163 ; CHECK: store i128 %new, i128* %2, align 8
164164 ; CHECK: %7 = call zeroext i1 @__atomic_compare_exchange(i32 16, i8* %4, i8* %5, i8* %6, i32 5, i32 5)
165 ; CHECK: call void @llvm.lifetime.end(i64 16, i8* %6)
165 ; CHECK: call void @llvm.lifetime.end.p0i8(i64 16, i8* %6)
166166 ; CHECK: %8 = load i128, i128* %1, align 8
167 ; CHECK: call void @llvm.lifetime.end(i64 16, i8* %5)
167 ; CHECK: call void @llvm.lifetime.end.p0i8(i64 16, i8* %5)
168168 ; CHECK: %9 = insertvalue { i128, i1 } undef, i128 %8, 0
169169 ; CHECK: %10 = insertvalue { i128, i1 } %9, i1 %7, 1
170170 ; CHECK: %success = extractvalue { i128, i1 } %10, 1
203203 ; CHECK: %1 = bitcast i16** %arg to i8*
204204 ; CHECK: %2 = alloca i16*, align 4
205205 ; CHECK: %3 = bitcast i16** %2 to i8*
206 ; CHECK: call void @llvm.lifetime.start(i64 4, i8* %3)
206 ; CHECK: call void @llvm.lifetime.start.p0i8(i64 4, i8* %3)
207207 ; CHECK: store i16* %old, i16** %2, align 4
208208 ; CHECK: %4 = ptrtoint i16* %new to i32
209209 ; CHECK: %5 = call zeroext i1 @__atomic_compare_exchange_4(i8* %1, i8* %3, i32 %4, i32 5, i32 2)
210210 ; CHECK: %6 = load i16*, i16** %2, align 4
211 ; CHECK: call void @llvm.lifetime.end(i64 4, i8* %3)
211 ; CHECK: call void @llvm.lifetime.end.p0i8(i64 4, i8* %3)
212212 ; CHECK: %7 = insertvalue { i16*, i1 } undef, i16* %6, 0
213213 ; CHECK: %8 = insertvalue { i16*, i1 } %7, i1 %5, 1
214214 ; CHECK: %ret = extractvalue { i16*, i1 } %8, 0
226226 ; CHECK: %1 = bitcast fp128* %arg to i8*
227227 ; CHECK: %2 = alloca fp128, align 8
228228 ; CHECK: %3 = bitcast fp128* %2 to i8*
229 ; CHECK: call void @llvm.lifetime.start(i64 16, i8* %3)
229 ; CHECK: call void @llvm.lifetime.start.p0i8(i64 16, i8* %3)
230230 ; CHECK: store fp128 %val, fp128* %2, align 8
231231 ; CHECK: call void @__atomic_store(i32 16, i8* %1, i8* %3, i32 5)
232 ; CHECK: call void @llvm.lifetime.end(i64 16, i8* %3)
232 ; CHECK: call void @llvm.lifetime.end.p0i8(i64 16, i8* %3)
233233 ; CHECK: ret void
234234 define void @test_store_fp128(fp128* %arg, fp128 %val) {
235235 store atomic fp128 %val, fp128* %arg seq_cst, align 16
1313 declare void @llvm.lifetime.start(i64, i8* nocapture) #0
1414
1515 ; Function Attrs: nounwind
16 declare void @llvm.lifetime.end(i64, i8* nocapture) #0
16 declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) #0
1717
1818 define void @main_arrayctor.cont([10 x %class.QBezier.15]* %beziers, %class.QBezier.15* %agg.tmp.i, %class.QBezier.15* %agg.tmp55.i, %class.QBezier.15* %agg.tmp56.i) {
1919 newFuncRoot:
133133 call fastcc void @_ZL12printQBezier7QBezier(%class.QBezier.15* byval align 8 %agg.tmp55.i)
134134 call void @llvm.memcpy.p0i8.p0i8.i64(i8* %v2, i8* %v3, i64 64, i32 8, i1 false)
135135 call fastcc void @_ZL12printQBezier7QBezier(%class.QBezier.15* byval align 8 %agg.tmp56.i)
136 call void @llvm.lifetime.end(i64 64, i8* %v0)
137 call void @llvm.lifetime.end(i64 64, i8* %v1)
138 call void @llvm.lifetime.end(i64 64, i8* %v2)
136 call void @llvm.lifetime.end.p0i8(i64 64, i8* %v0)
137 call void @llvm.lifetime.end.p0i8(i64 64, i8* %v1)
138 call void @llvm.lifetime.end.p0i8(i64 64, i8* %v2)
139139 br label %arrayctor.cont.ret.exitStub
140140 }
141141
7373 %chararray = alloca [30 x i8], align 16
7474 %chararray2 = alloca [10 x i8], align 1
7575 %0 = getelementptr inbounds [30 x i8], [30 x i8]* %chararray, i64 0, i64 0
76 call void @llvm.lifetime.start(i64 30, i8* %0)
76 call void @llvm.lifetime.start.p0i8(i64 30, i8* %0)
7777 %1 = getelementptr inbounds [10 x i8], [10 x i8]* %chararray2, i64 0, i64 0
78 call void @llvm.lifetime.start(i64 10, i8* %1)
78 call void @llvm.lifetime.start.p0i8(i64 10, i8* %1)
7979 %tobool = icmp eq i32 %flag, 0
8080 %cptr.0 = select i1 %tobool, i8* %0, i8* %1
8181 %2 = call i64 @llvm.objectsize.i64.p0i8(i8* %cptr.0, i1 true)
82 call void @llvm.lifetime.end(i64 10, i8* %1)
83 call void @llvm.lifetime.end(i64 30, i8* %0)
82 call void @llvm.lifetime.end.p0i8(i64 10, i8* %1)
83 call void @llvm.lifetime.end.p0i8(i64 30, i8* %0)
8484 ret i64 %2
8585 ; CHECK-LABEL: foo1
8686 ; CHECK: ret i64 10
8787 }
8888
89 declare void @llvm.lifetime.start(i64, i8* nocapture)
89 declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture)
9090
9191 declare i64 @llvm.objectsize.i64.p0i8(i8*, i1)
9292
93 declare void @llvm.lifetime.end(i64, i8* nocapture)
93 declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture)
9494
9595 define i64 @foo2