blob: 4b81de7b35b5645af37d8b99a60cb54454f8c52e [file] [log] [blame]
Vedant Kumar15718a62018-10-15 19:22:20 +00001; RUN: opt -hotcoldsplit -S < %s | FileCheck %s
2
3; CHECK-LABEL: define {{.*}}@foo_if.end
4; CHECK-NOT: llvm.dbg.value
5
6define void @foo(i32 %arg1) !dbg !6 {
7entry:
8 %var = add i32 0, 0, !dbg !11
9 br i1 undef, label %if.then, label %if.end, !dbg !12
10
11if.then: ; preds = %entry
12 unreachable, !dbg !13
13
14if.end: ; preds = %entry
15 call void @llvm.dbg.value(metadata i32 %arg1, metadata !9, metadata !DIExpression()), !dbg !11
16 br label %if.then12, !dbg !14
17
18if.then12: ; preds = %if.end
19 br label %cleanup40, !dbg !15
20
21cleanup40: ; preds = %if.then12
22 br label %return, !dbg !16
23
24return: ; preds = %cleanup40
25 ret void, !dbg !17
26}
27
28declare void @llvm.dbg.value(metadata, metadata, metadata)
29
30!llvm.dbg.cu = !{!0}
31!llvm.debugify = !{!3, !4}
32!llvm.module.flags = !{!5}
33
34!0 = distinct !DICompileUnit(language: DW_LANG_C, file: !1, producer: "debugify", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2)
35!1 = !DIFile(filename: "<stdin>", directory: "/")
36!2 = !{}
37!3 = !{i32 7}
38!4 = !{i32 1}
39!5 = !{i32 2, !"Debug Info Version", i32 3}
40!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)
41!7 = !DISubroutineType(types: !2)
42!8 = !{!9}
43!9 = !DILocalVariable(name: "1", scope: !6, file: !1, line: 1, type: !10)
44!10 = !DIBasicType(name: "ty32", size: 32, encoding: DW_ATE_unsigned)
45!11 = !DILocation(line: 1, column: 1, scope: !6)
46!12 = !DILocation(line: 2, column: 1, scope: !6)
47!13 = !DILocation(line: 3, column: 1, scope: !6)
48!14 = !DILocation(line: 4, column: 1, scope: !6)
49!15 = !DILocation(line: 5, column: 1, scope: !6)
50!16 = !DILocation(line: 6, column: 1, scope: !6)
51!17 = !DILocation(line: 7, column: 1, scope: !6)