[Frontend] Remove unused includes (NFC) (#116927)
[llvm-project.git] / llvm / test / DebugInfo / NVPTX / cu-range-hole.ll
blob1f4c44eaf455c0c50d74efba0fb08fbe5414d135
1 ; RUN: llc < %s -mtriple=nvptx64-nvidia-cuda | FileCheck %s
2 ; RUN: %if ptxas %{ llc < %s -mtriple=nvptx64-nvidia-cuda | %ptxas-verify %}
4 ; CHECK: .target sm_{{[0-9]+}}, debug
6 ; CHECK: .visible .func  (.param .b32 func_retval0) b(
7 ; CHECK: .param .b32 b_param_0
8 ; CHECK: )
9 ; CHECK: {
10 ; CHECK: .loc 1 1 0
11 ; CHECK: $L__func_begin0:
12 ; CHECK: .loc 1 1 0
13 ; CHECK: .loc 1 1 0
14 ; CHECK: ret;
15 ; CHECK: $L__func_end0:
16 ; CHECK: }
18 ; CHECK: .visible .func  (.param .b32 func_retval0) a(
19 ; CHECK: .param .b32 a_param_0
20 ; CHECK: )
21 ; CHECK: {
22 ; CHECK: $L__func_begin1:
23 ; CHECK-NOT: .loc
24 ; CHECK: ret;
25 ; CHECK: $L__func_end1:
26 ; CHECK: }
28 ; CHECK: .visible .func  (.param .b32 func_retval0) d(
29 ; CHECK: .param .b32 d_param_0
30 ; CHECK: )
31 ; CHECK: {
32 ; CHECK: .loc 1 3 0
33 ; CHECK: $L__func_begin2:
34 ; CHECK: .loc 1 3 0
35 ; CHECK: ret;
36 ; CHECK: $L__func_end2:
37 ; CHECK: }
39 ; CHECK-NEXT: .file 1 "{{.*}}b.c"
41 ; Function Attrs: nounwind uwtable
42 define i32 @b(i32 %c) #0 !dbg !5 {
43 entry:
44   %c.addr = alloca i32, align 4
45   store i32 %c, ptr %c.addr, align 4
46   call void @llvm.dbg.declare(metadata ptr %c.addr, metadata !13, metadata !DIExpression()), !dbg !14
47   %0 = load i32, ptr %c.addr, align 4, !dbg !14
48   %add = add nsw i32 %0, 1, !dbg !14
49   ret i32 %add, !dbg !14
52 ; Function Attrs: nounwind uwtable
53 define i32 @a(i32 %b) #0 {
54 entry:
55   %b.addr = alloca i32, align 4
56   store i32 %b, ptr %b.addr, align 4
57   %0 = load i32, ptr %b.addr, align 4
58   %add = add nsw i32 %0, 1
59   ret i32 %add
62 ; Function Attrs: nounwind readnone
63 declare void @llvm.dbg.declare(metadata, metadata, metadata) #1
65 ; Function Attrs: nounwind uwtable
66 define i32 @d(i32 %e) #0 !dbg !10 {
67 entry:
68   %e.addr = alloca i32, align 4
69   store i32 %e, ptr %e.addr, align 4
70   call void @llvm.dbg.declare(metadata ptr %e.addr, metadata !15, metadata !DIExpression()), !dbg !16
71   %0 = load i32, ptr %e.addr, align 4, !dbg !16
72   %add = add nsw i32 %0, 1, !dbg !16
73   ret i32 %add, !dbg !16
76 ; CHECK:        .section        .debug_abbrev
77 ; CHECK-NEXT:   {
78 ; CHECK-NEXT: .b8 1                                   // Abbreviation Code
79 ; CHECK-NEXT: .b8 17                                  // DW_TAG_compile_unit
80 ; CHECK-NEXT: .b8 1                                   // DW_CHILDREN_yes
81 ; CHECK-NEXT: .b8 37                                  // DW_AT_producer
82 ; CHECK-NEXT: .b8 8                                   // DW_FORM_string
83 ; CHECK-NEXT: .b8 19                                  // DW_AT_language
84 ; CHECK-NEXT: .b8 5                                   // DW_FORM_data2
85 ; CHECK-NEXT: .b8 3                                   // DW_AT_name
86 ; CHECK-NEXT: .b8 8                                   // DW_FORM_string
87 ; CHECK-NEXT: .b8 16                                  // DW_AT_stmt_list
88 ; CHECK-NEXT: .b8 6                                   // DW_FORM_data4
89 ; CHECK-NEXT: .b8 27                                  // DW_AT_comp_dir
90 ; CHECK-NEXT: .b8 8                                   // DW_FORM_string
91 ; CHECK-NEXT: .b8 0                                   // EOM(1)
92 ; CHECK-NEXT: .b8 0                                   // EOM(2)
93 ; CHECK-NEXT: .b8 2                                   // Abbreviation Code
94 ; CHECK-NEXT: .b8 46                                  // DW_TAG_subprogram
95 ; CHECK-NEXT: .b8 1                                   // DW_CHILDREN_yes
96 ; CHECK-NEXT: .b8 17                                  // DW_AT_low_pc
97 ; CHECK-NEXT: .b8 1                                   // DW_FORM_addr
98 ; CHECK-NEXT: .b8 18                                  // DW_AT_high_pc
99 ; CHECK-NEXT: .b8 1                                   // DW_FORM_addr
100 ; CHECK-NEXT: .b8 64                                  // DW_AT_frame_base
101 ; CHECK-NEXT: .b8 10                                  // DW_FORM_block1
102 ; CHECK-NEXT: .b8 3                                   // DW_AT_name
103 ; CHECK-NEXT: .b8 8                                   // DW_FORM_string
104 ; CHECK-NEXT: .b8 58                                  // DW_AT_decl_file
105 ; CHECK-NEXT: .b8 11                                  // DW_FORM_data1
106 ; CHECK-NEXT: .b8 59                                  // DW_AT_decl_line
107 ; CHECK-NEXT: .b8 11                                  // DW_FORM_data1
108 ; CHECK-NEXT: .b8 39                                  // DW_AT_prototyped
109 ; CHECK-NEXT: .b8 12                                  // DW_FORM_flag
110 ; CHECK-NEXT: .b8 73                                  // DW_AT_type
111 ; CHECK-NEXT: .b8 19                                  // DW_FORM_ref4
112 ; CHECK-NEXT: .b8 63                                  // DW_AT_external
113 ; CHECK-NEXT: .b8 12                                  // DW_FORM_flag
114 ; CHECK-NEXT: .b8 0                                   // EOM(1)
115 ; CHECK-NEXT: .b8 0                                   // EOM(2)
116 ; CHECK-NEXT: .b8 3                                   // Abbreviation Code
117 ; CHECK-NEXT: .b8 5                                   // DW_TAG_formal_parameter
118 ; CHECK-NEXT: .b8 0                                   // DW_CHILDREN_no
119 ; CHECK-NEXT: .b8 51                                  // DW_AT_address_class
120 ; CHECK-NEXT: .b8 11                                  // DW_FORM_data1
121 ; CHECK-NEXT: .b8 2                                   // DW_AT_location
122 ; CHECK-NEXT: .b8 10                                  // DW_FORM_block1
123 ; CHECK-NEXT: .b8 3                                   // DW_AT_name
124 ; CHECK-NEXT: .b8 8                                   // DW_FORM_string
125 ; CHECK-NEXT: .b8 58                                  // DW_AT_decl_file
126 ; CHECK-NEXT: .b8 11                                  // DW_FORM_data1
127 ; CHECK-NEXT: .b8 59                                  // DW_AT_decl_line
128 ; CHECK-NEXT: .b8 11                                  // DW_FORM_data1
129 ; CHECK-NEXT: .b8 73                                  // DW_AT_type
130 ; CHECK-NEXT: .b8 19                                  // DW_FORM_ref4
131 ; CHECK-NEXT: .b8 0                                   // EOM(1)
132 ; CHECK-NEXT: .b8 0                                   // EOM(2)
133 ; CHECK-NEXT: .b8 4                                   // Abbreviation Code
134 ; CHECK-NEXT: .b8 36                                  // DW_TAG_base_type
135 ; CHECK-NEXT: .b8 0                                   // DW_CHILDREN_no
136 ; CHECK-NEXT: .b8 3                                   // DW_AT_name
137 ; CHECK-NEXT: .b8 8                                   // DW_FORM_string
138 ; CHECK-NEXT: .b8 62                                  // DW_AT_encoding
139 ; CHECK-NEXT: .b8 11                                  // DW_FORM_data1
140 ; CHECK-NEXT: .b8 11                                  // DW_AT_byte_size
141 ; CHECK-NEXT: .b8 11                                  // DW_FORM_data1
142 ; CHECK-NEXT: .b8 0                                   // EOM(1)
143 ; CHECK-NEXT: .b8 0                                   // EOM(2)
144 ; CHECK-NEXT: .b8 0                                   // EOM(3)
145 ; CHECK-NEXT:   }
146 ; CHECK-NEXT:   .section        .debug_info
147 ; CHECK-NEXT:   {
148 ; CHECK-NEXT: .b32 181                                // Length of Unit
149 ; CHECK-NEXT: .b8 2                                   // DWARF version number
150 ; CHECK-NEXT: .b8 0
151 ; CHECK-NEXT: .b32 .debug_abbrev                      // Offset Into Abbrev. Section
152 ; CHECK-NEXT: .b8 8                                   // Address Size (in bytes)
153 ; CHECK-NEXT: .b8 1                                   // Abbrev [1] 0xb:0xae DW_TAG_compile_unit
154 ; CHECK-NEXT: .b8 99                                  // DW_AT_producer
155 ; CHECK-NEXT: .b8 108
156 ; CHECK-NEXT: .b8 97
157 ; CHECK-NEXT: .b8 110
158 ; CHECK-NEXT: .b8 103
159 ; CHECK-NEXT: .b8 32
160 ; CHECK-NEXT: .b8 118
161 ; CHECK-NEXT: .b8 101
162 ; CHECK-NEXT: .b8 114
163 ; CHECK-NEXT: .b8 115
164 ; CHECK-NEXT: .b8 105
165 ; CHECK-NEXT: .b8 111
166 ; CHECK-NEXT: .b8 110
167 ; CHECK-NEXT: .b8 32
168 ; CHECK-NEXT: .b8 51
169 ; CHECK-NEXT: .b8 46
170 ; CHECK-NEXT: .b8 53
171 ; CHECK-NEXT: .b8 46
172 ; CHECK-NEXT: .b8 48
173 ; CHECK-NEXT: .b8 32
174 ; CHECK-NEXT: .b8 40
175 ; CHECK-NEXT: .b8 116
176 ; CHECK-NEXT: .b8 114
177 ; CHECK-NEXT: .b8 117
178 ; CHECK-NEXT: .b8 110
179 ; CHECK-NEXT: .b8 107
180 ; CHECK-NEXT: .b8 32
181 ; CHECK-NEXT: .b8 50
182 ; CHECK-NEXT: .b8 48
183 ; CHECK-NEXT: .b8 52
184 ; CHECK-NEXT: .b8 49
185 ; CHECK-NEXT: .b8 54
186 ; CHECK-NEXT: .b8 52
187 ; CHECK-NEXT: .b8 41
188 ; CHECK-NEXT: .b8 32
189 ; CHECK-NEXT: .b8 40
190 ; CHECK-NEXT: .b8 108
191 ; CHECK-NEXT: .b8 108
192 ; CHECK-NEXT: .b8 118
193 ; CHECK-NEXT: .b8 109
194 ; CHECK-NEXT: .b8 47
195 ; CHECK-NEXT: .b8 116
196 ; CHECK-NEXT: .b8 114
197 ; CHECK-NEXT: .b8 117
198 ; CHECK-NEXT: .b8 110
199 ; CHECK-NEXT: .b8 107
200 ; CHECK-NEXT: .b8 32
201 ; CHECK-NEXT: .b8 50
202 ; CHECK-NEXT: .b8 48
203 ; CHECK-NEXT: .b8 52
204 ; CHECK-NEXT: .b8 49
205 ; CHECK-NEXT: .b8 56
206 ; CHECK-NEXT: .b8 51
207 ; CHECK-NEXT: .b8 41
208 ; CHECK-NEXT: .b8 0
209 ; CHECK-NEXT: .b8 12                                  // DW_AT_language
210 ; CHECK-NEXT: .b8 0
211 ; CHECK-NEXT: .b8 98                                  // DW_AT_name
212 ; CHECK-NEXT: .b8 46
213 ; CHECK-NEXT: .b8 99
214 ; CHECK-NEXT: .b8 0
215 ; CHECK-NEXT: .b32 .debug_line                        // DW_AT_stmt_list
216 ; CHECK-NEXT: .b8 47                                  // DW_AT_comp_dir
217 ; CHECK-NEXT: .b8 115
218 ; CHECK-NEXT: .b8 111
219 ; CHECK-NEXT: .b8 117
220 ; CHECK-NEXT: .b8 114
221 ; CHECK-NEXT: .b8 99
222 ; CHECK-NEXT: .b8 101
223 ; CHECK-NEXT: .b8 0
224 ; CHECK-NEXT: .b8 2                                   // Abbrev [2] 0x55:0x2e DW_TAG_subprogram
225 ; CHECK-NEXT: .b64 $L__func_begin0                    // DW_AT_low_pc
226 ; CHECK-NEXT: .b64 $L__func_end0                      // DW_AT_high_pc
227 ; CHECK-NEXT: .b8 1                                   // DW_AT_frame_base
228 ; CHECK-NEXT: .b8 156
229 ; CHECK-NEXT: .b8 98                                  // DW_AT_name
230 ; CHECK-NEXT: .b8 0
231 ; CHECK-NEXT: .b8 1                                   // DW_AT_decl_file
232 ; CHECK-NEXT: .b8 1                                   // DW_AT_decl_line
233 ; CHECK-NEXT: .b8 1                                   // DW_AT_prototyped
234 ; CHECK-NEXT: .b32 177                                // DW_AT_type
235 ; CHECK-NEXT: .b8 1                                   // DW_AT_external
236 ; CHECK-NEXT: .b8 3                                   // Abbrev [3] 0x72:0x10 DW_TAG_formal_parameter
237 ; CHECK-NEXT: .b8 2                                   // DW_AT_address_class
238 ; CHECK-NEXT: .b8 5                                   // DW_AT_location
239 ; CHECK-NEXT: .b8 144
240 ; CHECK-NEXT: .b8 177
241 ; CHECK-NEXT: .b8 228
242 ; CHECK-NEXT: .b8 149
243 ; CHECK-NEXT: .b8 1
244 ; CHECK-NEXT: .b8 99                                  // DW_AT_name
245 ; CHECK-NEXT: .b8 0
246 ; CHECK-NEXT: .b8 1                                   // DW_AT_decl_file
247 ; CHECK-NEXT: .b8 1                                   // DW_AT_decl_line
248 ; CHECK-NEXT: .b32 177                                // DW_AT_type
249 ; CHECK-NEXT: .b8 0                                   // End Of Children Mark
250 ; CHECK-NEXT: .b8 2                                   // Abbrev [2] 0x83:0x2e DW_TAG_subprogram
251 ; CHECK-NEXT: .b64 $L__func_begin2                    // DW_AT_low_pc
252 ; CHECK-NEXT: .b64 $L__func_end2                      // DW_AT_high_pc
253 ; CHECK-NEXT: .b8 1                                   // DW_AT_frame_base
254 ; CHECK-NEXT: .b8 156
255 ; CHECK-NEXT: .b8 100                                 // DW_AT_name
256 ; CHECK-NEXT: .b8 0
257 ; CHECK-NEXT: .b8 1                                   // DW_AT_decl_file
258 ; CHECK-NEXT: .b8 3                                   // DW_AT_decl_line
259 ; CHECK-NEXT: .b8 1                                   // DW_AT_prototyped
260 ; CHECK-NEXT: .b32 177                                // DW_AT_type
261 ; CHECK-NEXT: .b8 1                                   // DW_AT_external
262 ; CHECK-NEXT: .b8 3                                   // Abbrev [3] 0xa0:0x10 DW_TAG_formal_parameter
263 ; CHECK-NEXT: .b8 2                                   // DW_AT_address_class
264 ; CHECK-NEXT: .b8 5                                   // DW_AT_location
265 ; CHECK-NEXT: .b8 144
266 ; CHECK-NEXT: .b8 177
267 ; CHECK-NEXT: .b8 228
268 ; CHECK-NEXT: .b8 149
269 ; CHECK-NEXT: .b8 1
270 ; CHECK-NEXT: .b8 101                                 // DW_AT_name
271 ; CHECK-NEXT: .b8 0
272 ; CHECK-NEXT: .b8 1                                   // DW_AT_decl_file
273 ; CHECK-NEXT: .b8 3                                   // DW_AT_decl_line
274 ; CHECK-NEXT: .b32 177                                // DW_AT_type
275 ; CHECK-NEXT: .b8 0                                   // End Of Children Mark
276 ; CHECK-NEXT: .b8 4                                   // Abbrev [4] 0xb1:0x7 DW_TAG_base_type
277 ; CHECK-NEXT: .b8 105                                 // DW_AT_name
278 ; CHECK-NEXT: .b8 110
279 ; CHECK-NEXT: .b8 116
280 ; CHECK-NEXT: .b8 0
281 ; CHECK-NEXT: .b8 5                                   // DW_AT_encoding
282 ; CHECK-NEXT: .b8 4                                   // DW_AT_byte_size
283 ; CHECK-NEXT: .b8 0                                   // End Of Children Mark
284 ; CHECK-NEXT:   }
285 ; CHECK-NEXT:   .section        .debug_macinfo  {       }
286 ; CHECK-NOT: debug_
288 attributes #0 = { nounwind uwtable "less-precise-fpmad"="false" "frame-pointer"="all" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
289 attributes #1 = { nounwind readnone }
291 !llvm.ident = !{!0, !0}
292 !llvm.dbg.cu = !{!1}
293 !llvm.module.flags = !{!11, !12}
295 !0 = !{!"clang version 3.5.0 (trunk 204164) (llvm/trunk 204183)"}
296 !1 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.5.0 (trunk 204164) (llvm/trunk 204183)", isOptimized: false, emissionKind: FullDebug, file: !2, enums: !3, retainedTypes: !3, globals: !3, imports: !3, nameTableKind: None)
297 !2 = !DIFile(filename: "b.c", directory: "/source")
298 !3 = !{}
299 !5 = distinct !DISubprogram(name: "b", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !1, scopeLine: 1, file: !2, scope: !6, type: !7, retainedNodes: !3)
300 !6 = !DIFile(filename: "b.c", directory: "/source")
301 !7 = !DISubroutineType(types: !8)
302 !8 = !{!9, !9}
303 !9 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
304 !10 = distinct !DISubprogram(name: "d", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !1, scopeLine: 3, file: !2, scope: !6, type: !7, retainedNodes: !3)
305 !11 = !{i32 2, !"Dwarf Version", i32 2}
306 !12 = !{i32 1, !"Debug Info Version", i32 3}
307 !13 = !DILocalVariable(name: "c", line: 1, arg: 1, scope: !5, file: !6, type: !9)
308 !14 = !DILocation(line: 1, scope: !5)
309 !15 = !DILocalVariable(name: "e", line: 3, arg: 1, scope: !10, file: !6, type: !9)
310 !16 = !DILocation(line: 3, scope: !10)