1--- | 2 ; RUN: llc %s -mtriple=x86_64 -run-pass=livedebugvalues -o - | FileCheck %s -implicit-check-not=DBG_VALUE 3 4 ; Check that DBG_VALUE instructions are not propagated into a loop that 5 ; explicitly terminates its location. 6 7 ; CHECK: ![[VARNO:[0-9]+]] = !DILocalVariable(name: "myVar" 8 ; CHECK-LABEL: bb.0.entry: 9 ; CHECK: DBG_VALUE $ebx, $noreg, ![[VARNO]], !DIExpression(), 10 ; CHECK-LABEL: bb.2.bb2: 11 ; CHECK: DBG_VALUE $noreg, $noreg, ![[VARNO]], !DIExpression(), 12 13 define i32 @_Z8bb_to_bb() local_unnamed_addr !dbg !12 { 14 entry: 15 br label %bb1, !dbg !17 16 bb1: 17 br label %bb2, !dbg !17 18 bb2: 19 br label %bb3, !dbg !17 20 bb3: 21 ret i32 0, !dbg !17 22 } 23 24 !llvm.dbg.cu = !{!0} 25 !llvm.module.flags = !{!7, !8, !9, !10} 26 !llvm.ident = !{!11} 27 !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) 28 !1 = !DIFile(filename: "main.cpp", directory: "F:\test") 29 !2 = !{} 30 !3 = !{!4} 31 !4 = !DIGlobalVariableExpression(var: !5, expr: !DIExpression()) 32 !5 = distinct !DIGlobalVariable(name: "start", scope: !0, file: !1, line: 4, type: !6, isLocal: false, isDefinition: true) 33 !6 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) 34 !7 = !{i32 2, !"Dwarf Version", i32 4} 35 !8 = !{i32 2, !"Debug Info Version", i32 3} 36 !9 = !{i32 1, !"wchar_size", i32 2} 37 !10 = !{i32 7, !"PIC Level", i32 2} 38 !11 = !{!"clang version 10.0.0"} 39 !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) 40 !13 = !DISubroutineType(types: !14) 41 !14 = !{!6, !6} 42 !15 = !{!16} 43 !16 = !DILocalVariable(name: "myVar", scope: !12, file: !1, line: 7, type: !6) 44 !17 = !DILocation(line: 10, scope: !12) 45 46... 47--- 48name: _Z8bb_to_bb 49body: | 50 bb.0.entry: 51 successors: %bb.1 52 $ebx = MOV32ri 0, debug-location !17 53 DBG_VALUE $ebx, $noreg, !16, !DIExpression(), debug-location !17 54 55 bb.1.bb1: 56 successors: %bb.2 57 $eax = MOV32ri 0, debug-location !17 58 59 bb.2.bb2: 60 successors: %bb.1, %bb.3 61 $ecx = MOV32ri 1, debug-location !17 62 DBG_VALUE $noreg, $noreg, !16, !DIExpression(), debug-location !17 63 JCC_1 %bb.1, 4, implicit killed $eflags 64 65 bb.3.bb3: 66 RET64 $eax, debug-location !17 67... 68