1# RUN: llc -emit-call-site-info -start-before=livedebugvalues -filetype=obj -o - %s \ 2# RUN: | llvm-dwarfdump - | FileCheck %s --implicit-check-not=DW_TAG_GNU_call_site_parameter 3# 4# Test that we don't crash on complicated copies with avx registers. For 5# complex intrinsic code, LLVM will produce register copies to 128-bit 6# registers that (through writing to them) implicitly zero out the upper 7# bit of the 256 ymm register. 8# 9# However, this is now what call-site-info tracking expects to see, as 10# demonstrated in the MIR below -- a ymm argument to a function might be 11# implicit-def'd by such a copy, but without being the 'Destination' 12# register. For this non-trivial copy, test that we presently produce 13# no parameter location. We might be able to describe it in the future. 14# 15# CHECK: DW_TAG_GNU_call_site 16# CHECK-NEXT: DW_AT_abstract_origin 17 18--- | 19 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" 20 target triple = "x86_64-unknown-linux-gnu" 21 22 ; Function Attrs: nounwind uwtable 23 define void @foo() !dbg !12 { 24 entry: 25 ret void, !dbg !16 26 } 27 28 declare !dbg !4 void @call() 29 30 !llvm.dbg.cu = !{!0} 31 !llvm.module.flags = !{!8, !9, !10} 32 !llvm.ident = !{!11} 33 34 !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, splitDebugInlining: false, nameTableKind: None) 35 !1 = !DIFile(filename: "clobber.c", directory: "/") 36 !2 = !{} 37 !3 = !{!4} 38 !4 = !DISubprogram(name: "call", scope: !1, file: !1, line: 1, type: !5, flags: DIFlagPrototyped, spFlags: DISPFlagOptimized, retainedNodes: !2) 39 !5 = !DISubroutineType(types: !6) 40 !6 = !{null, !7, !7} 41 !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) 42 !8 = !{i32 7, !"Dwarf Version", i32 4} 43 !9 = !{i32 2, !"Debug Info Version", i32 3} 44 !10 = !{i32 1, !"wchar_size", i32 4} 45 !11 = !{!"clang version 11.0.0"} 46 !12 = distinct !DISubprogram(name: "foo", scope: !1, file: !1, line: 3, type: !13, scopeLine: 3, flags: DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !2) 47 !13 = !DISubroutineType(types: !14) 48 !14 = !{null} 49 !15 = !DILocation(line: 5, scope: !12) 50 !16 = !DILocation(line: 6, scope: !12) 51 52... 53--- 54name: foo 55callSites: 56 - { bb: 0, offset: 1, fwdArgRegs: 57 - { arg: 0, reg: '$ymm0' } } 58body: | 59 bb.0.entry: 60 liveins: $xmm1 61 62 renamable $xmm0 = VMOVAPSrr renamable $xmm1, implicit-def $ymm0 63 CALL64pcrel32 @call, csr_64, implicit $rsp, implicit $ssp, implicit killed $ymm0, implicit-def $rsp, implicit-def $ssp, debug-location !15 64 RET64 debug-location !16 65 66... 67