1# RUN: llc -emit-call-site-info -debug-entry-values -mtriple=armebv6k-unknown-linux-gnueabihf -filetype=obj -start-after=machineverifier %s -o -| llvm-dwarfdump - | FileCheck %s --implicit-check-not=DW_TAG_GNU_call_site_parameter
2
3## The test was handmade.
4
5--- |
6  ; ModuleID = 'test.c'
7  source_filename = "test.c"
8  target datalayout = "E-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64"
9  target triple = "armebv6k-unknown-linux-gnueabihf"
10
11  ; Function Attrs: nounwind
12  define dso_local arm_aapcscc i32 @func1(i32 %arg1) local_unnamed_addr !dbg !14 {
13  entry:
14    %add = add nsw i32 %arg1, 2, !dbg !19
15    %a = alloca i32, align 4
16    call void @llvm.dbg.value(metadata i32 %arg1, metadata !18, metadata !DIExpression()), !dbg !19
17    %call = call arm_aapcscc i32 @func2(i32 %add), !dbg !19
18    ret i32  0, !dbg !19
19  }
20
21  declare !dbg !4 dso_local arm_aapcscc i32 @func2(i32) local_unnamed_addr
22
23  ; Function Attrs: nounwind readnone speculatable willreturn
24  declare void @llvm.dbg.value(metadata, metadata, metadata)
25
26  !llvm.dbg.cu = !{!0}
27  !llvm.module.flags = !{!9, !10, !11, !12}
28  !llvm.ident = !{!13}
29
30  !0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 10.0.0", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !3, nameTableKind: None)
31  !1 = !DIFile(filename: "test.c", directory: "/")
32  !2 = !{}
33  !3 = !{!4}
34  !4 = !DISubprogram(name: "func2", scope: !1, file: !1, line: 8, type: !5, flags: DIFlagPrototyped, spFlags: DISPFlagOptimized, retainedNodes: !2)
35  !5 = !DISubroutineType(types: !6)
36  !6 = !{!7, !7, !7, !8}
37  !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
38  !8 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !7, size: 32)
39  !9 = !{i32 2, !"Dwarf Version", i32 4}
40  !10 = !{i32 2, !"Debug Info Version", i32 3}
41  !11 = !{i32 1, !"wchar_size", i32 4}
42  !12 = !{i32 1, !"min_enum_size", i32 4}
43  !13 = !{!"clang version 10.0.0"}
44  !14 = distinct !DISubprogram(name: "func1", scope: !1, file: !1, line: 9, type: !15, scopeLine: 9, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !17)
45  !15 = !DISubroutineType(types: !16)
46  !16 = !{!7, !7, !7, !7}
47  !17 = !{!18}
48  !18 = !DILocalVariable(name: "arg1", arg: 1, scope: !14, file: !1, line: 9, type: !7)
49  !19 = !DILocation(line: 0, scope: !14)
50...
51---
52name:            func1
53alignment:       4
54callSites:
55  - { bb: 0, offset: 11, fwdArgRegs:
56      - { arg: 0, reg: '$r0' } }
57body:             |
58  bb.0.entry:
59    liveins: $r0, $r1, $r2, $r4, $r10, $lr
60
61    DBG_VALUE $r0, $noreg, !18, !DIExpression(), debug-location !19
62    $sp = frame-setup STMDB_UPD $sp, 14, $noreg, killed $r4, killed $r10, $r11, killed $lr
63    frame-setup CFI_INSTRUCTION def_cfa_offset 16
64    frame-setup CFI_INSTRUCTION offset $lr, -4
65    frame-setup CFI_INSTRUCTION offset $r11, -8
66    frame-setup CFI_INSTRUCTION offset $r10, -12
67    frame-setup CFI_INSTRUCTION offset $r4, -16
68    $r11 = frame-setup ADDri $sp, 8, 14, $noreg, $noreg
69    frame-setup CFI_INSTRUCTION def_cfa $r11, 8
70    $sp = frame-setup SUBri $sp, 8, 14, $noreg, $noreg
71    INLINEASM &"rev $0, $1", 0, 327690, def renamable $r0, 327689, killed renamable $r4, 0, debug-location !19
72    BL @func2, csr_aapcs, implicit-def dead $lr, implicit $sp, implicit killed $r0, implicit killed $r1, implicit killed $r2, implicit-def $sp, implicit-def $r0, debug-location !19
73    BX_RET 14, $noreg, implicit killed $r0, debug-location !19
74
75...
76