blob: 4307064e1946ace61c7823c57e27e8b06c9a6503 [file] [log] [blame]
Dmitri Gribenkob137c9e2012-12-30 01:28:40 +00001; RUN: opt -inline -S < %s | FileCheck %s
Alexey Samsonovcfd662f2012-11-13 07:15:32 +00002
3declare void @use(i8* %a)
4
5define void @helper() {
6 %a = alloca i8
7 call void @use(i8* %a)
8 ret void
9}
10
Mehdi Amini46a43552015-03-04 18:43:29 +000011; Size in llvm.lifetime.X should be 1 (default for i8).
Alexey Samsonovcfd662f2012-11-13 07:15:32 +000012define void @test() {
Stephen Linc1c7a132013-07-14 01:42:54 +000013; CHECK-LABEL: @test(
Alexey Samsonovcfd662f2012-11-13 07:15:32 +000014; CHECK-NOT: lifetime
Mehdi Amini46a43552015-03-04 18:43:29 +000015; CHECK: llvm.lifetime.start(i64 1
Alexey Samsonovcfd662f2012-11-13 07:15:32 +000016; CHECK-NOT: lifetime
Mehdi Amini46a43552015-03-04 18:43:29 +000017; CHECK: llvm.lifetime.end(i64 1
Alexey Samsonovcfd662f2012-11-13 07:15:32 +000018 call void @helper()
19; CHECK-NOT: lifetime
20; CHECK: ret void
21 ret void
22}
23