brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.6 KiB · 80e9926 Raw
107 lines · plain
1# RUN: llc %s -mtriple=x86_64-unknown-unknown -o - -run-pass=livedebugvalues -experimental-debug-variable-locations=false | FileCheck %s --implicit-check-not=DBG_VALUE2#3# Test that the DBG_VALUE of ecx below does not get propagated. It is considered4# live-in on LiveDebugValues' first pass through the loop, but on the second it5# should be removed from the InLocs set because it gets clobbered inside the6# loop. There should be no transfer from ecx to ebx -- this is ensured by the7# FileCheck implicit-check-not option.8#9# FIXME: we successfully prevent the false location (ebx) from being10# propagated into block 2, but the original transfer isn't yet eliminated.11# Thus we get no DBG_VALUe in block 2, but an invalid one in block 1.12#13# CHECK-LABEL: name: foo14# CHECK-LABEL: bb.0.entry:15# CHECK:       $ecx = MOV32ri 016# CHECK-NEXT:  DBG_VALUE17# CHECK-LABEL: bb.1.loop:18# CHECK:       $ebx = COPY killed $ecx19# CHECK-NEXT:  DBG_VALUE20#21# An identical test in llvm/test/DebugInfo/MIR/X86/live-debug-values-bad-transfer.mir22# checks this for InstrRefBasedLDV.23 24--- |25  source_filename = "live-debug-values-remove-range.ll"26  target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"27  28  declare void @llvm.dbg.value(metadata, metadata, metadata)29  30  define i32 @foo(i32 %bar) !dbg !4 {31  entry:32    br label %loop33  loop:34    br label %loop35  exit:36    ret i32 %bar37  }38  39  !llvm.module.flags = !{!0, !1}40  !llvm.dbg.cu = !{!2}41  42  !0 = !{i32 2, !"Debug Info Version", i32 3}43  !1 = !{i32 2, !"Dwarf Version", i32 4}44  !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "beards", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug)45  !3 = !DIFile(filename: "bees.cpp", directory: ".")46  !4 = distinct !DISubprogram(name: "nope", scope: !3, file: !3, line: 1, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !8)47  !5 = !DISubroutineType(types: !6)48  !6 = !{!7}49  !7 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)50  !8 = !{!9}51  !9 = !DILocalVariable(name: "thin", scope: !4, file: !3, line: 1, type: !7)52  !10 = !DILocation(line: 1, scope: !4)53 54...55---56name:            foo57alignment:       458tracksRegLiveness: true59liveins:60  - { reg: '$edi' }61frameInfo:62  stackSize:       863  offsetAdjustment: -864  maxAlignment:    165  adjustsStack:    true66  hasCalls:        true67  maxCallFrameSize: 068  cvBytesOfCalleeSavedRegisters: 869fixedStack:70  - { id: 0, type: spill-slot, offset: -16, size: 8, alignment: 16, callee-saved-register: '$rbx' }71machineFunctionInfo: {}72body:             |73  bb.0.entry:74    liveins: $edi, $rbx75  76    frame-setup PUSH64r killed $rbx, implicit-def $rsp, implicit $rsp77    CFI_INSTRUCTION def_cfa_offset 1678    CFI_INSTRUCTION offset $rbx, -1679    $ebx = MOV32rr $edi80    $eax = MOV32ri 0, debug-location !1081    $ecx = MOV32ri 0, debug-location !1082    DBG_VALUE $ecx, $noreg, !9, !DIExpression(), debug-location !1083    $edi = MOV32ri 0, debug-location !1084    $esi = MOV32ri 0, debug-location !1085  86  bb.1.loop:87    successors: %bb.1, %bb.288    liveins: $ebx, $eax, $ecx, $edi, $esi89  90    $eax = COPY $ecx, debug-location !1091    $ebx = COPY killed $ecx, debug-location !1092    $ecx = COPY killed $edi, debug-location !1093    $edi = COPY killed $esi, debug-location !1094    $esi = MOV32ri 1, debug-location !1095    TEST8ri killed renamable $al, 1, implicit-def $eflags96    JCC_1 %bb.1, 5, implicit killed $eflags, debug-location !1097  98  bb.2.exit:99    liveins: $ebx100  101    $eax = MOV32rr killed $ebx, debug-location !10102    $rbx = frame-destroy POP64r implicit-def $rsp, implicit $rsp103    CFI_INSTRUCTION def_cfa_offset 8104    RET64 $eax, debug-location !10105 106...107