diff options
| author | Matt Arsenault <Matthew.Arsenault@amd.com> | 2017-04-10 20:18:21 +0000 |
|---|---|---|
| committer | Matt Arsenault <Matthew.Arsenault@amd.com> | 2017-04-10 20:18:21 +0000 |
| commit | f10061ec708ef787398649f3eb073c6ca3acd73d (patch) | |
| tree | 5949d7ce9679b7e663a7f4fad605cddae4c5199c /llvm/test/Assembler | |
| parent | 324c99dee5096be095adc3972c4a512ca0f74090 (diff) | |
| download | bcm5719-llvm-f10061ec708ef787398649f3eb073c6ca3acd73d.tar.gz bcm5719-llvm-f10061ec708ef787398649f3eb073c6ca3acd73d.zip | |
Add address space mangling to lifetime intrinsics
In preparation for allowing allocas to have non-0 addrspace.
llvm-svn: 299876
Diffstat (limited to 'llvm/test/Assembler')
| -rw-r--r-- | llvm/test/Assembler/auto_upgrade_intrinsics.ll | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/llvm/test/Assembler/auto_upgrade_intrinsics.ll b/llvm/test/Assembler/auto_upgrade_intrinsics.ll index 6df5500b442..d00fe5882bc 100644 --- a/llvm/test/Assembler/auto_upgrade_intrinsics.ll +++ b/llvm/test/Assembler/auto_upgrade_intrinsics.ll @@ -110,6 +110,25 @@ define void @test.stackprotectorcheck() { ret void } +declare void @llvm.lifetime.start(i64, i8* nocapture) nounwind readonly +declare void @llvm.lifetime.end(i64, i8* nocapture) nounwind + +define void @tests.lifetime.start.end() { + ; CHECK-LABEL: @tests.lifetime.start.end( + %a = alloca i8 + call void @llvm.lifetime.start(i64 1, i8* %a) + ; CHECK: call void @llvm.lifetime.start.p0i8(i64 1, i8* %a) + store i8 0, i8* %a + call void @llvm.lifetime.end(i64 1, i8* %a) + ; CHECK: call void @llvm.lifetime.end.p0i8(i64 1, i8* %a) + ret void +} + + ; This is part of @test.objectsize(), since llvm.objectsize declaration gets ; emitted at the end. ; CHECK: declare i32 @llvm.objectsize.i32.p0i8 + + +; CHECK: declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture) +; CHECK: declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture) |

