Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / bolt / test / X86 / Inputs / exc_args.s
blob71853371cecad5083f7f5f5e372b1a2d8086b72c
1 .file "exc_args.cpp"
2 .text
3 .globl _Z3fooiiiiiiii
4 .type _Z3fooiiiiiiii, @function
5 _Z3fooiiiiiiii:
6 .LFB15:
7 .cfi_startproc
8 pushq %rbp
9 .cfi_def_cfa_offset 16
10 .cfi_offset 6, -16
11 movq %rsp, %rbp
12 .cfi_def_cfa_register 6
13 subq $32, %rsp
14 movl %edi, -4(%rbp)
15 movl %esi, -8(%rbp)
16 movl %edx, -12(%rbp)
17 movl %ecx, -16(%rbp)
18 movl %r8d, -20(%rbp)
19 movl %r9d, -24(%rbp)
20 cmpl $1, -4(%rbp)
21 jle .L2
22 movl $1, %edi
23 call __cxa_allocate_exception
24 movl $0, %edx
25 movl $_ZTI4ExcG, %esi
26 movq %rax, %rdi
27 call __cxa_throw
28 .L2:
29 movl $1, %edi
30 call __cxa_allocate_exception
31 movl $0, %edx
32 movl $_ZTI4ExcC, %esi
33 movq %rax, %rdi
34 call __cxa_throw
35 .cfi_endproc
36 .LFE15:
37 .size _Z3fooiiiiiiii, .-_Z3fooiiiiiiii
38 .globl _Z11filter_onlyi
39 .type _Z11filter_onlyi, @function
40 _Z11filter_onlyi:
41 .LFB16:
42 .cfi_startproc
43 .cfi_personality 0x3,__gxx_personality_v0
44 .cfi_lsda 0x3,.LLSDA16
45 pushq %rbp
46 .cfi_def_cfa_offset 16
47 .cfi_offset 6, -16
48 movq %rsp, %rbp
49 .cfi_def_cfa_register 6
50 subq $16, %rsp
51 movl %edi, -4(%rbp)
52 movl -4(%rbp), %eax
53 pushq $7
54 pushq $6
55 movl $5, %r9d
56 movl $4, %r8d
57 movl $3, %ecx
58 movl $2, %edx
59 movl $1, %esi
60 movl %eax, %edi
61 .LEHB0:
62 .cfi_escape 0x2e,0x10
63 call _Z3fooiiiiiiii
64 .LEHE0:
65 addq $16, %rsp
66 jmp .L7
67 .L6:
68 cmpq $-1, %rdx
69 je .L5
70 movq %rax, %rdi
71 .LEHB1:
72 call _Unwind_Resume
73 .L5:
74 movq %rax, %rdi
75 call __cxa_call_unexpected
76 .LEHE1:
77 .L7:
78 leave
79 .cfi_def_cfa 7, 8
80 ret
81 .cfi_endproc
82 .LFE16:
83 .globl __gxx_personality_v0
84 .section .gcc_except_table,"a",@progbits
85 .align 4
86 .LLSDA16:
87 .byte 0xff
88 .byte 0x3
89 .uleb128 .LLSDATT16-.LLSDATTD16
90 .LLSDATTD16:
91 .byte 0x1
92 .uleb128 .LLSDACSE16-.LLSDACSB16
93 .LLSDACSB16:
94 .uleb128 .LEHB0-.LFB16
95 .uleb128 .LEHE0-.LEHB0
96 .uleb128 .L6-.LFB16
97 .uleb128 0x1
98 .uleb128 .LEHB1-.LFB16
99 .uleb128 .LEHE1-.LEHB1
100 .uleb128 0
101 .uleb128 0
102 .LLSDACSE16:
103 .byte 0x7f
104 .byte 0
105 .align 4
106 .long _ZTI4ExcA
107 .long _ZTI4ExcB
108 .long _ZTI4ExcC
109 .long _ZTI4ExcD
110 .long _ZTI4ExcE
111 .long _ZTI4ExcF
112 .LLSDATT16:
113 .byte 0x1
114 .byte 0x2
115 .byte 0x3
116 .byte 0x4
117 .byte 0x5
118 .byte 0x6
119 .byte 0
120 .text
121 .size _Z11filter_onlyi, .-_Z11filter_onlyi
122 .section .rodata
123 .align 8
124 .LC0:
125 .string "this statement is cold and should be outlined"
126 .text
127 .globl _Z12never_throwsv
128 .type _Z12never_throwsv, @function
129 _Z12never_throwsv:
130 .LFB17:
131 .cfi_startproc
132 .cfi_personality 0x3,__gxx_personality_v0
133 .cfi_lsda 0x3,.LLSDA17
134 pushq %rbp
135 .cfi_def_cfa_offset 16
136 .cfi_offset 6, -16
137 movq %rsp, %rbp
138 .cfi_def_cfa_register 6
139 movl $.LC0, %edi
140 .LEHB2:
141 call puts
142 .LEHE2:
143 jmp .L12
144 .L11:
145 cmpq $-1, %rdx
146 je .L10
147 movq %rax, %rdi
148 .LEHB3:
149 call _Unwind_Resume
150 .L10:
151 movq %rax, %rdi
152 call __cxa_call_unexpected
153 .LEHE3:
154 .L12:
155 popq %rbp
156 .cfi_def_cfa 7, 8
158 .cfi_endproc
159 .LFE17:
160 .section .gcc_except_table,"a",@progbits
161 .align 4
162 .LLSDA17:
163 .byte 0xff
164 .byte 0x3
165 .uleb128 .LLSDATT17-.LLSDATTD17
166 .LLSDATTD17:
167 .byte 0x1
168 .uleb128 .LLSDACSE17-.LLSDACSB17
169 .LLSDACSB17:
170 .uleb128 .LEHB2-.LFB17
171 .uleb128 .LEHE2-.LEHB2
172 .uleb128 .L11-.LFB17
173 .uleb128 0x1
174 .uleb128 .LEHB3-.LFB17
175 .uleb128 .LEHE3-.LEHB3
176 .uleb128 0
177 .uleb128 0
178 .LLSDACSE17:
179 .byte 0x7f
180 .byte 0
181 .align 4
182 .LLSDATT17:
183 .byte 0
184 .text
185 .size _Z12never_throwsv, .-_Z12never_throwsv
186 .section .rodata
187 .LC1:
188 .string "caught exception"
189 .LC2:
190 .string "caught ExcC"
191 .text
192 .globl main
193 .type main, @function
194 main:
195 .LFB18:
196 .cfi_startproc
197 .cfi_personality 0x3,__gxx_personality_v0
198 .cfi_lsda 0x3,.LLSDA18
199 pushq %rbp
200 .cfi_def_cfa_offset 16
201 .cfi_offset 6, -16
202 movq %rsp, %rbp
203 .cfi_def_cfa_register 6
204 pushq %rbx
205 subq $40, %rsp
206 .cfi_offset 3, -24
207 movl %edi, -36(%rbp)
208 movq %rsi, -48(%rbp)
209 movl $1768710518, -26(%rbp)
210 movw $100, -22(%rbp)
211 movl $0, -20(%rbp)
212 .L17:
213 cmpl $999999, -20(%rbp)
214 ja .L14
215 cmpl $2, -36(%rbp)
216 jne .L15
217 call _Z12never_throwsv
218 .L15:
219 cmpl $2, -36(%rbp)
220 jne .L16
221 movl -36(%rbp), %eax
222 movl %eax, %edi
223 .LEHB4:
224 call _Z11filter_onlyi
225 .LEHE4:
226 .L16:
227 movl -36(%rbp), %eax
228 pushq $7
229 pushq $6
230 movl $5, %r9d
231 movl $4, %r8d
232 movl $3, %ecx
233 movl $2, %edx
234 movl $1, %esi
235 movl %eax, %edi
236 .LEHB5:
237 .cfi_escape 0x2e,0x10
238 call _Z3fooiiiiiiii
239 .LEHE5:
240 addq $16, %rsp
241 .L25:
242 addl $1, -20(%rbp)
243 jmp .L17
244 .L14:
245 movl $0, %eax
246 jmp .L31
247 .L27:
248 movq %rax, %rdi
249 call __cxa_begin_catch
250 movl $.LC1, %edi
251 movl $0, %eax
252 .LEHB6:
253 .cfi_escape 0x2e,0
254 call printf
255 .LEHE6:
256 .LEHB7:
257 call __cxa_end_catch
258 .LEHE7:
259 jmp .L16
260 .L28:
261 movq %rax, %rbx
262 call __cxa_end_catch
263 movq %rbx, %rax
264 movq %rax, %rdi
265 .LEHB8:
266 call _Unwind_Resume
267 .L29:
268 cmpq $2, %rdx
269 je .L22
270 movq %rax, %rdi
271 call _Unwind_Resume
272 .LEHE8:
273 .L22:
274 movq %rax, %rdi
275 call __cxa_begin_catch
276 movzbl -26(%rbp), %eax
277 cmpb $118, %al
278 je .L23
279 call abort
280 .L23:
281 movzbl -25(%rbp), %eax
282 cmpb $97, %al
283 je .L24
284 call abort
285 .L24:
286 movl $.LC2, %edi
287 .LEHB9:
288 call puts
289 .LEHE9:
290 call __cxa_end_catch
291 jmp .L25
292 .L30:
293 movq %rax, %rbx
294 call __cxa_end_catch
295 movq %rbx, %rax
296 movq %rax, %rdi
297 .LEHB10:
298 call _Unwind_Resume
299 .LEHE10:
300 .L31:
301 movq -8(%rbp), %rbx
302 leave
303 .cfi_def_cfa 7, 8
305 .cfi_endproc
306 .LFE18:
307 .section .gcc_except_table,"a",@progbits
308 .align 4
309 .LLSDA18:
310 .byte 0xff
311 .byte 0x3
312 .uleb128 .LLSDATT18-.LLSDATTD18
313 .LLSDATTD18:
314 .byte 0x1
315 .uleb128 .LLSDACSE18-.LLSDACSB18
316 .LLSDACSB18:
317 .uleb128 .LEHB4-.LFB18
318 .uleb128 .LEHE4-.LEHB4
319 .uleb128 .L27-.LFB18
320 .uleb128 0x1
321 .uleb128 .LEHB5-.LFB18
322 .uleb128 .LEHE5-.LEHB5
323 .uleb128 .L29-.LFB18
324 .uleb128 0x3
325 .uleb128 .LEHB6-.LFB18
326 .uleb128 .LEHE6-.LEHB6
327 .uleb128 .L28-.LFB18
328 .uleb128 0
329 .uleb128 .LEHB7-.LFB18
330 .uleb128 .LEHE7-.LEHB7
331 .uleb128 0
332 .uleb128 0
333 .uleb128 .LEHB8-.LFB18
334 .uleb128 .LEHE8-.LEHB8
335 .uleb128 0
336 .uleb128 0
337 .uleb128 .LEHB9-.LFB18
338 .uleb128 .LEHE9-.LEHB9
339 .uleb128 .L30-.LFB18
340 .uleb128 0
341 .uleb128 .LEHB10-.LFB18
342 .uleb128 .LEHE10-.LEHB10
343 .uleb128 0
344 .uleb128 0
345 .LLSDACSE18:
346 .byte 0x1
347 .byte 0
348 .byte 0x2
349 .byte 0
350 .align 4
351 .long _ZTI4ExcC
352 .long 0
354 .LLSDATT18:
355 .text
356 .size main, .-main
357 .weak _ZTI4ExcF
358 .section .rodata._ZTI4ExcF,"aG",@progbits,_ZTI4ExcF,comdat
359 .align 8
360 .type _ZTI4ExcF, @object
361 .size _ZTI4ExcF, 16
362 _ZTI4ExcF:
363 .quad _ZTVN10__cxxabiv117__class_type_infoE+16
364 .quad _ZTS4ExcF
365 .weak _ZTS4ExcF
366 .section .rodata._ZTS4ExcF,"aG",@progbits,_ZTS4ExcF,comdat
367 .type _ZTS4ExcF, @object
368 .size _ZTS4ExcF, 6
369 _ZTS4ExcF:
370 .string "4ExcF"
371 .weak _ZTI4ExcE
372 .section .rodata._ZTI4ExcE,"aG",@progbits,_ZTI4ExcE,comdat
373 .align 8
374 .type _ZTI4ExcE, @object
375 .size _ZTI4ExcE, 16
376 _ZTI4ExcE:
377 .quad _ZTVN10__cxxabiv117__class_type_infoE+16
378 .quad _ZTS4ExcE
379 .weak _ZTS4ExcE
380 .section .rodata._ZTS4ExcE,"aG",@progbits,_ZTS4ExcE,comdat
381 .type _ZTS4ExcE, @object
382 .size _ZTS4ExcE, 6
383 _ZTS4ExcE:
384 .string "4ExcE"
385 .weak _ZTI4ExcD
386 .section .rodata._ZTI4ExcD,"aG",@progbits,_ZTI4ExcD,comdat
387 .align 8
388 .type _ZTI4ExcD, @object
389 .size _ZTI4ExcD, 16
390 _ZTI4ExcD:
391 .quad _ZTVN10__cxxabiv117__class_type_infoE+16
392 .quad _ZTS4ExcD
393 .weak _ZTS4ExcD
394 .section .rodata._ZTS4ExcD,"aG",@progbits,_ZTS4ExcD,comdat
395 .type _ZTS4ExcD, @object
396 .size _ZTS4ExcD, 6
397 _ZTS4ExcD:
398 .string "4ExcD"
399 .weak _ZTI4ExcB
400 .section .rodata._ZTI4ExcB,"aG",@progbits,_ZTI4ExcB,comdat
401 .align 8
402 .type _ZTI4ExcB, @object
403 .size _ZTI4ExcB, 16
404 _ZTI4ExcB:
405 .quad _ZTVN10__cxxabiv117__class_type_infoE+16
406 .quad _ZTS4ExcB
407 .weak _ZTS4ExcB
408 .section .rodata._ZTS4ExcB,"aG",@progbits,_ZTS4ExcB,comdat
409 .type _ZTS4ExcB, @object
410 .size _ZTS4ExcB, 6
411 _ZTS4ExcB:
412 .string "4ExcB"
413 .weak _ZTI4ExcA
414 .section .rodata._ZTI4ExcA,"aG",@progbits,_ZTI4ExcA,comdat
415 .align 8
416 .type _ZTI4ExcA, @object
417 .size _ZTI4ExcA, 16
418 _ZTI4ExcA:
419 .quad _ZTVN10__cxxabiv117__class_type_infoE+16
420 .quad _ZTS4ExcA
421 .weak _ZTS4ExcA
422 .section .rodata._ZTS4ExcA,"aG",@progbits,_ZTS4ExcA,comdat
423 .type _ZTS4ExcA, @object
424 .size _ZTS4ExcA, 6
425 _ZTS4ExcA:
426 .string "4ExcA"
427 .weak _ZTI4ExcC
428 .section .rodata._ZTI4ExcC,"aG",@progbits,_ZTI4ExcC,comdat
429 .align 8
430 .type _ZTI4ExcC, @object
431 .size _ZTI4ExcC, 16
432 _ZTI4ExcC:
433 .quad _ZTVN10__cxxabiv117__class_type_infoE+16
434 .quad _ZTS4ExcC
435 .weak _ZTS4ExcC
436 .section .rodata._ZTS4ExcC,"aG",@progbits,_ZTS4ExcC,comdat
437 .type _ZTS4ExcC, @object
438 .size _ZTS4ExcC, 6
439 _ZTS4ExcC:
440 .string "4ExcC"
441 .weak _ZTI4ExcG
442 .section .rodata._ZTI4ExcG,"aG",@progbits,_ZTI4ExcG,comdat
443 .align 8
444 .type _ZTI4ExcG, @object
445 .size _ZTI4ExcG, 16
446 _ZTI4ExcG:
447 .quad _ZTVN10__cxxabiv117__class_type_infoE+16
448 .quad _ZTS4ExcG
449 .weak _ZTS4ExcG
450 .section .rodata._ZTS4ExcG,"aG",@progbits,_ZTS4ExcG,comdat
451 .type _ZTS4ExcG, @object
452 .size _ZTS4ExcG, 6
453 _ZTS4ExcG:
454 .string "4ExcG"
455 .ident "GCC: (GNU) 8.5.0 20210514 (Red Hat 8.5.0-3)"
456 .section .note.GNU-stack,"",@progbits