[ARM] Better OR's for MVE compares
[llvm-core.git] / test / DebugInfo / X86 / convert-debugloc.ll
blob8d831cc1fabefb880b468a19a66bdc6ee8e5b67d
1 ; RUN: llc -dwarf-version=5 -filetype=obj -O0 < %s | llvm-dwarfdump - | FileCheck %s --match-full-lines --check-prefix=DW5-CHECK
2 ; RUN: llc -dwarf-version=4 -filetype=obj -O0 < %s | llvm-dwarfdump - | FileCheck %s --match-full-lines --check-prefix=DW4-CHECK
4 ; DW5-CHECK: .debug_info contents:
5 ; DW5-CHECK-NEXT: 0x00000000: Compile Unit: length = 0x00000064 version = 0x0005 unit_type = DW_UT_compile abbr_offset = 0x0000 addr_size = 0x08 (next unit at 0x00000068)
6 ; DW5-CHECK-EMPTY:
7 ; DW5-CHECK-NEXT: 0x0000000c: DW_TAG_compile_unit
8 ; DW5-CHECK-NEXT:               DW_AT_producer  ("clang version 9.0.0 (trunk 353791) (llvm/trunk 353801)")
9 ; DW5-CHECK-NEXT:               DW_AT_language  (DW_LANG_C99)
10 ; DW5-CHECK-NEXT:               DW_AT_name      ("dbg.c")
11 ; DW5-CHECK-NEXT:               DW_AT_str_offsets_base  (0x00000008)
12 ; DW5-CHECK-NEXT:               DW_AT_stmt_list (0x00000000)
13 ; DW5-CHECK-NEXT:               DW_AT_comp_dir {{.*}}
14 ; DW5-CHECK-NEXT:               DW_AT_low_pc    (0x0000000000000000)
15 ; DW5-CHECK-NEXT:               DW_AT_high_pc   (0x0000000000000005)
16 ; DW5-CHECK-NEXT:               DW_AT_addr_base (0x00000008)
17 ; DW5-CHECK-EMPTY:
18 ; DW5-CHECK-NEXT: 0x00000023:   DW_TAG_base_type
19 ; DW5-CHECK-NEXT:                 DW_AT_name    ("DW_ATE_signed_8")
20 ; DW5-CHECK-NEXT:                 DW_AT_encoding        (DW_ATE_signed)
21 ; DW5-CHECK-NEXT:                 DW_AT_byte_size       (0x01)
22 ; DW5-CHECK-EMPTY:
23 ; DW5-CHECK-NEXT: 0x00000027:   DW_TAG_base_type
24 ; DW5-CHECK-NEXT:                 DW_AT_name    ("DW_ATE_signed_32")
25 ; DW5-CHECK-NEXT:                 DW_AT_encoding        (DW_ATE_signed)
26 ; DW5-CHECK-NEXT:                 DW_AT_byte_size       (0x04)
27 ; DW5-CHECK-EMPTY:
28 ; DW5-CHECK-NEXT: 0x0000002b:   DW_TAG_subprogram
29 ; DW5-CHECK-NEXT:                 DW_AT_low_pc  (0x0000000000000000)
30 ; DW5-CHECK-NEXT:                 DW_AT_high_pc (0x0000000000000005)
31 ; DW5-CHECK-NEXT:                 DW_AT_frame_base      (DW_OP_reg7 RSP)
32 ; DW5-CHECK-NEXT:                 DW_AT_name    ("foo")
33 ; DW5-CHECK-NEXT:                 DW_AT_decl_file {{.*}}
34 ; DW5-CHECK-NEXT:                 DW_AT_decl_line       (1)
35 ; DW5-CHECK-NEXT:                 DW_AT_prototyped      (true)
36 ; DW5-CHECK-NEXT:                 DW_AT_type    (0x0000005f "signed char")
37 ; DW5-CHECK-NEXT:                 DW_AT_external        (true)
38 ; DW5-CHECK-EMPTY:
39 ; DW5-CHECK-NEXT: 0x0000003a:     DW_TAG_formal_parameter
40 ; DW5-CHECK-NEXT:                   DW_AT_location      (DW_OP_reg5 RDI)
41 ; DW5-CHECK-NEXT:                   DW_AT_name  ("x")
42 ; DW5-CHECK-NEXT:                   DW_AT_decl_file {{.*}}
43 ; DW5-CHECK-NEXT:                   DW_AT_decl_line     (1)
44 ; DW5-CHECK-NEXT:                   DW_AT_type  (0x0000005f "signed char")
45 ; DW5-CHECK-EMPTY:
46 ; DW5-CHECK-NEXT: 0x00000044:     DW_TAG_variable
47 ; DW5-CHECK-NEXT:                   DW_AT_location      (DW_OP_breg5 RDI+0, DW_OP_constu 0xff, DW_OP_and, DW_OP_convert (0x00000023) "DW_ATE_signed_8", DW_OP_convert (0x00000027) "DW_ATE_signed_32", DW_OP_stack_value)
48 ; DW5-CHECK-NEXT:                   DW_AT_name  ("y")
49 ; DW5-CHECK-NEXT:                   DW_AT_decl_file {{.*}}
50 ; DW5-CHECK-NEXT:                   DW_AT_decl_line     (3)
51 ; DW5-CHECK-NEXT:                   DW_AT_type  (0x00000063 "int")
52 ; DW5-CHECK-EMPTY:
53 ; DW5-CHECK-NEXT: 0x0000005e:     NULL
54 ; DW5-CHECK-EMPTY:
55 ; DW5-CHECK-NEXT: 0x0000005f:   DW_TAG_base_type
56 ; DW5-CHECK-NEXT:                 DW_AT_name    ("signed char")
57 ; DW5-CHECK-NEXT:                 DW_AT_encoding        (DW_ATE_signed_char)
58 ; DW5-CHECK-NEXT:                 DW_AT_byte_size       (0x01)
59 ; DW5-CHECK-EMPTY:
60 ; DW5-CHECK-NEXT: 0x00000063:   DW_TAG_base_type
61 ; DW5-CHECK-NEXT:                 DW_AT_name    ("int")
62 ; DW5-CHECK-NEXT:                 DW_AT_encoding        (DW_ATE_signed)
63 ; DW5-CHECK-NEXT:                 DW_AT_byte_size       (0x04)
64 ; DW5-CHECK-EMPTY:
65 ; DW5-CHECK-NEXT: 0x00000067:   NULL
68 ; DW4-CHECK: .debug_info contents:
69 ; DW4-CHECK-NEXT: 0x00000000: Compile Unit: length = 0x0000007a version = 0x0004 abbr_offset = 0x0000 addr_size = 0x08 (next unit at 0x0000007e)
70 ; DW4-CHECK-EMPTY:
71 ; DW4-CHECK-NEXT: 0x0000000b: DW_TAG_compile_unit
72 ; DW4-CHECK-NEXT:               DW_AT_producer  ("clang version 9.0.0 (trunk 353791) (llvm/trunk 353801)")
73 ; DW4-CHECK-NEXT:               DW_AT_language  (DW_LANG_C99)
74 ; DW4-CHECK-NEXT:               DW_AT_name      ("dbg.c")
75 ; DW4-CHECK-NEXT:               DW_AT_stmt_list (0x00000000)
76 ; DW4-CHECK-NEXT:               DW_AT_comp_dir {{.*}}
77 ; DW4-CHECK-NEXT:               DW_AT_low_pc    (0x0000000000000000)
78 ; DW4-CHECK-NEXT:               DW_AT_high_pc   (0x0000000000000005)
79 ; DW4-CHECK-EMPTY:
80 ; DW4-CHECK-NEXT: 0x0000002a:   DW_TAG_subprogram
81 ; DW4-CHECK-NEXT:                 DW_AT_low_pc  (0x0000000000000000)
82 ; DW4-CHECK-NEXT:                 DW_AT_high_pc (0x0000000000000005)
83 ; DW4-CHECK-NEXT:                 DW_AT_frame_base      (DW_OP_reg7 RSP)
84 ; DW4-CHECK-NEXT:                 DW_AT_name    ("foo")
85 ; DW4-CHECK-NEXT:                 DW_AT_decl_file {{.*}}
86 ; DW4-CHECK-NEXT:                 DW_AT_decl_line       (1)
87 ; DW4-CHECK-NEXT:                 DW_AT_prototyped      (true)
88 ; DW4-CHECK-NEXT:                 DW_AT_type    (0x0000006f "signed char")
89 ; DW4-CHECK-NEXT:                 DW_AT_external        (true)
90 ; DW4-CHECK-EMPTY:
91 ; DW4-CHECK-NEXT: 0x00000043:     DW_TAG_formal_parameter
92 ; DW4-CHECK-NEXT:                   DW_AT_location      (DW_OP_reg5 RDI)
93 ; DW4-CHECK-NEXT:                   DW_AT_name  ("x")
94 ; DW4-CHECK-NEXT:                   DW_AT_decl_file {{.*}}
95 ; DW4-CHECK-NEXT:                   DW_AT_decl_line     (1)
96 ; DW4-CHECK-NEXT:                   DW_AT_type  (0x0000006f "signed char")
97 ; DW4-CHECK-EMPTY:
98 ; DW4-CHECK-NEXT: 0x00000050:     DW_TAG_variable
99 ; DW4-CHECK-NEXT:                   DW_AT_location      (DW_OP_breg5 RDI+0, DW_OP_constu 0xff, DW_OP_and, DW_OP_dup, DW_OP_constu 0x7, DW_OP_shr, DW_OP_lit0, DW_OP_not, DW_OP_mul, DW_OP_constu 0x8, DW_OP_shl, DW_OP_or, DW_OP_stack_value)
100 ; DW4-CHECK-NEXT:                   DW_AT_name  ("y")
101 ; DW4-CHECK-NEXT:                   DW_AT_decl_file {{.*}}
102 ; DW4-CHECK-NEXT:                   DW_AT_decl_line     (3)
103 ; DW4-CHECK-NEXT:                   DW_AT_type  (0x00000076 "int")
104 ; DW4-CHECK-EMPTY:
105 ; DW4-CHECK-NEXT: 0x0000006e:     NULL
106 ; DW4-CHECK-EMPTY:
107 ; DW4-CHECK-NEXT: 0x0000006f:   DW_TAG_base_type
108 ; DW4-CHECK-NEXT:                 DW_AT_name    ("signed char")
109 ; DW4-CHECK-NEXT:                 DW_AT_encoding        (DW_ATE_signed_char)
110 ; DW4-CHECK-NEXT:                 DW_AT_byte_size       (0x01)
111 ; DW4-CHECK-EMPTY:
112 ; DW4-CHECK-NEXT: 0x00000076:   DW_TAG_base_type
113 ; DW4-CHECK-NEXT:                 DW_AT_name    ("int")
114 ; DW4-CHECK-NEXT:                 DW_AT_encoding        (DW_ATE_signed)
115 ; DW4-CHECK-NEXT:                 DW_AT_byte_size       (0x04)
116 ; DW4-CHECK-EMPTY:
117 ; DW4-CHECK-NEXT: 0x0000007d:   NULL
120 ; ModuleID = 'dbg.ll'
121 source_filename = "dbg.c"
122 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
123 target triple = "x86_64-unknown-linux-gnu"
125 ; Function Attrs: noinline nounwind uwtable
126 define dso_local signext i8 @foo(i8 signext %x) !dbg !7 {
127 entry:
128   call void @llvm.dbg.value(metadata i8 %x, metadata !11, metadata !DIExpression()), !dbg !12
129   call void @llvm.dbg.value(metadata i8 %x, metadata !13, metadata !DIExpression(DW_OP_LLVM_convert, 8, DW_ATE_signed, DW_OP_LLVM_convert, 32, DW_ATE_signed, DW_OP_stack_value)), !dbg !15
130   ret i8 %x, !dbg !16
133 ; Function Attrs: nounwind readnone speculatable
134 declare void @llvm.dbg.declare(metadata, metadata, metadata)
136 ; Function Attrs: nounwind readnone speculatable
137 declare void @llvm.dbg.value(metadata, metadata, metadata)
139 !llvm.dbg.cu = !{!0}
140 !llvm.module.flags = !{!3, !4, !5}
141 !llvm.ident = !{!6}
143 !0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 9.0.0 (trunk 353791) (llvm/trunk 353801)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, nameTableKind: None)
144 !1 = !DIFile(filename: "dbg.c", directory: "/tmp", checksumkind: CSK_MD5, checksum: "2a034da6937f5b9cf6dd2d89127f57fd")
145 !2 = !{}
146 !3 = !{i32 2, !"Dwarf Version", i32 5}
147 !4 = !{i32 2, !"Debug Info Version", i32 3}
148 !5 = !{i32 1, !"wchar_size", i32 4}
149 !6 = !{!"clang version 9.0.0 (trunk 353791) (llvm/trunk 353801)"}
150 !7 = distinct !DISubprogram(name: "foo", scope: !1, file: !1, line: 1, type: !8, scopeLine: 2, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !2)
151 !8 = !DISubroutineType(types: !9)
152 !9 = !{!10, !10}
153 !10 = !DIBasicType(name: "signed char", size: 8, encoding: DW_ATE_signed_char)
154 !11 = !DILocalVariable(name: "x", arg: 1, scope: !7, file: !1, line: 1, type: !10)
155 !12 = !DILocation(line: 1, column: 29, scope: !7)
156 !13 = !DILocalVariable(name: "y", scope: !7, file: !1, line: 3, type: !14)
157 !14 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
158 !15 = !DILocation(line: 3, column: 14, scope: !7)
159 !16 = !DILocation(line: 4, column: 3, scope: !7)