blob: dcaff12244249b36228acf281308429075cae16b [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
Sebastian Pop5df333b2018-10-16 00:42:07 +000012 ret void, !dbg !13
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
16 br label %if.then12, !dbg !14
17
18if.then12: ; preds = %if.end
19 br label %cleanup40, !dbg !15
20
21cleanup40: ; preds = %if.then12
Sebastian Pop5df333b2018-10-16 00:42:07 +000022 br i1 undef, label %if.then5, label %if.end1, !dbg !16
23
24if.then5:
25 br label %return, !dbg !17
26
27if.end1:
28 br label %return, !dbg !18
Vedant Kumar15718a62018-10-15 19:22:20 +000029
30return: ; preds = %cleanup40
Sebastian Pop5df333b2018-10-16 00:42:07 +000031 unreachable, !dbg !19
Vedant Kumar15718a62018-10-15 19:22:20 +000032}
33
34declare void @llvm.dbg.value(metadata, metadata, metadata)
35
36!llvm.dbg.cu = !{!0}
37!llvm.debugify = !{!3, !4}
38!llvm.module.flags = !{!5}
39
40!0 = distinct !DICompileUnit(language: DW_LANG_C, file: !1, producer: "debugify", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2)
41!1 = !DIFile(filename: "<stdin>", directory: "/")
42!2 = !{}
43!3 = !{i32 7}
44!4 = !{i32 1}
45!5 = !{i32 2, !"Debug Info Version", i32 3}
46!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)
47!7 = !DISubroutineType(types: !2)
48!8 = !{!9}
49!9 = !DILocalVariable(name: "1", scope: !6, file: !1, line: 1, type: !10)
50!10 = !DIBasicType(name: "ty32", size: 32, encoding: DW_ATE_unsigned)
51!11 = !DILocation(line: 1, column: 1, scope: !6)
52!12 = !DILocation(line: 2, column: 1, scope: !6)
53!13 = !DILocation(line: 3, column: 1, scope: !6)
54!14 = !DILocation(line: 4, column: 1, scope: !6)
55!15 = !DILocation(line: 5, column: 1, scope: !6)
56!16 = !DILocation(line: 6, column: 1, scope: !6)
57!17 = !DILocation(line: 7, column: 1, scope: !6)
Sebastian Pop5df333b2018-10-16 00:42:07 +000058!18 = !DILocation(line: 8, column: 1, scope: !6)
59!19 = !DILocation(line: 9, column: 1, scope: !6)