|
| 1 | +# RUN: llc -O0 -x mir -mcpu=gfx900 -start-after=livedebugvalues -filetype=obj < %s | llvm-dwarfdump - | FileCheck %s |
| 2 | + |
| 3 | +--- | |
| 4 | + target datalayout = "e-p:64:64-p1:64:64-p2:32:32-p3:32:32-p4:64:64-p5:32:32-p6:32:32-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64-S32-A5-G1-ni:7" |
| 5 | + target triple = "amdgcn-amd-amdhsa" |
| 6 | + |
| 7 | + define void @kern() #0 !dbg !9 { |
| 8 | + ret void, !dbg !16 |
| 9 | + } |
| 10 | + attributes #0 = { convergent mustprogress noinline nounwind optnone "amdgpu-stack-objects" "frame-pointer"="none" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="gfx900" "target-features"="+16-bit-insts,+ci-insts,+dpp,+flat-address-space,+gfx8-insts,+gfx9-insts,+s-memrealtime,+s-memtime-inst" "uniform-work-group-size"="false" } |
| 11 | + |
| 12 | + !llvm.dbg.cu = !{!0} |
| 13 | + !llvm.module.flags = !{!2, !3, !4, !5, !6, !7} |
| 14 | + !llvm.ident = !{!8} |
| 15 | + |
| 16 | + !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !1, producer: "clang version 19.0.0", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, splitDebugInlining: false, nameTableKind: None) |
| 17 | + !1 = !DIFile(filename: "t.cpp", directory: "/") |
| 18 | + !2 = !{i32 1, !"amdhsa_code_object_version", i32 500} |
| 19 | + !3 = !{i32 7, !"Dwarf Version", i32 5} |
| 20 | + !4 = !{i32 2, !"Debug Info Version", i32 3} |
| 21 | + !5 = !{i32 1, !"wchar_size", i32 4} |
| 22 | + !6 = !{i32 8, !"PIC Level", i32 2} |
| 23 | + !7 = !{i32 7, !"frame-pointer", i32 2} |
| 24 | + !8 = !{!"clang version 19.0.0"} |
| 25 | + !9 = distinct !DISubprogram(name: "kern", linkageName: "kern", scope: !1, file: !1, line: 1, type: !10, scopeLine: 1, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !12) |
| 26 | + !10 = !DISubroutineType(types: !11) |
| 27 | + !11 = !{} |
| 28 | + !12 = !{!17, !18, !19} |
| 29 | + !13 = !DIBasicType(name: "i16", size: 16, encoding: DW_ATE_signed) |
| 30 | + !14 = !DIBasicType(name: "i32", size: 32, encoding: DW_ATE_signed) |
| 31 | + !15 = !DIBasicType(name: "i64", size: 64, encoding: DW_ATE_signed) |
| 32 | + !16 = !DILocation(line: 1, column: 1, scope: !9) |
| 33 | + !17 = !DILocalVariable(name: "s_lo16", scope: !9, file: !1, line: 1, type: !13) |
| 34 | + !18 = !DILocalVariable(name: "s_hi16", scope: !9, file: !1, line: 1, type: !13) |
| 35 | + !19 = !DILocalVariable(name: "s_s", scope: !9, file: !1, line: 1, type: !15) |
| 36 | + !20 = !DILocalVariable(name: "v_lo16", scope: !9, file: !1, line: 1, type: !13) |
| 37 | + !21 = !DILocalVariable(name: "v_hi16", scope: !9, file: !1, line: 1, type: !13) |
| 38 | + !22 = !DILocalVariable(name: "v_v", scope: !9, file: !1, line: 1, type: !15) |
| 39 | + !23 = !DILocalVariable(name: "with_frags", scope: !9, file: !1, line: 1, type: !15) |
| 40 | + !24 = !DILocalVariable(name: "sgpr", scope: !9, file: !1, line: 1, type: !14) |
| 41 | + !25 = !DILocalVariable(name: "vgpr", scope: !9, file: !1, line: 1, type: !14) |
| 42 | + |
| 43 | +... |
| 44 | +--- |
| 45 | +name: kern |
| 46 | +body: | |
| 47 | + bb.0: |
| 48 | +
|
| 49 | + ; CHECK: DW_AT_location (DW_OP_regx SGPR42, DW_OP_deref_size 0x2, DW_OP_stack_value) |
| 50 | + ; CHECK-NEXT: DW_AT_name ("s_lo16") |
| 51 | + DBG_VALUE renamable $sgpr42_lo16, $noreg, !17, !DIExpression(DIOpArg(0, i16)), debug-location !16 |
| 52 | +
|
| 53 | + ; CHECK: DW_AT_location (DW_OP_regx SGPR42, DW_OP_LLVM_user DW_OP_LLVM_offset_uconst 0x2, DW_OP_deref_size 0x2, DW_OP_stack_value) |
| 54 | + ; CHECK-NEXT: DW_AT_name ("s_hi16") |
| 55 | + DBG_VALUE renamable $sgpr42_hi16, $noreg, !18, !DIExpression(DIOpArg(0, i16)), debug-location !16 |
| 56 | +
|
| 57 | + ; CHECK: DW_AT_location (DW_OP_regx SGPR42, DW_OP_piece 0x4, DW_OP_regx SGPR43, DW_OP_piece 0x4, DW_OP_LLVM_user DW_OP_LLVM_piece_end) |
| 58 | + ; CHECK-NEXT: DW_AT_name ("s_s") |
| 59 | + DBG_VALUE renamable $sgpr42_sgpr43, $noreg, !19, !DIExpression(DIOpArg(0, i64)), debug-location !16 |
| 60 | +
|
| 61 | + ; CHECK: DW_AT_location (DW_OP_regx VGPR42, DW_OP_deref_size 0x2, DW_OP_stack_value) |
| 62 | + ; CHECK-NEXT: DW_AT_name ("v_lo16") |
| 63 | + DBG_VALUE renamable $vgpr42_lo16, $noreg, !20, !DIExpression(DIOpArg(0, i16)), debug-location !16 |
| 64 | +
|
| 65 | + ; CHECK: DW_AT_location (DW_OP_regx VGPR42, DW_OP_LLVM_user DW_OP_LLVM_offset_uconst 0x2, DW_OP_deref_size 0x2, DW_OP_stack_value) |
| 66 | + ; CHECK-NEXT: DW_AT_name ("v_hi16") |
| 67 | + DBG_VALUE renamable $vgpr42_hi16, $noreg, !21, !DIExpression(DIOpArg(0, i16)), debug-location !16 |
| 68 | +
|
| 69 | + ; CHECK: DW_AT_location (DW_OP_regx VGPR42, DW_OP_piece 0x4, DW_OP_regx VGPR43, DW_OP_piece 0x4, DW_OP_LLVM_user DW_OP_LLVM_piece_end) |
| 70 | + ; CHECK-NEXT: DW_AT_name ("v_v") |
| 71 | + DBG_VALUE renamable $vgpr42_vgpr43, $noreg, !22, !DIExpression(DIOpArg(0, i64)), debug-location !16 |
| 72 | +
|
| 73 | + ; CHECK: DW_TAG_variable |
| 74 | + ; CHECK-NEXT: DW_AT_location (indexed ({{.*}}) loclist = {{.*}}: |
| 75 | + ; CHECK-NEXT: [{{.*}}): DW_OP_lit0, DW_OP_regx SGPR50, DW_OP_piece 0x4, DW_OP_regx SGPR51, DW_OP_piece 0x4, DW_OP_LLVM_user DW_OP_LLVM_piece_end, DW_OP_swap, DW_OP_drop, DW_OP_piece 0x4, DW_OP_lit0, DW_OP_regx SGPR52, DW_OP_piece 0x4, DW_OP_regx SGPR53, DW_OP_piece 0x4, DW_OP_LLVM_user DW_OP_LLVM_piece_end, DW_OP_swap, DW_OP_drop, DW_OP_piece 0x4) |
| 76 | + ; CHECK-NEXT: DW_AT_name ("with_frags") |
| 77 | + DBG_VALUE renamable $sgpr50_sgpr51, $noreg, !23, !DIExpression(DIOpArg(0, i64), DIOpFragment(0, 32)), debug-location !16 |
| 78 | + DBG_VALUE renamable $sgpr52_sgpr53, $noreg, !23, !DIExpression(DIOpArg(0, i64), DIOpFragment(32, 32)), debug-location !16 |
| 79 | +
|
| 80 | + ; CHECK: DW_AT_location (DW_OP_regx SGPR100) |
| 81 | + ; CHECK-NEXT: DW_AT_name ("sgpr") |
| 82 | + DBG_VALUE $sgpr100, $noreg, !24, !DIExpression(DIOpArg(0, i32)), debug-location !16 |
| 83 | +
|
| 84 | + ; CHECK: DW_AT_location (DW_OP_regx VGPR100) |
| 85 | + ; CHECK-NEXT: ("vgpr") |
| 86 | + DBG_VALUE $vgpr100, $noreg, !25, !DIExpression(DIOpArg(0, i32)), debug-location !16 |
| 87 | +
|
| 88 | + S_ENDPGM 0, debug-location !16 |
| 89 | +
|
| 90 | +... |
0 commit comments