96 lines · plain
1# RUN: llc -O1 -emit-call-site-info -filetype=obj -mtriple thumbv7em-apple-unknown-macho -start-after=machineverifier %s -o %t.o2# RUN: llvm-dwarfdump %t.o | FileCheck %s3 4# Crash test, reduced from:5#6# a(double);7# b(double c) {8# d();9# a(c);10# }11 12# CHECK: DW_TAG_GNU_call_site13# CHECK-NEXT: DW_AT_abstract_origin {{.*}} "a"14# CHECK-NOT: call_site_parameter15 16--- |17 ; ModuleID = 'unreduced.c'18 source_filename = "unreduced.c"19 target datalayout = "e-m:o-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64"20 target triple = "thumbv7em-apple-unknown-macho"21 ; Function Attrs: nounwind optsize uwtable22 define arm_aapcs_vfpcc i32 @b(double %c) local_unnamed_addr #0 !dbg !16 {23 entry:24 call void @llvm.dbg.value(metadata double %c, metadata !18, metadata !DIExpression()), !dbg !1925 %call = tail call arm_aapcs_vfpcc i32 @d(), !dbg !2026 %call1 = tail call arm_aapcs_vfpcc i32 @a(double %c), !dbg !2127 ret i32 undef, !dbg !2228 }29 declare arm_aapcs_vfpcc i32 @d(...) local_unnamed_addr #030 declare !dbg !4 arm_aapcs_vfpcc i32 @a(double) local_unnamed_addr #031 declare void @llvm.dbg.value(metadata, metadata, metadata)32 declare void @llvm.stackprotector(ptr, ptr)33 34 attributes #0 = { "disable-tail-calls"="false" "frame-pointer"="all" "target-features"="+thumb-mode,+vfp2" }35 36 !llvm.dbg.cu = !{!0}37 !llvm.module.flags = !{!10, !11, !12, !13, !14}38 !llvm.ident = !{!15}39 40 !0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 10.0.0 (git@github.com:apple/llvm-project.git 6203ec90d0bb0fd705fc0ad00ee263e5579aa709)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !3, nameTableKind: None)41 !1 = !DIFile(filename: "jnyn_freeBSD.c", directory: "/Users/vsk/tmp/jnyn")42 !2 = !{}43 !3 = !{!4}44 !4 = !DISubprogram(name: "a", scope: !5, file: !5, line: 1, type: !6, flags: DIFlagPrototyped, spFlags: DISPFlagOptimized, retainedNodes: !2)45 !5 = !DIFile(filename: "unreduced.c", directory: "/Users/vsk/tmp/jnyn")46 !6 = !DISubroutineType(types: !7)47 !7 = !{!8, !9}48 !8 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)49 !9 = !DIBasicType(name: "double", size: 64, encoding: DW_ATE_float)50 !10 = !{i32 7, !"Dwarf Version", i32 4}51 !11 = !{i32 2, !"Debug Info Version", i32 3}52 !12 = !{i32 1, !"wchar_size", i32 4}53 !13 = !{i32 1, !"min_enum_size", i32 4}54 !14 = !{i32 7, !"PIC Level", i32 2}55 !15 = !{!"clang version 10.0.0 (git@github.com:apple/llvm-project.git 6203ec90d0bb0fd705fc0ad00ee263e5579aa709)"}56 !16 = distinct !DISubprogram(name: "b", scope: !5, file: !5, line: 2, type: !6, scopeLine: 2, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !17)57 !17 = !{!18}58 !18 = !DILocalVariable(name: "c", arg: 1, scope: !16, file: !5, line: 2, type: !9)59 !19 = !DILocation(line: 0, scope: !16)60 !20 = !DILocation(line: 3, column: 3, scope: !16)61 !21 = !DILocation(line: 4, column: 3, scope: !16)62 !22 = !DILocation(line: 5, column: 1, scope: !16)63 64...65---66name: b67callSites:68 - { bb: 0, offset: 12, fwdArgRegs: [] }69 - { bb: 0, offset: 18, fwdArgRegs:70 - { arg: 0, reg: '$d0' } }71body: |72 bb.0.entry:73 liveins: $d0, $lr, $d874 75 DBG_VALUE $d0, $noreg, !18, !DIExpression(), debug-location !1976 frame-setup tPUSH 14, $noreg, $r7, killed $lr, implicit-def $sp, implicit $sp77 frame-setup CFI_INSTRUCTION def_cfa_offset 878 frame-setup CFI_INSTRUCTION offset $lr, -479 frame-setup CFI_INSTRUCTION offset $r7, -880 $r7 = frame-setup tMOVr $sp, 14, $noreg81 frame-setup CFI_INSTRUCTION def_cfa_register $r782 $sp = frame-setup VSTMDDB_UPD $sp, 14, $noreg, killed $d883 frame-setup CFI_INSTRUCTION offset $d8, -1684 $s16 = VMOVS killed $s0, 14, $noreg85 $s17 = VMOVS killed $s1, 14, $noreg, implicit-def $d886 DBG_VALUE $d8, $noreg, !18, !DIExpression(), debug-location !1987 tBL 14, $noreg, @d, csr_aapcs, implicit-def dead $lr, implicit $sp, implicit-def $sp, implicit-def dead $r0, debug-location !2088 $s0 = VMOVS killed $s16, 14, $noreg, debug-location !2189 $s1 = VMOVS killed $s17, 14, $noreg, implicit-def $d0, debug-location !2190 DBG_VALUE $d0, $noreg, !18, !DIExpression(), debug-location !1991 $sp = VLDMDIA_UPD $sp, 14, $noreg, def $d8, debug-location !2192 $sp = t2LDMIA_UPD $sp, 14, $noreg, def $r7, def $lr, debug-location !2193 tTAILJMPd @a, 14, $noreg, implicit $sp, implicit $sp, implicit killed $d0, debug-location !2194 95...96