Index: include/llvm/IR/Intrinsics.td =================================================================== --- include/llvm/IR/Intrinsics.td +++ include/llvm/IR/Intrinsics.td @@ -494,17 +494,17 @@ //===------------------------- Memory Use Markers -------------------------===// // def int_lifetime_start : Intrinsic<[], - [llvm_i64_ty, llvm_ptr_ty], + [llvm_i64_ty, llvm_anyptr_ty], [IntrReadWriteArgMem, NoCapture<1>]>; def int_lifetime_end : Intrinsic<[], - [llvm_i64_ty, llvm_ptr_ty], + [llvm_i64_ty, llvm_anyptr_ty], [IntrReadWriteArgMem, NoCapture<1>]>; def int_invariant_start : Intrinsic<[llvm_descriptor_ty], - [llvm_i64_ty, llvm_ptr_ty], + [llvm_i64_ty, llvm_anyptr_ty], [IntrReadWriteArgMem, NoCapture<1>]>; def int_invariant_end : Intrinsic<[], [llvm_descriptor_ty, llvm_i64_ty, - llvm_ptr_ty], + llvm_anyptr_ty], [IntrReadWriteArgMem, NoCapture<2>]>; //===------------------------ Stackmap Intrinsics -------------------------===// Index: lib/IR/AutoUpgrade.cpp =================================================================== --- lib/IR/AutoUpgrade.cpp +++ lib/IR/AutoUpgrade.cpp @@ -110,6 +110,40 @@ break; } + case 'i': { + if (Name == "invariant.start") { + F->setName(Name + ".old"); + NewFn = Intrinsic::getDeclaration(F->getParent(), + Intrinsic::invariant_start, + F->getFunctionType()->getParamType(1)); + return true; + } + if (Name == "invariant.end") { + F->setName(Name + ".old"); + NewFn = Intrinsic::getDeclaration(F->getParent(), + Intrinsic::invariant_end, + F->getFunctionType()->getParamType(2)); + return true; + } + break; + } + case 'l': { + if (Name == "lifetime.start") { + F->setName(Name + ".old"); + NewFn = Intrinsic::getDeclaration(F->getParent(), + Intrinsic::lifetime_start, + F->getFunctionType()->getParamType(1)); + return true; + } + if (Name == "lifetime.end") { + F->setName(Name + ".old"); + NewFn = Intrinsic::getDeclaration(F->getParent(), + Intrinsic::lifetime_end, + F->getFunctionType()->getParamType(1)); + return true; + } + break; + } case 'o': // We only need to change the name to match the mangling including the // address space. @@ -635,6 +669,36 @@ CI->eraseFromParent(); return; + case Intrinsic::invariant_start: + CI->replaceAllUsesWith(Builder.CreateCall2(NewFn, + CI->getArgOperand(0), + CI->getArgOperand(1), + Name)); + CI->eraseFromParent(); + return; + case Intrinsic::invariant_end: + CI->replaceAllUsesWith(Builder.CreateCall3(NewFn, + CI->getArgOperand(0), + CI->getArgOperand(1), + CI->getArgOperand(2), + Name)); + CI->eraseFromParent(); + return; + case Intrinsic::lifetime_start: + CI->replaceAllUsesWith(Builder.CreateCall2(NewFn, + CI->getArgOperand(0), + CI->getArgOperand(1), + Name)); + CI->eraseFromParent(); + return; + case Intrinsic::lifetime_end: + CI->replaceAllUsesWith(Builder.CreateCall2(NewFn, + CI->getArgOperand(0), + CI->getArgOperand(1), + Name)); + CI->eraseFromParent(); + return; + case Intrinsic::objectsize: CI->replaceAllUsesWith(Builder.CreateCall2(NewFn, CI->getArgOperand(0), Index: lib/IR/IRBuilder.cpp =================================================================== --- lib/IR/IRBuilder.cpp +++ lib/IR/IRBuilder.cpp @@ -170,7 +170,8 @@ "lifetime.start requires the size to be an i64"); Value *Ops[] = { Size, Ptr }; Module *M = BB->getParent()->getParent(); - Value *TheFn = Intrinsic::getDeclaration(M, Intrinsic::lifetime_start); + Value *TheFn = Intrinsic::getDeclaration(M, Intrinsic::lifetime_start, + Ptr->getType()); return createCallHelper(TheFn, Ops, this); } @@ -185,7 +186,8 @@ "lifetime.end requires the size to be an i64"); Value *Ops[] = { Size, Ptr }; Module *M = BB->getParent()->getParent(); - Value *TheFn = Intrinsic::getDeclaration(M, Intrinsic::lifetime_end); + Value *TheFn = Intrinsic::getDeclaration(M, Intrinsic::lifetime_end, + Ptr->getType()); return createCallHelper(TheFn, Ops, this); } Index: test/Analysis/BasicAA/modref.ll =================================================================== --- test/Analysis/BasicAA/modref.ll +++ test/Analysis/BasicAA/modref.ll @@ -1,7 +1,7 @@ ; RUN: opt < %s -basicaa -gvn -dse -S | FileCheck %s 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" -declare void @llvm.lifetime.end(i64, i8* nocapture) +declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) declare void @external(i32*) @@ -67,7 +67,7 @@ %P2 = getelementptr i8, i8* %P, i32 2 store i8 %Y, i8* %P2 ;; Not read by lifetime.end, should be removed. ; CHECK: store i8 2, i8* %P2 - call void @llvm.lifetime.end(i64 1, i8* %P) + call void @llvm.lifetime.end.p0i8(i64 1, i8* %P) store i8 2, i8* %P2 ; CHECK-NOT: store ret void @@ -80,8 +80,8 @@ %P2 = getelementptr i8, i8* %P, i32 2 store i8 %Y, i8* %P2 -; CHECK-NEXT: call void @llvm.lifetime.end - call void @llvm.lifetime.end(i64 10, i8* %P) +; CHECK-NEXT: call void @llvm.lifetime.end.p0i8 + call void @llvm.lifetime.end.p0i8(i64 10, i8* %P) ret void ; CHECK-NEXT: ret void } Index: test/Assembler/auto_upgrade_intrinsics.ll =================================================================== --- test/Assembler/auto_upgrade_intrinsics.ll +++ test/Assembler/auto_upgrade_intrinsics.ll @@ -10,6 +10,10 @@ declare i32 @llvm.objectsize.i32(i8*, i1) nounwind readonly +declare void @llvm.lifetime.start(i64, i8* nocapture) nounwind +declare void @llvm.lifetime.end(i64, i8* nocapture) nounwind +declare {}* @llvm.invariant.start(i64, i8* nocapture) readonly nounwind +declare void @llvm.invariant.end({}*, i64, i8* nocapture) nounwind define void @test.ctlz(i8 %a, i16 %b, i32 %c, i42 %d) { ; CHECK: @test.ctlz @@ -54,7 +58,27 @@ define i32 @test.objectsize() { ; CHECK-LABEL: @test.objectsize( ; CHECK: @llvm.objectsize.i32.p0i8 -; CHECK-DAG: declare i32 @llvm.objectsize.i32.p0i8 %s = call i32 @llvm.objectsize.i32(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @a, i32 0, i32 0), i1 false) ret i32 %s } + +define void @test.memorymarkers() { + ; CHECK-LABEL: @test.memorymarkers( + + %y = alloca i8 + call void @llvm.lifetime.start(i64 8, i8* %y) + ; CHECK: @llvm.lifetime.start.p0i8( + %inv = call {}* @llvm.invariant.start(i64 8, i8* %y) + ; CHECK: @llvm.invariant.start.p0i8( + call void @llvm.invariant.end({}* %inv, i64 8, i8* %y) + ; CHECK: @llvm.invariant.end.p0i8( + call void @llvm.lifetime.end(i64 8, i8* %y) + ; CHECK: @llvm.lifetime.end.p0i8( + ret void +} + +; CHECK-DAG: declare void @llvm.lifetime.start.p0i8( +; CHECK-DAG: declare {}* @llvm.invariant.start.p0i8( +; CHECK-DAG: declare void @llvm.invariant.end.p0i8( +; CHECK-DAG: declare void @llvm.lifetime.end.p0i8( +; CHECK-DAG: declare i32 @llvm.objectsize.i32.p0i8 Index: test/CodeGen/AArch64/stack_guard_remat.ll =================================================================== --- test/CodeGen/AArch64/stack_guard_remat.ll +++ test/CodeGen/AArch64/stack_guard_remat.ll @@ -29,20 +29,20 @@ entry: %a1 = alloca [256 x i32], align 4 %0 = bitcast [256 x i32]* %a1 to i8* - call void @llvm.lifetime.start(i64 1024, i8* %0) + call void @llvm.lifetime.start.p0i8(i64 1024, i8* %0) %arraydecay = getelementptr inbounds [256 x i32], [256 x i32]* %a1, i64 0, i64 0 call void @foo3(i32* %arraydecay) 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}"() - call void @llvm.lifetime.end(i64 1024, i8* %0) + call void @llvm.lifetime.end.p0i8(i64 1024, i8* %0) ret i32 0 } ; Function Attrs: nounwind -declare void @llvm.lifetime.start(i64, i8* nocapture) +declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) declare void @foo3(i32*) ; Function Attrs: nounwind -declare void @llvm.lifetime.end(i64, i8* nocapture) +declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) 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" } Index: test/CodeGen/ARM/ldrd.ll =================================================================== --- test/CodeGen/ARM/ldrd.ll +++ test/CodeGen/ARM/ldrd.ll @@ -83,15 +83,15 @@ ; A8-NEXT: add [[FIELD1]], [[FIELD2]] ; A8-NEXT: str [[FIELD1]], {{\[}}[[BASE]]{{\]}} %orig_blocks = alloca [256 x i16], align 2 - %0 = bitcast [256 x i16]* %orig_blocks to i8*call void @llvm.lifetime.start(i64 512, i8* %0) nounwind + %0 = bitcast [256 x i16]* %orig_blocks to i8*call void @llvm.lifetime.start.p0i8(i64 512, i8* %0) nounwind %tmp1 = load i32, i32* getelementptr inbounds (%struct.Test, %struct.Test* @TestVar, i32 0, i32 1), align 4 %tmp2 = load i32, i32* getelementptr inbounds (%struct.Test, %struct.Test* @TestVar, i32 0, i32 2), align 4 %add = add nsw i32 %tmp2, %tmp1 store i32 %add, i32* getelementptr inbounds (%struct.Test, %struct.Test* @TestVar, i32 0, i32 0), align 4 - call void @llvm.lifetime.end(i64 512, i8* %0) nounwind + call void @llvm.lifetime.end.p0i8(i64 512, i8* %0) nounwind ret void } -declare void @llvm.lifetime.start(i64, i8* nocapture) nounwind -declare void @llvm.lifetime.end(i64, i8* nocapture) nounwind +declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) nounwind +declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) nounwind Index: test/CodeGen/ARM/stack_guard_remat.ll =================================================================== --- test/CodeGen/ARM/stack_guard_remat.ll +++ test/CodeGen/ARM/stack_guard_remat.ll @@ -51,20 +51,20 @@ define i32 @test_stack_guard_remat() #0 { %a1 = alloca [256 x i32], align 4 %1 = bitcast [256 x i32]* %a1 to i8* - call void @llvm.lifetime.start(i64 1024, i8* %1) + call void @llvm.lifetime.start.p0i8(i64 1024, i8* %1) %2 = getelementptr inbounds [256 x i32], [256 x i32]* %a1, i32 0, i32 0 call void @foo3(i32* %2) #3 call void asm sideeffect "foo2", "~{r0},~{r1},~{r2},~{r3},~{r4},~{r5},~{r6},~{r7},~{r8},~{r9},~{r10},~{r11},~{r12},~{sp},~{lr}"() - call void @llvm.lifetime.end(i64 1024, i8* %1) + call void @llvm.lifetime.end.p0i8(i64 1024, i8* %1) ret i32 0 } ; Function Attrs: nounwind -declare void @llvm.lifetime.start(i64, i8* nocapture) +declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) declare void @foo3(i32*) ; Function Attrs: nounwind -declare void @llvm.lifetime.end(i64, i8* nocapture) +declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) 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" } Index: test/CodeGen/Hexagon/calling-conv.ll =================================================================== --- test/CodeGen/Hexagon/calling-conv.ll +++ test/CodeGen/Hexagon/calling-conv.ll @@ -23,10 +23,10 @@ store i32 %a, i32* %a.addr, align 4 store i8 %c, i8* %c.addr, align 1 %0 = bitcast i32* %z to i8* - call void @llvm.lifetime.start(i64 4, i8* %0) #1 + call void @llvm.lifetime.start.p0i8(i64 4, i8* %0) #1 store i32 45, i32* %z, align 4 %1 = bitcast %struct.test_struct* %ret to i8* - call void @llvm.lifetime.start(i64 16, i8* %1) #1 + call void @llvm.lifetime.start.p0i8(i64 16, i8* %1) #1 %2 = load i32, i32* %z, align 4 %3 = load %struct.test_struct*, %struct.test_struct** @mystruct, align 4 %4 = load %struct.test_struct*, %struct.test_struct** @mystruct, align 4 @@ -50,14 +50,14 @@ %14 = bitcast %struct.test_struct* %ret to i8* call void @llvm.memcpy.p0i8.p0i8.i32(i8* %13, i8* %14, i32 16, i32 8, i1 false) %15 = bitcast %struct.test_struct* %ret to i8* - call void @llvm.lifetime.end(i64 16, i8* %15) #1 + call void @llvm.lifetime.end.p0i8(i64 16, i8* %15) #1 %16 = bitcast i32* %z to i8* - call void @llvm.lifetime.end(i64 4, i8* %16) #1 + call void @llvm.lifetime.end.p0i8(i64 4, i8* %16) #1 ret void } ; Function Attrs: nounwind -declare void @llvm.lifetime.start(i64, i8* nocapture) #1 +declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) #1 declare void @bar(%struct.test_struct* sret, i32, %struct.test_struct* byval, %struct.test_struct* byval, i8 zeroext, i64, i32, i64, i8 zeroext, i8 zeroext, i8 zeroext, i32) #2 @@ -65,7 +65,7 @@ declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture readonly, i32, i32, i1) #1 ; Function Attrs: nounwind -declare void @llvm.lifetime.end(i64, i8* nocapture) #1 +declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) #1 attributes #0 = { nounwind "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"="hexagonv4" "unsafe-fp-math"="false" "use-soft-float"="false" } attributes #1 = { nounwind } Index: test/CodeGen/Hexagon/hwloop-loop1.ll =================================================================== --- test/CodeGen/Hexagon/hwloop-loop1.ll +++ test/CodeGen/Hexagon/hwloop-loop1.ll @@ -14,9 +14,9 @@ %array = alloca [100 x i32], align 8 %doublearray = alloca [100 x [100 x i32]], align 8 %0 = bitcast [100 x i32]* %array to i8* - call void @llvm.lifetime.start(i64 400, i8* %0) #1 + call void @llvm.lifetime.start.p0i8(i64 400, i8* %0) #1 %1 = bitcast [100 x [100 x i32]]* %doublearray to i8* - call void @llvm.lifetime.start(i64 40000, i8* %1) #1 + call void @llvm.lifetime.start.p0i8(i64 40000, i8* %1) #1 %arrayidx1 = getelementptr inbounds [100 x [100 x i32]], [100 x [100 x i32]]* %doublearray, i32 0, i32 10, i32 10 %arrayidx2.gep = getelementptr [100 x i32], [100 x i32]* %array, i32 0, i32 0 br label %for.body @@ -58,11 +58,11 @@ for.end17: %3 = load i32, i32* %arrayidx1, align 8 - call void @llvm.lifetime.end(i64 40000, i8* %1) #1 - call void @llvm.lifetime.end(i64 400, i8* %0) #1 + call void @llvm.lifetime.end.p0i8(i64 40000, i8* %1) #1 + call void @llvm.lifetime.end.p0i8(i64 400, i8* %0) #1 ret i32 %3 } -declare void @llvm.lifetime.start(i64, i8* nocapture) #1 +declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) #1 -declare void @llvm.lifetime.end(i64, i8* nocapture) #1 +declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) #1 Index: test/CodeGen/Mips/stackcoloring.ll =================================================================== --- test/CodeGen/Mips/stackcoloring.ll +++ test/CodeGen/Mips/stackcoloring.ll @@ -11,7 +11,7 @@ entry: %b = alloca [16 x i32], align 4 %0 = bitcast [16 x i32]* %b to i8* - call void @llvm.lifetime.start(i64 64, i8* %0) + call void @llvm.lifetime.start.p0i8(i64 64, i8* %0) %arraydecay = getelementptr inbounds [16 x i32], [16 x i32]* %b, i32 0, i32 0 br label %for.body @@ -28,12 +28,12 @@ br i1 %exitcond, label %for.end, label %for.body for.end: ; preds = %for.body - call void @llvm.lifetime.end(i64 64, i8* %0) + call void @llvm.lifetime.end.p0i8(i64 64, i8* %0) ret i32 %add } -declare void @llvm.lifetime.start(i64, i8* nocapture) +declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) declare i32 @foo2(i32, i32*) -declare void @llvm.lifetime.end(i64, i8* nocapture) +declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) Index: test/CodeGen/Mips/stchar.ll =================================================================== --- test/CodeGen/Mips/stchar.ll +++ test/CodeGen/Mips/stchar.ll @@ -63,8 +63,8 @@ %s.i = alloca i16, align 4 %c.i = alloca i8, align 4 %0 = bitcast i16* %s.i to i8* - call void @llvm.lifetime.start(i64 -1, i8* %0) nounwind - call void @llvm.lifetime.start(i64 -1, i8* %c.i) nounwind + call void @llvm.lifetime.start.p0i8(i64 -1, i8* %0) nounwind + call void @llvm.lifetime.start.p0i8(i64 -1, i8* %c.i) nounwind store i16 16, i16* %s.i, align 4 store i8 99, i8* %c.i, align 4 store i16* %s.i, i16** @sp, align 4 @@ -79,12 +79,12 @@ %conv.i.i = sext i16 %3 to i32 %conv1.i.i = sext i8 %4 to i32 %call.i.i = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i32 0, i32 0), i32 %conv.i.i, i32 %conv1.i.i) nounwind - call void @llvm.lifetime.end(i64 -1, i8* %0) nounwind - call void @llvm.lifetime.end(i64 -1, i8* %c.i) nounwind + call void @llvm.lifetime.end.p0i8(i64 -1, i8* %0) nounwind + call void @llvm.lifetime.end.p0i8(i64 -1, i8* %c.i) nounwind ret i32 0 } -declare void @llvm.lifetime.start(i64, i8* nocapture) nounwind +declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) nounwind -declare void @llvm.lifetime.end(i64, i8* nocapture) nounwind +declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) nounwind Index: test/CodeGen/NVPTX/bug22322.ll =================================================================== --- test/CodeGen/NVPTX/bug22322.ll +++ test/CodeGen/NVPTX/bug22322.ll @@ -17,7 +17,7 @@ %4 = add nsw i32 %2, %3 %5 = zext i32 %4 to i64 %6 = bitcast float* %ret_vec.sroa.8.i to i8* - call void @llvm.lifetime.start(i64 4, i8* %6) + call void @llvm.lifetime.start.p0i8(i64 4, i8* %6) %7 = and i32 %4, 15 %8 = icmp eq i32 %7, 0 %9 = select i1 %8, float 0.000000e+00, float -1.000000e+00 @@ -26,7 +26,7 @@ %10 = fcmp olt float %9, 0.000000e+00 %ret_vec.sroa.8.i.val = load float, float* %ret_vec.sroa.8.i, align 4 %11 = select i1 %10, float 0.000000e+00, float %ret_vec.sroa.8.i.val - call void @llvm.lifetime.end(i64 4, i8* %6) + call void @llvm.lifetime.end.p0i8(i64 4, i8* %6) %12 = getelementptr inbounds %class.float3, %class.float3* %dst, i64 %5, i32 0 store float 0.000000e+00, float* %12, align 4 %13 = getelementptr inbounds %class.float3, %class.float3* %dst, i64 %5, i32 1 @@ -46,10 +46,10 @@ declare i32 @llvm.ptx.read.tid.x() #1 ; Function Attrs: nounwind -declare void @llvm.lifetime.start(i64, i8* nocapture) #2 +declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) #2 ; Function Attrs: nounwind -declare void @llvm.lifetime.end(i64, i8* nocapture) #2 +declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) #2 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" } attributes #1 = { nounwind readnone } Index: test/CodeGen/PowerPC/addi-licm.ll =================================================================== --- test/CodeGen/PowerPC/addi-licm.ll +++ test/CodeGen/PowerPC/addi-licm.ll @@ -9,9 +9,9 @@ %x = alloca [2048 x float], align 4 %y = alloca [2048 x float], align 4 %0 = bitcast [2048 x float]* %x to i8* - call void @llvm.lifetime.start(i64 8192, i8* %0) #2 + call void @llvm.lifetime.start.p0i8(i64 8192, i8* %0) #2 %1 = bitcast [2048 x float]* %y to i8* - call void @llvm.lifetime.start(i64 8192, i8* %1) #2 + call void @llvm.lifetime.start.p0i8(i64 8192, i8* %1) #2 br label %for.body.i ; CHECK-LABEL: @foo @@ -50,12 +50,12 @@ } ; Function Attrs: nounwind -declare void @llvm.lifetime.start(i64, i8* nocapture) #2 +declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) #2 declare void @bar(float*, float*) ; Function Attrs: nounwind -declare void @llvm.lifetime.end(i64, i8* nocapture) #2 +declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) #2 attributes #0 = { nounwind readonly } attributes #1 = { nounwind } Index: test/CodeGen/PowerPC/lsa.ll =================================================================== --- test/CodeGen/PowerPC/lsa.ll +++ test/CodeGen/PowerPC/lsa.ll @@ -8,11 +8,11 @@ %w = alloca [8200 x i32], align 4 %q = alloca [8200 x i32], align 4 %0 = bitcast [8200 x i32]* %v to i8* - call void @llvm.lifetime.start(i64 32800, i8* %0) #0 + call void @llvm.lifetime.start.p0i8(i64 32800, i8* %0) #0 %1 = bitcast [8200 x i32]* %w to i8* - call void @llvm.lifetime.start(i64 32800, i8* %1) #0 + call void @llvm.lifetime.start.p0i8(i64 32800, i8* %1) #0 %2 = bitcast [8200 x i32]* %q to i8* - call void @llvm.lifetime.start(i64 32800, i8* %2) #0 + call void @llvm.lifetime.start.p0i8(i64 32800, i8* %2) #0 %arraydecay = getelementptr inbounds [8200 x i32], [8200 x i32]* %q, i64 0, i64 0 %arraydecay1 = getelementptr inbounds [8200 x i32], [8200 x i32]* %v, i64 0, i64 0 %arraydecay2 = getelementptr inbounds [8200 x i32], [8200 x i32]* %w, i64 0, i64 0 @@ -28,16 +28,16 @@ ; CHECK: blr %add = add nsw i32 %4, %3 - call void @llvm.lifetime.end(i64 32800, i8* %2) #0 - call void @llvm.lifetime.end(i64 32800, i8* %1) #0 - call void @llvm.lifetime.end(i64 32800, i8* %0) #0 + call void @llvm.lifetime.end.p0i8(i64 32800, i8* %2) #0 + call void @llvm.lifetime.end.p0i8(i64 32800, i8* %1) #0 + call void @llvm.lifetime.end.p0i8(i64 32800, i8* %0) #0 ret i32 %add } -declare void @llvm.lifetime.start(i64, i8* nocapture) #0 +declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) #0 declare void @bar(i32*, i32*, i32*) -declare void @llvm.lifetime.end(i64, i8* nocapture) #0 +declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) #0 attributes #0 = { nounwind } Index: test/CodeGen/PowerPC/toc-load-sched-bug.ll =================================================================== --- test/CodeGen/PowerPC/toc-load-sched-bug.ll +++ test/CodeGen/PowerPC/toc-load-sched-bug.ll @@ -223,7 +223,7 @@ %10 = getelementptr inbounds %"class.std::allocator", %"class.std::allocator"* %ref.tmp.i.i2.i, i64 0, i32 0 %11 = bitcast %"class.llvm::SMDiagnostic"* %ref.tmp to i8* call void @llvm.memset.p0i8.i64(i8* %11, i8 0, i64 16, i32 8, i1 false) #3 - call void @llvm.lifetime.start(i64 1, i8* %10) #3 + call void @llvm.lifetime.start.p0i8(i64 1, i8* %10) #3 %tobool.i.i4.i = icmp eq i8* %4, null br i1 %tobool.i.i4.i, label %if.then.i.i6.i, label %if.end.i.i8.i @@ -237,7 +237,7 @@ br label %_ZNK4llvm9StringRefcvSsEv.exit9.i _ZNK4llvm9StringRefcvSsEv.exit9.i: ; preds = %if.end.i.i8.i, %if.then.i.i6.i - call void @llvm.lifetime.end(i64 1, i8* %10) #3 + call void @llvm.lifetime.end.p0i8(i64 1, i8* %10) #3 %LineNo.i = getelementptr inbounds %"class.llvm::SMDiagnostic", %"class.llvm::SMDiagnostic"* %ref.tmp, i64 0, i32 3 store i32 -1, i32* %LineNo.i, align 8, !tbaa !14 %ColumnNo.i = getelementptr inbounds %"class.llvm::SMDiagnostic", %"class.llvm::SMDiagnostic"* %ref.tmp, i64 0, i32 4 @@ -246,7 +246,7 @@ store i32 0, i32* %Kind.i, align 8, !tbaa !22 %Message.i = getelementptr inbounds %"class.llvm::SMDiagnostic", %"class.llvm::SMDiagnostic"* %ref.tmp, i64 0, i32 6 %12 = getelementptr inbounds %"class.std::allocator", %"class.std::allocator"* %ref.tmp.i.i.i, i64 0, i32 0 - call void @llvm.lifetime.start(i64 1, i8* %12) #3 + call void @llvm.lifetime.start.p0i8(i64 1, i8* %12) #3 %tobool.i.i.i = icmp eq i8* %8, null br i1 %tobool.i.i.i, label %if.then.i.i.i, label %if.end.i.i.i @@ -260,7 +260,7 @@ br label %_ZN4llvm12SMDiagnosticC2ENS_9StringRefENS_9SourceMgr8DiagKindES1_.exit _ZN4llvm12SMDiagnosticC2ENS_9StringRefENS_9SourceMgr8DiagKindES1_.exit: ; preds = %if.then.i.i.i, %if.end.i.i.i - call void @llvm.lifetime.end(i64 1, i8* %12) #3 + call void @llvm.lifetime.end.p0i8(i64 1, i8* %12) #3 %_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 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 %Ranges.i = getelementptr inbounds %"class.llvm::SMDiagnostic", %"class.llvm::SMDiagnostic"* %ref.tmp, i64 0, i32 8 @@ -320,7 +320,7 @@ %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 call void @_ZN4llvm12SMDiagnosticD2Ev(%"class.llvm::SMDiagnostic"* %ref.tmp) #3 %26 = getelementptr inbounds %"class.std::allocator", %"class.std::allocator"* %ref.tmp.i.i, i64 0, i32 0 - call void @llvm.lifetime.start(i64 1, i8* %26) #3 + call void @llvm.lifetime.start.p0i8(i64 1, i8* %26) #3 %27 = bitcast i8* %arrayidx.i.i.i36 to %"struct.std::basic_string, std::allocator >::_Rep"* %cmp.i.i.i = icmp eq i8* %arrayidx.i.i.i36, bitcast ([0 x i64]* @_ZNSs4_Rep20_S_empty_rep_storageE to i8*) br i1 %cmp.i.i.i, label %_ZNSsD1Ev.exit, label %if.then.i.i.i45, !prof !28 @@ -332,11 +332,11 @@ if.then.i.i.i.i: ; preds = %if.then.i.i.i45 %.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* - 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) + 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) %29 = atomicrmw volatile add i32* %28, i32 -1 acq_rel store i32 %29, i32* %.atomicdst.i.i.i.i.i, align 4 %.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 - 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) + 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) br label %_ZN9__gnu_cxxL27__exchange_and_add_dispatchEPii.exit.i.i.i if.else.i.i.i.i: ; preds = %if.then.i.i.i45 @@ -355,9 +355,9 @@ br label %_ZNSsD1Ev.exit _ZNSsD1Ev.exit: ; preds = %_ZN4llvm12SMDiagnosticaSEOS0_.exit, %_ZN9__gnu_cxxL27__exchange_and_add_dispatchEPii.exit.i.i.i, %if.then4.i.i.i - call void @llvm.lifetime.end(i64 1, i8* %26) #3 + call void @llvm.lifetime.end.p0i8(i64 1, i8* %26) #3 %31 = getelementptr inbounds %"class.std::allocator", %"class.std::allocator"* %ref.tmp.i.i47, i64 0, i32 0 - call void @llvm.lifetime.start(i64 1, i8* %31) #3 + call void @llvm.lifetime.start.p0i8(i64 1, i8* %31) #3 %_M_p.i.i.i.i48 = getelementptr inbounds %"class.std::basic_string", %"class.std::basic_string"* %ref.tmp5, i64 0, i32 0, i32 0 %32 = load i8*, i8** %_M_p.i.i.i.i48, align 8, !tbaa !1 %arrayidx.i.i.i49 = getelementptr inbounds i8, i8* %32, i64 -24 @@ -372,11 +372,11 @@ if.then.i.i.i.i55: ; preds = %if.then.i.i.i52 %.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* - 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) + 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) %35 = atomicrmw volatile add i32* %34, i32 -1 acq_rel store i32 %35, i32* %.atomicdst.i.i.i.i.i46, align 4 %.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 - 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) + 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) br label %_ZN9__gnu_cxxL27__exchange_and_add_dispatchEPii.exit.i.i.i60 if.else.i.i.i.i57: ; preds = %if.then.i.i.i52 @@ -395,7 +395,7 @@ br label %_ZNSsD1Ev.exit62 _ZNSsD1Ev.exit62: ; preds = %_ZNSsD1Ev.exit, %_ZN9__gnu_cxxL27__exchange_and_add_dispatchEPii.exit.i.i.i60, %if.then4.i.i.i61 - call void @llvm.lifetime.end(i64 1, i8* %31) #3 + call void @llvm.lifetime.end.p0i8(i64 1, i8* %31) #3 br label %cleanup cond.false.i.i: ; preds = %_ZNK4llvm7ErrorOrISt10unique_ptrINS_12MemoryBufferESt14default_deleteIS2_EEE8getErrorEv.exit @@ -438,10 +438,10 @@ } ; Function Attrs: nounwind -declare void @llvm.lifetime.start(i64, i8* nocapture) #3 +declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) #3 ; Function Attrs: nounwind -declare void @llvm.lifetime.end(i64, i8* nocapture) #3 +declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) #3 ; Function Attrs: noreturn nounwind declare void @__assert_fail(i8*, i8*, i32 zeroext, i8*) #4 Index: test/CodeGen/Thumb/PR17309.ll =================================================================== --- test/CodeGen/Thumb/PR17309.ll +++ test/CodeGen/Thumb/PR17309.ll @@ -11,9 +11,9 @@ entry: %c = alloca %struct.C, align 1 %0 = getelementptr inbounds %struct.C, %struct.C* %c, i32 0, i32 0, i32 0 - call void @llvm.lifetime.start(i64 1000, i8* %0) #1 + call void @llvm.lifetime.start.p0i8(i64 1000, i8* %0) #1 call void @use_C(%struct.C* byval %c) #3 - call void @llvm.lifetime.end(i64 1000, i8* %0) #1 + call void @llvm.lifetime.end.p0i8(i64 1000, i8* %0) #1 ret void } @@ -24,9 +24,9 @@ entry: %s = alloca %struct.S, align 2 %0 = bitcast %struct.S* %s to i8* - call void @llvm.lifetime.start(i64 2000, i8* %0) #1 + call void @llvm.lifetime.start.p0i8(i64 2000, i8* %0) #1 call void @use_S(%struct.S* byval %s) #3 - call void @llvm.lifetime.end(i64 2000, i8* %0) #1 + call void @llvm.lifetime.end.p0i8(i64 2000, i8* %0) #1 ret void } @@ -37,9 +37,9 @@ entry: %i = alloca %struct.I, align 4 %0 = bitcast %struct.I* %i to i8* - call void @llvm.lifetime.start(i64 4000, i8* %0) #1 + call void @llvm.lifetime.start.p0i8(i64 4000, i8* %0) #1 call void @use_I(%struct.I* byval %i) #3 - call void @llvm.lifetime.end(i64 4000, i8* %0) #1 + call void @llvm.lifetime.end.p0i8(i64 4000, i8* %0) #1 ret void } @@ -47,8 +47,8 @@ declare void @use_S(%struct.S* byval) #2 declare void @use_I(%struct.I* byval) #2 -declare void @llvm.lifetime.start(i64, i8* nocapture) #1 -declare void @llvm.lifetime.end(i64, i8* nocapture) #1 +declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) #1 +declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) #1 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" } Index: test/CodeGen/Thumb/stack-coloring-without-frame-ptr.ll =================================================================== --- test/CodeGen/Thumb/stack-coloring-without-frame-ptr.ll +++ test/CodeGen/Thumb/stack-coloring-without-frame-ptr.ll @@ -12,18 +12,18 @@ %0 = bitcast %deque* %var3 to i8* %1 = bitcast %iterator* %var1 to i8* - call void @llvm.lifetime.start(i64 16, i8* %1) nounwind + call void @llvm.lifetime.start.p0i8(i64 16, i8* %1) nounwind call void @llvm.memcpy.p0i8.p0i8.i32(i8* %1, i8* %0, i32 16, i32 4, i1 false) - call void @llvm.lifetime.end(i64 16, i8* %1) nounwind + call void @llvm.lifetime.end.p0i8(i64 16, i8* %1) nounwind %2 = bitcast %insert_iterator* %var2 to i8* - call void @llvm.lifetime.start(i64 20, i8* %2) nounwind + call void @llvm.lifetime.start.p0i8(i64 20, i8* %2) nounwind ret i32 0 } declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32, i1) nounwind -declare void @llvm.lifetime.start(i64, i8* nocapture) nounwind +declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) nounwind -declare void @llvm.lifetime.end(i64, i8* nocapture) nounwind +declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) nounwind Index: test/CodeGen/Thumb/stack_guard_remat.ll =================================================================== --- test/CodeGen/Thumb/stack_guard_remat.ll +++ test/CodeGen/Thumb/stack_guard_remat.ll @@ -27,20 +27,20 @@ define i32 @test_stack_guard_remat() #0 { %a1 = alloca [256 x i32], align 4 %1 = bitcast [256 x i32]* %a1 to i8* - call void @llvm.lifetime.start(i64 1024, i8* %1) + call void @llvm.lifetime.start.p0i8(i64 1024, i8* %1) %2 = getelementptr inbounds [256 x i32], [256 x i32]* %a1, i32 0, i32 0 call void @foo3(i32* %2) #3 call void asm sideeffect "foo2", "~{r0},~{r1},~{r2},~{r3},~{r4},~{r5},~{r6},~{r7},~{r8},~{r9},~{r10},~{r11},~{r12},~{sp},~{lr}"() - call void @llvm.lifetime.end(i64 1024, i8* %1) + call void @llvm.lifetime.end.p0i8(i64 1024, i8* %1) ret i32 0 } ; Function Attrs: nounwind -declare void @llvm.lifetime.start(i64, i8* nocapture) +declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) declare void @foo3(i32*) ; Function Attrs: nounwind -declare void @llvm.lifetime.end(i64, i8* nocapture) +declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) 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" } Index: test/CodeGen/Thumb2/stack_guard_remat.ll =================================================================== --- test/CodeGen/Thumb2/stack_guard_remat.ll +++ test/CodeGen/Thumb2/stack_guard_remat.ll @@ -24,20 +24,20 @@ define i32 @test_stack_guard_remat() #0 { %a1 = alloca [256 x i32], align 4 %1 = bitcast [256 x i32]* %a1 to i8* - call void @llvm.lifetime.start(i64 1024, i8* %1) + call void @llvm.lifetime.start.p0i8(i64 1024, i8* %1) %2 = getelementptr inbounds [256 x i32], [256 x i32]* %a1, i32 0, i32 0 call void @foo3(i32* %2) #3 call void asm sideeffect "foo2", "~{r0},~{r1},~{r2},~{r3},~{r4},~{r5},~{r6},~{r7},~{r8},~{r9},~{r10},~{r11},~{r12},~{sp},~{lr}"() - call void @llvm.lifetime.end(i64 1024, i8* %1) + call void @llvm.lifetime.end.p0i8(i64 1024, i8* %1) ret i32 0 } ; Function Attrs: nounwind -declare void @llvm.lifetime.start(i64, i8* nocapture) +declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) declare void @foo3(i32*) ; Function Attrs: nounwind -declare void @llvm.lifetime.end(i64, i8* nocapture) +declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) 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" } Index: test/CodeGen/WinEH/cppeh-nonalloca-frame-values.ll =================================================================== --- test/CodeGen/WinEH/cppeh-nonalloca-frame-values.ll +++ test/CodeGen/WinEH/cppeh-nonalloca-frame-values.ll @@ -62,7 +62,7 @@ ; CHECK: [[DATA_PTR:\%.+]] = alloca i64, align 8 ; CHECK: [[TMPCAST:\%.+]] = bitcast i64* [[DATA_PTR]] to %struct.SomeData* ; CHECK: [[TMP:\%.+]] = bitcast [10 x i32]* [[EXCEPTIONVAL]] to i8* -; CHECK: call void @llvm.lifetime.start(i64 40, i8* [[TMP]]) +; CHECK: call void @llvm.lifetime.start.p0i8(i64 40, i8* [[TMP]]) ; CHECK: store i64 0, i64* [[DATA_PTR]], align 8 ; CHECK: [[A_PTR:\%.+]] = bitcast i64* [[DATA_PTR]] to i32* ; CHECK: store i32* [[A_PTR]], i32** [[A_REGMEM]] @@ -79,7 +79,7 @@ %Data = alloca i64, align 8 %tmpcast = bitcast i64* %Data to %struct.SomeData* %0 = bitcast [10 x i32]* %ExceptionVal to i8* - call void @llvm.lifetime.start(i64 40, i8* %0) #1 + call void @llvm.lifetime.start.p0i8(i64 40, i8* %0) #1 store i64 0, i64* %Data, align 8 %a = bitcast i64* %Data to i32* %b = getelementptr inbounds %struct.SomeData, %struct.SomeData* %tmpcast, i64 0, i32 1 @@ -181,7 +181,7 @@ %NumExceptions.1.lcssa = phi i32 [ %NumExceptions.1, %try.cont ] %arraydecay = getelementptr inbounds [10 x i32], [10 x i32]* %ExceptionVal, i64 0, i64 0 call void @"\01?dump@@YAXPEAHHAEAUSomeData@@@Z"(i32* %arraydecay, i32 %NumExceptions.1.lcssa, %struct.SomeData* dereferenceable(8) %tmpcast) - call void @llvm.lifetime.end(i64 40, i8* %0) #1 + call void @llvm.lifetime.end.p0i8(i64 40, i8* %0) #1 ret void eh.resume: ; preds = %lpad @@ -239,7 +239,7 @@ ; CHECK: } ; Function Attrs: nounwind -declare void @llvm.lifetime.start(i64, i8* nocapture) #1 +declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) #1 declare void @"\01?may_throw@@YAXXZ"() #2 @@ -257,7 +257,7 @@ declare void @"\01?dump@@YAXPEAHHAEAUSomeData@@@Z"(i32*, i32, %struct.SomeData* dereferenceable(8)) #2 ; Function Attrs: nounwind -declare void @llvm.lifetime.end(i64, i8* nocapture) #1 +declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) #1 attributes #0 = { uwtable "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" } attributes #1 = { nounwind } Index: test/CodeGen/WinEH/cppeh-prepared-catch-reordered.ll =================================================================== --- test/CodeGen/WinEH/cppeh-prepared-catch-reordered.ll +++ test/CodeGen/WinEH/cppeh-prepared-catch-reordered.ll @@ -85,7 +85,7 @@ declare void @llvm.eh.endcatch() #3 ; Function Attrs: nounwind -declare void @llvm.lifetime.start(i64, i8* nocapture) #3 +declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) #3 ; Function Attrs: nounwind declare i8* @llvm.eh.actions(...) #3 Index: test/CodeGen/X86/StackColoring-dbg.ll =================================================================== --- test/CodeGen/X86/StackColoring-dbg.ll +++ test/CodeGen/X86/StackColoring-dbg.ll @@ -15,15 +15,15 @@ br label %for.body for.body: - call void @llvm.lifetime.end(i64 -1, i8* %0) nounwind - call void @llvm.lifetime.start(i64 -1, i8* %x.i) nounwind + call void @llvm.lifetime.end.p0i8(i64 -1, i8* %0) nounwind + call void @llvm.lifetime.start.p0i8(i64 -1, i8* %x.i) nounwind call void @llvm.dbg.declare(metadata i8* %x.i, metadata !22, metadata !DIExpression()) nounwind, !dbg !DILocation(scope: !2) br label %for.body } -declare void @llvm.lifetime.start(i64, i8* nocapture) nounwind +declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) nounwind -declare void @llvm.lifetime.end(i64, i8* nocapture) nounwind +declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) nounwind !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!23} Index: test/CodeGen/X86/StackColoring.ll =================================================================== --- test/CodeGen/X86/StackColoring.ll +++ test/CodeGen/X86/StackColoring.ll @@ -13,14 +13,14 @@ %a2 = alloca [16 x i8*], align 8 %b = bitcast [17 x i8*]* %a to i8* %b2 = bitcast [16 x i8*]* %a2 to i8* - call void @llvm.lifetime.start(i64 -1, i8* %b) + call void @llvm.lifetime.start.p0i8(i64 -1, i8* %b) %t1 = call i32 @foo(i32 %in, i8* %b) %t2 = call i32 @foo(i32 %in, i8* %b) - call void @llvm.lifetime.end(i64 -1, i8* %b) - call void @llvm.lifetime.start(i64 -1, i8* %b2) + call void @llvm.lifetime.end.p0i8(i64 -1, i8* %b) + call void @llvm.lifetime.start.p0i8(i64 -1, i8* %b2) %t3 = call i32 @foo(i32 %in, i8* %b2) %t4 = call i32 @foo(i32 %in, i8* %b2) - call void @llvm.lifetime.end(i64 -1, i8* %b2) + call void @llvm.lifetime.end.p0i8(i64 -1, i8* %b2) %t5 = add i32 %t1, %t2 %t6 = add i32 %t3, %t4 %t7 = add i32 %t5, %t6 @@ -37,22 +37,22 @@ %a2 = alloca [16 x i8*], align 8 %b = bitcast [17 x i8*]* %a to i8* %b2 = bitcast [16 x i8*]* %a2 to i8* - call void @llvm.lifetime.start(i64 -1, i8* %b) + call void @llvm.lifetime.start.p0i8(i64 -1, i8* %b) %t1 = call i32 @foo(i32 %in, i8* %b) %t2 = call i32 @foo(i32 %in, i8* %b) br i1 %d, label %bb2, label %bb3 bb2: - call void @llvm.lifetime.start(i64 -1, i8* %b2) + call void @llvm.lifetime.start.p0i8(i64 -1, i8* %b2) %t3 = call i32 @foo(i32 %in, i8* %b2) %t4 = call i32 @foo(i32 %in, i8* %b2) - call void @llvm.lifetime.end(i64 -1, i8* %b2) + call void @llvm.lifetime.end.p0i8(i64 -1, i8* %b2) %t5 = add i32 %t1, %t2 %t6 = add i32 %t3, %t4 %t7 = add i32 %t5, %t6 - call void @llvm.lifetime.end(i64 -1, i8* %b) + call void @llvm.lifetime.end.p0i8(i64 -1, i8* %b) ret i32 %t7 bb3: - call void @llvm.lifetime.end(i64 -1, i8* %b) + call void @llvm.lifetime.end.p0i8(i64 -1, i8* %b) ret i32 0 } @@ -65,16 +65,16 @@ %a2 = alloca [16 x i8*], align 8 %b = bitcast [17 x i8*]* %a to i8* %b2 = bitcast [16 x i8*]* %a2 to i8* - call void @llvm.lifetime.start(i64 -1, i8* %b) + call void @llvm.lifetime.start.p0i8(i64 -1, i8* %b) %t1 = call i32 @foo(i32 %in, i8* %b) %t2 = call i32 @foo(i32 %in, i8* %b) - call void @llvm.lifetime.end(i64 -1, i8* %b) + call void @llvm.lifetime.end.p0i8(i64 -1, i8* %b) br i1 %d, label %bb2, label %bb3 bb2: - call void @llvm.lifetime.start(i64 -1, i8* %b2) + call void @llvm.lifetime.start.p0i8(i64 -1, i8* %b2) %t3 = call i32 @foo(i32 %in, i8* %b2) %t4 = call i32 @foo(i32 %in, i8* %b2) - call void @llvm.lifetime.end(i64 -1, i8* %b2) + call void @llvm.lifetime.end.p0i8(i64 -1, i8* %b2) %t5 = add i32 %t1, %t2 %t6 = add i32 %t3, %t4 %t7 = add i32 %t5, %t6 @@ -98,21 +98,21 @@ %b2 = bitcast [13 x i8*]* %a2 to i8* %b3 = bitcast [12 x i8*]* %a3 to i8* %b4 = bitcast [11 x i8*]* %a4 to i8* - call void @llvm.lifetime.start(i64 -1, i8* %b4) - call void @llvm.lifetime.start(i64 -1, i8* %b1) + call void @llvm.lifetime.start.p0i8(i64 -1, i8* %b4) + call void @llvm.lifetime.start.p0i8(i64 -1, i8* %b1) %t1 = call i32 @foo(i32 %in, i8* %b1) %t2 = call i32 @foo(i32 %in, i8* %b1) - call void @llvm.lifetime.end(i64 -1, i8* %b1) - call void @llvm.lifetime.start(i64 -1, i8* %b2) + call void @llvm.lifetime.end.p0i8(i64 -1, i8* %b1) + call void @llvm.lifetime.start.p0i8(i64 -1, i8* %b2) %t9 = call i32 @foo(i32 %in, i8* %b2) %t8 = call i32 @foo(i32 %in, i8* %b2) - call void @llvm.lifetime.end(i64 -1, i8* %b2) - call void @llvm.lifetime.start(i64 -1, i8* %b3) + call void @llvm.lifetime.end.p0i8(i64 -1, i8* %b2) + call void @llvm.lifetime.start.p0i8(i64 -1, i8* %b3) %t3 = call i32 @foo(i32 %in, i8* %b3) %t4 = call i32 @foo(i32 %in, i8* %b3) - call void @llvm.lifetime.end(i64 -1, i8* %b3) + call void @llvm.lifetime.end.p0i8(i64 -1, i8* %b3) %t11 = call i32 @foo(i32 %in, i8* %b4) - call void @llvm.lifetime.end(i64 -1, i8* %b4) + call void @llvm.lifetime.end.p0i8(i64 -1, i8* %b4) %t5 = add i32 %t1, %t2 %t6 = add i32 %t3, %t4 %t7 = add i32 %t5, %t6 @@ -132,23 +132,23 @@ %b2 = bitcast [13 x i8*]* %a2 to i8* %b3 = bitcast [12 x i8*]* %a3 to i8* %b4 = bitcast [11 x i8*]* %a4 to i8* - call void @llvm.lifetime.start(i64 -1, i8* %b1) + call void @llvm.lifetime.start.p0i8(i64 -1, i8* %b1) %t1 = call i32 @foo(i32 %in, i8* %b1) %t2 = call i32 @foo(i32 %in, i8* %b1) - call void @llvm.lifetime.end(i64 -1, i8* %b1) - call void @llvm.lifetime.start(i64 -1, i8* %b2) + call void @llvm.lifetime.end.p0i8(i64 -1, i8* %b1) + call void @llvm.lifetime.start.p0i8(i64 -1, i8* %b2) %t9 = call i32 @foo(i32 %in, i8* %b2) %t8 = call i32 @foo(i32 %in, i8* %b2) - call void @llvm.lifetime.end(i64 -1, i8* %b2) - call void @llvm.lifetime.start(i64 -1, i8* %b3) + call void @llvm.lifetime.end.p0i8(i64 -1, i8* %b2) + call void @llvm.lifetime.start.p0i8(i64 -1, i8* %b3) %t3 = call i32 @foo(i32 %in, i8* %b3) %t4 = call i32 @foo(i32 %in, i8* %b3) - call void @llvm.lifetime.end(i64 -1, i8* %b3) + call void @llvm.lifetime.end.p0i8(i64 -1, i8* %b3) br i1 undef, label %bb2, label %bb3 bb2: - call void @llvm.lifetime.start(i64 -1, i8* %b4) + call void @llvm.lifetime.start.p0i8(i64 -1, i8* %b4) %t11 = call i32 @foo(i32 %in, i8* %b4) - call void @llvm.lifetime.end(i64 -1, i8* %b4) + call void @llvm.lifetime.end.p0i8(i64 -1, i8* %b4) %t5 = add i32 %t1, %t2 %t6 = add i32 %t3, %t4 %t7 = add i32 %t5, %t6 @@ -168,13 +168,13 @@ %a2 = alloca [16 x i8*], align 8 %b = bitcast [17 x i8*]* %a to i8* %b2 = bitcast [16 x i8*]* %a2 to i8* - call void @llvm.lifetime.start(i64 -1, i8* %b) + call void @llvm.lifetime.start.p0i8(i64 -1, i8* %b) %t1 = call i32 @foo(i32 %in, i8* %b) %t2 = call i32 @foo(i32 %in, i8* %b) - call void @llvm.lifetime.end(i64 -1, i8* %b) + call void @llvm.lifetime.end.p0i8(i64 -1, i8* %b) br i1 %d, label %bb2, label %bb3 bb2: - call void @llvm.lifetime.start(i64 -1, i8* %b2) + call void @llvm.lifetime.start.p0i8(i64 -1, i8* %b2) %t3 = call i32 @foo(i32 %in, i8* %b2) %t4 = call i32 @foo(i32 %in, i8* %b2) %t5 = add i32 %t1, %t2 @@ -193,13 +193,13 @@ %a2 = alloca [16 x i8*], align 8 %b = bitcast [17 x i8*]* %a to i8* %b2 = bitcast [16 x i8*]* %a2 to i8* - call void @llvm.lifetime.start(i64 -1, i8* %b) + call void @llvm.lifetime.start.p0i8(i64 -1, i8* %b) %t1 = call i32 @foo(i32 %in, i8* %b) %t2 = call i32 @foo(i32 %in, i8* %b) br i1 %d, label %bb2, label %bb3 bb2: - call void @llvm.lifetime.end(i64 -1, i8* %b) - call void @llvm.lifetime.start(i64 -1, i8* %b2) + call void @llvm.lifetime.end.p0i8(i64 -1, i8* %b) + call void @llvm.lifetime.start.p0i8(i64 -1, i8* %b2) %t3 = call i32 @foo(i32 %in, i8* %b2) %t4 = call i32 @foo(i32 %in, i8* %b2) %t5 = add i32 %t1, %t2 @@ -221,10 +221,10 @@ %b2 = bitcast [16 x i8*]* %a2 to i8* %t1 = call i32 @foo(i32 %in, i8* %b) %t2 = call i32 @foo(i32 %in, i8* %b) - call void @llvm.lifetime.end(i64 -1, i8* %b) + call void @llvm.lifetime.end.p0i8(i64 -1, i8* %b) br i1 %d, label %bb2, label %bb3 bb2: - call void @llvm.lifetime.start(i64 -1, i8* %b2) + call void @llvm.lifetime.start.p0i8(i64 -1, i8* %b2) %t3 = call i32 @foo(i32 %in, i8* %b2) %t4 = call i32 @foo(i32 %in, i8* %b2) %t5 = add i32 %t1, %t2 @@ -245,19 +245,19 @@ %A.i = alloca [100 x i32], align 4 %B.i = alloca [100 x i32], align 4 %0 = bitcast [100 x i32]* %A.i to i8* - call void @llvm.lifetime.start(i64 -1, i8* %0) nounwind + call void @llvm.lifetime.start.p0i8(i64 -1, i8* %0) nounwind %1 = bitcast [100 x i32]* %B.i to i8* - call void @llvm.lifetime.start(i64 -1, i8* %1) nounwind + call void @llvm.lifetime.start.p0i8(i64 -1, i8* %1) nounwind call void @bar([100 x i32]* %A.i, [100 x i32]* %B.i) nounwind - call void @llvm.lifetime.end(i64 -1, i8* %0) nounwind - call void @llvm.lifetime.end(i64 -1, i8* %1) nounwind + call void @llvm.lifetime.end.p0i8(i64 -1, i8* %0) nounwind + call void @llvm.lifetime.end.p0i8(i64 -1, i8* %1) nounwind %2 = bitcast [100 x i32]* %A.i1 to i8* - call void @llvm.lifetime.start(i64 -1, i8* %2) nounwind + call void @llvm.lifetime.start.p0i8(i64 -1, i8* %2) nounwind %3 = bitcast [100 x i32]* %B.i2 to i8* - call void @llvm.lifetime.start(i64 -1, i8* %3) nounwind + call void @llvm.lifetime.start.p0i8(i64 -1, i8* %3) nounwind call void @bar([100 x i32]* %A.i1, [100 x i32]* %B.i2) nounwind - call void @llvm.lifetime.end(i64 -1, i8* %2) nounwind - call void @llvm.lifetime.end(i64 -1, i8* %3) nounwind + call void @llvm.lifetime.end.p0i8(i64 -1, i8* %2) nounwind + call void @llvm.lifetime.end.p0i8(i64 -1, i8* %3) nounwind ret void } @@ -271,7 +271,7 @@ %b2 = bitcast [16 x i8*]* %a2 to i8* %t1 = call i32 @foo(i32 %in, i8* %b) %t2 = call i32 @foo(i32 %in, i8* %b) - call void @llvm.lifetime.end(i64 -1, i8* %b) + call void @llvm.lifetime.end.p0i8(i64 -1, i8* %b) br i1 %d, label %bb0, label %bb1 bb0: @@ -284,13 +284,13 @@ bb2: %split = phi i8* [ %I1, %bb0 ], [ %I2, %bb1 ] - call void @llvm.lifetime.start(i64 -1, i8* %split) + call void @llvm.lifetime.start.p0i8(i64 -1, i8* %split) %t3 = call i32 @foo(i32 %in, i8* %b2) %t4 = call i32 @foo(i32 %in, i8* %b2) %t5 = add i32 %t1, %t2 %t6 = add i32 %t3, %t4 %t7 = add i32 %t5, %t6 - call void @llvm.lifetime.end(i64 -1, i8* %split) + call void @llvm.lifetime.end.p0i8(i64 -1, i8* %split) ret i32 %t7 bb3: ret i32 0 @@ -306,21 +306,21 @@ %A.i = alloca [100 x i32], align 4 %B.i = alloca [100 x i32], align 4 %0 = bitcast [100 x i32]* %A.i to i8* - call void @llvm.lifetime.start(i64 -1, i8* %0) nounwind ; <---- start #1 + call void @llvm.lifetime.start.p0i8(i64 -1, i8* %0) nounwind ; <---- start #1 %1 = bitcast [100 x i32]* %B.i to i8* - call void @llvm.lifetime.start(i64 -1, i8* %1) nounwind + call void @llvm.lifetime.start.p0i8(i64 -1, i8* %1) nounwind call void @bar([100 x i32]* %A.i, [100 x i32]* %B.i) nounwind - call void @llvm.lifetime.end(i64 -1, i8* %0) nounwind - call void @llvm.lifetime.end(i64 -1, i8* %1) nounwind + call void @llvm.lifetime.end.p0i8(i64 -1, i8* %0) nounwind + call void @llvm.lifetime.end.p0i8(i64 -1, i8* %1) nounwind %2 = bitcast [100 x i32]* %A.i1 to i8* - call void @llvm.lifetime.start(i64 -1, i8* %2) nounwind + call void @llvm.lifetime.start.p0i8(i64 -1, i8* %2) nounwind %3 = bitcast [100 x i32]* %B.i2 to i8* - call void @llvm.lifetime.start(i64 -1, i8* %3) nounwind - call void @llvm.lifetime.start(i64 -1, i8* %0) nounwind ; <---- start #2 + call void @llvm.lifetime.start.p0i8(i64 -1, i8* %3) nounwind + call void @llvm.lifetime.start.p0i8(i64 -1, i8* %0) nounwind ; <---- start #2 call void @bar([100 x i32]* %A.i1, [100 x i32]* %B.i2) nounwind - call void @llvm.lifetime.end(i64 -1, i8* %2) nounwind - call void @llvm.lifetime.end(i64 -1, i8* %0) nounwind - call void @llvm.lifetime.end(i64 -1, i8* %3) nounwind + call void @llvm.lifetime.end.p0i8(i64 -1, i8* %2) nounwind + call void @llvm.lifetime.end.p0i8(i64 -1, i8* %0) nounwind + call void @llvm.lifetime.end.p0i8(i64 -1, i8* %3) nounwind ret void } @@ -335,11 +335,11 @@ %b2 = bitcast [16 x i8*]* %a2 to i8* %t1 = call i32 @foo(i32 %in, i8* %b) %t2 = call i32 @foo(i32 %in, i8* %b) - call void @llvm.lifetime.end(i64 -1, i8* %b) - call void @llvm.lifetime.start(i64 -1, i8* %b) + call void @llvm.lifetime.end.p0i8(i64 -1, i8* %b) + call void @llvm.lifetime.start.p0i8(i64 -1, i8* %b) br i1 %d, label %bb2, label %bb3 bb2: - call void @llvm.lifetime.start(i64 -1, i8* %b2) + call void @llvm.lifetime.start.p0i8(i64 -1, i8* %b2) %t3 = call i32 @foo(i32 %in, i8* %b2) %t4 = call i32 @foo(i32 %in, i8* %b2) %t5 = add i32 %t1, %t2 @@ -361,11 +361,11 @@ %buf1 = alloca i8, i32 100000, align 16 %buf2 = alloca i8, i32 100000, align 16 - call void @llvm.lifetime.start(i64 -1, i8* %buf1) - call void @llvm.lifetime.end(i64 -1, i8* %buf1) + call void @llvm.lifetime.start.p0i8(i64 -1, i8* %buf1) + call void @llvm.lifetime.end.p0i8(i64 -1, i8* %buf1) - call void @llvm.lifetime.start(i64 -1, i8* %buf1) - call void @llvm.lifetime.start(i64 -1, i8* %buf2) + call void @llvm.lifetime.start.p0i8(i64 -1, i8* %buf1) + call void @llvm.lifetime.start.p0i8(i64 -1, i8* %buf2) %result1 = call i32 @foo(i32 0, i8* %buf1) %result2 = call i32 @foo(i32 0, i8* %buf2) ret void @@ -383,12 +383,12 @@ %A.i = alloca [100 x i32], align 4 %B.i = alloca [100 x i32], align 4 %0 = bitcast [100 x i32]* %A.i to i8* - call void @llvm.lifetime.start(i64 -1, i8* %0) nounwind + call void @llvm.lifetime.start.p0i8(i64 -1, i8* %0) nounwind %1 = bitcast [100 x i32]* %B.i to i8* - call void @llvm.lifetime.start(i64 -1, i8* %1) nounwind + call void @llvm.lifetime.start.p0i8(i64 -1, i8* %1) nounwind call void @bar([100 x i32]* %A.i, [100 x i32]* %B.i) nounwind - call void @llvm.lifetime.end(i64 -1, i8* %0) nounwind - call void @llvm.lifetime.end(i64 -1, i8* %1) nounwind + call void @llvm.lifetime.end.p0i8(i64 -1, i8* %0) nounwind + call void @llvm.lifetime.end.p0i8(i64 -1, i8* %1) nounwind br label %block2 block2: @@ -412,20 +412,20 @@ %b8 = bitcast [4 x %struct.Klass]* %b.i to i8* ; I am used outside the lifetime zone below: %z2 = getelementptr inbounds [4 x %struct.Klass], [4 x %struct.Klass]* %a.i, i64 0, i64 0, i32 0 - call void @llvm.lifetime.start(i64 -1, i8* %a8) - call void @llvm.lifetime.start(i64 -1, i8* %b8) + call void @llvm.lifetime.start.p0i8(i64 -1, i8* %a8) + call void @llvm.lifetime.start.p0i8(i64 -1, i8* %b8) %z3 = load i32, i32* %z2, align 16 %r = call i32 @foo(i32 %z3, i8* %a8) %r2 = call i32 @foo(i32 %z3, i8* %b8) - call void @llvm.lifetime.end(i64 -1, i8* %a8) - call void @llvm.lifetime.end(i64 -1, i8* %b8) + call void @llvm.lifetime.end.p0i8(i64 -1, i8* %a8) + call void @llvm.lifetime.end.p0i8(i64 -1, i8* %b8) ret i32 9 } declare void @bar([100 x i32]* , [100 x i32]*) nounwind -declare void @llvm.lifetime.start(i64, i8* nocapture) nounwind +declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) nounwind -declare void @llvm.lifetime.end(i64, i8* nocapture) nounwind +declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) nounwind declare i32 @foo(i32, i8*) Index: test/CodeGen/X86/crash.ll =================================================================== --- test/CodeGen/X86/crash.ll +++ test/CodeGen/X86/crash.ll @@ -314,9 +314,9 @@ declare void @_ZNSt6vectorIN4llvm11MachineMoveESaIS1_EE13_M_insert_auxEN9__gnu_cxx17__normal_iteratorIPS1_S3_EERKS1_(%t10*, %t21* byval align 4, %t13*) -declare void @llvm.lifetime.start(i64, i8* nocapture) nounwind +declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) nounwind -declare void @llvm.lifetime.end(i64, i8* nocapture) nounwind +declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) nounwind ; PR10463 ; Spilling a virtual register with uses. Index: test/CodeGen/X86/dynamic-alloca-lifetime.ll =================================================================== --- test/CodeGen/X86/dynamic-alloca-lifetime.ll +++ test/CodeGen/X86/dynamic-alloca-lifetime.ll @@ -10,10 +10,10 @@ target triple = "i386-apple-macosx10.10.0" ; Function Attrs: nounwind -declare void @llvm.lifetime.start(i64, i8* nocapture) #0 +declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) #0 ; Function Attrs: nounwind -declare void @llvm.lifetime.end(i64, i8* nocapture) #0 +declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) #0 ; Function Attrs: ssp define void @foo(i1 %cond1, i1 %cond2) #1 { @@ -30,11 +30,11 @@ if.else130: ; preds = %bb1 %tmp = getelementptr inbounds [8192 x i8], [8192 x i8]* %bitmapBuffer, i32 0, i32 0 - call void @llvm.lifetime.start(i64 8192, i8* %tmp) #0 - call void @llvm.lifetime.end(i64 8192, i8* %tmp) #0 + call void @llvm.lifetime.start.p0i8(i64 8192, i8* %tmp) #0 + call void @llvm.lifetime.end.p0i8(i64 8192, i8* %tmp) #0 %tmp25 = getelementptr inbounds [8192 x i8], [8192 x i8]* %bitmapBuffer229, i32 0, i32 0 - call void @llvm.lifetime.start(i64 8192, i8* %tmp25) #0 - call void @llvm.lifetime.end(i64 8192, i8* %tmp25) #0 + call void @llvm.lifetime.start.p0i8(i64 8192, i8* %tmp25) #0 + call void @llvm.lifetime.end.p0i8(i64 8192, i8* %tmp25) #0 br label %end1 } Index: test/CodeGen/X86/fast-isel.ll =================================================================== --- test/CodeGen/X86/fast-isel.ll +++ test/CodeGen/X86/fast-isel.ll @@ -107,12 +107,12 @@ ret void } -declare void @llvm.lifetime.start(i64, i8* nocapture) nounwind +declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) nounwind define i64* @life() nounwind { %a1 = alloca i64*, align 8 %a2 = bitcast i64** %a1 to i8* - call void @llvm.lifetime.start(i64 -1, i8* %a2) nounwind + call void @llvm.lifetime.start.p0i8(i64 -1, i8* %a2) nounwind %a3 = load i64*, i64** %a1, align 8 ret i64* %a3 } Index: test/CodeGen/X86/load-slice.ll =================================================================== --- test/CodeGen/X86/load-slice.ll +++ test/CodeGen/X86/load-slice.ll @@ -73,10 +73,10 @@ declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture, i8* nocapture readonly, i64, i32, i1) #1 ; Function Attrs: nounwind -declare void @llvm.lifetime.start(i64, i8* nocapture) +declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) ; Function Attrs: nounwind -declare void @llvm.lifetime.end(i64, i8* nocapture) +declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) ; Check that we do not read outside of the chunk of bits of the original loads. ; Index: test/CodeGen/X86/misched-aa-colored.ll =================================================================== --- test/CodeGen/X86/misched-aa-colored.ll +++ test/CodeGen/X86/misched-aa-colored.ll @@ -143,10 +143,10 @@ declare void @__assert_fail(i8*, i8*, i32, i8*) #0 ; Function Attrs: nounwind -declare void @llvm.lifetime.start(i64, i8* nocapture) #1 +declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) #1 ; Function Attrs: nounwind -declare void @llvm.lifetime.end(i64, i8* nocapture) #1 +declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) #1 ; Function Attrs: nounwind uwtable 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 { @@ -157,10 +157,10 @@ %0 = bitcast %"struct.std::pair.112.119.719.1079.2039.2159.2399.4199"* %ref.tmp.i to i8* %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 %retval.sroa.0.0.copyload.i37 = load i32, i32* %retval.sroa.0.0.idx.i36, align 8 - call void @llvm.lifetime.end(i64 24, i8* %0) #1 + call void @llvm.lifetime.end.p0i8(i64 24, i8* %0) #1 %agg.tmp8.sroa.2.0.copyload = load i32, i32* undef, align 8 %1 = bitcast %"class.llvm::SDValue.3.603.963.1923.2043.2283.4083"* %Op.i to i8* - call void @llvm.lifetime.start(i64 16, i8* %1) #1 + call void @llvm.lifetime.start.p0i8(i64 16, i8* %1) #1 %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 store i32 %agg.tmp8.sroa.2.0.copyload, i32* %2, align 8 Index: test/CodeGen/X86/stack-protector-weight.ll =================================================================== --- test/CodeGen/X86/stack-protector-weight.ll +++ test/CodeGen/X86/stack-protector-weight.ll @@ -17,20 +17,20 @@ entry: %a = alloca [128 x i32], align 16 %0 = bitcast [128 x i32]* %a to i8* - call void @llvm.lifetime.start(i64 512, i8* %0) + call void @llvm.lifetime.start.p0i8(i64 512, i8* %0) %arraydecay = getelementptr inbounds [128 x i32], [128 x i32]* %a, i64 0, i64 0 call void @foo2(i32* %arraydecay) %idxprom = sext i32 %n to i64 %arrayidx = getelementptr inbounds [128 x i32], [128 x i32]* %a, i64 0, i64 %idxprom %1 = load i32, i32* %arrayidx, align 4 - call void @llvm.lifetime.end(i64 512, i8* %0) + call void @llvm.lifetime.end.p0i8(i64 512, i8* %0) ret i32 %1 } -declare void @llvm.lifetime.start(i64, i8* nocapture) +declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) declare void @foo2(i32*) -declare void @llvm.lifetime.end(i64, i8* nocapture) +declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) attributes #0 = { ssp "stack-protector-buffer-size"="8" } Index: test/CodeGen/X86/stack_guard_remat.ll =================================================================== --- test/CodeGen/X86/stack_guard_remat.ll +++ test/CodeGen/X86/stack_guard_remat.ll @@ -9,20 +9,20 @@ entry: %a1 = alloca [256 x i32], align 16 %0 = bitcast [256 x i32]* %a1 to i8* - call void @llvm.lifetime.start(i64 1024, i8* %0) + call void @llvm.lifetime.start.p0i8(i64 1024, i8* %0) %arraydecay = getelementptr inbounds [256 x i32], [256 x i32]* %a1, i64 0, i64 0 call void @foo3(i32* %arraydecay) call void asm sideeffect "foo2", "~{r12},~{r13},~{r14},~{r15},~{ebx},~{esi},~{edi},~{dirflag},~{fpsr},~{flags}"() - call void @llvm.lifetime.end(i64 1024, i8* %0) + call void @llvm.lifetime.end.p0i8(i64 1024, i8* %0) ret i32 0 } ; Function Attrs: nounwind -declare void @llvm.lifetime.start(i64, i8* nocapture) +declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) declare void @foo3(i32*) ; Function Attrs: nounwind -declare void @llvm.lifetime.end(i64, i8* nocapture) +declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) 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" } Index: test/CodeGen/X86/unwindraise.ll =================================================================== --- test/CodeGen/X86/unwindraise.ll +++ test/CodeGen/X86/unwindraise.ll @@ -123,7 +123,7 @@ store i64 %16, i64* %private_2, align 8 call void @llvm.memcpy.p0i8.p0i8.i64(i8* %2, i8* %3, i64 240, i32 8, i1 false) %17 = bitcast %struct._Unwind_FrameState* %fs.i to i8* - call void @llvm.lifetime.start(i64 -1, i8* %17) + call void @llvm.lifetime.start.p0i8(i64 -1, i8* %17) %personality.i = getelementptr inbounds %struct._Unwind_FrameState, %struct._Unwind_FrameState* %fs.i, i64 0, i32 6 %retaddr_column.i22 = getelementptr inbounds %struct._Unwind_FrameState, %struct._Unwind_FrameState* %fs.i, i64 0, i32 9 br label %while.body.i @@ -211,7 +211,7 @@ br label %while.body.i do.body19: ; preds = %if.then3.i - call void @llvm.lifetime.end(i64 -1, i8* %17) + call void @llvm.lifetime.end.p0i8(i64 -1, i8* %17) %call20 = call fastcc i64 @uw_install_context_1(%struct._Unwind_Context* %this_context, %struct._Unwind_Context* %cur_context) %32 = load i8*, i8** %ra.i, align 8 call void @llvm.eh.return.i64(i64 %call20, i8* %32) @@ -242,6 +242,6 @@ declare fastcc void @uw_update_context_1(%struct._Unwind_Context*, %struct._Unwind_FrameState* nocapture) uwtable -declare void @llvm.lifetime.start(i64, i8* nocapture) nounwind +declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) nounwind -declare void @llvm.lifetime.end(i64, i8* nocapture) nounwind +declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) nounwind Index: test/DebugInfo/AArch64/frameindices.ll =================================================================== --- test/DebugInfo/AArch64/frameindices.ll +++ test/DebugInfo/AArch64/frameindices.ll @@ -73,13 +73,13 @@ tail call void @llvm.dbg.declare(metadata %struct.A* %p1, metadata !33, metadata !46), !dbg !63 %0 = getelementptr inbounds %struct.A, %struct.A* %p1, i64 0, i32 0, !dbg !64 %1 = getelementptr inbounds %struct.A, %struct.A* %agg.tmp.i, i64 0, i32 0, !dbg !65 - call void @llvm.lifetime.start(i64 24, i8* %1), !dbg !65 + call void @llvm.lifetime.start.p0i8(i64 24, i8* %1), !dbg !65 %2 = load i64, i64* @a, align 8, !dbg !67, !tbaa !49 %call.i = tail call noalias i8* @_Znwm(i64 %2) #5, !dbg !68 store i8* %call.i, i8** bitcast (i32** @b to i8**), align 8, !dbg !69, !tbaa !55 call void @llvm.memcpy.p0i8.p0i8.i64(i8* %1, i8* %0, i64 24, i32 8, i1 false), !dbg !70 call void @_Z2f91A(%struct.A* %agg.tmp.i), !dbg !71 - call void @llvm.lifetime.end(i64 24, i8* %1), !dbg !72 + call void @llvm.lifetime.end.p0i8(i64 24, i8* %1), !dbg !72 ret void, !dbg !73 } @@ -101,7 +101,7 @@ call void @llvm.dbg.value(metadata i8 1, i64 0, metadata !74, metadata !84), !dbg !77 call void @llvm.dbg.declare(metadata %struct.A* undef, metadata !74, metadata !46), !dbg !77 %1 = getelementptr inbounds %struct.A, %struct.A* %agg.tmp.i.i, i64 0, i32 0, !dbg !85 - call void @llvm.lifetime.start(i64 24, i8* %1), !dbg !85 + call void @llvm.lifetime.start.p0i8(i64 24, i8* %1), !dbg !85 %2 = load i64, i64* @a, align 8, !dbg !87, !tbaa !49 %call.i.i5 = invoke noalias i8* @_Znwm(i64 %2) #5 to label %call.i.i.noexc unwind label %lpad, !dbg !88 @@ -121,7 +121,7 @@ to label %invoke.cont unwind label %lpad, !dbg !92 invoke.cont: ; preds = %call.i.i.noexc - call void @llvm.lifetime.end(i64 24, i8* %1), !dbg !93 + call void @llvm.lifetime.end.p0i8(i64 24, i8* %1), !dbg !93 call void @llvm.dbg.value(metadata %struct.B* %d, i64 0, metadata !39, metadata !79), !dbg !82 %call1 = call %struct.B* @_ZN1BD1Ev(%struct.B* %d) #3, !dbg !94 ret void, !dbg !94 @@ -145,10 +145,10 @@ declare void @llvm.dbg.value(metadata, i64, metadata, metadata) #1 ; Function Attrs: nounwind -declare void @llvm.lifetime.start(i64, i8* nocapture) #3 +declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) #3 ; Function Attrs: nounwind -declare void @llvm.lifetime.end(i64, i8* nocapture) #3 +declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) #3 attributes #1 = { nounwind readnone } attributes #2 = { nobuiltin } Index: test/DebugInfo/X86/debug-ranges-offset.ll =================================================================== --- test/DebugInfo/X86/debug-ranges-offset.ll +++ test/DebugInfo/X86/debug-ranges-offset.ll @@ -90,7 +90,7 @@ %2 = inttoptr i64 %1 to i64*, !dbg !30 store i64 -1, i64* %2, align 8, !dbg !30 %p.i.0..sroa_cast = bitcast i32** %p.i to i8*, !dbg !30 - call void @llvm.lifetime.start(i64 8, i8* %p.i.0..sroa_cast), !dbg !30 + call void @llvm.lifetime.start.p0i8(i64 8, i8* %p.i.0..sroa_cast), !dbg !30 store i64 0, i64* getelementptr inbounds ([1000 x i64], [1000 x i64]* @__msan_param_tls, i64 0, i64 0), align 8, !dbg !30 store i64 0, i64* getelementptr inbounds ([8 x i64], [8 x i64]* @__msan_retval_tls, i64 0, i64 0), align 8, !dbg !30 %call.i = call i8* @_Znwm(i64 4) #4, !dbg !30 @@ -140,7 +140,7 @@ br label %_Z1fv.exit, !dbg !34 _Z1fv.exit: ; preds = %16, %if.then.i - call void @llvm.lifetime.end(i64 8, i8* %p.i.0..sroa_cast), !dbg !35 + call void @llvm.lifetime.end.p0i8(i64 8, i8* %p.i.0..sroa_cast), !dbg !35 store i32 0, i32* bitcast ([8 x i64]* @__msan_retval_tls to i32*), align 8, !dbg !36 ret i32 0, !dbg !36 } @@ -154,10 +154,10 @@ declare i32 @puts(i8* nocapture readonly) #3 ; Function Attrs: nounwind -declare void @llvm.lifetime.start(i64, i8* nocapture) #3 +declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) #3 ; Function Attrs: nounwind -declare void @llvm.lifetime.end(i64, i8* nocapture) #3 +declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) #3 declare void @__msan_warning_noreturn() Index: test/DebugInfo/X86/nodebug_with_debug_loc.ll =================================================================== --- test/DebugInfo/X86/nodebug_with_debug_loc.ll +++ test/DebugInfo/X86/nodebug_with_debug_loc.ll @@ -57,12 +57,12 @@ for.body: ; preds = %for.body, %entry %iter.02 = phi i32 [ 0, %entry ], [ %inc, %for.body ] - call void @llvm.lifetime.start(i64 4, i8* %0), !dbg !26 + call void @llvm.lifetime.start.p0i8(i64 4, i8* %0), !dbg !26 call void @llvm.dbg.value(metadata %struct.string* %str2.i, i64 0, metadata !16, metadata !DIExpression()) #3, !dbg !26 call void @llvm.dbg.value(metadata %struct.string* %str2.i, i64 0, metadata !27, metadata !DIExpression()) #3, !dbg !29 call void @_Z4sinkPKv(i8* undef) #3, !dbg !29 call void @_Z4sinkPKv(i8* %0) #3, !dbg !30 - call void @llvm.lifetime.end(i64 4, i8* %0), !dbg !31 + call void @llvm.lifetime.end.p0i8(i64 4, i8* %0), !dbg !31 %2 = load i32*, i32** %mem, align 4, !tbaa !32 %3 = bitcast i32* %2 to i8* call void @_Z4sinkPKv(i8* %3) #3 @@ -83,10 +83,10 @@ declare void @llvm.dbg.value(metadata, i64, metadata, metadata) #2 ; Function Attrs: nounwind -declare void @llvm.lifetime.start(i64, i8* nocapture) #3 +declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) #3 ; Function Attrs: nounwind -declare void @llvm.lifetime.end(i64, i8* nocapture) #3 +declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) #3 attributes #0 = { nounwind "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "no-realign-stack" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" } attributes #1 = { "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "no-realign-stack" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" } Index: test/DebugInfo/cross-cu-inlining.ll =================================================================== --- test/DebugInfo/cross-cu-inlining.ll +++ test/DebugInfo/cross-cu-inlining.ll @@ -73,13 +73,13 @@ store i32 0, i32* %retval %0 = load i32, i32* @i, align 4, !dbg !19 %1 = bitcast i32* %x.addr.i to i8* - call void @llvm.lifetime.start(i64 4, i8* %1) + call void @llvm.lifetime.start.p0i8(i64 4, i8* %1) store i32 %0, i32* %x.addr.i, align 4 call void @llvm.dbg.declare(metadata i32* %x.addr.i, metadata !120, metadata !DIExpression()), !dbg !21 %2 = load i32, i32* %x.addr.i, align 4, !dbg !22 %mul.i = mul nsw i32 %2, 2, !dbg !22 %3 = bitcast i32* %x.addr.i to i8*, !dbg !22 - call void @llvm.lifetime.end(i64 4, i8* %3), !dbg !22 + call void @llvm.lifetime.end.p0i8(i64 4, i8* %3), !dbg !22 ret i32 %mul.i, !dbg !19 } @@ -98,10 +98,10 @@ declare void @llvm.dbg.declare(metadata, metadata, metadata) #2 ; Function Attrs: nounwind -declare void @llvm.lifetime.start(i64, i8* nocapture) #3 +declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) #3 ; Function Attrs: nounwind -declare void @llvm.lifetime.end(i64, i8* nocapture) #3 +declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) #3 attributes #0 = { 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" } attributes #1 = { alwaysinline nounwind 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" } Index: test/Feature/memorymarkers.ll =================================================================== --- test/Feature/memorymarkers.ll +++ test/Feature/memorymarkers.ll @@ -4,10 +4,10 @@ declare void @_Z3barRKi(i32*) -declare void @llvm.lifetime.start(i64, i8* nocapture) nounwind -declare void @llvm.lifetime.end(i64, i8* nocapture) nounwind -declare {}* @llvm.invariant.start(i64, i8* nocapture) readonly nounwind -declare void @llvm.invariant.end({}*, i64, i8* nocapture) nounwind +declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) nounwind +declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) nounwind +declare {}* @llvm.invariant.start.p0i8(i64, i8* nocapture) readonly nounwind +declare void @llvm.invariant.end.p0i8({}*, i64, i8* nocapture) nounwind define i32 @_Z4foo2v() nounwind { entry: @@ -16,7 +16,7 @@ ;; Constructor starts here (this isn't needed since it is immediately ;; preceded by an alloca, but shown for completeness). - call void @llvm.lifetime.start(i64 8, i8* %y) + call void @llvm.lifetime.start.p0i8(i64 8, i8* %y) %0 = getelementptr %"struct.std::pair", %"struct.std::pair"* %x, i32 0, i32 0 store i32 4, i32* %0, align 8 @@ -24,13 +24,13 @@ store i32 5, i32* %1, align 4 ;; Constructor has finished here. - %inv = call {}* @llvm.invariant.start(i64 8, i8* %y) + %inv = call {}* @llvm.invariant.start.p0i8(i64 8, i8* %y) call void @_Z3barRKi(i32* %0) nounwind %2 = load i32, i32* %0, align 8 ;; Destructor is run here. - call void @llvm.invariant.end({}* %inv, i64 8, i8* %y) + call void @llvm.invariant.end.p0i8({}* %inv, i64 8, i8* %y) ;; Destructor is done here. - call void @llvm.lifetime.end(i64 8, i8* %y) + call void @llvm.lifetime.end.p0i8(i64 8, i8* %y) ret i32 %2 } Index: test/Feature/memorymarkers_addrspace.ll =================================================================== --- /dev/null +++ test/Feature/memorymarkers_addrspace.ll @@ -0,0 +1,38 @@ +; RUN: llvm-as -disable-output < %s + +%"struct.std::pair" = type { i32, i32 } + +declare void @_Z3barRKi(i32 addrspace(5)*) + +declare void @llvm.lifetime.start.p5i8(i64, i8 addrspace(5)* nocapture) nounwind +declare void @llvm.lifetime.end.p5i8(i64, i8 addrspace(5)* nocapture) nounwind +declare {}* @llvm.invariant.start.p5i8(i64, i8 addrspace(5)* nocapture) readonly nounwind +declare void @llvm.invariant.end.p5i8({}*, i64, i8 addrspace(5)* nocapture) nounwind + +declare %"struct.std::pair" addrspace(5)* @allocpair5() nounwind + +define i32 @_Z4foo2v() nounwind { +entry: + %x = call %"struct.std::pair" addrspace(5)* @allocpair5() + %y = bitcast %"struct.std::pair" addrspace(5)* %x to i8 addrspace(5)* + + ;; Constructor starts here (this isn't needed since it is immediately + ;; preceded by an alloca, but shown for completeness). + call void @llvm.lifetime.start.p5i8(i64 8, i8 addrspace(5)* %y) + + %0 = getelementptr %"struct.std::pair", %"struct.std::pair" addrspace(5)* %x, i32 0, i32 0 + store i32 4, i32 addrspace(5)* %0, align 8 + %1 = getelementptr %"struct.std::pair", %"struct.std::pair" addrspace(5)* %x, i32 0, i32 1 + store i32 5, i32 addrspace(5)* %1, align 4 + + ;; Constructor has finished here. + %inv = call {}* @llvm.invariant.start.p5i8(i64 8, i8 addrspace(5)* %y) + call void @_Z3barRKi(i32 addrspace(5)* %0) nounwind + %2 = load i32, i32 addrspace(5)* %0, align 8 + + ;; Destructor is run here. + call void @llvm.invariant.end.p5i8({}* %inv, i64 8, i8 addrspace(5)* %y) + ;; Destructor is done here. + call void @llvm.lifetime.end.p5i8(i64 8, i8 addrspace(5)* %y) + ret i32 %2 +} Index: test/Instrumentation/AddressSanitizer/lifetime-uar.ll =================================================================== --- test/Instrumentation/AddressSanitizer/lifetime-uar.ll +++ test/Instrumentation/AddressSanitizer/lifetime-uar.ll @@ -3,8 +3,8 @@ 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" -declare void @llvm.lifetime.start(i64, i8* nocapture) nounwind -declare void @llvm.lifetime.end(i64, i8* nocapture) nounwind +declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) nounwind +declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) nounwind define i32 @basic_test() sanitize_address { ; CHECK-LABEL: define i32 @basic_test() @@ -13,15 +13,15 @@ %retval = alloca i32, align 4 %c = alloca i8, align 1 - call void @llvm.lifetime.start(i64 1, i8* %c) - ; Memory is unpoisoned at llvm.lifetime.start + call void @llvm.lifetime.start.p0i8(i64 1, i8* %c) + ; Memory is unpoisoned at llvm.lifetime.start.p0i8 ; CHECK: call void @__asan_unpoison_stack_memory(i64 %{{[^ ]+}}, i64 1) store volatile i32 0, i32* %retval store volatile i8 0, i8* %c, align 1 - call void @llvm.lifetime.end(i64 1, i8* %c) - ; Memory is poisoned at llvm.lifetime.end + call void @llvm.lifetime.end.p0i8(i64 1, i8* %c) + ; Memory is poisoned at llvm.lifetime.end.p0i8 ; CHECK: call void @__asan_poison_stack_memory(i64 %{{[^ ]+}}, i64 1) ; No need to unpoison memory at function exit in UAR mode. Index: test/Instrumentation/AddressSanitizer/lifetime.ll =================================================================== --- test/Instrumentation/AddressSanitizer/lifetime.ll +++ test/Instrumentation/AddressSanitizer/lifetime.ll @@ -4,16 +4,16 @@ 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" target triple = "x86_64-unknown-linux-gnu" -declare void @llvm.lifetime.start(i64, i8* nocapture) nounwind -declare void @llvm.lifetime.end(i64, i8* nocapture) nounwind +declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) nounwind +declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) nounwind define void @lifetime_no_size() sanitize_address { entry: %i = alloca i32, align 4 %i.ptr = bitcast i32* %i to i8* - call void @llvm.lifetime.start(i64 -1, i8* %i.ptr) + call void @llvm.lifetime.start.p0i8(i64 -1, i8* %i.ptr) store volatile i8 0, i8* %i.ptr - call void @llvm.lifetime.end(i64 -1, i8* %i.ptr) + call void @llvm.lifetime.end.p0i8(i64 -1, i8* %i.ptr) ; Check that lifetime with no size are ignored. ; CHECK-LABEL: define void @lifetime_no_size() @@ -30,31 +30,31 @@ ; Regular variable lifetime intrinsics. %i = alloca i32, align 4 %i.ptr = bitcast i32* %i to i8* - call void @llvm.lifetime.start(i64 3, i8* %i.ptr) + call void @llvm.lifetime.start.p0i8(i64 3, i8* %i.ptr) store volatile i8 0, i8* %i.ptr - ; Memory is unpoisoned at llvm.lifetime.start + ; Memory is unpoisoned at llvm.lifetime.start.p0i8 ; CHECK: %[[VAR:[^ ]*]] = ptrtoint i32* %{{[^ ]+}} to i64 ; CHECK-NEXT: call void @__asan_unpoison_stack_memory(i64 %[[VAR]], i64 3) - call void @llvm.lifetime.end(i64 4, i8* %i.ptr) - call void @llvm.lifetime.end(i64 2, i8* %i.ptr) - ; Memory is poisoned at every call to llvm.lifetime.end + call void @llvm.lifetime.end.p0i8(i64 4, i8* %i.ptr) + call void @llvm.lifetime.end.p0i8(i64 2, i8* %i.ptr) + ; Memory is poisoned at every call to llvm.lifetime.end.p0i8 ; CHECK: call void @__asan_poison_stack_memory(i64 %{{[^ ]+}}, i64 4) ; CHECK: call void @__asan_poison_stack_memory(i64 %{{[^ ]+}}, i64 2) ; Lifetime intrinsics for array. %arr = alloca [10 x i32], align 16 %arr.ptr = bitcast [10 x i32]* %arr to i8* - call void @llvm.lifetime.start(i64 40, i8* %arr.ptr) + call void @llvm.lifetime.start.p0i8(i64 40, i8* %arr.ptr) store volatile i8 0, i8* %arr.ptr ; CHECK: call void @__asan_unpoison_stack_memory(i64 %{{[^ ]+}}, i64 40) - call void @llvm.lifetime.end(i64 40, i8* %arr.ptr) + call void @llvm.lifetime.end.p0i8(i64 40, i8* %arr.ptr) ; CHECK: call void @__asan_poison_stack_memory(i64 %{{[^ ]+}}, i64 40) ; One more lifetime start/end for the same variable %i. - call void @llvm.lifetime.start(i64 4, i8* %i.ptr) + call void @llvm.lifetime.start.p0i8(i64 4, i8* %i.ptr) store volatile i8 0, i8* %i.ptr ; CHECK: call void @__asan_unpoison_stack_memory(i64 %{{[^ ]+}}, i64 4) - call void @llvm.lifetime.end(i64 4, i8* %i.ptr) + call void @llvm.lifetime.end.p0i8(i64 4, i8* %i.ptr) ; CHECK: call void @__asan_poison_stack_memory(i64 %{{[^ ]+}}, i64 4) ; Memory is unpoisoned at function exit (only once). @@ -71,7 +71,7 @@ entry: %i = alloca i64, align 4 %i.ptr = bitcast i64* %i to i8* - call void @llvm.lifetime.start(i64 8, i8* %i.ptr) + call void @llvm.lifetime.start.p0i8(i64 8, i8* %i.ptr) store volatile i8 0, i8* %i.ptr ; CHECK: __asan_unpoison_stack_memory br i1 %x, label %bb0, label %bb1 @@ -82,7 +82,7 @@ bb1: %i.phi = phi i8* [ %i.ptr, %entry ], [ %i.ptr2, %bb0 ] - call void @llvm.lifetime.end(i64 8, i8* %i.phi) + call void @llvm.lifetime.end.p0i8(i64 8, i8* %i.phi) ; CHECK: __asan_poison_stack_memory ; CHECK: ret void ret void Index: test/Transforms/BBVectorize/X86/wr-aliases.ll =================================================================== --- test/Transforms/BBVectorize/X86/wr-aliases.ll +++ test/Transforms/BBVectorize/X86/wr-aliases.ll @@ -11,10 +11,10 @@ declare fastcc void @_ZL12printQBezier7QBezier(%class.QBezier.15* byval nocapture readonly align 8) #1 ; Function Attrs: nounwind -declare void @llvm.lifetime.start(i64, i8* nocapture) #0 +declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) #0 ; Function Attrs: nounwind -declare void @llvm.lifetime.end(i64, i8* nocapture) #0 +declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) #0 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) { newFuncRoot: @@ -49,11 +49,11 @@ store double 8.000000e+01, double* %ref.tmp.sroa.8.0.idx7, align 8 %add.ptr = getelementptr inbounds [10 x %class.QBezier.15], [10 x %class.QBezier.15]* %beziers, i64 0, i64 1 %v0 = bitcast %class.QBezier.15* %agg.tmp.i to i8* - call void @llvm.lifetime.start(i64 64, i8* %v0) + call void @llvm.lifetime.start.p0i8(i64 64, i8* %v0) %v1 = bitcast %class.QBezier.15* %agg.tmp55.i to i8* - call void @llvm.lifetime.start(i64 64, i8* %v1) + call void @llvm.lifetime.start.p0i8(i64 64, i8* %v1) %v2 = bitcast %class.QBezier.15* %agg.tmp56.i to i8* - call void @llvm.lifetime.start(i64 64, i8* %v2) + call void @llvm.lifetime.start.p0i8(i64 64, i8* %v2) %v3 = bitcast [10 x %class.QBezier.15]* %beziers to i8* call void @llvm.memcpy.p0i8.p0i8.i64(i8* %v0, i8* %v3, i64 64, i32 8, i1 false) call fastcc void @_ZL12printQBezier7QBezier(%class.QBezier.15* byval align 8 %agg.tmp.i) @@ -134,9 +134,9 @@ call fastcc void @_ZL12printQBezier7QBezier(%class.QBezier.15* byval align 8 %agg.tmp55.i) call void @llvm.memcpy.p0i8.p0i8.i64(i8* %v2, i8* %v3, i64 64, i32 8, i1 false) call fastcc void @_ZL12printQBezier7QBezier(%class.QBezier.15* byval align 8 %agg.tmp56.i) - call void @llvm.lifetime.end(i64 64, i8* %v0) - call void @llvm.lifetime.end(i64 64, i8* %v1) - call void @llvm.lifetime.end(i64 64, i8* %v2) + call void @llvm.lifetime.end.p0i8(i64 64, i8* %v0) + call void @llvm.lifetime.end.p0i8(i64 64, i8* %v1) + call void @llvm.lifetime.end.p0i8(i64 64, i8* %v2) br label %arrayctor.cont.ret.exitStub } Index: test/Transforms/DeadStoreElimination/dominate.ll =================================================================== --- test/Transforms/DeadStoreElimination/dominate.ll +++ test/Transforms/DeadStoreElimination/dominate.ll @@ -9,12 +9,12 @@ br label %bb3 bb2: - call void @llvm.lifetime.end(i64 -1, i8* %0) + call void @llvm.lifetime.end.p0i8(i64 -1, i8* %0) br label %bb3 bb3: call void @bar() - call void @llvm.lifetime.end(i64 -1, i8* %0) + call void @llvm.lifetime.end.p0i8(i64 -1, i8* %0) br label %bb4 bb4: @@ -22,4 +22,4 @@ } -declare void @llvm.lifetime.end(i64, i8* nocapture) nounwind +declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) nounwind Index: test/Transforms/DeadStoreElimination/lifetime.ll =================================================================== --- test/Transforms/DeadStoreElimination/lifetime.ll +++ test/Transforms/DeadStoreElimination/lifetime.ll @@ -2,8 +2,8 @@ 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" -declare void @llvm.lifetime.start(i64, i8* nocapture) nounwind -declare void @llvm.lifetime.end(i64, i8* nocapture) nounwind +declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) nounwind +declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) nounwind declare void @llvm.memset.p0i8.i8(i8* nocapture, i8, i8, i32, i1) nounwind define void @test1() { @@ -11,7 +11,7 @@ %A = alloca i8 store i8 0, i8* %A ;; Written to by memset - call void @llvm.lifetime.end(i64 1, i8* %A) + call void @llvm.lifetime.end.p0i8(i64 1, i8* %A) ; CHECK: lifetime.end call void @llvm.memset.p0i8.i8(i8* %A, i8 0, i8 -1, i32 0, i1 false) @@ -25,11 +25,11 @@ ; CHECK: test2 %Q = getelementptr i32, i32* %P, i32 1 %R = bitcast i32* %Q to i8* - call void @llvm.lifetime.start(i64 4, i8* %R) + call void @llvm.lifetime.start.p0i8(i64 4, i8* %R) ; CHECK: lifetime.start store i32 0, i32* %Q ;; This store is dead. ; CHECK-NOT: store - call void @llvm.lifetime.end(i64 4, i8* %R) + call void @llvm.lifetime.end.p0i8(i64 4, i8* %R) ; CHECK: lifetime.end ret void } Index: test/Transforms/GVN/cond_br2.ll =================================================================== --- test/Transforms/GVN/cond_br2.ll +++ test/Transforms/GVN/cond_br2.ll @@ -18,7 +18,7 @@ entry: %sv = alloca %"class.llvm::SmallVector", align 16 %0 = bitcast %"class.llvm::SmallVector"* %sv to i8* - call void @llvm.lifetime.start(i64 64, i8* %0) #1 + call void @llvm.lifetime.start.p0i8(i64 64, i8* %0) #1 %BeginX.i.i.i.i.i.i = getelementptr inbounds %"class.llvm::SmallVector", %"class.llvm::SmallVector"* %sv, i64 0, i32 0, i32 0, i32 0, i32 0, i32 0 %FirstEl.i.i.i.i.i.i = getelementptr inbounds %"class.llvm::SmallVector", %"class.llvm::SmallVector"* %sv, i64 0, i32 0, i32 0, i32 0, i32 0, i32 3 %1 = bitcast %"union.llvm::SmallVectorBase::U"* %FirstEl.i.i.i.i.i.i to i8* @@ -94,7 +94,7 @@ br label %_ZN4llvm11SmallVectorIiLj8EED1Ev.exit21 _ZN4llvm11SmallVectorIiLj8EED1Ev.exit21: ; preds = %invoke.cont3, %if.then.i.i.i20 - call void @llvm.lifetime.end(i64 64, i8* %0) #1 + call void @llvm.lifetime.end.p0i8(i64 64, i8* %0) #1 ret void lpad: ; preds = %if.end.i14, %if.end.i, %invoke.cont2 @@ -113,14 +113,14 @@ } ; Function Attrs: nounwind -declare void @llvm.lifetime.start(i64, i8* nocapture) #1 +declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) #1 declare i32 @__gxx_personality_v0(...) declare void @_Z1gRN4llvm11SmallVectorIiLj8EEE(%"class.llvm::SmallVector"*) #2 ; Function Attrs: nounwind -declare void @llvm.lifetime.end(i64, i8* nocapture) #1 +declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) #1 declare void @_ZN4llvm15SmallVectorBase8grow_podEmm(%"class.llvm::SmallVectorBase"*, i64, i64) #2 Index: test/Transforms/GVN/lifetime-simple.ll =================================================================== --- test/Transforms/GVN/lifetime-simple.ll +++ test/Transforms/GVN/lifetime-simple.ll @@ -8,13 +8,13 @@ ; CHECK-NOT: load ; CHECK: lifetime.end entry: - call void @llvm.lifetime.start(i64 32, i8* %P) + call void @llvm.lifetime.start.p0i8(i64 32, i8* %P) %0 = load i8, i8* %P store i8 1, i8* %P - call void @llvm.lifetime.end(i64 32, i8* %P) + call void @llvm.lifetime.end.p0i8(i64 32, i8* %P) %1 = load i8, i8* %P ret i8 %1 } -declare void @llvm.lifetime.start(i64 %S, i8* nocapture %P) readonly -declare void @llvm.lifetime.end(i64 %S, i8* nocapture %P) +declare void @llvm.lifetime.start.p0i8(i64 %S, i8* nocapture %P) readonly +declare void @llvm.lifetime.end.p0i8(i64 %S, i8* nocapture %P) Index: test/Transforms/GlobalOpt/invariant-nodatalayout.ll =================================================================== --- test/Transforms/GlobalOpt/invariant-nodatalayout.ll +++ test/Transforms/GlobalOpt/invariant-nodatalayout.ll @@ -1,14 +1,14 @@ ; RUN: opt -globalopt -S -o - < %s | FileCheck %s ; The check here is that it doesn't crash. -declare {}* @llvm.invariant.start(i64 %size, i8* nocapture %ptr) +declare {}* @llvm.invariant.start.p0i8(i64 %size, i8* nocapture %ptr) @object1 = global { i32, i32 } zeroinitializer ; CHECK: @object1 = global { i32, i32 } zeroinitializer define void @ctor1() { %ptr = bitcast {i32, i32}* @object1 to i8* - call {}* @llvm.invariant.start(i64 4, i8* %ptr) + call {}* @llvm.invariant.start.p0i8(i64 4, i8* %ptr) ret void } Index: test/Transforms/GlobalOpt/invariant.ll =================================================================== --- test/Transforms/GlobalOpt/invariant.ll +++ test/Transforms/GlobalOpt/invariant.ll @@ -3,10 +3,10 @@ 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" target triple = "x86_64-unknown-linux-gnu" -declare {}* @llvm.invariant.start(i64 %size, i8* nocapture %ptr) +declare {}* @llvm.invariant.start.p0i8(i64 %size, i8* nocapture %ptr) define void @test1(i8* %ptr) { - call {}* @llvm.invariant.start(i64 4, i8* %ptr) + call {}* @llvm.invariant.start.p0i8(i64 4, i8* %ptr) ret void } @@ -25,7 +25,7 @@ define void @ctor2() { store i32 -1, i32* @object2 %A = bitcast i32* @object2 to i8* - %B = call {}* @llvm.invariant.start(i64 4, i8* %A) + %B = call {}* @llvm.invariant.start.p0i8(i64 4, i8* %A) %C = bitcast {}* %B to i8* ret void } @@ -36,7 +36,7 @@ define void @ctor3() { store i32 -1, i32* @object3 %A = bitcast i32* @object3 to i8* - call {}* @llvm.invariant.start(i64 3, i8* %A) + call {}* @llvm.invariant.start.p0i8(i64 3, i8* %A) ret void } @@ -46,7 +46,7 @@ define void @ctor4() { store i32 -1, i32* @object4 %A = bitcast i32* @object4 to i8* - call {}* @llvm.invariant.start(i64 -1, i8* %A) + call {}* @llvm.invariant.start.p0i8(i64 -1, i8* %A) ret void } Index: test/Transforms/Inline/alloca-bonus.ll =================================================================== --- test/Transforms/Inline/alloca-bonus.ll +++ test/Transforms/Inline/alloca-bonus.ll @@ -2,7 +2,7 @@ target datalayout = "p:32:32" -declare void @llvm.lifetime.start(i64 %size, i8* nocapture %ptr) +declare void @llvm.lifetime.start.p0i8(i64 %size, i8* nocapture %ptr) @glbl = external global i32 @@ -21,7 +21,7 @@ %D = getelementptr inbounds i32, i32* %ptr, i32 1 %E = bitcast i32* %ptr to i8* %F = select i1 false, i32* %ptr, i32* @glbl - call void @llvm.lifetime.start(i64 0, i8* %E) + call void @llvm.lifetime.start.p0i8(i64 0, i8* %E) ret void } @@ -41,7 +41,7 @@ %D = getelementptr inbounds i32, i32* %ptr, i32 %A %E = bitcast i32* %ptr to i8* %F = select i1 false, i32* %ptr, i32* @glbl - call void @llvm.lifetime.start(i64 0, i8* %E) + call void @llvm.lifetime.start.p0i8(i64 0, i8* %E) ret void } @@ -146,7 +146,7 @@ %D = getelementptr inbounds i32, i32* %ptr, i32 %A %E = bitcast i32* %ptr to i8* %F = select i1 false, i32* %ptr, i32* @glbl - call void @llvm.lifetime.start(i64 0, i8* %E) + call void @llvm.lifetime.start.p0i8(i64 0, i8* %E) ret void exit: Index: test/Transforms/Inline/byval-tail-call.ll =================================================================== --- test/Transforms/Inline/byval-tail-call.ll +++ test/Transforms/Inline/byval-tail-call.ll @@ -16,7 +16,7 @@ define void @foo(i32* %x) { ; CHECK-LABEL: define void @foo( -; CHECK: llvm.lifetime.start +; CHECK: llvm.lifetime.start.p0i8 ; CHECK: store i32 %2, i32* %x call void @bar(i32* byval %x) ret void Index: test/Transforms/Inline/byval_lifetime.ll =================================================================== --- test/Transforms/Inline/byval_lifetime.ll +++ test/Transforms/Inline/byval_lifetime.ll @@ -18,7 +18,7 @@ define i32 @main(i32 %argc, i8** %argv) { ; CHECK-LABEL: @main -; CHECK: llvm.lifetime.start +; CHECK: llvm.lifetime.start.p0i8 ; CHECK: memcpy entry: %call = call i32 @foo(%struct.foo* byval align 8 @gFoo, i32 %argc) Index: test/Transforms/Inline/crash-lifetime-marker.ll =================================================================== --- test/Transforms/Inline/crash-lifetime-marker.ll +++ test/Transforms/Inline/crash-lifetime-marker.ll @@ -14,9 +14,9 @@ ; CHECK-LABEL: define i32 @caller1( ; CHECK: [[ALLOCA:%[a-z0-9\.]+]] = alloca i8 -; CHECK-NOT: call void @llvm.lifetime.start( +; CHECK-NOT: call void @llvm.lifetime.start.p0i8( ; CHECK: call i32 @callee2(i8* [[ALLOCA]]) -; CHECK-NOT: call void @llvm.lifetime.end( +; CHECK-NOT: call void @llvm.lifetime.end.p0i8( define i32 @caller1(i32 %count) { %call0 = call i32 @callee1(i32 0) Index: test/Transforms/Inline/lifetime-no-datalayout.ll =================================================================== --- test/Transforms/Inline/lifetime-no-datalayout.ll +++ test/Transforms/Inline/lifetime-no-datalayout.ll @@ -12,9 +12,9 @@ define void @test() { ; CHECK-LABEL: @test( ; CHECK-NOT: lifetime -; CHECK: llvm.lifetime.start(i64 1 +; CHECK: llvm.lifetime.start.p0i8(i64 1 ; CHECK-NOT: lifetime -; CHECK: llvm.lifetime.end(i64 1 +; CHECK: llvm.lifetime.end.p0i8(i64 1 call void @helper() ; CHECK-NOT: lifetime ; CHECK: ret void Index: test/Transforms/Inline/lifetime.ll =================================================================== --- test/Transforms/Inline/lifetime.ll +++ test/Transforms/Inline/lifetime.ll @@ -1,25 +1,25 @@ ; RUN: opt -inline -S < %s | FileCheck %s 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" -declare void @llvm.lifetime.start(i64, i8*) -declare void @llvm.lifetime.end(i64, i8*) +declare void @llvm.lifetime.start.p0i8(i64, i8*) +declare void @llvm.lifetime.end.p0i8(i64, i8*) define void @helper_both_markers() { %a = alloca i8 - ; Size in llvm.lifetime.start / llvm.lifetime.end differs from + ; Size in llvm.lifetime.start.p0i8 / llvm.lifetime.end.p0i8 differs from ; allocation size. We should use the former. - call void @llvm.lifetime.start(i64 2, i8* %a) - call void @llvm.lifetime.end(i64 2, i8* %a) + call void @llvm.lifetime.start.p0i8(i64 2, i8* %a) + call void @llvm.lifetime.end.p0i8(i64 2, i8* %a) ret void } define void @test_both_markers() { ; CHECK-LABEL: @test_both_markers( -; CHECK: llvm.lifetime.start(i64 2 -; CHECK-NEXT: llvm.lifetime.end(i64 2 +; CHECK: llvm.lifetime.start.p0i8(i64 2 +; CHECK-NEXT: llvm.lifetime.end.p0i8(i64 2 call void @helper_both_markers() -; CHECK-NEXT: llvm.lifetime.start(i64 2 -; CHECK-NEXT: llvm.lifetime.end(i64 2 +; CHECK-NEXT: llvm.lifetime.start.p0i8(i64 2 +; CHECK-NEXT: llvm.lifetime.end.p0i8(i64 2 call void @helper_both_markers() ; CHECK-NEXT: ret void ret void @@ -40,14 +40,14 @@ define void @test_no_marker() { ; CHECK-LABEL: @test_no_marker( ; CHECK-NOT: lifetime -; CHECK: llvm.lifetime.start(i64 1 +; CHECK: llvm.lifetime.start.p0i8(i64 1 ; CHECK-NOT: lifetime -; CHECK: llvm.lifetime.end(i64 1 +; CHECK: llvm.lifetime.end.p0i8(i64 1 call void @helper_no_markers() ; CHECK-NOT: lifetime -; CHECK: llvm.lifetime.start(i64 1 +; CHECK: llvm.lifetime.start.p0i8(i64 1 ; CHECK-NOT: lifetime -; CHECK: llvm.lifetime.end(i64 1 +; CHECK: llvm.lifetime.end.p0i8(i64 1 call void @helper_no_markers() ; CHECK-NOT: lifetime ; CHECK: ret void @@ -57,23 +57,23 @@ define void @helper_two_casts() { %a = alloca i32 %b = bitcast i32* %a to i8* - call void @llvm.lifetime.start(i64 4, i8* %b) + call void @llvm.lifetime.start.p0i8(i64 4, i8* %b) %c = bitcast i32* %a to i8* - call void @llvm.lifetime.end(i64 4, i8* %c) + call void @llvm.lifetime.end.p0i8(i64 4, i8* %c) ret void } define void @test_two_casts() { ; CHECK-LABEL: @test_two_casts( ; CHECK-NOT: lifetime -; CHECK: llvm.lifetime.start(i64 4 +; CHECK: llvm.lifetime.start.p0i8(i64 4 ; CHECK-NOT: lifetime -; CHECK: llvm.lifetime.end(i64 4 +; CHECK: llvm.lifetime.end.p0i8(i64 4 call void @helper_two_casts() ; CHECK-NOT: lifetime -; CHECK: llvm.lifetime.start(i64 4 +; CHECK: llvm.lifetime.start.p0i8(i64 4 ; CHECK-NOT: lifetime -; CHECK: llvm.lifetime.end(i64 4 +; CHECK: llvm.lifetime.end.p0i8(i64 4 call void @helper_two_casts() ; CHECK-NOT: lifetime ; CHECK: ret void @@ -90,9 +90,9 @@ define void @test_arrays_alloca() { ; CHECK-LABEL: @test_arrays_alloca( ; CHECK-NOT: lifetime -; CHECK: llvm.lifetime.start(i64 40, +; CHECK: llvm.lifetime.start.p0i8(i64 40, ; CHECK-NOT: lifetime -; CHECK: llvm.lifetime.end(i64 40, +; CHECK: llvm.lifetime.end.p0i8(i64 40, call void @helper_arrays_alloca() ; CHECK-NOT: lifetime ; CHECK: ret void Index: test/Transforms/InstCombine/deadcode.ll =================================================================== --- test/Transforms/InstCombine/deadcode.ll +++ test/Transforms/InstCombine/deadcode.ll @@ -22,12 +22,12 @@ declare i8* @llvm.stacksave() -declare void @llvm.lifetime.start(i64, i8*) -declare void @llvm.lifetime.end(i64, i8*) +declare void @llvm.lifetime.start.p0i8(i64, i8*) +declare void @llvm.lifetime.end.p0i8(i64, i8*) define void @test3() { - call void @llvm.lifetime.start(i64 -1, i8* undef) - call void @llvm.lifetime.end(i64 -1, i8* undef) + call void @llvm.lifetime.start.p0i8(i64 -1, i8* undef) + call void @llvm.lifetime.end.p0i8(i64 -1, i8* undef) ret void } Index: test/Transforms/InstCombine/invariant.ll =================================================================== --- test/Transforms/InstCombine/invariant.ll +++ test/Transforms/InstCombine/invariant.ll @@ -1,15 +1,15 @@ -; Test to make sure unused llvm.invariant.start calls are not trivially eliminated +; Test to make sure unused llvm.invariant.start.p0i8 calls are not trivially eliminated ; RUN: opt < %s -instcombine -S | FileCheck %s declare void @g(i8*) -declare {}* @llvm.invariant.start(i64, i8* nocapture) nounwind readonly +declare {}* @llvm.invariant.start.p0i8(i64, i8* nocapture) nounwind readonly define i8 @f() { %a = alloca i8 ; [#uses=4] store i8 0, i8* %a - %i = call {}* @llvm.invariant.start(i64 1, i8* %a) ; <{}*> [#uses=0] - ; CHECK: call {}* @llvm.invariant.start + %i = call {}* @llvm.invariant.start.p0i8(i64 1, i8* %a) ; <{}*> [#uses=0] + ; CHECK: call {}* @llvm.invariant.start.p0i8 call void @g(i8* %a) %r = load i8, i8* %a ; [#uses=1] ret i8 %r Index: test/Transforms/InstCombine/malloc-free-delete.ll =================================================================== --- test/Transforms/InstCombine/malloc-free-delete.ll +++ test/Transforms/InstCombine/malloc-free-delete.ll @@ -24,8 +24,8 @@ ret i1 %z } -declare void @llvm.lifetime.start(i64, i8*) -declare void @llvm.lifetime.end(i64, i8*) +declare void @llvm.lifetime.start.p0i8(i64, i8*) +declare void @llvm.lifetime.end.p0i8(i64, i8*) declare i64 @llvm.objectsize.i64(i8*, i1) declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32, i1) nounwind declare void @llvm.memmove.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32, i1) nounwind @@ -35,8 +35,8 @@ ; CHECK-LABEL: @test3( ; CHECK-NEXT: ret void %a = call noalias i8* @malloc(i32 10) - call void @llvm.lifetime.start(i64 10, i8* %a) - call void @llvm.lifetime.end(i64 10, i8* %a) + call void @llvm.lifetime.start.p0i8(i64 10, i8* %a) + call void @llvm.lifetime.end.p0i8(i64 10, i8* %a) %size = call i64 @llvm.objectsize.i64(i8* %a, i1 true) store i8 42, i8* %a call void @llvm.memcpy.p0i8.p0i8.i32(i8* %a, i8* %src, i32 32, i32 1, i1 false) Index: test/Transforms/InstCombine/memcpy-from-global.ll =================================================================== --- test/Transforms/InstCombine/memcpy-from-global.ll +++ test/Transforms/InstCombine/memcpy-from-global.ll @@ -126,11 +126,11 @@ ret void } -declare void @llvm.lifetime.start(i64, i8*) +declare void @llvm.lifetime.start.p0i8(i64, i8*) define void @test5() { %A = alloca %T %a = bitcast %T* %A to i8* - call void @llvm.lifetime.start(i64 -1, i8* %a) + call void @llvm.lifetime.start.p0i8(i64 -1, i8* %a) call void @llvm.memcpy.p0i8.p0i8.i64(i8* %a, i8* bitcast (%T* @G to i8*), i64 124, i32 4, i1 false) call void @baz(i8* byval %a) ; CHECK-LABEL: @test5( Index: test/Transforms/LoopVectorize/lifetime.ll =================================================================== --- test/Transforms/LoopVectorize/lifetime.ll +++ test/Transforms/LoopVectorize/lifetime.ll @@ -5,68 +5,68 @@ ; Make sure we can vectorize loops which contain lifetime markers. ; CHECK-LABEL: @test( -; CHECK: call void @llvm.lifetime.end +; CHECK: call void @llvm.lifetime.end.p0i8 ; CHECK: store <2 x i32> -; CHECK: call void @llvm.lifetime.start +; CHECK: call void @llvm.lifetime.start.p0i8 define void @test(i32 *%d) { entry: %arr = alloca [1024 x i32], align 16 %0 = bitcast [1024 x i32]* %arr to i8* - call void @llvm.lifetime.start(i64 4096, i8* %0) #1 + call void @llvm.lifetime.start.p0i8(i64 4096, i8* %0) #1 br label %for.body for.body: %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ] - call void @llvm.lifetime.end(i64 4096, i8* %0) #1 + call void @llvm.lifetime.end.p0i8(i64 4096, i8* %0) #1 %arrayidx = getelementptr inbounds i32, i32* %d, i64 %indvars.iv %1 = load i32, i32* %arrayidx, align 8 store i32 100, i32* %arrayidx, align 8 - call void @llvm.lifetime.start(i64 4096, i8* %0) #1 + call void @llvm.lifetime.start.p0i8(i64 4096, i8* %0) #1 %indvars.iv.next = add i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 %exitcond = icmp ne i32 %lftr.wideiv, 128 br i1 %exitcond, label %for.body, label %for.end for.end: - call void @llvm.lifetime.end(i64 4096, i8* %0) #1 + call void @llvm.lifetime.end.p0i8(i64 4096, i8* %0) #1 ret void } ; CHECK-LABEL: @testbitcast( -; CHECK: call void @llvm.lifetime.end +; CHECK: call void @llvm.lifetime.end.p0i8 ; CHECK: store <2 x i32> -; CHECK: call void @llvm.lifetime.start +; CHECK: call void @llvm.lifetime.start.p0i8 define void @testbitcast(i32 *%d) { entry: %arr = alloca [1024 x i32], align 16 %0 = bitcast [1024 x i32]* %arr to i8* - call void @llvm.lifetime.start(i64 4096, i8* %0) #1 + call void @llvm.lifetime.start.p0i8(i64 4096, i8* %0) #1 br label %for.body for.body: %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ] %1 = bitcast [1024 x i32]* %arr to i8* - call void @llvm.lifetime.end(i64 4096, i8* %1) #1 + call void @llvm.lifetime.end.p0i8(i64 4096, i8* %1) #1 %arrayidx = getelementptr inbounds i32, i32* %d, i64 %indvars.iv %2 = load i32, i32* %arrayidx, align 8 store i32 100, i32* %arrayidx, align 8 - call void @llvm.lifetime.start(i64 4096, i8* %1) #1 + call void @llvm.lifetime.start.p0i8(i64 4096, i8* %1) #1 %indvars.iv.next = add i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 %exitcond = icmp ne i32 %lftr.wideiv, 128 br i1 %exitcond, label %for.body, label %for.end for.end: - call void @llvm.lifetime.end(i64 4096, i8* %0) #1 + call void @llvm.lifetime.end.p0i8(i64 4096, i8* %0) #1 ret void } ; CHECK-LABEL: @testloopvariant( -; CHECK: call void @llvm.lifetime.end +; CHECK: call void @llvm.lifetime.end.p0i8 ; CHECK: store <2 x i32> -; CHECK: call void @llvm.lifetime.start +; CHECK: call void @llvm.lifetime.start.p0i8 define void @testloopvariant(i32 *%d) { entry: @@ -77,11 +77,11 @@ %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ] %0 = getelementptr [1024 x i32], [1024 x i32]* %arr, i32 0, i64 %indvars.iv %1 = bitcast [1024 x i32]* %arr to i8* - call void @llvm.lifetime.end(i64 4096, i8* %1) #1 + call void @llvm.lifetime.end.p0i8(i64 4096, i8* %1) #1 %arrayidx = getelementptr inbounds i32, i32* %d, i64 %indvars.iv %2 = load i32, i32* %arrayidx, align 8 store i32 100, i32* %arrayidx, align 8 - call void @llvm.lifetime.start(i64 4096, i8* %1) #1 + call void @llvm.lifetime.start.p0i8(i64 4096, i8* %1) #1 %indvars.iv.next = add i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 %exitcond = icmp ne i32 %lftr.wideiv, 128 @@ -91,6 +91,6 @@ ret void } -declare void @llvm.lifetime.start(i64, i8* nocapture) #1 +declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) #1 -declare void @llvm.lifetime.end(i64, i8* nocapture) #1 +declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) #1 Index: test/Transforms/Mem2Reg/ignore-lifetime.ll =================================================================== --- test/Transforms/Mem2Reg/ignore-lifetime.ll +++ test/Transforms/Mem2Reg/ignore-lifetime.ll @@ -1,16 +1,16 @@ ; RUN: opt -mem2reg -S -o - < %s | FileCheck %s -declare void @llvm.lifetime.start(i64 %size, i8* nocapture %ptr) -declare void @llvm.lifetime.end(i64 %size, i8* nocapture %ptr) +declare void @llvm.lifetime.start.p0i8(i64 %size, i8* nocapture %ptr) +declare void @llvm.lifetime.end.p0i8(i64 %size, i8* nocapture %ptr) define void @test1() { ; CHECK: test1 ; CHECK-NOT: alloca %A = alloca i32 %B = bitcast i32* %A to i8* - call void @llvm.lifetime.start(i64 2, i8* %B) + call void @llvm.lifetime.start.p0i8(i64 2, i8* %B) store i32 1, i32* %A - call void @llvm.lifetime.end(i64 2, i8* %B) + call void @llvm.lifetime.end.p0i8(i64 2, i8* %B) ret void } @@ -19,8 +19,8 @@ ; CHECK-NOT: alloca %A = alloca {i8, i16} %B = getelementptr {i8, i16}, {i8, i16}* %A, i32 0, i32 0 - call void @llvm.lifetime.start(i64 2, i8* %B) + call void @llvm.lifetime.start.p0i8(i64 2, i8* %B) store {i8, i16} zeroinitializer, {i8, i16}* %A - call void @llvm.lifetime.end(i64 2, i8* %B) + call void @llvm.lifetime.end.p0i8(i64 2, i8* %B) ret void } Index: test/Transforms/MemCpyOpt/memcpy-to-memset-with-lifetimes.ll =================================================================== --- test/Transforms/MemCpyOpt/memcpy-to-memset-with-lifetimes.ll +++ test/Transforms/MemCpyOpt/memcpy-to-memset-with-lifetimes.ll @@ -7,11 +7,11 @@ entry-block: %a = alloca [8 x i64], align 8 %a.cast = bitcast [8 x i64]* %a to i8* - call void @llvm.lifetime.start(i64 64, i8* %a.cast) + call void @llvm.lifetime.start.p0i8(i64 64, i8* %a.cast) call void @llvm.memset.p0i8.i64(i8* %a.cast, i8 0, i64 64, i32 8, i1 false) %sret.cast = bitcast [8 x i64]* %sret to i8* call void @llvm.memcpy.p0i8.p0i8.i64(i8* %sret.cast, i8* %a.cast, i64 64, i32 8, i1 false) - call void @llvm.lifetime.end(i64 64, i8* %a.cast) + call void @llvm.lifetime.end.p0i8(i64 64, i8* %a.cast) ret void ; CHECK-LABEL: @foo( @@ -25,14 +25,14 @@ entry-block: %a = alloca [8 x i64], align 8 %a.cast = bitcast [8 x i64]* %a to i8* - call void @llvm.lifetime.start(i64 64, i8* %a.cast) + call void @llvm.lifetime.start.p0i8(i64 64, i8* %a.cast) call void @llvm.memset.p0i8.i64(i8* %a.cast, i8 0, i64 64, i32 8, i1 false) %sret.cast = bitcast [8 x i64]* %sret to i8* call void @llvm.memcpy.p0i8.p0i8.i64(i8* %sret.cast, i8* %a.cast, i64 64, i32 8, i1 false) call void @llvm.memset.p0i8.i64(i8* %a.cast, i8 42, i64 32, i32 8, i1 false) %out.cast = bitcast [8 x i64]* %out to i8* call void @llvm.memcpy.p0i8.p0i8.i64(i8* %out.cast, i8* %a.cast, i64 64, i32 8, i1 false) - call void @llvm.lifetime.end(i64 64, i8* %a.cast) + call void @llvm.lifetime.end.p0i8(i64 64, i8* %a.cast) ret void ; CHECK-LABEL: @bar( @@ -48,8 +48,8 @@ ; CHECK: ret void } -declare void @llvm.lifetime.start(i64, i8* nocapture) nounwind -declare void @llvm.lifetime.end(i64, i8* nocapture) nounwind +declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) nounwind +declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) nounwind declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture, i8* nocapture readonly, i64, i32, i1) nounwind declare void @llvm.memset.p0i8.i64(i8* nocapture, i8, i64, i32, i1) nounwind Index: test/Transforms/MemCpyOpt/memcpy-undef.ll =================================================================== --- test/Transforms/MemCpyOpt/memcpy-undef.ll +++ test/Transforms/MemCpyOpt/memcpy-undef.ll @@ -22,7 +22,7 @@ } define void @test2(i8* sret noalias nocapture %out, i8* %in) nounwind noinline ssp uwtable { - call void @llvm.lifetime.start(i64 8, i8* %in) + call void @llvm.lifetime.start.p0i8(i64 8, i8* %in) call void @llvm.memcpy.p0i8.p0i8.i64(i8* %out, i8* %in, i64 8, i32 1, i1 false) ret void @@ -32,7 +32,7 @@ } define void @test3(i8* sret noalias nocapture %out, i8* %in) nounwind noinline ssp uwtable { - call void @llvm.lifetime.start(i64 4, i8* %in) + call void @llvm.lifetime.start.p0i8(i64 4, i8* %in) call void @llvm.memcpy.p0i8.p0i8.i64(i8* %out, i8* %in, i64 8, i32 1, i1 false) ret void @@ -43,4 +43,4 @@ declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture, i8* nocapture, i64, i32, i1) nounwind -declare void @llvm.lifetime.start(i64, i8* nocapture) nounwind +declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) nounwind Index: test/Transforms/SROA/basictest.ll =================================================================== --- test/Transforms/SROA/basictest.ll +++ test/Transforms/SROA/basictest.ll @@ -3,8 +3,8 @@ target datalayout = "e-p:64:64:64-p1:16:16:16-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-n8:16:32:64" -declare void @llvm.lifetime.start(i64, i8* nocapture) -declare void @llvm.lifetime.end(i64, i8* nocapture) +declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) +declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) define i32 @test0() { ; CHECK-LABEL: @test0( @@ -16,22 +16,22 @@ %a2 = alloca float %a1.i8 = bitcast i32* %a1 to i8* - call void @llvm.lifetime.start(i64 4, i8* %a1.i8) + call void @llvm.lifetime.start.p0i8(i64 4, i8* %a1.i8) store i32 0, i32* %a1 %v1 = load i32, i32* %a1 - call void @llvm.lifetime.end(i64 4, i8* %a1.i8) + call void @llvm.lifetime.end.p0i8(i64 4, i8* %a1.i8) %a2.i8 = bitcast float* %a2 to i8* - call void @llvm.lifetime.start(i64 4, i8* %a2.i8) + call void @llvm.lifetime.start.p0i8(i64 4, i8* %a2.i8) store float 0.0, float* %a2 %v2 = load float , float * %a2 %v2.int = bitcast float %v2 to i32 %sum1 = add i32 %v1, %v2.int - call void @llvm.lifetime.end(i64 4, i8* %a2.i8) + call void @llvm.lifetime.end.p0i8(i64 4, i8* %a2.i8) ret i32 %sum1 } @@ -1057,7 +1057,7 @@ entry: %X.sroa.0.i = alloca double, align 8 %0 = bitcast double* %X.sroa.0.i to i8* - call void @llvm.lifetime.start(i64 -1, i8* %0) + call void @llvm.lifetime.start.p0i8(i64 -1, i8* %0) ; Store to the low 32-bits... %X.sroa.0.0.cast2.i = bitcast double* %X.sroa.0.i to i32* @@ -1084,7 +1084,7 @@ %accum.real.i = load double, double* %d, align 8 %add.r.i = fadd double %accum.real.i, %X.sroa.0.0.load1.i store double %add.r.i, double* %d, align 8 - call void @llvm.lifetime.end(i64 -1, i8* %0) + call void @llvm.lifetime.end.p0i8(i64 -1, i8* %0) ret void } Index: test/Transforms/SROA/vector-lifetime-intrinsic.ll =================================================================== --- test/Transforms/SROA/vector-lifetime-intrinsic.ll +++ test/Transforms/SROA/vector-lifetime-intrinsic.ll @@ -3,10 +3,10 @@ target datalayout = "e-p:64:32-i64:32-v32:32-n32-S64" ; Function Attrs: nounwind -declare void @llvm.lifetime.start(i64, i8* nocapture) #0 +declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) #0 ; Function Attrs: nounwind -declare void @llvm.lifetime.end(i64, i8* nocapture) #0 +declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) #0 ; CHECK: @wombat ; CHECK-NOT: alloca @@ -15,12 +15,12 @@ bb: %tmp = alloca <4 x float>, align 16 %tmp8 = bitcast <4 x float>* %tmp to i8* - call void @llvm.lifetime.start(i64 16, i8* %tmp8) + call void @llvm.lifetime.start.p0i8(i64 16, i8* %tmp8) store <4 x float> %arg1, <4 x float>* %tmp, align 16 %tmp17 = bitcast <4 x float>* %tmp to <3 x float>* %tmp18 = load <3 x float>, <3 x float>* %tmp17 %tmp20 = bitcast <4 x float>* %tmp to i8* - call void @llvm.lifetime.end(i64 16, i8* %tmp20) + call void @llvm.lifetime.end.p0i8(i64 16, i8* %tmp20) call void @wombat3(<3 x float> %tmp18) ret void } Index: test/Transforms/ScalarRepl/lifetime.ll =================================================================== --- test/Transforms/ScalarRepl/lifetime.ll +++ test/Transforms/ScalarRepl/lifetime.ll @@ -3,8 +3,8 @@ 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" target triple = "x86_64-unknown-linux-gnu" -declare void @llvm.lifetime.start(i64, i8*) -declare void @llvm.lifetime.end(i64, i8*) +declare void @llvm.lifetime.start.p0i8(i64, i8*) +declare void @llvm.lifetime.end.p0i8(i64, i8*) %t1 = type {i32, i32, i32} @@ -16,7 +16,7 @@ %A3 = getelementptr %t1, %t1* %A, i32 0, i32 2 %B = bitcast i32* %A1 to i8* store i32 0, i32* %A1 - call void @llvm.lifetime.start(i64 -1, i8* %B) + call void @llvm.lifetime.start.p0i8(i64 -1, i8* %B) ret void ; CHECK-NEXT: ret void } @@ -29,7 +29,7 @@ %A3 = getelementptr %t1, %t1* %A, i32 0, i32 2 %B = bitcast i32* %A2 to i8* store i32 0, i32* %A2 - call void @llvm.lifetime.start(i64 -1, i8* %B) + call void @llvm.lifetime.start.p0i8(i64 -1, i8* %B) %C = load i32, i32* %A2 ret void ; CHECK: ret void @@ -43,7 +43,7 @@ %A3 = getelementptr %t1, %t1* %A, i32 0, i32 2 %B = bitcast i32* %A2 to i8* store i32 0, i32* %A2 - call void @llvm.lifetime.start(i64 6, i8* %B) + call void @llvm.lifetime.start.p0i8(i64 6, i8* %B) %C = load i32, i32* %A2 ret void ; CHECK-NEXT: ret void @@ -57,7 +57,7 @@ %A3 = getelementptr %t1, %t1* %A, i32 0, i32 2 %B = bitcast i32* %A2 to i8* store i32 0, i32* %A2 - call void @llvm.lifetime.start(i64 1, i8* %B) + call void @llvm.lifetime.start.p0i8(i64 1, i8* %B) %C = load i32, i32* %A2 ret void ; CHECK-NEXT: ret void @@ -86,7 +86,7 @@ %A2 = getelementptr %t2, %t2* %A, i32 0, i32 1, i32 1 %A3 = getelementptr %t2, %t2* %A, i32 0, i32 2 store i8 0, i8* %A2 - call void @llvm.lifetime.start(i64 5, i8* %A2) + call void @llvm.lifetime.start.p0i8(i64 5, i8* %A2) ; CHECK: llvm.lifetime{{.*}}i64 1 ; CHECK: llvm.lifetime{{.*}}i64 1 ; CHECK: llvm.lifetime{{.*}}i64 1 @@ -130,7 +130,7 @@ ; CHECK-NOT: store i8 24 %B = bitcast i16* %A13 to i8* - call void @llvm.lifetime.start(i64 7, i8* %B) + call void @llvm.lifetime.start.p0i8(i64 7, i8* %B) ; CHECK: lifetime.start{{.*}}i64 1 ; CHECK: lifetime.start{{.*}}i64 1 ; CHECK: lifetime.start{{.*}}i64 1 Index: test/Transforms/SimplifyCFG/lifetime.ll =================================================================== --- test/Transforms/SimplifyCFG/lifetime.ll +++ test/Transforms/SimplifyCFG/lifetime.ll @@ -10,11 +10,11 @@ define void @foo(i1 %x) { entry: %a = alloca i8 - call void @llvm.lifetime.start(i64 -1, i8* %a) nounwind + call void @llvm.lifetime.start.p0i8(i64 -1, i8* %a) nounwind br i1 %x, label %bb0, label %bb1 bb0: - call void @llvm.lifetime.end(i64 -1, i8* %a) nounwind + call void @llvm.lifetime.end.p0i8(i64 -1, i8* %a) nounwind br label %bb1 bb1: @@ -24,6 +24,6 @@ declare void @f() -declare void @llvm.lifetime.start(i64, i8* nocapture) nounwind +declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) nounwind -declare void @llvm.lifetime.end(i64, i8* nocapture) nounwind +declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) nounwind