[Alignment][NFC] Migrate Instructions to Align
[llvm-core.git] / test / DebugInfo / X86 / debug-label-unreached.ll
blobb84fb07d93ea61ae14cb1e708f5effe6dd52ffb7
1 ; Test unreachable llvm.dbg.label
3 ; RUN: llc -filetype=obj -split-dwarf-file debug.dwo -mtriple=x86_64-unknown-linux-gnu -o - %s | llvm-dwarfdump -v - | FileCheck %s
5 ; CHECK: .debug_info.dwo contents:
6 ; CHECK: DW_TAG_label
7 ; CHECK-NEXT: DW_AT_name {{.*}}"done"
8 ; CHECK-NOT: {{DW_TAG|NULL}}
9 ; CHECK: DW_AT_low_pc
10 ; CHECK: DW_TAG_label
11 ; CHECK-NEXT: DW_AT_name {{.*}}"removed"
12 ; CHECK-NOT: DW_AT_low_pc
13 source_filename = "debug-label-unreached.c"
15 define dso_local i32 @foo(i32 %a, i32 %b) !dbg !8 {
16 entry:
17   %sum = add nsw i32 %a, %b, !dbg !12
18   call void @llvm.dbg.label(metadata !11), !dbg !12
19   ret i32 %sum, !dbg !13
22 declare void @llvm.dbg.label(metadata)
24 !llvm.dbg.cu = !{!0}
25 !llvm.module.flags = !{!4}
27 !0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, isOptimized: true, emissionKind: FullDebug, enums: !2)
28 !1 = !DIFile(filename: "debug-label-unreached.c", directory: "./")
29 !2 = !{}
30 !4 = !{i32 2, !"Debug Info Version", i32 3}
31 !5 = !DISubroutineType(types: !6)
32 !6 = !{!7}
33 !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
34 !8 = distinct !DISubprogram(name: "foo", scope: !1, file: !1, line: 8, type: !5, isLocal: false, isDefinition: true, scopeLine: 9, flags: DIFlagPrototyped, isOptimized: true, unit: !0, retainedNodes: !9)
35 !9 = !{!10, !11}
36 !10 = !DILabel(scope: !8, name: "removed", file: !1, line: 11)
37 !11 = !DILabel(scope: !8, name: "done", file: !1, line: 13)
38 !12 = !DILocation(line: 13, column: 1, scope: !8)
39 !13 = !DILocation(line: 14, column: 5, scope: !8)