1 # We do not support the call site info for the target now, so we use the experimental option (-emit-call-site-info -debug-entry-values).
3 # RUN: llc -emit-call-site-info -debug-entry-values -start-after=livedebugvalues -o - %s | FileCheck %s
5 # This test would previously trigger an assertion when trying to describe the
6 # call site value for callee()'s float parameter.
8 # Please note that at the time of creating this test the SystemZ target did not
9 # support call site information, so the "callSites" array has been manually
10 # added. For now, verify that we don't crash, and that no (invalid) call site
11 # parameter entry is emitted, but later on when call site information is added
12 # to the target the LZER instruction should be properly described.
14 # CHECK-NOT: DW_TAG_GNU_call_site_parameter
16 # Based on the following C reproducer:
18 # extern void callee(float);
25 target datalayout = "E-m:e-i1:8:16-i8:8:16-i64:64-f128:64-a:8:16-n32:64"
26 target triple = "systemz"
28 ; Function Attrs: nounwind
29 define signext i32 @caller() !dbg !12 {
31 tail call void @callee(float 0.000000e+00), !dbg !16
35 declare !dbg !4 void @callee(float)
38 !llvm.module.flags = !{!8, !9, !10}
41 !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)
42 !1 = !DIFile(filename: "systemz-lzer.c", directory: "/")
45 !4 = !DISubprogram(name: "callee", scope: !1, file: !1, line: 1, type: !5, flags: DIFlagPrototyped, spFlags: DISPFlagOptimized, retainedNodes: !2)
46 !5 = !DISubroutineType(types: !6)
48 !7 = !DIBasicType(name: "float", size: 32, encoding: DW_ATE_float)
49 !8 = !{i32 2, !"Dwarf Version", i32 4}
50 !9 = !{i32 2, !"Debug Info Version", i32 3}
51 !10 = !{i32 1, !"wchar_size", i32 4}
52 !11 = !{!"clang version 10.0.0"}
53 !12 = distinct !DISubprogram(name: "caller", scope: !1, file: !1, line: 2, type: !13, scopeLine: 2, flags: DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !2)
54 !13 = !DISubroutineType(types: !14)
56 !15 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
57 !16 = !DILocation(line: 3, scope: !12)
58 !17 = !DILocation(line: 4, scope: !12)
63 tracksRegLiveness: true
65 - { bb: 0, offset: 9, fwdArgRegs:
66 - { arg: 0, reg: '$f0s' } }
69 liveins: $r11d, $r15d, $r14d
71 STMG killed $r11d, killed $r15d, $r15d, 88, implicit killed $r14d
72 CFI_INSTRUCTION offset $r11d, -72
73 CFI_INSTRUCTION offset $r14d, -48
74 CFI_INSTRUCTION offset $r15d, -40
75 $r15d = AGHI $r15d, -160, implicit-def dead $cc
76 CFI_INSTRUCTION def_cfa_offset 320
78 CFI_INSTRUCTION def_cfa_register $r11d
80 CallBRASL @callee, $f0s, csr_systemz_elf, implicit-def dead $r14d, implicit-def dead $cc, implicit $fpc, debug-location !16
81 $r2d = LGHI 0, debug-location !17
82 $r11d, $r15d = LMG $r11d, 248, implicit-def $r14d, debug-location !17
83 Return implicit killed $r2d, debug-location !17