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 ; CHECK-LABEL: define {{.*}}@foo.cold
7 ; CHECK-NOT: llvm.dbg.value
9 define void @foo(i32 %arg1) !dbg !6 {
11 %var = add i32 0, 0, !dbg !11
12 br i1 undef, label %if.then, label %if.end
14 if.then: ; preds = %entry
17 if.end: ; preds = %entry
18 call void @llvm.dbg.value(metadata i32 %arg1, metadata !9, metadata !DIExpression()), !dbg !11
23 declare void @llvm.dbg.value(metadata, metadata, metadata)
25 declare void @sink() cold
28 !llvm.debugify = !{!3, !4}
29 !llvm.module.flags = !{!5}
31 !0 = distinct !DICompileUnit(language: DW_LANG_C, file: !1, producer: "debugify", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2)
32 !1 = !DIFile(filename: "<stdin>", directory: "/")
36 !5 = !{i32 2, !"Debug Info Version", i32 3}
37 !6 = distinct !DISubprogram(name: "foo", linkageName: "foo", scope: null, file: !1, line: 1, type: !7, isLocal: false, isDefinition: true, scopeLine: 1, isOptimized: true, unit: !0, retainedNodes: !8)
38 !7 = !DISubroutineType(types: !2)
40 !9 = !DILocalVariable(name: "1", scope: !6, file: !1, line: 1, type: !10)
41 !10 = !DIBasicType(name: "ty32", size: 32, encoding: DW_ATE_unsigned)
42 !11 = !DILocation(line: 1, column: 1, scope: !6)