|
| 1 | +--- | |
| 2 | + ; RUN: llc %s -march=x86-64 -run-pass=livedebugvalues -o - | FileCheck %s --implicit-check-not=DBG_VALUE |
| 3 | + ; RUN: llc %s -march=x86-64 -run-pass=livedebugvalues -o - -experimental-debug-variable-locations | FileCheck %s --implicit-check-not=DBG_VALUE |
| 4 | + ; |
| 5 | + ; No DBG_VALUEs should be propagated, as there's a loop between bb2 and bb3 |
| 6 | + ; that defines $rdi without specifying it as being the variable value. Uses |
| 7 | + ; implicit check-not in runlines above. |
| 8 | + ; |
| 9 | + ; CHECK-LABEL: bb.1.while.body |
| 10 | + ; CHECK: DBG_VALUE |
| 11 | + ; CHECK-NEXT: TEST8rr |
| 12 | + ; CHECK-NEXT: JCC_1 |
| 13 | + |
| 14 | + ; ModuleID = 'multi-downgrade-but-not-sensitive.ll' |
| 15 | + source_filename = "/fast/fs/llvm3/clang/lib/CodeGen/CoverageMappingGen.cpp" |
| 16 | + target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" |
| 17 | + target triple = "x86_64-unknown-linux-gnu" |
| 18 | + |
| 19 | + %"struct.std::pair.1976" = type { %"class.clang::SourceLocation", i32 } |
| 20 | + %"class.clang::SourceLocation" = type { i32 } |
| 21 | + |
| 22 | + ; Function Attrs: nounwind uwtable |
| 23 | + define weak_odr void @_ZSt17__merge_sort_loopIPSt4pairIN5clang14SourceLocationEjES4_lN9__gnu_cxx5__ops15_Iter_comp_iterIN4llvm11less_secondEEEEvT_SB_T0_T1_T2_(%"struct.std::pair.1976"* %__result) local_unnamed_addr !dbg !12 { |
| 24 | + while.body.lr.ph: |
| 25 | + br label %while.body, !dbg !17 |
| 26 | + |
| 27 | + while.body: ; preds = %while.body, %while.body.i, %while.body.lr.ph |
| 28 | + %__result.addr.099 = phi %"struct.std::pair.1976"* [ %__result, %while.body.lr.ph ], [ %__result.addr.099, %while.body ], [ %incdec.ptr7.i, %while.body.i ] |
| 29 | + call void @llvm.dbg.value(metadata %"struct.std::pair.1976"* %__result.addr.099, metadata !16, metadata !DIExpression()), !dbg !17 |
| 30 | + br i1 undef, label %while.body.i.preheader, label %while.body, !dbg !17 |
| 31 | + |
| 32 | + while.body.i.preheader: ; preds = %while.body |
| 33 | + br label %while.body.i, !dbg !17 |
| 34 | + |
| 35 | + while.body.i: ; preds = %while.body.i, %while.body.i.preheader |
| 36 | + %__result.addr.046.i = phi %"struct.std::pair.1976"* [ %incdec.ptr7.i, %while.body.i ], [ %__result.addr.099, %while.body.i.preheader ] |
| 37 | + %incdec.ptr7.i = getelementptr inbounds %"struct.std::pair.1976", %"struct.std::pair.1976"* %__result.addr.046.i, i64 1, !dbg !17 |
| 38 | + %cmp.not.i = icmp ne %"struct.std::pair.1976"* undef, undef, !dbg !17 |
| 39 | + %0 = and i1 undef, %cmp.not.i, !dbg !17 |
| 40 | + br i1 %0, label %while.body.i, label %while.body, !dbg !17 |
| 41 | + } |
| 42 | + |
| 43 | + ; Function Attrs: nounwind readnone speculatable willreturn |
| 44 | + declare void @llvm.dbg.value(metadata, metadata, metadata) |
| 45 | + |
| 46 | + ; Function Attrs: nounwind |
| 47 | + declare void @llvm.stackprotector(i8*, i8**) |
| 48 | + |
| 49 | + !llvm.dbg.cu = !{!0} |
| 50 | + !llvm.module.flags = !{!7, !8, !9, !10} |
| 51 | + !llvm.ident = !{!11} |
| 52 | + !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) |
| 53 | + !1 = !DIFile(filename: "main.cpp", directory: "F:\") |
| 54 | + !2 = !{} |
| 55 | + !3 = !{!4} |
| 56 | + !4 = !DIGlobalVariableExpression(var: !5, expr: !DIExpression()) |
| 57 | + !5 = distinct !DIGlobalVariable(name: "start", scope: !0, file: !1, line: 4, type: !6, isLocal: false, isDefinition: true) |
| 58 | + !6 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) |
| 59 | + !7 = !{i32 2, !"Dwarf Version", i32 4} |
| 60 | + !8 = !{i32 2, !"Debug Info Version", i32 3} |
| 61 | + !9 = !{i32 1, !"wchar_size", i32 2} |
| 62 | + !10 = !{i32 7, !"PIC Level", i32 2} |
| 63 | + !11 = !{!"clang version 10.0.0"} |
| 64 | + !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) |
| 65 | + !13 = !DISubroutineType(types: !14) |
| 66 | + !14 = !{!6, !6} |
| 67 | + !15 = !{!16} |
| 68 | + !16 = !DILocalVariable(name: "myVar", scope: !12, file: !1, line: 7, type: !6) |
| 69 | + !17 = !DILocation(line: 10, scope: !12) |
| 70 | + |
| 71 | + |
| 72 | +... |
| 73 | +--- |
| 74 | +name: _ZSt17__merge_sort_loopIPSt4pairIN5clang14SourceLocationEjES4_lN9__gnu_cxx5__ops15_Iter_comp_iterIN4llvm11less_secondEEEEvT_SB_T0_T1_T2_ |
| 75 | +alignment: 16 |
| 76 | +tracksRegLiveness: true |
| 77 | +registers: [] |
| 78 | +liveins: |
| 79 | + - { reg: '$rdi', virtual-reg: '' } |
| 80 | +machineFunctionInfo: {} |
| 81 | +body: | |
| 82 | + bb.0.while.body.lr.ph: |
| 83 | + successors: %bb.1(0x80000000) |
| 84 | + liveins: $rdi |
| 85 | + |
| 86 | + renamable $eax = XOR32rr undef $eax, undef $eax, implicit-def dead $eflags |
| 87 | + |
| 88 | + bb.1.while.body (align 16): |
| 89 | + successors: %bb.2(0x40000000), %bb.1(0x40000000) |
| 90 | + liveins: $eax, $rdi |
| 91 | + |
| 92 | + DBG_VALUE $rdi, $noreg, !16, !DIExpression(), debug-location !17 |
| 93 | + TEST8rr renamable $al, renamable $al, implicit-def $eflags, debug-location !17 |
| 94 | + JCC_1 %bb.1, 5, implicit killed $eflags, debug-location !17 |
| 95 | + |
| 96 | + bb.2.while.body.i (align 16): |
| 97 | + successors: %bb.3(0x7e000000), %bb.1(0x02000000) |
| 98 | + liveins: $eax, $rdi |
| 99 | + |
| 100 | + renamable $rdi = nuw ADD64ri8 killed renamable $rdi, 8, implicit-def dead $eflags, debug-location !17 |
| 101 | + TEST8rr renamable $al, renamable $al, implicit-def $eflags, debug-location !17 |
| 102 | + JCC_1 %bb.1, 5, implicit $eflags, debug-location !17 |
| 103 | + |
| 104 | + bb.3.while.body.i: |
| 105 | + successors: %bb.2(0x7df7df7e), %bb.1(0x02082082) |
| 106 | + liveins: $eax, $rdi |
| 107 | + |
| 108 | + TEST8rr renamable $al, renamable $al, implicit-def $eflags, debug-location !17 |
| 109 | + JCC_1 %bb.2, 5, implicit $eflags |
| 110 | + JMP_1 %bb.1 |
| 111 | +
|
| 112 | +... |
0 commit comments