1 ; RUN: opt -passes=hotcoldsplit -hotcoldsplit-threshold=0 -S < %s | FileCheck %s
3 target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
4 target triple = "x86_64-apple-macosx10.14.0"
6 %swift_error = type {i64, i8}
8 declare void @sink() cold
10 ; CHECK-LABEL: define {{.*}}@in_arg(
11 ; CHECK: call void @in_arg.cold.1(ptr swifterror
12 define void @in_arg(ptr swifterror %error_ptr_ref) {
13 br i1 undef, label %cold, label %exit
16 store ptr undef, ptr %error_ptr_ref
24 ; CHECK-LABEL: define {{.*}}@in_alloca(
25 ; CHECK: call void @in_alloca.cold.1(ptr swifterror
26 define void @in_alloca() {
27 %err = alloca swifterror ptr
28 br i1 undef, label %cold, label %exit
31 store ptr undef, ptr %err
39 ; CHECK-LABEL: define {{.*}}@in_arg.cold.1({{.*}} swifterror
40 ; CHECK: call {{.*}}@sink
42 ; CHECK-LABEL: define {{.*}}@in_alloca.cold.1({{.*}} swifterror
43 ; CHECK: call {{.*}}@sink