60 lines · plain
1# RUN: llc -emit-call-site-info -start-after=machineverifier -filetype=obj -o - %s \2# RUN: | llvm-dwarfdump - | FileCheck %s --implicit-check-not=DW_TAG_GNU_call_site_parameter3 4## This test would previously trigger an assertion when trying to describe the5## call site value for the MOV16ri instruction.6## Based on the following reproducer:7## a(short);8## b() { a(1); }9 10--- |11 target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"12 target triple = "x86_64-w64-windows-gnu"13 14 ; Function Attrs: nounwind uwtable15 define dso_local i32 @b() local_unnamed_addr !dbg !14 {16 entry:17 %call = tail call i32 @a(i16 1), !dbg !1718 ret i32 undef, !dbg !1819 }20 21 declare !dbg !4 dso_local i32 @a(i16) local_unnamed_addr22 23 !llvm.dbg.cu = !{!0}24 !llvm.module.flags = !{!9, !10, !11, !12}25 !llvm.ident = !{!13}26 27 !0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 11.0.0", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !3, nameTableKind: None)28 !1 = !DIFile(filename: "1.c", directory: "/")29 !2 = !{}30 !3 = !{!4}31 !4 = !DISubprogram(name: "a", scope: !1, file: !1, line: 1, type: !5, flags: DIFlagPrototyped, spFlags: DISPFlagOptimized, retainedNodes: !2)32 !5 = !DISubroutineType(types: !6)33 !6 = !{!7, !8}34 !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)35 !8 = !DIBasicType(name: "short", size: 16, encoding: DW_ATE_signed)36 !9 = !{i32 7, !"Dwarf Version", i32 4}37 !10 = !{i32 2, !"Debug Info Version", i32 3}38 !11 = !{i32 1, !"wchar_size", i32 2}39 !12 = !{i32 7, !"PIC Level", i32 2}40 !13 = !{!"clang version 11.0.0"}41 !14 = distinct !DISubprogram(name: "b", scope: !1, file: !1, line: 3, type: !15, scopeLine: 3, flags: DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !2)42 !15 = !DISubroutineType(types: !16)43 !16 = !{!7}44 !17 = !DILocation(line: 4, column: 3, scope: !14)45 !18 = !DILocation(line: 5, column: 1, scope: !14)46 47...48---49name: b50alignment: 1651callSites:52 - { bb: 0, offset: 1, fwdArgRegs: 53 - { arg: 0, reg: '$cx' } }54body: |55 bb.0.entry:56 $cx = MOV16ri 1, debug-location !1757 TAILJMPd64 @a, csr_win64, implicit $rsp, implicit $ssp, implicit $rsp, implicit $ssp, implicit killed $cx, debug-location !1758 59...60