brintos

brintos / llvm-project-archived public Read only

0
0
Text · 4.4 KiB · b7a9892 Raw
118 lines · plain
1# RUN: llc -o - %s -O0 -regalloc=fast -run-pass=livedebugvalues | \2# RUN:   FileCheck %s -implicit-check-not=DBG_VALUE3 4# RUN: llc -o - %s -O0 -regalloc=fast -passes=live-debug-values | \5# RUN:   FileCheck %s -implicit-check-not=DBG_VALUE6--- |7  target triple = "arm64-apple-ios12.1.0"8 9  declare void @use(i32)10 11  define void @f1(i32 %x) !dbg !6 {12  entry:13    %var = add i32 %x, 1, !dbg !1214    call void @llvm.dbg.value(metadata i32 %var, metadata !9, metadata !DIExpression()), !dbg !1215    br label %artificial-bb-1, !dbg !1316 17  artificial-bb-1:18    br label %artificial-bb-219 20  artificial-bb-2:21    %invisible = add i32 %var, 122    br label %return, !dbg !1423 24  return:25    call void @use(i32 %var)26    ret void, !dbg !1527  }28 29  declare void @llvm.dbg.value(metadata, metadata, metadata) #030  declare void @llvm.stackprotector(ptr, ptr) #131 32  attributes #0 = { nounwind readnone speculatable }33  attributes #1 = { nounwind }34 35  !llvm.dbg.cu = !{!0}36  !llvm.debugify = !{!3, !4}37  !llvm.module.flags = !{!5}38 39  !0 = distinct !DICompileUnit(language: DW_LANG_C, file: !1, producer: "debugify", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2)40  !1 = !DIFile(filename: "compiler-gen-bbs-livedebugvalues.ll", directory: "/")41  !2 = !{}42  !3 = !{i32 6}43  !4 = !{i32 2}44  !5 = !{i32 2, !"Debug Info Version", i32 3}45  !6 = distinct !DISubprogram(name: "f1", linkageName: "f1", scope: null, file: !1, line: 1, type: !7, isLocal: false, isDefinition: true, scopeLine: 1, isOptimized: true, unit: !0, retainedNodes: !8)46  !7 = !DISubroutineType(types: !2)47  !8 = !{!9, !11}48  !9 = !DILocalVariable(name: "1", scope: !6, file: !1, line: 1, type: !10)49  !10 = !DIBasicType(name: "ty32", size: 32, encoding: DW_ATE_unsigned)50  !11 = !DILocalVariable(name: "2", scope: !6, file: !1, line: 4, type: !10)51  !12 = !DILocation(line: 1, column: 1, scope: !6)52  !13 = !DILocation(line: 2, column: 1, scope: !6)53  !14 = !DILocation(line: 0, column: 1, scope: !6)54  !15 = !DILocation(line: 4, column: 1, scope: !6)55 56...57---58# CHECK-LABEL: name: f159name:            f160alignment:       461legalized:       true62regBankSelected: true63selected:        true64tracksRegLiveness: true65frameInfo:66  stackSize:       3267  maxAlignment:    868  adjustsStack:    true69  hasCalls:        true70  maxCallFrameSize: 071machineFunctionInfo:72  stackSizeZPR:     073  stackSizePPR:     074stack:75  - { id: 0, type: spill-slot, offset: -20, size: 4, alignment: 4, stack-id: default }76  - { id: 1, type: spill-slot, offset: -8, size: 8, alignment: 8, stack-id: default,77      callee-saved-register: '$lr' }78  - { id: 2, type: spill-slot, offset: -16, size: 8, alignment: 8, stack-id: default,79      callee-saved-register: '$fp' }80body:             |81  ; CHECK-LABEL: bb.0.entry:82  bb.0.entry:83    liveins: $w0, $lr84 85    $sp = frame-setup SUBXri $sp, 32, 086    frame-setup STPXi killed $fp, killed $lr, $sp, 2 :: (store (s64) into %stack.2), (store (s64) into %stack.1)87    frame-setup CFI_INSTRUCTION def_cfa_offset 3288    frame-setup CFI_INSTRUCTION offset $w30, -8, debug-location !1289    frame-setup CFI_INSTRUCTION offset $w29, -16, debug-location !1290    renamable $w0 = ADDWri killed renamable $w0, 1, 0, debug-location !1291    DBG_VALUE renamable $w0, $noreg, !9, !DIExpression(), debug-location !1292    STRWui killed $w0, $sp, 3 :: (store (s32) into %stack.0)93    DBG_VALUE $sp, 0, !9, !DIExpression(DW_OP_plus_uconst, 12), debug-location !1294 95    ; CHECK: DBG_VALUE renamable $w0, $noreg, !9, !DIExpression(), debug-location !1296    ; CHECK-NEXT: STRWui killed $w0, $sp, 3 :: (store (s32) into %stack.0)97    ; CHECK-NEXT: DBG_VALUE $sp, 0, !9, !DIExpression(DW_OP_plus_uconst, 12)98    ; CHECK-NEXT: DBG_VALUE $sp, 0, !9, !DIExpression(DW_OP_plus_uconst, 12)99 100  bb.1.artificial-bb-1:101    ; CHECK-LABEL: bb.1.artificial-bb-1:102    ; CHECK: DBG_VALUE $sp, 0, !9, !DIExpression(DW_OP_plus_uconst, 12)103 104  bb.2.artificial-bb-2:105    ; CHECK-LABEL: bb.2.artificial-bb-2:106    ; CHECK: DBG_VALUE $sp, 0, !9, !DIExpression(DW_OP_plus_uconst, 12)107 108  bb.3.return:109    ; CHECK-LABEL: bb.3.return:110    ; CHECK: DBG_VALUE $sp, 0, !9, !DIExpression(DW_OP_plus_uconst, 12)111 112    $w0 = LDRWui $sp, 3 :: (load (s32) from %stack.0)113    BL @use, csr_aarch64_aapcs, implicit-def $lr, implicit $sp, implicit killed $w0114    $fp, $lr = frame-destroy LDPXi $sp, 2, debug-location !15 :: (load (s64) from %stack.2), (load (s64) from %stack.1)115    $sp = frame-destroy ADDXri $sp, 32, 0, debug-location !15116    RET undef $lr, debug-location !15117...118