[ORC] Add std::tuple support to SimplePackedSerialization.
[llvm-project.git] / llvm / test / DebugInfo / MIR / X86 / dbgcall-site-reg-shuffle.mir
blob27a03193e81615868aa4606187b03bbc65e329ed
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
4 --- |
5   target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
6   target triple = "x86_64-unknown-linux-gnu"
8   ; Function Attrs: nounwind uwtable
9   define void @move_around_args(i32 %a) #0 !dbg !12 {
10   entry:
11     call void @call2(i32 123, i32 %a), !dbg !15
12     ret void, !dbg !16
13   }
15   declare !dbg !4 dso_local void @call2(i32, i32)
17   attributes #0 = { nounwind uwtable }
19   !llvm.dbg.cu = !{!0}
20   !llvm.module.flags = !{!8, !9, !10}
21   !llvm.ident = !{!11}
23   !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)
24   !1 = !DIFile(filename: "worklist.c", directory: "/")
25   !2 = !{}
26   !3 = !{!4}
27   !4 = !DISubprogram(name: "call2", scope: !1, file: !1, line: 1, type: !5, flags: DIFlagPrototyped, spFlags: DISPFlagOptimized, retainedNodes: !2)
28   !5 = !DISubroutineType(types: !6)
29   !6 = !{null, !7, !7}
30   !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
31   !8 = !{i32 7, !"Dwarf Version", i32 4}
32   !9 = !{i32 2, !"Debug Info Version", i32 3}
33   !10 = !{i32 1, !"wchar_size", i32 4}
34   !11 = !{!"clang version 11.0.0"}
35   !12 = distinct !DISubprogram(name: "move_around_args", scope: !1, file: !1, line: 3, type: !13, scopeLine: 3, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !2)
36   !13 = !DISubroutineType(types: !14)
37   !14 = !{null, !7}
38   !15 = !DILocation(line: 4, scope: !12)
39   !16 = !DILocation(line: 5, scope: !12)
41 ...
42 ---
43 name:            move_around_args
44 liveins:
45   - { reg: '$edi' }
46 callSites:
47   - { bb: 0, offset: 12, fwdArgRegs:
48       - { arg: 0, reg: '$edi' }
49       - { arg: 1, reg: '$esi' } }
50 body:             |
51   bb.0.entry:
52     liveins: $edi
54     frame-setup PUSH64r undef $rax, implicit-def $rsp, implicit $rsp
55     CFI_INSTRUCTION def_cfa_offset 16
56     $esi = MOV32ri 123
58     ; Move the values around between different registers.
60     $edx = MOV32rr $edi
62     $edi = MOV32rr $esi
63     $esi = MOV32rr $edx
65     $edx = MOV32rr $edi
66     $eax = MOV32rr $esi
68     $esi = MOV32rr $edx
69     $edx = MOV32rr $eax
71     $edi = MOV32rr $esi
72     $esi = MOV32rr $edx
74     CALL64pcrel32 @call2, csr_64, implicit $rsp, implicit $ssp, implicit $edi, implicit $esi, implicit-def $rsp, implicit-def $ssp, debug-location !15
75     $rax = frame-destroy POP64r implicit-def $rsp, implicit $rsp, debug-location !16
76     CFI_INSTRUCTION def_cfa_offset 8, debug-location !16
77     RETQ debug-location !16
79 ...
81 # Verify that we emit correct call site parameter entries even after moving
82 # around the call site values between different registers.
84 # This test uses an implicit CHECK-NOT to verify that only two call site
85 # parameter entries are emitted.
87 # CHECK: DW_TAG_GNU_call_site_parameter
88 # CHECK-NEXT: DW_AT_location    (DW_OP_reg5 RDI)
89 # CHECK-NEXT: DW_AT_GNU_call_site_value (DW_OP_constu 0x7b)
91 # CHECK: DW_TAG_GNU_call_site_parameter
92 # CHECK-NEXT: DW_AT_location    (DW_OP_reg4 RSI)
93 # CHECK-NEXT: DW_AT_GNU_call_site_value (DW_OP_GNU_entry_value(DW_OP_reg5 RDI))