Vedant Kumar | 15718a6 | 2018-10-15 19:22:20 +0000 | [diff] [blame] | 1 | ; RUN: opt -hotcoldsplit -S < %s | FileCheck %s |
| 2 | |
Teresa Johnson | c8dba68 | 2018-10-24 18:53:47 +0000 | [diff] [blame^] | 3 | ; CHECK-LABEL: define {{.*}}@foo.cold |
Vedant Kumar | 15718a6 | 2018-10-15 19:22:20 +0000 | [diff] [blame] | 4 | ; CHECK-NOT: llvm.dbg.value |
| 5 | |
| 6 | define void @foo(i32 %arg1) !dbg !6 { |
| 7 | entry: |
| 8 | %var = add i32 0, 0, !dbg !11 |
| 9 | br i1 undef, label %if.then, label %if.end, !dbg !12 |
| 10 | |
| 11 | if.then: ; preds = %entry |
Sebastian Pop | 5df333b | 2018-10-16 00:42:07 +0000 | [diff] [blame] | 12 | ret void, !dbg !13 |
Vedant Kumar | 15718a6 | 2018-10-15 19:22:20 +0000 | [diff] [blame] | 13 | |
| 14 | if.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 | |
| 18 | if.then12: ; preds = %if.end |
| 19 | br label %cleanup40, !dbg !15 |
| 20 | |
| 21 | cleanup40: ; preds = %if.then12 |
Sebastian Pop | 5df333b | 2018-10-16 00:42:07 +0000 | [diff] [blame] | 22 | br i1 undef, label %if.then5, label %if.end1, !dbg !16 |
| 23 | |
| 24 | if.then5: |
| 25 | br label %return, !dbg !17 |
| 26 | |
| 27 | if.end1: |
| 28 | br label %return, !dbg !18 |
Vedant Kumar | 15718a6 | 2018-10-15 19:22:20 +0000 | [diff] [blame] | 29 | |
| 30 | return: ; preds = %cleanup40 |
Sebastian Pop | 5df333b | 2018-10-16 00:42:07 +0000 | [diff] [blame] | 31 | unreachable, !dbg !19 |
Vedant Kumar | 15718a6 | 2018-10-15 19:22:20 +0000 | [diff] [blame] | 32 | } |
| 33 | |
| 34 | declare 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 Pop | 5df333b | 2018-10-16 00:42:07 +0000 | [diff] [blame] | 58 | !18 = !DILocation(line: 8, column: 1, scope: !6) |
| 59 | !19 = !DILocation(line: 9, column: 1, scope: !6) |