blob: becfaf8e63d3f728c6a54c0f6035b382a1f98eca [file] [log] [blame]
Vedant Kumar15718a62018-10-15 19:22:20 +00001; RUN: opt -hotcoldsplit -S < %s | FileCheck %s
2
Vedant Kumard2a895a2018-11-04 23:11:57 +00003target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
4target triple = "x86_64-apple-macosx10.14.0"
5
Teresa Johnsonc8dba682018-10-24 18:53:47 +00006; CHECK-LABEL: define {{.*}}@foo.cold
Vedant Kumar15718a62018-10-15 19:22:20 +00007; CHECK-NOT: llvm.dbg.value
8
9define void @foo(i32 %arg1) !dbg !6 {
10entry:
11 %var = add i32 0, 0, !dbg !11
Vedant Kumardd4be532018-10-29 19:15:39 +000012 br i1 undef, label %if.then, label %if.end
Vedant Kumar15718a62018-10-15 19:22:20 +000013
14if.then: ; preds = %entry
Vedant Kumardd4be532018-10-29 19:15:39 +000015 ret void
Vedant Kumar15718a62018-10-15 19:22:20 +000016
17if.end: ; preds = %entry
18 call void @llvm.dbg.value(metadata i32 %arg1, metadata !9, metadata !DIExpression()), !dbg !11
Vedant Kumardd4be532018-10-29 19:15:39 +000019 call void @sink()
20 call void @sink()
21 call void @sink()
22 ret void
Vedant Kumar15718a62018-10-15 19:22:20 +000023}
24
25declare void @llvm.dbg.value(metadata, metadata, metadata)
26
Vedant Kumardd4be532018-10-29 19:15:39 +000027declare void @sink() cold
28
Vedant Kumar15718a62018-10-15 19:22:20 +000029!llvm.dbg.cu = !{!0}
30!llvm.debugify = !{!3, !4}
31!llvm.module.flags = !{!5}
32
33!0 = distinct !DICompileUnit(language: DW_LANG_C, file: !1, producer: "debugify", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2)
34!1 = !DIFile(filename: "<stdin>", directory: "/")
35!2 = !{}
36!3 = !{i32 7}
37!4 = !{i32 1}
38!5 = !{i32 2, !"Debug Info Version", i32 3}
39!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)
40!7 = !DISubroutineType(types: !2)
41!8 = !{!9}
42!9 = !DILocalVariable(name: "1", scope: !6, file: !1, line: 1, type: !10)
43!10 = !DIBasicType(name: "ty32", size: 32, encoding: DW_ATE_unsigned)
44!11 = !DILocation(line: 1, column: 1, scope: !6)