Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / bolt / test / X86 / Inputs / jump_table_icp.s
blobde2be9b6d112b8e1d2c871994f8476b662c7b397
1 .text
2 .globl main
3 .type main, %function
4 main:
5 .cfi_startproc
6 pushq %rbp
7 .cfi_def_cfa_offset 16
8 .cfi_offset %rbp, -16
9 movq %rsp, %rbp
10 .cfi_def_cfa_register %rbp
11 pushq %rbx
12 subq $0x18, %rsp
13 .cfi_offset %rbx, -24
14 movl $0x0, -0x14(%rbp)
15 movl $0x0, -0x18(%rbp)
16 jmp Ltmp16
18 Ltmp17:
19 callq rand@PLT
20 movl %eax, %ecx
21 movl $0x92492493, %edx
22 movl %ecx, %eax
23 imull %edx
24 leal (%rdx,%rcx), %eax
25 sarl $0x2, %eax
26 movl %eax, %edx
27 movl %ecx, %eax
28 sarl $0x1f, %eax
29 subl %eax, %edx
30 movl %edx, %eax
31 movl %eax, -0x1c(%rbp)
32 movl -0x1c(%rbp), %edx
33 movl %edx, %eax
34 shll $0x3, %eax
35 subl %edx, %eax
36 subl %eax, %ecx
37 movl %ecx, %eax
38 movl %eax, -0x1c(%rbp)
39 callq rand@PLT
40 movl %eax, %ecx
41 movl $0x92492493, %edx
42 movl %ecx, %eax
43 imull %edx
44 leal (%rdx,%rcx), %eax
45 sarl $0x2, %eax
46 movl %eax, %edx
47 movl %ecx, %eax
48 sarl $0x1f, %eax
49 subl %eax, %edx
50 movl %edx, %eax
51 movl %eax, -0x20(%rbp)
52 movl -0x20(%rbp), %edx
53 movl %edx, %eax
54 shll $0x3, %eax
55 subl %edx, %eax
56 subl %eax, %ecx
57 movl %ecx, %eax
58 movl %eax, -0x20(%rbp)
59 movl -0x1c(%rbp), %eax
60 movl %eax, %edi
61 Ltmp17_inc:
62 callq _Z3inci
63 # FDATA: 1 main #Ltmp17_inc# 1 _Z3inci 0 0 1073
64 movl %eax, %ebx
65 movl -0x20(%rbp), %eax
66 movl %eax, %edi
67 Ltmp17_dup:
68 callq _Z7inc_dupi
69 # FDATA: 1 main #Ltmp17_dup# 1 _Z7inc_dupi 0 0 1064
70 movl %eax, %edx
71 movl $0x0, %eax
72 subl %edx, %eax
73 addl %eax, %eax
74 addl %ebx, %eax
75 addl %eax, -0x14(%rbp)
76 addl $0x1, -0x18(%rbp)
78 Ltmp16:
79 cmpl $0x98967f, -0x18(%rbp)
80 Ltmp16_br:
81 jle Ltmp17
82 # FDATA: 1 main #Ltmp16_br# 1 main #Ltmp17# 0 651
84 cmpl $0x0, -0x14(%rbp)
85 sete %al
86 movzbl %al, %eax
87 addq $0x18, %rsp
88 popq %rbx
89 popq %rbp
90 .cfi_def_cfa %rsp, 8
91 retq
93 .cfi_endproc
94 .size main, .-main
96 .globl _Z3inci
97 .type _Z3inci, %function
98 _Z3inci:
99 .cfi_startproc
100 LBB00:
101 pushq %rbp
102 .cfi_def_cfa_offset 16
103 .cfi_offset %rbp, -16
104 movq %rsp, %rbp
105 .cfi_def_cfa_register %rbp
106 movl %edi, -0x4(%rbp)
107 cmpl $0x5, -0x4(%rbp)
108 LBB00_br:
109 ja Ltmp12
110 # FDATA: 1 _Z3inci #LBB00_br# 1 _Z3inci #Ltmp12# 189 189
111 # FDATA: 1 _Z3inci #LBB00_br# 1 _Z3inci #LFT0# 0 881
113 LFT0:
114 movl -0x4(%rbp), %eax
115 movq "JUMP_TABLE/_Z3inci.0"(,%rax,8), %rax
116 LFT0_br:
117 jmpq *%rax
118 # FDATA: 1 _Z3inci #LFT0_br# 1 _Z3inci #Ltmp0# 146 163
119 # FDATA: 1 _Z3inci #LFT0_br# 1 _Z3inci #Ltmp1# 140 156
120 # FDATA: 1 _Z3inci #LFT0_br# 1 _Z3inci #Ltmp2# 126 157
121 # FDATA: 1 _Z3inci #LFT0_br# 1 _Z3inci #Ltmp3# 129 148
122 # FDATA: 1 _Z3inci #LFT0_br# 1 _Z3inci #Ltmp4# 137 150
123 # FDATA: 1 _Z3inci #LFT0_br# 1 _Z3inci #Ltmp5# 134 152
125 Ltmp0:
126 movl total(%rip), %eax
127 addl $0x1, %eax
128 movl %eax, total(%rip)
129 movl $0x1, %eax
130 Ltmp0_br:
131 jmp Ltmp13
132 # FDATA: 1 _Z3inci #Ltmp0_br# 1 _Z3inci #Ltmp13# 0 167
134 Ltmp1:
135 movl total(%rip), %eax
136 addl $0x2, %eax
137 movl %eax, total(%rip)
138 movl $0x2, %eax
139 Ltmp1_br:
140 jmp Ltmp13
141 # FDATA: 1 _Z3inci #Ltmp1_br# 1 _Z3inci #Ltmp13# 0 151
143 Ltmp2:
144 movl total(%rip), %eax
145 addl $0x3, %eax
146 movl %eax, total(%rip)
147 movl $0x3, %eax
148 Ltmp2_br:
149 jmp Ltmp13
150 # FDATA: 1 _Z3inci #Ltmp2_br# 1 _Z3inci #Ltmp13# 0 152
152 Ltmp3:
153 movl total(%rip), %eax
154 addl $0x4, %eax
155 movl %eax, total(%rip)
156 movl $0x4, %eax
157 Ltmp3_br:
158 jmp Ltmp13
159 # FDATA: 1 _Z3inci #Ltmp3_br# 1 _Z3inci #Ltmp13# 0 146
161 Ltmp4:
162 movl total(%rip), %eax
163 addl $0x5, %eax
164 movl %eax, total(%rip)
165 movl $0x5, %eax
166 Ltmp4_br:
167 jmp Ltmp13
168 # FDATA: 1 _Z3inci #Ltmp4_br# 1 _Z3inci #Ltmp13# 0 149
170 Ltmp5:
171 movl total(%rip), %eax
172 addl $0x6, %eax
173 movl %eax, total(%rip)
174 movl $0x6, %eax
175 Ltmp5_br:
176 jmp Ltmp13
177 # FDATA: 1 _Z3inci #Ltmp5_br# 1 _Z3inci #Ltmp13# 0 150
179 Ltmp12:
180 movl -0x4(%rbp), %eax
181 addl $0x1, %eax
183 Ltmp13:
184 popq %rbp
185 .cfi_def_cfa %rsp, 8
186 retq
188 .cfi_endproc
189 .size _Z3inci, .-_Z3inci
190 # Jump tables
191 .section .rodata
192 "JUMP_TABLE/_Z3inci.0":
193 .quad Ltmp0
194 .quad Ltmp1
195 .quad Ltmp2
196 .quad Ltmp3
197 .quad Ltmp4
198 .quad Ltmp5
200 # BinaryData
201 .section .bss
202 "total":
204 .text
205 .globl _Z7inc_dupi
206 .type _Z7inc_dupi, %function
207 _Z7inc_dupi:
208 .cfi_startproc
209 LBB01:
210 pushq %rbp
211 .cfi_def_cfa_offset 16
212 .cfi_offset %rbp, -16
213 movq %rsp, %rbp
214 .cfi_def_cfa_register %rbp
215 movl %edi, -0x4(%rbp)
216 cmpl $0x5, -0x4(%rbp)
217 LBB01_br:
218 ja Ltmp14
219 # FDATA: 1 _Z7inc_dupi #LBB01_br# 1 _Z7inc_dupi #Ltmp14# 143 144
220 # FDATA: 1 _Z7inc_dupi #LBB01_br# 1 _Z7inc_dupi #LFT1# 0 777
222 LFT1:
223 movl -0x4(%rbp), %eax
224 movq "JUMP_TABLE/_Z7inc_dupi.0"(,%rax,8), %rax
225 LFT1_br:
226 jmpq *%rax
227 # FDATA: 1 _Z7inc_dupi #LFT1_br# 1 _Z7inc_dupi #Ltmp6# 130 137
228 # FDATA: 1 _Z7inc_dupi #LFT1_br# 1 _Z7inc_dupi #Ltmp7# 126 136
229 # FDATA: 1 _Z7inc_dupi #LFT1_br# 1 _Z7inc_dupi #Ltmp8# 122 130
230 # FDATA: 1 _Z7inc_dupi #LFT1_br# 1 _Z7inc_dupi #Ltmp9# 111 130
231 # FDATA: 1 _Z7inc_dupi #LFT1_br# 1 _Z7inc_dupi #Ltmp10# 122 140
232 # FDATA: 1 _Z7inc_dupi #LFT1_br# 1 _Z7inc_dupi #Ltmp11# 104 114
234 Ltmp6:
235 movl total(%rip), %eax
236 addl $0x2, %eax
237 movl %eax, total(%rip)
238 movl $0x1, %eax
239 Ltmp6_br:
240 jmp Ltmp15
241 # FDATA: 1 _Z7inc_dupi #Ltmp6_br# 1 _Z7inc_dupi #Ltmp15# 0 106
243 Ltmp7:
244 movl total(%rip), %eax
245 addl $0x3, %eax
246 movl %eax, total(%rip)
247 movl $0x2, %eax
248 Ltmp7_br:
249 jmp Ltmp15
250 # FDATA: 1 _Z7inc_dupi #Ltmp7_br# 1 _Z7inc_dupi #Ltmp15# 0 113
252 Ltmp8:
253 movl total(%rip), %eax
254 addl $0x4, %eax
255 movl %eax, total(%rip)
256 movl $0x3, %eax
257 Ltmp8_br:
258 jmp Ltmp15
259 # FDATA: 1 _Z7inc_dupi #Ltmp8_br# 1 _Z7inc_dupi #Ltmp15# 0 97
261 Ltmp9:
262 movl total(%rip), %eax
263 addl $0x5, %eax
264 movl %eax, total(%rip)
265 movl $0x4, %eax
266 Ltmp9_br:
267 jmp Ltmp15
268 # FDATA: 1 _Z7inc_dupi #Ltmp9_br# 1 _Z7inc_dupi #Ltmp15# 0 105
270 Ltmp10:
271 movl total(%rip), %eax
272 addl $0x6, %eax
273 movl %eax, total(%rip)
274 movl $0x5, %eax
275 Ltmp10_br:
276 jmp Ltmp15
277 # FDATA: 1 _Z7inc_dupi #Ltmp10_br# 1 _Z7inc_dupi #Ltmp15# 0 98
279 Ltmp11:
280 movl total(%rip), %eax
281 addl $0x7, %eax
282 movl %eax, total(%rip)
283 movl $0x6, %eax
284 Ltmp11_br:
285 jmp Ltmp15
286 # FDATA: 1 _Z7inc_dupi #Ltmp11_br# 1 _Z7inc_dupi #Ltmp15# 0 92
288 Ltmp14:
289 movl -0x4(%rbp), %eax
290 addl $0x1, %eax
292 Ltmp15:
293 popq %rbp
294 .cfi_def_cfa %rsp, 8
295 retq
297 .cfi_endproc
298 .size _Z7inc_dupi, .-_Z7inc_dupi
299 # Jump tables
300 .section .rodata
301 "JUMP_TABLE/_Z7inc_dupi.0":
302 .quad Ltmp6
303 .quad Ltmp7
304 .quad Ltmp8
305 .quad Ltmp9
306 .quad Ltmp10
307 .quad Ltmp11