Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / bolt / test / X86 / Inputs / dwarf5-loclist-offset-form-main.s
blob7f002d371d27b4883f25483959df7c568356dcf3
1 # void use(int * x, int * y) {
2 # *x += 4;
3 # *y -= 2;
4 # }
6 # extern int fooVar;
7 # int main(int argc, char *argv[]) {
8 # int x = argc;
9 # int y = fooVar + 3;
10 # use(&x, &y);
11 # return x + y;
12 # }
14 .text
15 .file "main.cpp"
16 .globl _Z3usePiS_ # -- Begin function _Z3usePiS_
17 .p2align 4, 0x90
18 .type _Z3usePiS_,@function
19 _Z3usePiS_: # @_Z3usePiS_
20 .Lfunc_begin0:
21 .file 0 "." "main.cpp" md5 0x0df8b93231613cae17dbf82c0897c3b3
22 .loc 0 1 0 # main.cpp:1:0
23 .cfi_startproc
24 # %bb.0: # %entry
25 #DEBUG_VALUE: use:x <- $rdi
26 #DEBUG_VALUE: use:y <- $rsi
27 .loc 0 2 6 prologue_end # main.cpp:2:6
28 addl $4, (%rdi)
29 .loc 0 3 6 # main.cpp:3:6
30 addl $-2, (%rsi)
31 .loc 0 4 1 # main.cpp:4:1
32 retq
33 .Ltmp0:
34 .Lfunc_end0:
35 .size _Z3usePiS_, .Lfunc_end0-_Z3usePiS_
36 .cfi_endproc
37 # -- End function
38 .globl main # -- Begin function main
39 .p2align 4, 0x90
40 .type main,@function
41 main: # @main
42 .Lfunc_begin1:
43 .loc 0 7 0 # main.cpp:7:0
44 .cfi_startproc
45 # %bb.0: # %entry
46 #DEBUG_VALUE: main:argc <- $edi
47 #DEBUG_VALUE: main:argv <- $rsi
48 #DEBUG_VALUE: main:x <- $edi
49 # kill: def $edi killed $edi def $rdi
50 .loc 0 9 13 prologue_end # main.cpp:9:13
51 movq fooVar@GOTPCREL(%rip), %rax
52 movl (%rax), %eax
53 .Ltmp1:
54 #DEBUG_VALUE: main:y <- [DW_OP_plus_uconst 3, DW_OP_stack_value] $eax
55 #DEBUG_VALUE: main:y <- [DW_OP_plus_uconst 1, DW_OP_stack_value] $eax
56 #DEBUG_VALUE: main:x <- [DW_OP_plus_uconst 4, DW_OP_stack_value] $edi
57 .loc 0 11 14 # main.cpp:11:14
58 addl %edi, %eax
59 .Ltmp2:
60 addl $5, %eax
61 .loc 0 11 5 is_stmt 0 # main.cpp:11:5
62 retq
63 .Ltmp3:
64 .Lfunc_end1:
65 .size main, .Lfunc_end1-main
66 .cfi_endproc
67 # -- End function
68 .section .debug_loclists,"",@progbits
69 .long .Ldebug_list_header_end0-.Ldebug_list_header_start0 # Length
70 .Ldebug_list_header_start0:
71 .short 5 # Version
72 .byte 8 # Address size
73 .byte 0 # Segment selector size
74 .long 2 # Offset entry count
75 .Lloclists_table_base0:
76 .long .Ldebug_loc0-.Lloclists_table_base0
77 .long .Ldebug_loc1-.Lloclists_table_base0
78 .Ldebug_loc0:
79 .byte 4 # DW_LLE_offset_pair
80 .uleb128 .Lfunc_begin1-.Lfunc_begin0 # starting offset
81 .uleb128 .Ltmp1-.Lfunc_begin0 # ending offset
82 .byte 1 # Loc expr size
83 .byte 85 # super-register DW_OP_reg5
84 .byte 4 # DW_LLE_offset_pair
85 .uleb128 .Ltmp1-.Lfunc_begin0 # starting offset
86 .uleb128 .Lfunc_end1-.Lfunc_begin0 # ending offset
87 .byte 10 # Loc expr size
88 .byte 117 # DW_OP_breg5
89 .byte 4 # 4
90 .byte 16 # DW_OP_constu
91 .byte 255 # 4294967295
92 .byte 255 #
93 .byte 255 #
94 .byte 255 #
95 .byte 15 #
96 .byte 26 # DW_OP_and
97 .byte 159 # DW_OP_stack_value
98 .byte 0 # DW_LLE_end_of_list
99 .Ldebug_loc1:
100 .byte 4 # DW_LLE_offset_pair
101 .uleb128 .Ltmp1-.Lfunc_begin0 # starting offset
102 .uleb128 .Ltmp2-.Lfunc_begin0 # ending offset
103 .byte 10 # Loc expr size
104 .byte 112 # DW_OP_breg0
105 .byte 1 # 1
106 .byte 16 # DW_OP_constu
107 .byte 255 # 4294967295
108 .byte 255 #
109 .byte 255 #
110 .byte 255 #
111 .byte 15 #
112 .byte 26 # DW_OP_and
113 .byte 159 # DW_OP_stack_value
114 .byte 0 # DW_LLE_end_of_list
115 .Ldebug_list_header_end0:
116 .section .debug_abbrev,"",@progbits
117 .byte 1 # Abbreviation Code
118 .byte 17 # DW_TAG_compile_unit
119 .byte 1 # DW_CHILDREN_yes
120 .byte 37 # DW_AT_producer
121 .byte 37 # DW_FORM_strx1
122 .byte 19 # DW_AT_language
123 .byte 5 # DW_FORM_data2
124 .byte 3 # DW_AT_name
125 .byte 37 # DW_FORM_strx1
126 .byte 114 # DW_AT_str_offsets_base
127 .byte 23 # DW_FORM_sec_offset
128 .byte 16 # DW_AT_stmt_list
129 .byte 23 # DW_FORM_sec_offset
130 .byte 27 # DW_AT_comp_dir
131 .byte 37 # DW_FORM_strx1
132 .byte 17 # DW_AT_low_pc
133 .byte 27 # DW_FORM_addrx
134 .byte 18 # DW_AT_high_pc
135 .byte 6 # DW_FORM_data4
136 .byte 115 # DW_AT_addr_base
137 .byte 23 # DW_FORM_sec_offset
138 .byte 0 # EOM(1)
139 .byte 0 # EOM(2)
140 .byte 2 # Abbreviation Code
141 .byte 46 # DW_TAG_subprogram
142 .byte 1 # DW_CHILDREN_yes
143 .byte 17 # DW_AT_low_pc
144 .byte 27 # DW_FORM_addrx
145 .byte 18 # DW_AT_high_pc
146 .byte 6 # DW_FORM_data4
147 .byte 64 # DW_AT_frame_base
148 .byte 24 # DW_FORM_exprloc
149 .byte 122 # DW_AT_call_all_calls
150 .byte 25 # DW_FORM_flag_present
151 .byte 110 # DW_AT_linkage_name
152 .byte 37 # DW_FORM_strx1
153 .byte 3 # DW_AT_name
154 .byte 37 # DW_FORM_strx1
155 .byte 58 # DW_AT_decl_file
156 .byte 11 # DW_FORM_data1
157 .byte 59 # DW_AT_decl_line
158 .byte 11 # DW_FORM_data1
159 .byte 63 # DW_AT_external
160 .byte 25 # DW_FORM_flag_present
161 .byte 0 # EOM(1)
162 .byte 0 # EOM(2)
163 .byte 3 # Abbreviation Code
164 .byte 5 # DW_TAG_formal_parameter
165 .byte 0 # DW_CHILDREN_no
166 .byte 2 # DW_AT_location
167 .byte 24 # DW_FORM_exprloc
168 .byte 3 # DW_AT_name
169 .byte 37 # DW_FORM_strx1
170 .byte 58 # DW_AT_decl_file
171 .byte 11 # DW_FORM_data1
172 .byte 59 # DW_AT_decl_line
173 .byte 11 # DW_FORM_data1
174 .byte 73 # DW_AT_type
175 .byte 19 # DW_FORM_ref4
176 .byte 0 # EOM(1)
177 .byte 0 # EOM(2)
178 .byte 4 # Abbreviation Code
179 .byte 46 # DW_TAG_subprogram
180 .byte 1 # DW_CHILDREN_yes
181 .byte 17 # DW_AT_low_pc
182 .byte 27 # DW_FORM_addrx
183 .byte 18 # DW_AT_high_pc
184 .byte 6 # DW_FORM_data4
185 .byte 64 # DW_AT_frame_base
186 .byte 24 # DW_FORM_exprloc
187 .byte 122 # DW_AT_call_all_calls
188 .byte 25 # DW_FORM_flag_present
189 .byte 3 # DW_AT_name
190 .byte 37 # DW_FORM_strx1
191 .byte 58 # DW_AT_decl_file
192 .byte 11 # DW_FORM_data1
193 .byte 59 # DW_AT_decl_line
194 .byte 11 # DW_FORM_data1
195 .byte 73 # DW_AT_type
196 .byte 19 # DW_FORM_ref4
197 .byte 63 # DW_AT_external
198 .byte 25 # DW_FORM_flag_present
199 .byte 0 # EOM(1)
200 .byte 0 # EOM(2)
201 .byte 5 # Abbreviation Code
202 .byte 52 # DW_TAG_variable
203 .byte 0 # DW_CHILDREN_no
204 .byte 2 # DW_AT_location
205 .byte 23 # DW_FORM_sec_offset
206 .byte 3 # DW_AT_name
207 .byte 37 # DW_FORM_strx1
208 .byte 58 # DW_AT_decl_file
209 .byte 11 # DW_FORM_data1
210 .byte 59 # DW_AT_decl_line
211 .byte 11 # DW_FORM_data1
212 .byte 73 # DW_AT_type
213 .byte 19 # DW_FORM_ref4
214 .byte 0 # EOM(1)
215 .byte 0 # EOM(2)
216 .byte 6 # Abbreviation Code
217 .byte 36 # DW_TAG_base_type
218 .byte 0 # DW_CHILDREN_no
219 .byte 3 # DW_AT_name
220 .byte 37 # DW_FORM_strx1
221 .byte 62 # DW_AT_encoding
222 .byte 11 # DW_FORM_data1
223 .byte 11 # DW_AT_byte_size
224 .byte 11 # DW_FORM_data1
225 .byte 0 # EOM(1)
226 .byte 0 # EOM(2)
227 .byte 7 # Abbreviation Code
228 .byte 15 # DW_TAG_pointer_type
229 .byte 0 # DW_CHILDREN_no
230 .byte 73 # DW_AT_type
231 .byte 19 # DW_FORM_ref4
232 .byte 0 # EOM(1)
233 .byte 0 # EOM(2)
234 .byte 0 # EOM(3)
235 .section .debug_info,"",@progbits
236 .Lcu_begin0:
237 .long .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit
238 .Ldebug_info_start0:
239 .short 5 # DWARF version number
240 .byte 1 # DWARF Unit Type
241 .byte 8 # Address Size (in bytes)
242 .long .debug_abbrev # Offset Into Abbrev. Section
243 .byte 1 # Abbrev [1] 0xc:0x8a DW_TAG_compile_unit
244 .byte 0 # DW_AT_producer
245 .short 33 # DW_AT_language
246 .byte 1 # DW_AT_name
247 .long .Lstr_offsets_base0 # DW_AT_str_offsets_base
248 .long .Lline_table_start0 # DW_AT_stmt_list
249 .byte 2 # DW_AT_comp_dir
250 .byte 0 # DW_AT_low_pc
251 .long .Lfunc_end1-.Lfunc_begin0 # DW_AT_high_pc
252 .long .Laddr_table_base0 # DW_AT_addr_base
253 .byte 2 # Abbrev [2] 0x27:0x21 DW_TAG_subprogram
254 .byte 0 # DW_AT_low_pc
255 .long .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc
256 .byte 1 # DW_AT_frame_base
257 .byte 87
258 # DW_AT_call_all_calls
259 .byte 3 # DW_AT_linkage_name
260 .byte 4 # DW_AT_name
261 .byte 0 # DW_AT_decl_file
262 .byte 1 # DW_AT_decl_line
263 # DW_AT_external
264 .byte 3 # Abbrev [3] 0x33:0xa DW_TAG_formal_parameter
265 .byte 1 # DW_AT_location
266 .byte 85
267 .byte 7 # DW_AT_name
268 .byte 0 # DW_AT_decl_file
269 .byte 1 # DW_AT_decl_line
270 .long 132 # DW_AT_type
271 .byte 3 # Abbrev [3] 0x3d:0xa DW_TAG_formal_parameter
272 .byte 1 # DW_AT_location
273 .byte 84
274 .byte 8 # DW_AT_name
275 .byte 0 # DW_AT_decl_file
276 .byte 1 # DW_AT_decl_line
277 .long 132 # DW_AT_type
278 .byte 0 # End Of Children Mark
279 .byte 4 # Abbrev [4] 0x48:0x36 DW_TAG_subprogram
280 .byte 1 # DW_AT_low_pc
281 .long .Lfunc_end1-.Lfunc_begin1 # DW_AT_high_pc
282 .byte 1 # DW_AT_frame_base
283 .byte 87
284 # DW_AT_call_all_calls
285 .byte 5 # DW_AT_name
286 .byte 0 # DW_AT_decl_file
287 .byte 7 # DW_AT_decl_line
288 .long 128 # DW_AT_type
289 # DW_AT_external
290 .byte 3 # Abbrev [3] 0x57:0xa DW_TAG_formal_parameter
291 .byte 1 # DW_AT_location
292 .byte 85
293 .byte 9 # DW_AT_name
294 .byte 0 # DW_AT_decl_file
295 .byte 7 # DW_AT_decl_line
296 .long 128 # DW_AT_type
297 .byte 3 # Abbrev [3] 0x61:0xa DW_TAG_formal_parameter
298 .byte 1 # DW_AT_location
299 .byte 84
300 .byte 10 # DW_AT_name
301 .byte 0 # DW_AT_decl_file
302 .byte 7 # DW_AT_decl_line
303 .long 137 # DW_AT_type
304 .byte 5 # Abbrev [5] 0x6b:0x9 DW_TAG_variable
305 .long .Ldebug_loc0 # DW_AT_location
306 .byte 7 # DW_AT_name
307 .byte 0 # DW_AT_decl_file
308 .byte 8 # DW_AT_decl_line
309 .long 128 # DW_AT_type
310 .byte 5 # Abbrev [5] 0x74:0x9 DW_TAG_variable
311 .long .Ldebug_loc1 # DW_AT_location
312 .byte 8 # DW_AT_name
313 .byte 0 # DW_AT_decl_file
314 .byte 9 # DW_AT_decl_line
315 .long 128 # DW_AT_type
316 .byte 0 # End Of Children Mark
317 .byte 6 # Abbrev [6] 0x7e:0x4 DW_TAG_base_type
318 .byte 6 # DW_AT_name
319 .byte 5 # DW_AT_encoding
320 .byte 4 # DW_AT_byte_size
321 .byte 7 # Abbrev [7] 0x82:0x5 DW_TAG_pointer_type
322 .long 128 # DW_AT_type
323 .byte 7 # Abbrev [7] 0x87:0x5 DW_TAG_pointer_type
324 .long 142 # DW_AT_type
325 .byte 7 # Abbrev [7] 0x8c:0x5 DW_TAG_pointer_type
326 .long 147 # DW_AT_type
327 .byte 6 # Abbrev [6] 0x91:0x4 DW_TAG_base_type
328 .byte 11 # DW_AT_name
329 .byte 6 # DW_AT_encoding
330 .byte 1 # DW_AT_byte_size
331 .byte 0 # End Of Children Mark
332 .Ldebug_info_end0:
333 .section .debug_str_offsets,"",@progbits
334 .long 52 # Length of String Offsets Set
335 .short 5
336 .short 0
337 .Lstr_offsets_base0:
338 .section .debug_str,"MS",@progbits,1
339 .Linfo_string0:
340 .asciz "clang version 15.0.0" # string offset=0
341 .Linfo_string1:
342 .asciz "main.cpp" # string offset=134
343 .Linfo_string2:
344 .asciz "." # string offset=143
345 .Linfo_string3:
346 .asciz "_Z3usePiS_" # string offset=181
347 .Linfo_string4:
348 .asciz "use" # string offset=192
349 .Linfo_string5:
350 .asciz "main" # string offset=196
351 .Linfo_string6:
352 .asciz "int" # string offset=201
353 .Linfo_string7:
354 .asciz "x" # string offset=205
355 .Linfo_string8:
356 .asciz "y" # string offset=207
357 .Linfo_string9:
358 .asciz "argc" # string offset=209
359 .Linfo_string10:
360 .asciz "argv" # string offset=214
361 .Linfo_string11:
362 .asciz "char" # string offset=219
363 .section .debug_str_offsets,"",@progbits
364 .long .Linfo_string0
365 .long .Linfo_string1
366 .long .Linfo_string2
367 .long .Linfo_string3
368 .long .Linfo_string4
369 .long .Linfo_string5
370 .long .Linfo_string6
371 .long .Linfo_string7
372 .long .Linfo_string8
373 .long .Linfo_string9
374 .long .Linfo_string10
375 .long .Linfo_string11
376 .section .debug_addr,"",@progbits
377 .long .Ldebug_addr_end0-.Ldebug_addr_start0 # Length of contribution
378 .Ldebug_addr_start0:
379 .short 5 # DWARF version number
380 .byte 8 # Address size
381 .byte 0 # Segment selector size
382 .Laddr_table_base0:
383 .quad .Lfunc_begin0
384 .quad .Lfunc_begin1
385 .Ldebug_addr_end0:
386 .ident "clang version 15.0.0"
387 .section ".note.GNU-stack","",@progbits
388 .addrsig
389 .section .debug_line,"",@progbits
390 .Lline_table_start0: