1 ; RUN: opt -S -passes=hotcoldsplit -hotcoldsplit-threshold=0 < %s 2>&1 | FileCheck %s
6 declare void @llvm.lifetime.start.p0(i64, ptr nocapture)
8 declare void @llvm.lifetime.end.p0(i64, ptr nocapture)
10 declare void @use(ptr, ptr)
12 declare void @use2(ptr, ptr) cold
14 ; CHECK-LABEL: define {{.*}}@foo(
15 define void @foo(i1 %arg) {
19 br i1 %arg, label %normalPath, label %outlinedPath
22 call void @use(ptr %local1, ptr %local2)
25 ; CHECK-LABEL: codeRepl:
26 ; CHECK-NEXT: call void @llvm.lifetime.start.p0(i64 -1, ptr %local1)
27 ; CHECK-NEXT: call void @llvm.lifetime.start.p0(i64 -1, ptr %local2)
28 ; CHECK-NEXT: call void @foo.cold.1(ptr %local1, ptr %local2
31 call void @llvm.lifetime.start.p0(i64 1, ptr %local1)
32 call void @llvm.lifetime.start.p0(i64 1, ptr %local2)
33 call void @use2(ptr %local1, ptr %local2)
34 call void @llvm.lifetime.end.p0(i64 1, ptr %local1)
35 call void @llvm.lifetime.end.p0(i64 1, ptr %local2)
36 br label %outlinedPathExit
42 ; CHECK-LABEL: define {{.*}}@foo.cold.1(
43 ; CHECK-NOT: @llvm.lifetime