blob: b77201fe0d38d9131a5b5f1cb67a719e920c54d9 [file] [log] [blame]
Vedant Kumar15718a62018-10-15 19:22:20 +00001; RUN: opt -hotcoldsplit -S < %s | FileCheck %s
2
Teresa Johnsonc8dba682018-10-24 18:53:47 +00003; CHECK-LABEL: define {{.*}}@foo.cold
Vedant Kumar15718a62018-10-15 19:22:20 +00004; CHECK-NOT: llvm.dbg.value
5
6define void @foo(i32 %arg1) !dbg !6 {
7entry:
8 %var = add i32 0, 0, !dbg !11
Vedant Kumardd4be532018-10-29 19:15:39 +00009 br i1 undef, label %if.then, label %if.end
Vedant Kumar15718a62018-10-15 19:22:20 +000010
11if.then: ; preds = %entry
Vedant Kumardd4be532018-10-29 19:15:39 +000012 ret void
Vedant Kumar15718a62018-10-15 19:22:20 +000013
14if.end: ; preds = %entry
15 call void @llvm.dbg.value(metadata i32 %arg1, metadata !9, metadata !DIExpression()), !dbg !11
Vedant Kumardd4be532018-10-29 19:15:39 +000016 call void @sink()
17 call void @sink()
18 call void @sink()
19 ret void
Vedant Kumar15718a62018-10-15 19:22:20 +000020}
21
22declare void @llvm.dbg.value(metadata, metadata, metadata)
23
Vedant Kumardd4be532018-10-29 19:15:39 +000024declare void @sink() cold
25
Vedant Kumar15718a62018-10-15 19:22:20 +000026!llvm.dbg.cu = !{!0}
27!llvm.debugify = !{!3, !4}
28!llvm.module.flags = !{!5}
29
30!0 = distinct !DICompileUnit(language: DW_LANG_C, file: !1, producer: "debugify", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2)
31!1 = !DIFile(filename: "<stdin>", directory: "/")
32!2 = !{}
33!3 = !{i32 7}
34!4 = !{i32 1}
35!5 = !{i32 2, !"Debug Info Version", i32 3}
36!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)
37!7 = !DISubroutineType(types: !2)
38!8 = !{!9}
39!9 = !DILocalVariable(name: "1", scope: !6, file: !1, line: 1, type: !10)
40!10 = !DIBasicType(name: "ty32", size: 32, encoding: DW_ATE_unsigned)
41!11 = !DILocation(line: 1, column: 1, scope: !6)