1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=i686-- -no-integrated-as | FileCheck %s -check-prefix=X32
3 ; RUN: llc < %s -mtriple=x86_64-- -no-integrated-as | FileCheck %s -check-prefix=X64
5 define i32 @test_cca(i64 %nr, i64* %addr) {
7 ; X32: # %bb.0: # %entry
9 ; X32-NEXT: .cfi_def_cfa_offset 8
10 ; X32-NEXT: .cfi_offset %esi, -8
11 ; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx
12 ; X32-NEXT: movl {{[0-9]+}}(%esp), %edx
13 ; X32-NEXT: movl {{[0-9]+}}(%esp), %esi
14 ; X32-NEXT: xorl %eax, %eax
16 ; X32-NEXT: cmp %ecx,(%esi)
20 ; X32-NEXT: .cfi_def_cfa_offset 4
23 ; X64-LABEL: test_cca:
24 ; X64: # %bb.0: # %entry
25 ; X64-NEXT: xorl %eax, %eax
27 ; X64-NEXT: cmp %rdi,(%rsi)
32 %cc = tail call i32 asm "cmp $2,$1", "={@cca},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(i64* %addr, i64 %nr) nounwind
33 %tobool = icmp eq i32 %cc, 0
34 %rv = zext i1 %tobool to i32
39 define i32 @test_ccae(i64 %nr, i64* %addr) {
40 ; X32-LABEL: test_ccae:
41 ; X32: # %bb.0: # %entry
42 ; X32-NEXT: pushl %esi
43 ; X32-NEXT: .cfi_def_cfa_offset 8
44 ; X32-NEXT: .cfi_offset %esi, -8
45 ; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx
46 ; X32-NEXT: movl {{[0-9]+}}(%esp), %edx
47 ; X32-NEXT: movl {{[0-9]+}}(%esp), %esi
48 ; X32-NEXT: xorl %eax, %eax
50 ; X32-NEXT: cmp %ecx,(%esi)
54 ; X32-NEXT: .cfi_def_cfa_offset 4
57 ; X64-LABEL: test_ccae:
58 ; X64: # %bb.0: # %entry
59 ; X64-NEXT: xorl %eax, %eax
61 ; X64-NEXT: cmp %rdi,(%rsi)
66 %cc = tail call i32 asm "cmp $2,$1", "={@ccae},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(i64* %addr, i64 %nr) nounwind
67 %tobool = icmp eq i32 %cc, 0
68 %rv = zext i1 %tobool to i32
73 define i32 @test_ccb(i64 %nr, i64* %addr) {
74 ; X32-LABEL: test_ccb:
75 ; X32: # %bb.0: # %entry
76 ; X32-NEXT: pushl %esi
77 ; X32-NEXT: .cfi_def_cfa_offset 8
78 ; X32-NEXT: .cfi_offset %esi, -8
79 ; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx
80 ; X32-NEXT: movl {{[0-9]+}}(%esp), %edx
81 ; X32-NEXT: movl {{[0-9]+}}(%esp), %esi
82 ; X32-NEXT: xorl %eax, %eax
84 ; X32-NEXT: cmp %ecx,(%esi)
88 ; X32-NEXT: .cfi_def_cfa_offset 4
91 ; X64-LABEL: test_ccb:
92 ; X64: # %bb.0: # %entry
93 ; X64-NEXT: xorl %eax, %eax
95 ; X64-NEXT: cmp %rdi,(%rsi)
100 %cc = tail call i32 asm "cmp $2,$1", "={@ccb},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(i64* %addr, i64 %nr) nounwind
101 %tobool = icmp eq i32 %cc, 0
102 %rv = zext i1 %tobool to i32
107 define i32 @test_ccbe(i64 %nr, i64* %addr) {
108 ; X32-LABEL: test_ccbe:
109 ; X32: # %bb.0: # %entry
110 ; X32-NEXT: pushl %esi
111 ; X32-NEXT: .cfi_def_cfa_offset 8
112 ; X32-NEXT: .cfi_offset %esi, -8
113 ; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx
114 ; X32-NEXT: movl {{[0-9]+}}(%esp), %edx
115 ; X32-NEXT: movl {{[0-9]+}}(%esp), %esi
116 ; X32-NEXT: xorl %eax, %eax
118 ; X32-NEXT: cmp %ecx,(%esi)
121 ; X32-NEXT: popl %esi
122 ; X32-NEXT: .cfi_def_cfa_offset 4
125 ; X64-LABEL: test_ccbe:
126 ; X64: # %bb.0: # %entry
127 ; X64-NEXT: xorl %eax, %eax
129 ; X64-NEXT: cmp %rdi,(%rsi)
134 %cc = tail call i32 asm "cmp $2,$1", "={@ccbe},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(i64* %addr, i64 %nr) nounwind
135 %tobool = icmp eq i32 %cc, 0
136 %rv = zext i1 %tobool to i32
141 define i32 @test_ccc(i64 %nr, i64* %addr) {
142 ; X32-LABEL: test_ccc:
143 ; X32: # %bb.0: # %entry
144 ; X32-NEXT: pushl %esi
145 ; X32-NEXT: .cfi_def_cfa_offset 8
146 ; X32-NEXT: .cfi_offset %esi, -8
147 ; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx
148 ; X32-NEXT: movl {{[0-9]+}}(%esp), %edx
149 ; X32-NEXT: movl {{[0-9]+}}(%esp), %esi
150 ; X32-NEXT: xorl %eax, %eax
152 ; X32-NEXT: cmp %ecx,(%esi)
154 ; X32-NEXT: setae %al
155 ; X32-NEXT: popl %esi
156 ; X32-NEXT: .cfi_def_cfa_offset 4
159 ; X64-LABEL: test_ccc:
160 ; X64: # %bb.0: # %entry
161 ; X64-NEXT: xorl %eax, %eax
163 ; X64-NEXT: cmp %rdi,(%rsi)
165 ; X64-NEXT: setae %al
168 %cc = tail call i32 asm "cmp $2,$1", "={@ccc},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(i64* %addr, i64 %nr) nounwind
169 %tobool = icmp eq i32 %cc, 0
170 %rv = zext i1 %tobool to i32
175 define i32 @test_cce(i64 %nr, i64* %addr) {
176 ; X32-LABEL: test_cce:
177 ; X32: # %bb.0: # %entry
178 ; X32-NEXT: pushl %esi
179 ; X32-NEXT: .cfi_def_cfa_offset 8
180 ; X32-NEXT: .cfi_offset %esi, -8
181 ; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx
182 ; X32-NEXT: movl {{[0-9]+}}(%esp), %edx
183 ; X32-NEXT: movl {{[0-9]+}}(%esp), %esi
184 ; X32-NEXT: xorl %eax, %eax
186 ; X32-NEXT: cmp %ecx,(%esi)
188 ; X32-NEXT: setne %al
189 ; X32-NEXT: popl %esi
190 ; X32-NEXT: .cfi_def_cfa_offset 4
193 ; X64-LABEL: test_cce:
194 ; X64: # %bb.0: # %entry
195 ; X64-NEXT: xorl %eax, %eax
197 ; X64-NEXT: cmp %rdi,(%rsi)
199 ; X64-NEXT: setne %al
202 %cc = tail call i32 asm "cmp $2,$1", "={@cce},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(i64* %addr, i64 %nr) nounwind
203 %tobool = icmp eq i32 %cc, 0
204 %rv = zext i1 %tobool to i32
209 define i32 @test_ccz(i64 %nr, i64* %addr) {
210 ; X32-LABEL: test_ccz:
211 ; X32: # %bb.0: # %entry
212 ; X32-NEXT: pushl %esi
213 ; X32-NEXT: .cfi_def_cfa_offset 8
214 ; X32-NEXT: .cfi_offset %esi, -8
215 ; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx
216 ; X32-NEXT: movl {{[0-9]+}}(%esp), %edx
217 ; X32-NEXT: movl {{[0-9]+}}(%esp), %esi
218 ; X32-NEXT: xorl %eax, %eax
220 ; X32-NEXT: cmp %ecx,(%esi)
222 ; X32-NEXT: setne %al
223 ; X32-NEXT: popl %esi
224 ; X32-NEXT: .cfi_def_cfa_offset 4
227 ; X64-LABEL: test_ccz:
228 ; X64: # %bb.0: # %entry
229 ; X64-NEXT: xorl %eax, %eax
231 ; X64-NEXT: cmp %rdi,(%rsi)
233 ; X64-NEXT: setne %al
236 %cc = tail call i32 asm "cmp $2,$1", "={@ccz},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(i64* %addr, i64 %nr) nounwind
237 %tobool = icmp eq i32 %cc, 0
238 %rv = zext i1 %tobool to i32
243 define i32 @test_ccg(i64 %nr, i64* %addr) {
244 ; X32-LABEL: test_ccg:
245 ; X32: # %bb.0: # %entry
246 ; X32-NEXT: pushl %esi
247 ; X32-NEXT: .cfi_def_cfa_offset 8
248 ; X32-NEXT: .cfi_offset %esi, -8
249 ; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx
250 ; X32-NEXT: movl {{[0-9]+}}(%esp), %edx
251 ; X32-NEXT: movl {{[0-9]+}}(%esp), %esi
252 ; X32-NEXT: xorl %eax, %eax
254 ; X32-NEXT: cmp %ecx,(%esi)
256 ; X32-NEXT: setle %al
257 ; X32-NEXT: popl %esi
258 ; X32-NEXT: .cfi_def_cfa_offset 4
261 ; X64-LABEL: test_ccg:
262 ; X64: # %bb.0: # %entry
263 ; X64-NEXT: xorl %eax, %eax
265 ; X64-NEXT: cmp %rdi,(%rsi)
267 ; X64-NEXT: setle %al
270 %cc = tail call i32 asm "cmp $2,$1", "={@ccg},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(i64* %addr, i64 %nr) nounwind
271 %tobool = icmp eq i32 %cc, 0
272 %rv = zext i1 %tobool to i32
277 define i32 @test_ccge(i64 %nr, i64* %addr) {
278 ; X32-LABEL: test_ccge:
279 ; X32: # %bb.0: # %entry
280 ; X32-NEXT: pushl %esi
281 ; X32-NEXT: .cfi_def_cfa_offset 8
282 ; X32-NEXT: .cfi_offset %esi, -8
283 ; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx
284 ; X32-NEXT: movl {{[0-9]+}}(%esp), %edx
285 ; X32-NEXT: movl {{[0-9]+}}(%esp), %esi
286 ; X32-NEXT: xorl %eax, %eax
288 ; X32-NEXT: cmp %ecx,(%esi)
291 ; X32-NEXT: popl %esi
292 ; X32-NEXT: .cfi_def_cfa_offset 4
295 ; X64-LABEL: test_ccge:
296 ; X64: # %bb.0: # %entry
297 ; X64-NEXT: xorl %eax, %eax
299 ; X64-NEXT: cmp %rdi,(%rsi)
304 %cc = tail call i32 asm "cmp $2,$1", "={@ccge},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(i64* %addr, i64 %nr) nounwind
305 %tobool = icmp eq i32 %cc, 0
306 %rv = zext i1 %tobool to i32
311 define i32 @test_ccl(i64 %nr, i64* %addr) {
312 ; X32-LABEL: test_ccl:
313 ; X32: # %bb.0: # %entry
314 ; X32-NEXT: pushl %esi
315 ; X32-NEXT: .cfi_def_cfa_offset 8
316 ; X32-NEXT: .cfi_offset %esi, -8
317 ; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx
318 ; X32-NEXT: movl {{[0-9]+}}(%esp), %edx
319 ; X32-NEXT: movl {{[0-9]+}}(%esp), %esi
320 ; X32-NEXT: xorl %eax, %eax
322 ; X32-NEXT: cmp %ecx,(%esi)
324 ; X32-NEXT: setge %al
325 ; X32-NEXT: popl %esi
326 ; X32-NEXT: .cfi_def_cfa_offset 4
329 ; X64-LABEL: test_ccl:
330 ; X64: # %bb.0: # %entry
331 ; X64-NEXT: xorl %eax, %eax
333 ; X64-NEXT: cmp %rdi,(%rsi)
335 ; X64-NEXT: setge %al
338 %cc = tail call i32 asm "cmp $2,$1", "={@ccl},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(i64* %addr, i64 %nr) nounwind
339 %tobool = icmp eq i32 %cc, 0
340 %rv = zext i1 %tobool to i32
345 define i32 @test_ccle(i64 %nr, i64* %addr) {
346 ; X32-LABEL: test_ccle:
347 ; X32: # %bb.0: # %entry
348 ; X32-NEXT: pushl %esi
349 ; X32-NEXT: .cfi_def_cfa_offset 8
350 ; X32-NEXT: .cfi_offset %esi, -8
351 ; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx
352 ; X32-NEXT: movl {{[0-9]+}}(%esp), %edx
353 ; X32-NEXT: movl {{[0-9]+}}(%esp), %esi
354 ; X32-NEXT: xorl %eax, %eax
356 ; X32-NEXT: cmp %ecx,(%esi)
359 ; X32-NEXT: popl %esi
360 ; X32-NEXT: .cfi_def_cfa_offset 4
363 ; X64-LABEL: test_ccle:
364 ; X64: # %bb.0: # %entry
365 ; X64-NEXT: xorl %eax, %eax
367 ; X64-NEXT: cmp %rdi,(%rsi)
372 %cc = tail call i32 asm "cmp $2,$1", "={@ccle},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(i64* %addr, i64 %nr) nounwind
373 %tobool = icmp eq i32 %cc, 0
374 %rv = zext i1 %tobool to i32
379 define i32 @test_ccna(i64 %nr, i64* %addr) {
380 ; X32-LABEL: test_ccna:
381 ; X32: # %bb.0: # %entry
382 ; X32-NEXT: pushl %esi
383 ; X32-NEXT: .cfi_def_cfa_offset 8
384 ; X32-NEXT: .cfi_offset %esi, -8
385 ; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx
386 ; X32-NEXT: movl {{[0-9]+}}(%esp), %edx
387 ; X32-NEXT: movl {{[0-9]+}}(%esp), %esi
388 ; X32-NEXT: xorl %eax, %eax
390 ; X32-NEXT: cmp %ecx,(%esi)
393 ; X32-NEXT: popl %esi
394 ; X32-NEXT: .cfi_def_cfa_offset 4
397 ; X64-LABEL: test_ccna:
398 ; X64: # %bb.0: # %entry
399 ; X64-NEXT: xorl %eax, %eax
401 ; X64-NEXT: cmp %rdi,(%rsi)
406 %cc = tail call i32 asm "cmp $2,$1", "={@ccna},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(i64* %addr, i64 %nr) nounwind
407 %tobool = icmp eq i32 %cc, 0
408 %rv = zext i1 %tobool to i32
413 define i32 @test_ccnae(i64 %nr, i64* %addr) {
414 ; X32-LABEL: test_ccnae:
415 ; X32: # %bb.0: # %entry
416 ; X32-NEXT: pushl %esi
417 ; X32-NEXT: .cfi_def_cfa_offset 8
418 ; X32-NEXT: .cfi_offset %esi, -8
419 ; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx
420 ; X32-NEXT: movl {{[0-9]+}}(%esp), %edx
421 ; X32-NEXT: movl {{[0-9]+}}(%esp), %esi
422 ; X32-NEXT: xorl %eax, %eax
424 ; X32-NEXT: cmp %ecx,(%esi)
426 ; X32-NEXT: setae %al
427 ; X32-NEXT: popl %esi
428 ; X32-NEXT: .cfi_def_cfa_offset 4
431 ; X64-LABEL: test_ccnae:
432 ; X64: # %bb.0: # %entry
433 ; X64-NEXT: xorl %eax, %eax
435 ; X64-NEXT: cmp %rdi,(%rsi)
437 ; X64-NEXT: setae %al
440 %cc = tail call i32 asm "cmp $2,$1", "={@ccnae},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(i64* %addr, i64 %nr) nounwind
441 %tobool = icmp eq i32 %cc, 0
442 %rv = zext i1 %tobool to i32
447 define i32 @test_ccnb(i64 %nr, i64* %addr) {
448 ; X32-LABEL: test_ccnb:
449 ; X32: # %bb.0: # %entry
450 ; X32-NEXT: pushl %esi
451 ; X32-NEXT: .cfi_def_cfa_offset 8
452 ; X32-NEXT: .cfi_offset %esi, -8
453 ; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx
454 ; X32-NEXT: movl {{[0-9]+}}(%esp), %edx
455 ; X32-NEXT: movl {{[0-9]+}}(%esp), %esi
456 ; X32-NEXT: xorl %eax, %eax
458 ; X32-NEXT: cmp %ecx,(%esi)
461 ; X32-NEXT: popl %esi
462 ; X32-NEXT: .cfi_def_cfa_offset 4
465 ; X64-LABEL: test_ccnb:
466 ; X64: # %bb.0: # %entry
467 ; X64-NEXT: xorl %eax, %eax
469 ; X64-NEXT: cmp %rdi,(%rsi)
474 %cc = tail call i32 asm "cmp $2,$1", "={@ccnb},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(i64* %addr, i64 %nr) nounwind
475 %tobool = icmp eq i32 %cc, 0
476 %rv = zext i1 %tobool to i32
481 define i32 @test_ccnbe(i64 %nr, i64* %addr) {
482 ; X32-LABEL: test_ccnbe:
483 ; X32: # %bb.0: # %entry
484 ; X32-NEXT: pushl %esi
485 ; X32-NEXT: .cfi_def_cfa_offset 8
486 ; X32-NEXT: .cfi_offset %esi, -8
487 ; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx
488 ; X32-NEXT: movl {{[0-9]+}}(%esp), %edx
489 ; X32-NEXT: movl {{[0-9]+}}(%esp), %esi
490 ; X32-NEXT: xorl %eax, %eax
492 ; X32-NEXT: cmp %ecx,(%esi)
494 ; X32-NEXT: setbe %al
495 ; X32-NEXT: popl %esi
496 ; X32-NEXT: .cfi_def_cfa_offset 4
499 ; X64-LABEL: test_ccnbe:
500 ; X64: # %bb.0: # %entry
501 ; X64-NEXT: xorl %eax, %eax
503 ; X64-NEXT: cmp %rdi,(%rsi)
505 ; X64-NEXT: setbe %al
508 %cc = tail call i32 asm "cmp $2,$1", "={@ccnbe},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(i64* %addr, i64 %nr) nounwind
509 %tobool = icmp eq i32 %cc, 0
510 %rv = zext i1 %tobool to i32
515 define i32 @test_ccnc(i64 %nr, i64* %addr) {
516 ; X32-LABEL: test_ccnc:
517 ; X32: # %bb.0: # %entry
518 ; X32-NEXT: pushl %esi
519 ; X32-NEXT: .cfi_def_cfa_offset 8
520 ; X32-NEXT: .cfi_offset %esi, -8
521 ; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx
522 ; X32-NEXT: movl {{[0-9]+}}(%esp), %edx
523 ; X32-NEXT: movl {{[0-9]+}}(%esp), %esi
524 ; X32-NEXT: xorl %eax, %eax
526 ; X32-NEXT: cmp %ecx,(%esi)
529 ; X32-NEXT: popl %esi
530 ; X32-NEXT: .cfi_def_cfa_offset 4
533 ; X64-LABEL: test_ccnc:
534 ; X64: # %bb.0: # %entry
535 ; X64-NEXT: xorl %eax, %eax
537 ; X64-NEXT: cmp %rdi,(%rsi)
542 %cc = tail call i32 asm "cmp $2,$1", "={@ccnc},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(i64* %addr, i64 %nr) nounwind
543 %tobool = icmp eq i32 %cc, 0
544 %rv = zext i1 %tobool to i32
549 define i32 @test_ccne(i64 %nr, i64* %addr) {
550 ; X32-LABEL: test_ccne:
551 ; X32: # %bb.0: # %entry
552 ; X32-NEXT: pushl %esi
553 ; X32-NEXT: .cfi_def_cfa_offset 8
554 ; X32-NEXT: .cfi_offset %esi, -8
555 ; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx
556 ; X32-NEXT: movl {{[0-9]+}}(%esp), %edx
557 ; X32-NEXT: movl {{[0-9]+}}(%esp), %esi
558 ; X32-NEXT: xorl %eax, %eax
560 ; X32-NEXT: cmp %ecx,(%esi)
563 ; X32-NEXT: popl %esi
564 ; X32-NEXT: .cfi_def_cfa_offset 4
567 ; X64-LABEL: test_ccne:
568 ; X64: # %bb.0: # %entry
569 ; X64-NEXT: xorl %eax, %eax
571 ; X64-NEXT: cmp %rdi,(%rsi)
576 %cc = tail call i32 asm "cmp $2,$1", "={@ccne},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(i64* %addr, i64 %nr) nounwind
577 %tobool = icmp eq i32 %cc, 0
578 %rv = zext i1 %tobool to i32
583 define i32 @test_ccnz(i64 %nr, i64* %addr) {
584 ; X32-LABEL: test_ccnz:
585 ; X32: # %bb.0: # %entry
586 ; X32-NEXT: pushl %esi
587 ; X32-NEXT: .cfi_def_cfa_offset 8
588 ; X32-NEXT: .cfi_offset %esi, -8
589 ; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx
590 ; X32-NEXT: movl {{[0-9]+}}(%esp), %edx
591 ; X32-NEXT: movl {{[0-9]+}}(%esp), %esi
592 ; X32-NEXT: xorl %eax, %eax
594 ; X32-NEXT: cmp %ecx,(%esi)
597 ; X32-NEXT: popl %esi
598 ; X32-NEXT: .cfi_def_cfa_offset 4
601 ; X64-LABEL: test_ccnz:
602 ; X64: # %bb.0: # %entry
603 ; X64-NEXT: xorl %eax, %eax
605 ; X64-NEXT: cmp %rdi,(%rsi)
610 %cc = tail call i32 asm "cmp $2,$1", "={@ccnz},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(i64* %addr, i64 %nr) nounwind
611 %tobool = icmp eq i32 %cc, 0
612 %rv = zext i1 %tobool to i32
617 define i32 @test_ccng(i64 %nr, i64* %addr) {
618 ; X32-LABEL: test_ccng:
619 ; X32: # %bb.0: # %entry
620 ; X32-NEXT: pushl %esi
621 ; X32-NEXT: .cfi_def_cfa_offset 8
622 ; X32-NEXT: .cfi_offset %esi, -8
623 ; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx
624 ; X32-NEXT: movl {{[0-9]+}}(%esp), %edx
625 ; X32-NEXT: movl {{[0-9]+}}(%esp), %esi
626 ; X32-NEXT: xorl %eax, %eax
628 ; X32-NEXT: cmp %ecx,(%esi)
631 ; X32-NEXT: popl %esi
632 ; X32-NEXT: .cfi_def_cfa_offset 4
635 ; X64-LABEL: test_ccng:
636 ; X64: # %bb.0: # %entry
637 ; X64-NEXT: xorl %eax, %eax
639 ; X64-NEXT: cmp %rdi,(%rsi)
644 %cc = tail call i32 asm "cmp $2,$1", "={@ccng},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(i64* %addr, i64 %nr) nounwind
645 %tobool = icmp eq i32 %cc, 0
646 %rv = zext i1 %tobool to i32
651 define i32 @test_ccnge(i64 %nr, i64* %addr) {
652 ; X32-LABEL: test_ccnge:
653 ; X32: # %bb.0: # %entry
654 ; X32-NEXT: pushl %esi
655 ; X32-NEXT: .cfi_def_cfa_offset 8
656 ; X32-NEXT: .cfi_offset %esi, -8
657 ; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx
658 ; X32-NEXT: movl {{[0-9]+}}(%esp), %edx
659 ; X32-NEXT: movl {{[0-9]+}}(%esp), %esi
660 ; X32-NEXT: xorl %eax, %eax
662 ; X32-NEXT: cmp %ecx,(%esi)
664 ; X32-NEXT: setge %al
665 ; X32-NEXT: popl %esi
666 ; X32-NEXT: .cfi_def_cfa_offset 4
669 ; X64-LABEL: test_ccnge:
670 ; X64: # %bb.0: # %entry
671 ; X64-NEXT: xorl %eax, %eax
673 ; X64-NEXT: cmp %rdi,(%rsi)
675 ; X64-NEXT: setge %al
678 %cc = tail call i32 asm "cmp $2,$1", "={@ccnge},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(i64* %addr, i64 %nr) nounwind
679 %tobool = icmp eq i32 %cc, 0
680 %rv = zext i1 %tobool to i32
685 define i32 @test_ccnl(i64 %nr, i64* %addr) {
686 ; X32-LABEL: test_ccnl:
687 ; X32: # %bb.0: # %entry
688 ; X32-NEXT: pushl %esi
689 ; X32-NEXT: .cfi_def_cfa_offset 8
690 ; X32-NEXT: .cfi_offset %esi, -8
691 ; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx
692 ; X32-NEXT: movl {{[0-9]+}}(%esp), %edx
693 ; X32-NEXT: movl {{[0-9]+}}(%esp), %esi
694 ; X32-NEXT: xorl %eax, %eax
696 ; X32-NEXT: cmp %ecx,(%esi)
699 ; X32-NEXT: popl %esi
700 ; X32-NEXT: .cfi_def_cfa_offset 4
703 ; X64-LABEL: test_ccnl:
704 ; X64: # %bb.0: # %entry
705 ; X64-NEXT: xorl %eax, %eax
707 ; X64-NEXT: cmp %rdi,(%rsi)
712 %cc = tail call i32 asm "cmp $2,$1", "={@ccnl},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(i64* %addr, i64 %nr) nounwind
713 %tobool = icmp eq i32 %cc, 0
714 %rv = zext i1 %tobool to i32
719 define i32 @test_ccnle(i64 %nr, i64* %addr) {
720 ; X32-LABEL: test_ccnle:
721 ; X32: # %bb.0: # %entry
722 ; X32-NEXT: pushl %esi
723 ; X32-NEXT: .cfi_def_cfa_offset 8
724 ; X32-NEXT: .cfi_offset %esi, -8
725 ; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx
726 ; X32-NEXT: movl {{[0-9]+}}(%esp), %edx
727 ; X32-NEXT: movl {{[0-9]+}}(%esp), %esi
728 ; X32-NEXT: xorl %eax, %eax
730 ; X32-NEXT: cmp %ecx,(%esi)
732 ; X32-NEXT: setle %al
733 ; X32-NEXT: popl %esi
734 ; X32-NEXT: .cfi_def_cfa_offset 4
737 ; X64-LABEL: test_ccnle:
738 ; X64: # %bb.0: # %entry
739 ; X64-NEXT: xorl %eax, %eax
741 ; X64-NEXT: cmp %rdi,(%rsi)
743 ; X64-NEXT: setle %al
746 %cc = tail call i32 asm "cmp $2,$1", "={@ccnle},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(i64* %addr, i64 %nr) nounwind
747 %tobool = icmp eq i32 %cc, 0
748 %rv = zext i1 %tobool to i32
753 define i32 @test_ccno(i64 %nr, i64* %addr) {
754 ; X32-LABEL: test_ccno:
755 ; X32: # %bb.0: # %entry
756 ; X32-NEXT: pushl %esi
757 ; X32-NEXT: .cfi_def_cfa_offset 8
758 ; X32-NEXT: .cfi_offset %esi, -8
759 ; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx
760 ; X32-NEXT: movl {{[0-9]+}}(%esp), %edx
761 ; X32-NEXT: movl {{[0-9]+}}(%esp), %esi
762 ; X32-NEXT: xorl %eax, %eax
764 ; X32-NEXT: cmp %ecx,(%esi)
767 ; X32-NEXT: popl %esi
768 ; X32-NEXT: .cfi_def_cfa_offset 4
771 ; X64-LABEL: test_ccno:
772 ; X64: # %bb.0: # %entry
773 ; X64-NEXT: xorl %eax, %eax
775 ; X64-NEXT: cmp %rdi,(%rsi)
780 %cc = tail call i32 asm "cmp $2,$1", "={@ccno},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(i64* %addr, i64 %nr) nounwind
781 %tobool = icmp eq i32 %cc, 0
782 %rv = zext i1 %tobool to i32
787 define i32 @test_ccnp(i64 %nr, i64* %addr) {
788 ; X32-LABEL: test_ccnp:
789 ; X32: # %bb.0: # %entry
790 ; X32-NEXT: pushl %esi
791 ; X32-NEXT: .cfi_def_cfa_offset 8
792 ; X32-NEXT: .cfi_offset %esi, -8
793 ; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx
794 ; X32-NEXT: movl {{[0-9]+}}(%esp), %edx
795 ; X32-NEXT: movl {{[0-9]+}}(%esp), %esi
796 ; X32-NEXT: xorl %eax, %eax
798 ; X32-NEXT: cmp %ecx,(%esi)
800 ; X32-NEXT: setnp %al
801 ; X32-NEXT: popl %esi
802 ; X32-NEXT: .cfi_def_cfa_offset 4
805 ; X64-LABEL: test_ccnp:
806 ; X64: # %bb.0: # %entry
807 ; X64-NEXT: xorl %eax, %eax
809 ; X64-NEXT: cmp %rdi,(%rsi)
811 ; X64-NEXT: setnp %al
814 %cc = tail call i32 asm "cmp $2,$1", "={@ccnp},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(i64* %addr, i64 %nr) nounwind
815 %tobool = icmp eq i32 %cc, 0
816 %rv = zext i1 %tobool to i32
821 define i32 @test_ccns(i64 %nr, i64* %addr) {
822 ; X32-LABEL: test_ccns:
823 ; X32: # %bb.0: # %entry
824 ; X32-NEXT: pushl %esi
825 ; X32-NEXT: .cfi_def_cfa_offset 8
826 ; X32-NEXT: .cfi_offset %esi, -8
827 ; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx
828 ; X32-NEXT: movl {{[0-9]+}}(%esp), %edx
829 ; X32-NEXT: movl {{[0-9]+}}(%esp), %esi
830 ; X32-NEXT: xorl %eax, %eax
832 ; X32-NEXT: cmp %ecx,(%esi)
835 ; X32-NEXT: popl %esi
836 ; X32-NEXT: .cfi_def_cfa_offset 4
839 ; X64-LABEL: test_ccns:
840 ; X64: # %bb.0: # %entry
841 ; X64-NEXT: xorl %eax, %eax
843 ; X64-NEXT: cmp %rdi,(%rsi)
848 %cc = tail call i32 asm "cmp $2,$1", "={@ccns},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(i64* %addr, i64 %nr) nounwind
849 %tobool = icmp eq i32 %cc, 0
850 %rv = zext i1 %tobool to i32
855 define i32 @test_cco(i64 %nr, i64* %addr) {
856 ; X32-LABEL: test_cco:
857 ; X32: # %bb.0: # %entry
858 ; X32-NEXT: pushl %esi
859 ; X32-NEXT: .cfi_def_cfa_offset 8
860 ; X32-NEXT: .cfi_offset %esi, -8
861 ; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx
862 ; X32-NEXT: movl {{[0-9]+}}(%esp), %edx
863 ; X32-NEXT: movl {{[0-9]+}}(%esp), %esi
864 ; X32-NEXT: xorl %eax, %eax
866 ; X32-NEXT: cmp %ecx,(%esi)
868 ; X32-NEXT: setno %al
869 ; X32-NEXT: popl %esi
870 ; X32-NEXT: .cfi_def_cfa_offset 4
873 ; X64-LABEL: test_cco:
874 ; X64: # %bb.0: # %entry
875 ; X64-NEXT: xorl %eax, %eax
877 ; X64-NEXT: cmp %rdi,(%rsi)
879 ; X64-NEXT: setno %al
882 %cc = tail call i32 asm "cmp $2,$1", "={@cco},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(i64* %addr, i64 %nr) nounwind
883 %tobool = icmp eq i32 %cc, 0
884 %rv = zext i1 %tobool to i32
889 define i32 @test_ccp(i64 %nr, i64* %addr) {
890 ; X32-LABEL: test_ccp:
891 ; X32: # %bb.0: # %entry
892 ; X32-NEXT: pushl %esi
893 ; X32-NEXT: .cfi_def_cfa_offset 8
894 ; X32-NEXT: .cfi_offset %esi, -8
895 ; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx
896 ; X32-NEXT: movl {{[0-9]+}}(%esp), %edx
897 ; X32-NEXT: movl {{[0-9]+}}(%esp), %esi
898 ; X32-NEXT: xorl %eax, %eax
900 ; X32-NEXT: cmp %ecx,(%esi)
902 ; X32-NEXT: setnp %al
903 ; X32-NEXT: popl %esi
904 ; X32-NEXT: .cfi_def_cfa_offset 4
907 ; X64-LABEL: test_ccp:
908 ; X64: # %bb.0: # %entry
909 ; X64-NEXT: xorl %eax, %eax
911 ; X64-NEXT: cmp %rdi,(%rsi)
913 ; X64-NEXT: setnp %al
916 %cc = tail call i32 asm "cmp $2,$1", "={@ccp},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(i64* %addr, i64 %nr) nounwind
917 %tobool = icmp eq i32 %cc, 0
918 %rv = zext i1 %tobool to i32
923 define i32 @test_ccs(i64 %nr, i64* %addr) {
924 ; X32-LABEL: test_ccs:
925 ; X32: # %bb.0: # %entry
926 ; X32-NEXT: pushl %esi
927 ; X32-NEXT: .cfi_def_cfa_offset 8
928 ; X32-NEXT: .cfi_offset %esi, -8
929 ; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx
930 ; X32-NEXT: movl {{[0-9]+}}(%esp), %edx
931 ; X32-NEXT: movl {{[0-9]+}}(%esp), %esi
932 ; X32-NEXT: xorl %eax, %eax
934 ; X32-NEXT: cmp %ecx,(%esi)
936 ; X32-NEXT: setns %al
937 ; X32-NEXT: popl %esi
938 ; X32-NEXT: .cfi_def_cfa_offset 4
941 ; X64-LABEL: test_ccs:
942 ; X64: # %bb.0: # %entry
943 ; X64-NEXT: xorl %eax, %eax
945 ; X64-NEXT: cmp %rdi,(%rsi)
947 ; X64-NEXT: setns %al
950 %cc = tail call i32 asm "cmp $2,$1", "={@ccs},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(i64* %addr, i64 %nr) nounwind
951 %tobool = icmp eq i32 %cc, 0
952 %rv = zext i1 %tobool to i32