Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / bolt / test / X86 / cmov-conversion.s
blobed7aac8bc5be67574c6f0febe239c5e1d220ceb8
1 # REQUIRES: system-linux
3 # RUN: llvm-mc -filetype=obj -triple x86_64-unknown-unknown %s -o %t.o
4 # RUN: link_fdata %s %t.o %t.fdata
5 # RUN: llvm-strip --strip-unneeded %t.o
6 # RUN: %clang %cflags %t.o -o %t.exe -Wl,-q -nostdlib
7 # RUN: llvm-bolt %t.exe --data %t.fdata -o %t --lite=0 -v=2 \
8 # RUN: --cmov-conversion --cmov-conversion-misprediction-threshold=-1 \
9 # RUN: --cmov-conversion-bias-threshold=-1 --print-all | FileCheck %s
10 # CHECK: BOLT-INFO: CMOVConversion: CmovInHotPath, converted static 1/1
11 # CHECK: BOLT-INFO: CMOVConversion: CmovNotInHotPath, converted static 1/1
12 # CHECK: BOLT-INFO: CMOVConversion: MaxIndex, converted static 1/1
13 # CHECK: BOLT-INFO: CMOVConversion: MaxIndex_unpredictable, converted static 1/1
14 # CHECK: BOLT-INFO: CMOVConversion: MaxValue, converted static 1/1
15 # CHECK: BOLT-INFO: CMOVConversion: BinarySearch, converted static 0/0
16 # CHECK: BOLT-INFO: CMOVConversion: Transform, converted static 0/0
17 # CHECK: BOLT-INFO: CMOVConversion: test_cmov_memoperand, converted static 0/0
18 # CHECK: BOLT-INFO: CMOVConversion: test_cmov_memoperand_unpredictable, converted static 0/0
19 # CHECK: BOLT-INFO: CMOVConversion: test_cmov_memoperand_in_group, converted static 0/0
20 # CHECK: BOLT-INFO: CMOVConversion: test_cmov_memoperand_in_group2, converted static 0/0
21 # CHECK: BOLT-INFO: CMOVConversion: test_cmov_memoperand_conflicting_dir, converted static 0/0
22 # CHECK: BOLT-INFO: CMOVConversion: test_cmov_memoperand_in_group_reuse_for_addr, converted static 0/0
23 # CHECK: BOLT-INFO: CMOVConversion: test_cmov_memoperand_in_group_reuse_for_addr2, converted static 0/0
24 # CHECK: BOLT-INFO: CMOVConversion: test_cmov_memoperand_in_group_reuse_for_addr3, converted static 0/0
25 # CHECK: BOLT-INFO: CMOVConversion: test_memoperand_loop, converted static 1/1
26 # CHECK: BOLT-INFO: CMOVConversion: CmovBackToBack, converted static 2/2
27 # CHECK: BOLT-INFO: CMOVConversion total: converted static 8/8
29 .globl _start
30 _start:
31 .globl CmovInHotPath # -- Begin function CmovInHotPath
32 .p2align 4, 0x90
33 .type CmovInHotPath,@function
34 CmovInHotPath: # @CmovInHotPath
35 # CHECK-LABEL: Binary Function "CmovInHotPath" after CMOV conversion
36 # FDATA: 0 [unknown] 0 1 CmovInHotPath 0 1 2
37 .cfi_startproc
38 # %bb.0: # %entry
39 testl %edi, %edi
40 jle LBB0_5
41 # %bb.1: # %for.body.preheader
42 movl %edi, %r8d
43 xorl %edi, %edi
44 # FDATA: 0 [unknown] 0 1 CmovInHotPath #LBB0_2# 1 2
45 LBB0_2: # %for.body
46 movl (%rcx,%rdi,4), %eax
47 leal 1(%rax), %r9d
48 imull %esi, %eax
49 movl $10, %r10d
50 cmpl %edx, %eax
51 # CHECK: cmpl %edx, %eax
52 # CHECK-NEXT: cmovlel %r9d, %r10d
53 LBB0_2_br:
54 jg LBB0_4
55 # FDATA: 1 CmovInHotPath #LBB0_2_br# 1 CmovInHotPath #LBB0_3# 1 2
56 # FDATA: 1 CmovInHotPath #LBB0_2_br# 1 CmovInHotPath #LBB0_4# 1 2
57 # %bb.3: # %for.body
58 LBB0_3:
59 movl %r9d, %r10d
60 LBB0_4: # %for.body
61 imull %r9d, %r10d
62 movl %r10d, (%rcx,%rdi,4)
63 addq $1, %rdi
64 cmpq %rdi, %r8
65 jne LBB0_2
66 LBB0_5: # %for.cond.cleanup
67 retq
68 Lfunc_end0:
69 .size CmovInHotPath, Lfunc_end0-CmovInHotPath
70 .cfi_endproc
71 # -- End function
72 .globl CmovNotInHotPath # -- Begin function CmovNotInHotPath
73 .p2align 4, 0x90
74 .type CmovNotInHotPath,@function
75 CmovNotInHotPath: # @CmovNotInHotPath
76 # CHECK-LABEL: Binary Function "CmovNotInHotPath" after CMOV conversion
77 # FDATA: 0 [unknown] 0 1 CmovNotInHotPath 0 1 2
78 .cfi_startproc
79 # %bb.0: # %entry
80 testl %edi, %edi
81 jle LBB1_5
82 # %bb.1: # %for.body.preheader
83 movl %edx, %r9d
84 movl %edi, %r10d
85 xorl %edi, %edi
86 # FDATA: 0 [unknown] 0 1 CmovNotInHotPath #LBB1_2# 1 2
87 LBB1_2: # %for.body
88 movl (%rcx,%rdi,4), %r11d
89 movl %r11d, %eax
90 imull %esi, %eax
91 movl $10, %edx
92 cmpl %r9d, %eax
93 # CHECK: cmpl %r9d, %eax
94 # CHECK-NEXT: cmovlel %r11d, %edx
95 LBB1_4_br:
96 jg LBB1_4
97 # FDATA: 1 CmovNotInHotPath #LBB1_4_br# 1 CmovNotInHotPath #LBB1_3# 1 2
98 # FDATA: 1 CmovNotInHotPath #LBB1_4_br# 1 CmovNotInHotPath #LBB1_4# 1 2
99 # %bb.3: # %for.body
100 LBB1_3:
101 movl %r11d, %edx
102 LBB1_4: # %for.body
103 movl %edx, (%rcx,%rdi,4)
104 movl (%r8,%rdi,4), %eax
105 cltd
106 idivl %r9d
107 movl %eax, (%r8,%rdi,4)
108 addq $1, %rdi
109 cmpq %rdi, %r10
110 jne LBB1_2
111 LBB1_5: # %for.cond.cleanup
112 retq
113 Lfunc_end1:
114 .size CmovNotInHotPath, Lfunc_end1-CmovNotInHotPath
115 .cfi_endproc
116 # -- End function
117 .globl MaxIndex # -- Begin function MaxIndex
118 .p2align 4, 0x90
119 .type MaxIndex,@function
120 MaxIndex: # @MaxIndex
121 # CHECK-LABEL: Binary Function "MaxIndex" after CMOV conversion
122 # FDATA: 0 [unknown] 0 1 MaxIndex 0 1 2
123 .cfi_startproc
124 # %bb.0: # %entry
125 xorl %eax, %eax
126 cmpl $2, %edi
127 jl LBB2_5
128 # %bb.1: # %for.body.preheader
129 movl %edi, %r8d
130 xorl %edi, %edi
131 movl $1, %edx
132 # FDATA: 0 [unknown] 0 1 MaxIndex #LBB2_2# 1 2
133 LBB2_2: # %for.body
134 movl (%rsi,%rdx,4), %r9d
135 movslq %edi, %rcx
136 movl %edx, %eax
137 cmpl (%rsi,%rcx,4), %r9d
138 # CHECK: cmpl (%rsi,%rcx,4), %r9d
139 # CHECK-NEXT: cmovlel %edi, %eax
140 LBB2_2_br:
141 jg LBB2_4
142 # FDATA: 1 MaxIndex #LBB2_2_br# 1 MaxIndex #LBB2_3# 1 2
143 # FDATA: 1 MaxIndex #LBB2_2_br# 1 MaxIndex #LBB2_4# 1 2
144 # %bb.3: # %for.body
145 LBB2_3:
146 movl %edi, %eax
147 LBB2_4: # %for.body
148 addq $1, %rdx
149 movl %eax, %edi
150 cmpq %rdx, %r8
151 jne LBB2_2
152 LBB2_5: # %for.cond.cleanup
153 retq
154 Lfunc_end2:
155 .size MaxIndex, Lfunc_end2-MaxIndex
156 .cfi_endproc
157 # -- End function
158 .globl MaxIndex_unpredictable # -- Begin function MaxIndex_unpredictable
159 .p2align 4, 0x90
160 .type MaxIndex_unpredictable,@function
161 MaxIndex_unpredictable: # @MaxIndex_unpredictable
162 # CHECK-LABEL: Binary Function "MaxIndex_unpredictable" after CMOV conversion
163 # FDATA: 0 [unknown] 0 1 MaxIndex_unpredictable 0 1 2
164 .cfi_startproc
165 # %bb.0: # %entry
166 xorl %eax, %eax
167 cmpl $2, %edi
168 jl LBB3_5
169 # %bb.1: # %for.body.preheader
170 movl %edi, %r8d
171 xorl %edi, %edi
172 movl $1, %edx
173 # FDATA: 0 [unknown] 0 1 MaxIndex_unpredictable #LBB3_2# 1 2
174 LBB3_2: # %for.body
175 movl (%rsi,%rdx,4), %r9d
176 movslq %edi, %rcx
177 movl %edx, %eax
178 cmpl (%rsi,%rcx,4), %r9d
179 # CHECK: cmpl (%rsi,%rcx,4), %r9d
180 # CHECK-NEXT: cmovlel %edi, %eax
181 LBB3_2_br:
182 jg LBB3_4
183 # FDATA: 1 MaxIndex_unpredictable #LBB3_2_br# 1 MaxIndex_unpredictable #LBB3_3# 1 2
184 # FDATA: 1 MaxIndex_unpredictable #LBB3_2_br# 1 MaxIndex_unpredictable #LBB3_4# 1 2
185 # %bb.3: # %for.body
186 LBB3_3:
187 movl %edi, %eax
188 LBB3_4: # %for.body
189 addq $1, %rdx
190 movl %eax, %edi
191 cmpq %rdx, %r8
192 jne LBB3_2
193 LBB3_5: # %for.cond.cleanup
194 retq
195 Lfunc_end3:
196 .size MaxIndex_unpredictable, Lfunc_end3-MaxIndex_unpredictable
197 .cfi_endproc
198 # -- End function
199 .globl MaxValue # -- Begin function MaxValue
200 .p2align 4, 0x90
201 .type MaxValue,@function
202 MaxValue: # @MaxValue
203 # CHECK-LABEL: Binary Function "MaxValue" after CMOV conversion
204 # FDATA: 0 [unknown] 0 1 MaxValue 0 1 2
205 .cfi_startproc
206 # %bb.0: # %entry
207 movl (%rsi), %ecx
208 cmpl $2, %edi
209 jge LBB4_3
210 # %bb.1:
211 LBB4_1:
212 movl %ecx, %eax
213 LBB4_2: # %for.cond.cleanup
214 retq
215 LBB4_3: # %for.body.preheader
216 movl %edi, %edi
217 movl $1, %edx
218 LBB4_4: # %for.body
219 movl (%rsi,%rdx,4), %eax
220 cmpl %ecx, %eax
221 # CHECK: cmpl %ecx, %eax
222 # CHECK-NEXT: cmovlel %ecx, %eax
223 LBB4_4_br:
224 jg LBB4_6
225 # FDATA: 1 MaxValue #LBB4_4_br# 1 MaxValue #LBB4_5# 1 2
226 # FDATA: 1 MaxValue #LBB4_4_br# 1 MaxValue #LBB4_6# 1 2
227 # %bb.5: # %for.body
228 LBB4_5:
229 movl %ecx, %eax
230 LBB4_6: # %for.body
231 addq $1, %rdx
232 movl %eax, %ecx
233 cmpq %rdx, %rdi
234 je LBB4_2
235 jmp LBB4_4
236 Lfunc_end4:
237 .size MaxValue, Lfunc_end4-MaxValue
238 .cfi_endproc
239 # -- End function
240 .globl BinarySearch # -- Begin function BinarySearch
241 .p2align 4, 0x90
242 .type BinarySearch,@function
243 BinarySearch: # @BinarySearch
244 # CHECK-LABEL: Binary Function "BinarySearch" after CMOV conversion
245 # FDATA: 0 [unknown] 0 1 BinarySearch 0 1 2
246 .cfi_startproc
247 # %bb.0: # %entry
248 movl (%rsi), %eax
249 jmp LBB5_2
250 LBB5_1: # %while.body
251 movl %ecx, %eax
252 xorl %ecx, %ecx
253 btl %eax, %edi
254 setae %cl
255 movq 8(%rdx,%rcx,8), %rdx
256 LBB5_2: # %while.body
257 movl (%rdx), %ecx
258 cmpl %ecx, %eax
259 ja LBB5_1
260 # %bb.3: # %while.end
261 retq
262 Lfunc_end5:
263 .size BinarySearch, Lfunc_end5-BinarySearch
264 .cfi_endproc
265 # -- End function
266 .globl Transform # -- Begin function Transform
267 .p2align 4, 0x90
268 .type Transform,@function
269 Transform: # @Transform
270 # CHECK-LABEL: Binary Function "Transform" after CMOV conversion
271 # FDATA: 0 [unknown] 0 1 Transform 0 1 2
272 .cfi_startproc
273 # %bb.0: # %entry
274 movb $1, %al
275 testb %al, %al
276 jne LBB6_5
277 # %bb.1: # %while.body.preheader
278 movl %edx, %r8d
279 xorl %esi, %esi
280 LBB6_2: # %while.body
281 movslq %esi, %rsi
282 movl (%rdi,%rsi,4), %eax
283 xorl %edx, %edx
284 divl %r8d
285 movl %eax, %edx
286 movl $11, %eax
287 movl %r8d, %ecx
288 cmpl %r8d, %edx
289 ja LBB6_4
290 # %bb.3: # %while.body
291 movl $22, %eax
292 movl $22, %ecx
293 LBB6_4: # %while.body
294 xorl %edx, %edx
295 divl %ecx
296 movl %edx, (%rdi,%rsi,4)
297 addl $1, %esi
298 cmpl %r9d, %esi
299 ja LBB6_2
300 LBB6_5: # %while.end
301 retq
302 Lfunc_end6:
303 .size Transform, Lfunc_end6-Transform
304 .cfi_endproc
305 # -- End function
306 .globl test_cmov_memoperand # -- Begin function test_cmov_memoperand
307 .p2align 4, 0x90
308 .type test_cmov_memoperand,@function
309 test_cmov_memoperand: # @test_cmov_memoperand
310 # CHECK-LABEL: Binary Function "test_cmov_memoperand" after CMOV conversion
311 # FDATA: 0 [unknown] 0 1 test_cmov_memoperand 0 1 2
312 .cfi_startproc
313 # %bb.0: # %entry
314 movl %edx, %eax
315 cmpl %esi, %edi
316 ja LBB7_2
317 # %bb.1: # %entry
318 movl (%rcx), %eax
319 LBB7_2: # %entry
320 retq
321 Lfunc_end7:
322 .size test_cmov_memoperand, Lfunc_end7-test_cmov_memoperand
323 .cfi_endproc
324 # -- End function
325 .globl test_cmov_memoperand_unpredictable # -- Begin function test_cmov_memoperand_unpredictable
326 .p2align 4, 0x90
327 .type test_cmov_memoperand_unpredictable,@function
328 test_cmov_memoperand_unpredictable: # @test_cmov_memoperand_unpredictable
329 # CHECK-LABEL: Binary Function "test_cmov_memoperand_unpredictable" after CMOV conversion
330 # FDATA: 0 [unknown] 0 1 test_cmov_memoperand_unpredictable 0 1 2
331 .cfi_startproc
332 # %bb.0: # %entry
333 movl %edx, %eax
334 cmpl %esi, %edi
335 ja LBB8_2
336 # %bb.1: # %entry
337 movl (%rcx), %eax
338 LBB8_2: # %entry
339 retq
340 Lfunc_end8:
341 .size test_cmov_memoperand_unpredictable, Lfunc_end8-test_cmov_memoperand_unpredictable
342 .cfi_endproc
343 # -- End function
344 .globl test_cmov_memoperand_in_group # -- Begin function test_cmov_memoperand_in_group
345 .p2align 4, 0x90
346 .type test_cmov_memoperand_in_group,@function
347 test_cmov_memoperand_in_group: # @test_cmov_memoperand_in_group
348 # CHECK-LABEL: Binary Function "test_cmov_memoperand_in_group" after CMOV conversion
349 # FDATA: 0 [unknown] 0 1 test_cmov_memoperand_in_group 0 1 2
350 .cfi_startproc
351 # %bb.0: # %entry
352 movl %edx, %eax
353 movl %edx, %r8d
354 cmpl %esi, %edi
355 ja LBB9_2
356 # %bb.1: # %entry
357 movl (%rcx), %r8d
358 movl %edi, %eax
359 movl %esi, %edx
360 LBB9_2: # %entry
361 addl %r8d, %eax
362 addl %edx, %eax
363 retq
364 Lfunc_end9:
365 .size test_cmov_memoperand_in_group, Lfunc_end9-test_cmov_memoperand_in_group
366 .cfi_endproc
367 # -- End function
368 .globl test_cmov_memoperand_in_group2 # -- Begin function test_cmov_memoperand_in_group2
369 .p2align 4, 0x90
370 .type test_cmov_memoperand_in_group2,@function
371 test_cmov_memoperand_in_group2: # @test_cmov_memoperand_in_group2
372 # CHECK-LABEL: Binary Function "test_cmov_memoperand_in_group2" after CMOV conversion
373 # FDATA: 0 [unknown] 0 1 test_cmov_memoperand_in_group2 0 1 2
374 .cfi_startproc
375 # %bb.0: # %entry
376 movl %edx, %eax
377 movl %edx, %r8d
378 cmpl %esi, %edi
379 jbe LBB10_2
380 # %bb.1: # %entry
381 movl (%rcx), %r8d
382 movl %edi, %eax
383 movl %esi, %edx
384 LBB10_2: # %entry
385 addl %r8d, %eax
386 addl %edx, %eax
387 retq
388 Lfunc_end10:
389 .size test_cmov_memoperand_in_group2, Lfunc_end10-test_cmov_memoperand_in_group2
390 .cfi_endproc
391 # -- End function
392 .globl test_cmov_memoperand_conflicting_dir # -- Begin function test_cmov_memoperand_conflicting_dir
393 .p2align 4, 0x90
394 .type test_cmov_memoperand_conflicting_dir,@function
395 test_cmov_memoperand_conflicting_dir: # @test_cmov_memoperand_conflicting_dir
396 # CHECK-LABEL: Binary Function "test_cmov_memoperand_conflicting_dir" after CMOV conversion
397 # FDATA: 0 [unknown] 0 1 test_cmov_memoperand_conflicting_dir 0 1 2
398 .cfi_startproc
399 # %bb.0: # %entry
400 cmpl %esi, %edi
401 movl (%rcx), %eax
402 cmoval %edx, %eax
403 cmoval (%r8), %edx
404 addl %edx, %eax
405 retq
406 Lfunc_end11:
407 .size test_cmov_memoperand_conflicting_dir, Lfunc_end11-test_cmov_memoperand_conflicting_dir
408 .cfi_endproc
409 # -- End function
410 .globl test_cmov_memoperand_in_group_reuse_for_addr # -- Begin function test_cmov_memoperand_in_group_reuse_for_addr
411 .p2align 4, 0x90
412 .type test_cmov_memoperand_in_group_reuse_for_addr,@function
413 test_cmov_memoperand_in_group_reuse_for_addr: # @test_cmov_memoperand_in_group_reuse_for_addr
414 # CHECK-LABEL: Binary Function "test_cmov_memoperand_in_group_reuse_for_addr" after CMOV conversion
415 # FDATA: 0 [unknown] 0 1 test_cmov_memoperand_in_group_reuse_for_addr 0 1 2
416 .cfi_startproc
417 # %bb.0: # %entry
418 movl %edi, %eax
419 cmpl %esi, %edi
420 ja LBB12_2
421 # %bb.1: # %entry
422 movl (%rcx), %eax
423 LBB12_2: # %entry
424 retq
425 Lfunc_end12:
426 .size test_cmov_memoperand_in_group_reuse_for_addr, Lfunc_end12-test_cmov_memoperand_in_group_reuse_for_addr
427 .cfi_endproc
428 # -- End function
429 .globl test_cmov_memoperand_in_group_reuse_for_addr2 # -- Begin function test_cmov_memoperand_in_group_reuse_for_addr2
430 .p2align 4, 0x90
431 .type test_cmov_memoperand_in_group_reuse_for_addr2,@function
432 test_cmov_memoperand_in_group_reuse_for_addr2: # @test_cmov_memoperand_in_group_reuse_for_addr2
433 # CHECK-LABEL: Binary Function "test_cmov_memoperand_in_group_reuse_for_addr2" after CMOV conversion
434 # FDATA: 0 [unknown] 0 1 test_cmov_memoperand_in_group_reuse_for_addr2 0 1 2
435 .cfi_startproc
436 # %bb.0: # %entry
437 movl %edi, %eax
438 cmpl %esi, %edi
439 ja LBB13_2
440 # %bb.1: # %entry
441 movq (%rcx), %rax
442 movl (%rax), %eax
443 LBB13_2: # %entry
444 retq
445 Lfunc_end13:
446 .size test_cmov_memoperand_in_group_reuse_for_addr2, Lfunc_end13-test_cmov_memoperand_in_group_reuse_for_addr2
447 .cfi_endproc
448 # -- End function
449 .globl test_cmov_memoperand_in_group_reuse_for_addr3 # -- Begin function test_cmov_memoperand_in_group_reuse_for_addr3
450 .p2align 4, 0x90
451 .type test_cmov_memoperand_in_group_reuse_for_addr3,@function
452 test_cmov_memoperand_in_group_reuse_for_addr3: # @test_cmov_memoperand_in_group_reuse_for_addr3
453 # CHECK-LABEL: Binary Function "test_cmov_memoperand_in_group_reuse_for_addr3" after CMOV conversion
454 # FDATA: 0 [unknown] 0 1 test_cmov_memoperand_in_group_reuse_for_addr3 0 1 2
455 .cfi_startproc
456 # %bb.0: # %entry
457 movl %edi, %eax
458 cmpl %esi, %edi
459 ja LBB14_2
460 # %bb.1: # %entry
461 movl (%rcx), %eax
462 LBB14_2: # %entry
463 retq
464 Lfunc_end14:
465 .size test_cmov_memoperand_in_group_reuse_for_addr3, Lfunc_end14-test_cmov_memoperand_in_group_reuse_for_addr3
466 .cfi_endproc
467 # -- End function
468 .globl test_memoperand_loop # -- Begin function test_memoperand_loop
469 .p2align 4, 0x90
470 .type test_memoperand_loop,@function
471 test_memoperand_loop: # @test_memoperand_loop
472 # CHECK-LABEL: Binary Function "test_memoperand_loop" after CMOV conversion
473 # FDATA: 0 [unknown] 0 1 test_memoperand_loop 0 1 2
474 .cfi_startproc
475 # %bb.0: # %entry
476 movq begin@GOTPCREL(%rip), %r8
477 movq (%r8), %rax
478 movq end@GOTPCREL(%rip), %rcx
479 movq (%rcx), %rdx
480 xorl %esi, %esi
481 movq %rax, %rcx
482 LBB15_1: # %loop.body
483 addq $8, %rcx
484 cmpq %rdx, %rcx
485 ja LBB15_3
486 # %bb.2: # %loop.body
487 movq (%r8), %rcx
488 LBB15_3: # %loop.body
489 movl %edi, (%rcx)
490 addq $8, %rcx
491 cmpq %rdx, %rcx
492 # CHECK: movl %edi, (%rcx)
493 # CHECK-NEXT: addq $0x8, %rcx
494 # CHECK-NEXT: cmpq %rdx, %rcx
495 # CHECK-NEXT: cmovbeq %rax, %rcx
496 LBB15_3_br:
497 ja LBB15_5
498 # FDATA: 1 test_memoperand_loop #LBB15_3_br# 1 test_memoperand_loop #LBB15_4# 1 2
499 # FDATA: 1 test_memoperand_loop #LBB15_3_br# 1 test_memoperand_loop #LBB15_5# 1 2
500 # %bb.4: # %loop.body
501 LBB15_4:
502 movq %rax, %rcx
503 LBB15_5: # %loop.body
504 movl %edi, (%rcx)
505 addl $1, %esi
506 cmpl $1024, %esi # imm = 0x400
507 jl LBB15_1
508 # %bb.6: # %exit
509 retq
510 Lfunc_end15:
511 .size test_memoperand_loop, Lfunc_end15-test_memoperand_loop
512 .cfi_endproc
513 # -- End function
514 .globl CmovBackToBack # -- Begin function CmovBackToBack
515 .p2align 4, 0x90
516 .type CmovBackToBack,@function
517 CmovBackToBack: # @CmovBackToBack
518 # CHECK-LABEL: Binary Function "CmovBackToBack" after CMOV conversion
519 # FDATA: 0 [unknown] 0 1 CmovBackToBack 0 1 2
520 .cfi_startproc
521 testl %edi, %edi
522 jle LBB16_5
523 movl %edi, %r8d
524 xorl %edi, %edi
525 # FDATA: 0 [unknown] 0 1 CmovBackToBack #LBB16_2# 1 2
526 LBB16_2: # %for.body
527 movl (%rcx,%rdi,4), %eax
528 leal 1(%rax), %r9d
529 imull %esi, %eax
530 movl $10, %r10d
531 cmpl %edx, %eax
532 # CHECK: cmpl %edx, %eax
533 # CHECK-NEXT: cmovlel %r9d, %r10d
534 LBB16_2_br:
535 jg LBB16_4
536 # FDATA: 1 CmovBackToBack #LBB16_2_br# 1 CmovBackToBack #LBB16_3# 1 2
537 # FDATA: 1 CmovBackToBack #LBB16_2_br# 1 CmovBackToBack #LBB16_4# 1 2
538 LBB16_3:
539 movl %r9d, %r10d
540 LBB16_4: # %for.body
541 # CHECK-NEXT: cmovlel %r9d, %r10d
542 LBB16_6_br:
543 jg LBB16_8
544 # FDATA: 1 CmovBackToBack #LBB16_6_br# 1 CmovBackToBack #LBB16_7# 1 2
545 # FDATA: 1 CmovBackToBack #LBB16_6_br# 1 CmovBackToBack #LBB16_8# 1 2
546 LBB16_7:
547 movl %r9d, %r10d
548 LBB16_8: # %for.body
549 imull %r9d, %r10d
550 movl %r10d, (%rcx,%rdi,4)
551 addq $1, %rdi
552 cmpq %rdi, %r8
553 jne LBB16_2
554 LBB16_5: # %for.cond.cleanup
555 retq
556 Lfunc_end16:
557 .size CmovBackToBack, Lfunc_end16-CmovBackToBack
558 .cfi_endproc
559 # -- End function
560 .data
561 .globl begin
562 begin:
563 .quad 0xdeadbeef
564 .globl end
565 end:
566 .quad 0xfaceb00c