86 lines · plain
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).2 3# RUN: llc -emit-call-site-info -debug-entry-values -start-after=livedebugvalues -o - %s | FileCheck %s4 5# This test would previously trigger an assertion when trying to describe the6# call site value for callee()'s float parameter.7#8# Please note that at the time of creating this test the SystemZ target did not9# support call site information, so the "callSites" array has been manually10# added. For now, verify that we don't crash, and that no (invalid) call site11# parameter entry is emitted, but later on when call site information is added12# to the target the LZER instruction should be properly described.13 14# CHECK-NOT: DW_TAG_GNU_call_site_parameter15 16# Based on the following C reproducer:17#18# extern void callee(float);19# int caller() {20# callee(0);21# return 0;22# }23 24--- |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"27 28 ; Function Attrs: nounwind29 define signext i32 @caller() !dbg !12 {30 entry:31 tail call void @callee(float 0.000000e+00), !dbg !1632 ret i32 0, !dbg !1733 }34 35 declare !dbg !4 void @callee(float)36 37 !llvm.dbg.cu = !{!0}38 !llvm.module.flags = !{!8, !9, !10}39 !llvm.ident = !{!11}40 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: "/")43 !2 = !{}44 !3 = !{!4}45 !4 = !DISubprogram(name: "callee", scope: !1, file: !1, line: 1, type: !5, flags: DIFlagPrototyped, spFlags: DISPFlagOptimized, retainedNodes: !2)46 !5 = !DISubroutineType(types: !6)47 !6 = !{null, !7}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)55 !14 = !{!15}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)59 60...61---62name: caller63tracksRegLiveness: true64callSites:65 - { bb: 0, offset: 9, fwdArgRegs:66 - { arg: 0, reg: '$f0s' } }67body: |68 bb.0.entry:69 liveins: $r11d, $r15d, $r14d70 71 STMG killed $r11d, killed $r15d, $r15d, 88, implicit killed $r14d72 CFI_INSTRUCTION offset $r11d, -7273 CFI_INSTRUCTION offset $r14d, -4874 CFI_INSTRUCTION offset $r15d, -4075 $r15d = AGHI $r15d, -160, implicit-def dead $cc76 CFI_INSTRUCTION def_cfa_offset 32077 $r11d = LGR $r15d78 CFI_INSTRUCTION def_cfa_register $r11d79 renamable $f0s = LZER80 CallBRASL @callee, $f0s, csr_systemz_elf, implicit-def dead $r14d, implicit-def dead $cc, implicit $fpc, debug-location !1681 $r2d = LGHI 0, debug-location !1782 $r11d, $r15d = LMG $r11d, 248, implicit-def $r14d, debug-location !1783 Return implicit killed $r2d, debug-location !1784 85...86