summaryrefslogtreecommitdiff
path: root/test/Transforms/Inline/lifetime-no-datalayout.ll
diff options
context:
space:
mode:
authorAlexey Samsonov <samsonov@google.com>2012-11-13 07:15:32 +0000
committerAlexey Samsonov <samsonov@google.com>2012-11-13 07:15:32 +0000
commit009c4d86c14bb2f46f9473f8f517393dabab7e9e (patch)
tree810ca2837213a813032ff52c28ef5fb0cefbcfef /test/Transforms/Inline/lifetime-no-datalayout.ll
parent266c473b91a7a204b9d0de7f1461fe8ca8bd7117 (diff)
downloadllvm-009c4d86c14bb2f46f9473f8f517393dabab7e9e.tar.gz
llvm-009c4d86c14bb2f46f9473f8f517393dabab7e9e.tar.bz2
llvm-009c4d86c14bb2f46f9473f8f517393dabab7e9e.tar.xz
Figure out <size> argument of llvm.lifetime intrinsics at the moment they are created (during function inlining)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167821 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/Inline/lifetime-no-datalayout.ll')
-rw-r--r--test/Transforms/Inline/lifetime-no-datalayout.ll23
1 files changed, 23 insertions, 0 deletions
diff --git a/test/Transforms/Inline/lifetime-no-datalayout.ll b/test/Transforms/Inline/lifetime-no-datalayout.ll
new file mode 100644
index 0000000000..9ad14282f9
--- /dev/null
+++ b/test/Transforms/Inline/lifetime-no-datalayout.ll
@@ -0,0 +1,23 @@
+; RUN: opt -inline %s -S -o - | FileCheck %s
+
+declare void @use(i8* %a)
+
+define void @helper() {
+ %a = alloca i8
+ call void @use(i8* %a)
+ ret void
+}
+
+; Size in llvm.lifetime.X should be -1 (unknown).
+define void @test() {
+; CHECK: @test
+; CHECK-NOT: lifetime
+; CHECK: llvm.lifetime.start(i64 -1
+; CHECK-NOT: lifetime
+; CHECK: llvm.lifetime.end(i64 -1
+ call void @helper()
+; CHECK-NOT: lifetime
+; CHECK: ret void
+ ret void
+}
+