1 # RUN: llc -mtriple=x86_64-pc-linux %s -dwarf-version=5 -start-after=livedebugvalues -filetype=obj -o %t
2 # RUN: llvm-dwarfdump -v %t | FileCheck %s
4 # CHECK: DW_AT_location {{.*}} (DW_OP_entry_value
8 source_filename = "test.c"
9 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
10 target triple = "x86_64-unknown-linux-gnu"
12 ; Function Attrs: noinline nounwind uwtable
13 define dso_local void @fn1(i8* %x) local_unnamed_addr !dbg !12 {
15 call void @llvm.dbg.value(metadata i8* %x, metadata !16, metadata !DIExpression()), !dbg !18
16 %0 = ptrtoint i8* %x to i64, !dbg !18
17 %y = trunc i64 %0 to i32, !dbg !18
18 call void @llvm.dbg.value(metadata i32 %y, metadata !17, metadata !DIExpression()), !dbg !18
19 tail call void @fn2(i32 7), !dbg !18
23 declare !dbg !4 dso_local void @fn2(i32) local_unnamed_addr
25 ; Function Attrs: nounwind readnone speculatable
26 declare void @llvm.dbg.value(metadata, metadata, metadata)
29 !llvm.module.flags = !{!8, !9, !10}
32 !0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 9.0.0", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !3, nameTableKind: None)
33 !1 = !DIFile(filename: "test.c", directory: "/dir")
36 !4 = !DISubprogram(name: "fn2", scope: !1, file: !1, line: 1, type: !5, flags: DIFlagPrototyped, spFlags: DISPFlagOptimized, retainedNodes: !2)
37 !5 = !DISubroutineType(types: !6)
39 !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
40 !8 = !{i32 2, !"Dwarf Version", i32 5}
41 !9 = !{i32 2, !"Debug Info Version", i32 3}
42 !10 = !{i32 1, !"wchar_size", i32 4}
43 !11 = !{!"clang version 9.0.0"}
44 !12 = distinct !DISubprogram(name: "fn1", scope: !1, file: !1, line: 5, type: !13, scopeLine: 5, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !15)
45 !13 = !DISubroutineType(types: !14)
48 !16 = !DILocalVariable(name: "x", arg: 1, scope: !12, file: !1, line: 5, type: !7, flags: DIFlagArgumentNotModified)
49 !17 = !DILocalVariable(name: "y", scope: !12, file: !1, line: 5, type: !7)
50 !18 = !DILocation(line: 0, scope: !12)
56 tracksRegLiveness: true
60 DBG_VALUE $rdi, $noreg, !16, !DIExpression(), debug-location !18
61 DBG_VALUE $edi, $noreg, !16, !DIExpression(), debug-location !18
62 DBG_VALUE $edi, $noreg, !17, !DIExpression(), debug-location !18
63 $edi = KILL renamable $edi, implicit killed $rdi, debug-location !18
64 DBG_VALUE $rdi, $noreg, !16, !DIExpression(DW_OP_entry_value, 1), debug-location !18
65 TAILJMPd64 @fn2, csr_64, implicit $rsp, implicit $ssp, implicit $rsp, implicit $ssp, implicit killed $edi, debug-location !18