1--- | 2 ; RUN: llc %s -march=x86-64 -run-pass=livedebugvalues -o - | FileCheck %s -implicit-check-not=DBG_VALUE 3 4 ; Check that DBG_VALUE instructions are propagated into a loop with 5 ; diamond pattern but not beyond. 6 7 ; CHECK-LABEL: bb.0.entry: 8 ; CHECK: DBG_VALUE $ebx, $noreg, !16, !DIExpression() 9 ; CHECK-LABEL: bb.1.bb1: 10 ; CHECK: DBG_VALUE $eax, $noreg, !16, !DIExpression() 11 ; CHECK-LABEL: bb.2.bb2: 12 ; CHECK: DBG_VALUE $eax, $noreg, !16, !DIExpression() 13 ; CHECK-LABEL: bb.3.bb3: 14 ; CHECK: DBG_VALUE $eax, $noreg, !16, !DIExpression() 15 ; CHECK-LABEL: bb.4.bb4: 16 ; CHECK: DBG_VALUE $eax, $noreg, !16, !DIExpression() 17 ; CHECK-LABEL: bb.5.bb5: 18 ; CHECK: DBG_VALUE $eax, $noreg, !16, !DIExpression() 19 20 define i32 @_Z8bb_to_bb() local_unnamed_addr !dbg !12 { 21 entry: 22 br label %bb1, !dbg !17 23 bb1: 24 br label %bb2, !dbg !17 25 bb2: 26 br label %bb3, !dbg !17 27 bb3: 28 br label %bb3, !dbg !17 29 bb4: 30 br label %bb3, !dbg !17 31 bb5: 32 ret i32 0, !dbg !17 33 } 34 35 !llvm.dbg.cu = !{!0} 36 !llvm.module.flags = !{!7, !8, !9, !10} 37 !llvm.ident = !{!11} 38 !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 10.0.0", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, globals: !3, debugInfoForProfiling: true, nameTableKind: None) 39 !1 = !DIFile(filename: "main.cpp", directory: "F:\") 40 !2 = !{} 41 !3 = !{!4} 42 !4 = !DIGlobalVariableExpression(var: !5, expr: !DIExpression()) 43 !5 = distinct !DIGlobalVariable(name: "start", scope: !0, file: !1, line: 4, type: !6, isLocal: false, isDefinition: true) 44 !6 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) 45 !7 = !{i32 2, !"Dwarf Version", i32 4} 46 !8 = !{i32 2, !"Debug Info Version", i32 3} 47 !9 = !{i32 1, !"wchar_size", i32 2} 48 !10 = !{i32 7, !"PIC Level", i32 2} 49 !11 = !{!"clang version 10.0.0"} 50 !12 = distinct !DISubprogram(name: "bb_to_bb", linkageName: "bb_to_bb", scope: !1, file: !1, line: 6, type: !13, scopeLine: 6, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !15) 51 !13 = !DISubroutineType(types: !14) 52 !14 = !{!6, !6} 53 !15 = !{!16} 54 !16 = !DILocalVariable(name: "myVar", scope: !12, file: !1, line: 7, type: !6) 55 !17 = !DILocation(line: 10, scope: !12) 56 57... 58--- 59name: _Z8bb_to_bb 60body: | 61 bb.0.entry: 62 successors: %bb.1 63 $ebx = MOV32ri 0, debug-location !17 64 DBG_VALUE $ebx, $noreg, !16, !DIExpression(), debug-location !17 65 bb.1.bb1: 66 successors: %bb.2, %bb.3 67 $eax = MOV32ri 0, debug-location !17 68 DBG_VALUE $eax, $noreg, !16, !DIExpression(), debug-location !17 69 JCC_1 %bb.3, 4, implicit killed $eflags 70 bb.2.bb2: 71 successors: %bb.4 72 $ebx = MOV32ri 0, debug-location !17 73 JMP_1 %bb.4 74 bb.3.bb3: 75 successors: %bb.4 76 $ebx = MOV32ri 0, debug-location !17 77 bb.4.bb4: 78 successors: %bb.1, %bb.5 79 $ebx = MOV32ri 0, debug-location !17 80 JCC_1 %bb.1, 4, implicit killed $eflags 81 bb.5.bb5: 82 RETQ $eax, debug-location !17 83... 84