brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.6 KiB · 3e8a9db Raw
98 lines · plain
1# RUN: llc -verify-machineinstrs -start-after=prologepilog -filetype=obj -o - %s | llvm-dwarfdump -v --debug-info - | FileCheck %s2# CHECK: .debug_info contents:3# CHECK: DW_TAG_variable4# CHECK-NEXT: DW_AT_location {{.*}}         (DW_OP_reg1 RDX, DW_OP_bit_piece 0x8 0x8)5# CHECK-NEXT: DW_AT_name {{.*}}"dh"6--- |7  ; Manually created after:8  ; char f(int i) {9  ;   char dh = i>>8;10  ;   return dh;11  ; }12 13  target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"14  target triple = "x86_64-apple-macosx10.12.0"15  16  define signext i8 @f(i32 %i) local_unnamed_addr #0 !dbg !7 {17  entry:18    tail call void @llvm.dbg.value(metadata i32 %i, i64 0, metadata !13, metadata !15), !dbg !1619    %shr1 = lshr i32 %i, 8, !dbg !1720    %conv = trunc i32 %shr1 to i8, !dbg !1821    tail call void @llvm.dbg.value(metadata i8 %conv, i64 0, metadata !14, metadata !15), !dbg !1922    ret i8 %conv, !dbg !2023  }24  25  declare void @llvm.dbg.value(metadata, i64, metadata, metadata) #026  27  attributes #0 = { nounwind readnone }28  29  !llvm.dbg.cu = !{!0}30  !llvm.module.flags = !{!3, !4, !5}31  !llvm.ident = !{!6}32  33  !0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 4.0.0 (trunk 288677) (llvm/trunk 288679)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2)34  !1 = !DIFile(filename: "t.c", directory: "/")35  !2 = !{}36  !3 = !{i32 2, !"Dwarf Version", i32 4}37  !4 = !{i32 2, !"Debug Info Version", i32 3}38  !5 = !{i32 1, !"PIC Level", i32 2}39  !6 = !{!"clang version 4.0.0 (trunk 288677) (llvm/trunk 288679)"}40  !7 = distinct !DISubprogram(name: "f", scope: !1, file: !1, line: 1, type: !8, isLocal: false, isDefinition: true, scopeLine: 1, flags: DIFlagPrototyped, isOptimized: true, unit: !0, retainedNodes: !12)41  !8 = !DISubroutineType(types: !9)42  !9 = !{!10, !11}43  !10 = !DIBasicType(name: "char", size: 8, encoding: DW_ATE_signed_char)44  !11 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)45  !12 = !{!13, !14}46  !13 = !DILocalVariable(name: "i", arg: 1, scope: !7, file: !1, line: 1, type: !11)47  !14 = !DILocalVariable(name: "dh", scope: !7, file: !1, line: 2, type: !10)48  !15 = !DIExpression()49  !16 = !DILocation(line: 1, column: 12, scope: !7)50  !17 = !DILocation(line: 2, column: 14, scope: !7)51  !18 = !DILocation(line: 2, column: 13, scope: !7)52  !19 = !DILocation(line: 2, column: 8, scope: !7)53  !20 = !DILocation(line: 3, column: 3, scope: !7)54 55...56---57name:            f58alignment:       1659exposesReturnsTwice: false60legalized:       false61regBankSelected: false62selected:        false63tracksRegLiveness: true64liveins:         65  - { reg: '$edi' }66frameInfo:       67  isFrameAddressTaken: false68  isReturnAddressTaken: false69  hasStackMap:     false70  hasPatchPoint:   false71  stackSize:       872  offsetAdjustment: 073  maxAlignment:    074  adjustsStack:    false75  hasCalls:        false76  maxCallFrameSize: 077  hasOpaqueSPAdjustment: false78  hasVAStart:      false79  hasMustTailInVarArgFunc: false80fixedStack:      81  - { id: 0, type: spill-slot, offset: -16, size: 8, alignment: 16 }82body:             |83  bb.0.entry:84    liveins: $edi, $rbp85  86    frame-setup PUSH64r killed $rbp, implicit-def $rsp, implicit $rsp87    CFI_INSTRUCTION def_cfa_offset 1688    CFI_INSTRUCTION offset $rbp, -1689    $rbp = frame-setup MOV64rr $rsp90    CFI_INSTRUCTION def_cfa_register $rbp91    DBG_VALUE $dh, _, !14, !15, debug-location !1692    $edi = SHR32ri killed $edi, 8, implicit-def dead $eflags, debug-location !1793    $eax = MOVSX32rr8 $dil, implicit killed $edi, debug-location !2094    $rbp = POP64r implicit-def $rsp, implicit $rsp, debug-location !2095    RET64 $eax, debug-location !2096 97...98