llvm.org GIT mirror llvm / 02b99f6
[X86] Remove KNL specific check prefix from xaluo.ll test. NFC This was added at a time when i1 was a legal type with avx512f and there was a bug. i1 is no longer considered a legal type with avx512f so there should be no codegen difference. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350195 91177308-0d34-0410-b5e6-96231b3b80d8 Craig Topper 9 months ago
1 changed file(s) with 1 addition(s) and 349 deletion(s). Raw diff Collapse all Expand all
0 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
11 ; RUN: llc -mtriple=x86_64-darwin-unknown < %s | FileCheck %s --check-prefix=SDAG
22 ; RUN: llc -mtriple=x86_64-darwin-unknown -fast-isel -fast-isel-abort=1 < %s | FileCheck %s --check-prefix=FAST
3 ; RUN: llc -mtriple=x86_64-darwin-unknown -mcpu=knl < %s | FileCheck %s --check-prefix=KNL
3 ; RUN: llc -mtriple=x86_64-darwin-unknown -mcpu=knl < %s | FileCheck %s --check-prefix=SDAG
44
55 ;
66 ; Get the actual value of the overflow bit.
2222 ; FAST-NEXT: andb $1, %al
2323 ; FAST-NEXT: movzbl %al, %eax
2424 ; FAST-NEXT: retq
25 ;
26 ; KNL-LABEL: saddoi8:
27 ; KNL: ## %bb.0:
28 ; KNL-NEXT: addb %sil, %dil
29 ; KNL-NEXT: seto %al
30 ; KNL-NEXT: movb %dil, (%rdx)
31 ; KNL-NEXT: retq
3225 %t = call {i8, i1} @llvm.sadd.with.overflow.i8(i8 %v1, i8 %v2)
3326 %val = extractvalue {i8, i1} %t, 0
3427 %obit = extractvalue {i8, i1} %t, 1
5245 ; FAST-NEXT: andb $1, %al
5346 ; FAST-NEXT: movzbl %al, %eax
5447 ; FAST-NEXT: retq
55 ;
56 ; KNL-LABEL: saddoi16:
57 ; KNL: ## %bb.0:
58 ; KNL-NEXT: addw %si, %di
59 ; KNL-NEXT: seto %al
60 ; KNL-NEXT: movw %di, (%rdx)
61 ; KNL-NEXT: retq
6248 %t = call {i16, i1} @llvm.sadd.with.overflow.i16(i16 %v1, i16 %v2)
6349 %val = extractvalue {i16, i1} %t, 0
6450 %obit = extractvalue {i16, i1} %t, 1
8268 ; FAST-NEXT: andb $1, %al
8369 ; FAST-NEXT: movzbl %al, %eax
8470 ; FAST-NEXT: retq
85 ;
86 ; KNL-LABEL: saddoi32:
87 ; KNL: ## %bb.0:
88 ; KNL-NEXT: addl %esi, %edi
89 ; KNL-NEXT: seto %al
90 ; KNL-NEXT: movl %edi, (%rdx)
91 ; KNL-NEXT: retq
9271 %t = call {i32, i1} @llvm.sadd.with.overflow.i32(i32 %v1, i32 %v2)
9372 %val = extractvalue {i32, i1} %t, 0
9473 %obit = extractvalue {i32, i1} %t, 1
11291 ; FAST-NEXT: andb $1, %al
11392 ; FAST-NEXT: movzbl %al, %eax
11493 ; FAST-NEXT: retq
115 ;
116 ; KNL-LABEL: saddoi64:
117 ; KNL: ## %bb.0:
118 ; KNL-NEXT: addq %rsi, %rdi
119 ; KNL-NEXT: seto %al
120 ; KNL-NEXT: movq %rdi, (%rdx)
121 ; KNL-NEXT: retq
12294 %t = call {i64, i1} @llvm.sadd.with.overflow.i64(i64 %v1, i64 %v2)
12395 %val = extractvalue {i64, i1} %t, 0
12496 %obit = extractvalue {i64, i1} %t, 1
143115 ; FAST-NEXT: andb $1, %al
144116 ; FAST-NEXT: movzbl %al, %eax
145117 ; FAST-NEXT: retq
146 ;
147 ; KNL-LABEL: saddoinci8:
148 ; KNL: ## %bb.0:
149 ; KNL-NEXT: incb %dil
150 ; KNL-NEXT: seto %al
151 ; KNL-NEXT: movb %dil, (%rsi)
152 ; KNL-NEXT: retq
153118 %t = call {i8, i1} @llvm.sadd.with.overflow.i8(i8 %v1, i8 1)
154119 %val = extractvalue {i8, i1} %t, 0
155120 %obit = extractvalue {i8, i1} %t, 1
173138 ; FAST-NEXT: andb $1, %al
174139 ; FAST-NEXT: movzbl %al, %eax
175140 ; FAST-NEXT: retq
176 ;
177 ; KNL-LABEL: saddoinci16:
178 ; KNL: ## %bb.0:
179 ; KNL-NEXT: incw %di
180 ; KNL-NEXT: seto %al
181 ; KNL-NEXT: movw %di, (%rsi)
182 ; KNL-NEXT: retq
183141 %t = call {i16, i1} @llvm.sadd.with.overflow.i16(i16 %v1, i16 1)
184142 %val = extractvalue {i16, i1} %t, 0
185143 %obit = extractvalue {i16, i1} %t, 1
203161 ; FAST-NEXT: andb $1, %al
204162 ; FAST-NEXT: movzbl %al, %eax
205163 ; FAST-NEXT: retq
206 ;
207 ; KNL-LABEL: saddoinci32:
208 ; KNL: ## %bb.0:
209 ; KNL-NEXT: incl %edi
210 ; KNL-NEXT: seto %al
211 ; KNL-NEXT: movl %edi, (%rsi)
212 ; KNL-NEXT: retq
213164 %t = call {i32, i1} @llvm.sadd.with.overflow.i32(i32 %v1, i32 1)
214165 %val = extractvalue {i32, i1} %t, 0
215166 %obit = extractvalue {i32, i1} %t, 1
233184 ; FAST-NEXT: andb $1, %al
234185 ; FAST-NEXT: movzbl %al, %eax
235186 ; FAST-NEXT: retq
236 ;
237 ; KNL-LABEL: saddoinci64:
238 ; KNL: ## %bb.0:
239 ; KNL-NEXT: incq %rdi
240 ; KNL-NEXT: seto %al
241 ; KNL-NEXT: movq %rdi, (%rsi)
242 ; KNL-NEXT: retq
243187 %t = call {i64, i1} @llvm.sadd.with.overflow.i64(i64 %v1, i64 1)
244188 %val = extractvalue {i64, i1} %t, 0
245189 %obit = extractvalue {i64, i1} %t, 1
266210 ; FAST-NEXT: andb $1, %al
267211 ; FAST-NEXT: movzbl %al, %eax
268212 ; FAST-NEXT: retq
269 ;
270 ; KNL-LABEL: saddoi64imm1:
271 ; KNL: ## %bb.0:
272 ; KNL-NEXT: movl $2, %ecx
273 ; KNL-NEXT: addq %rdi, %rcx
274 ; KNL-NEXT: seto %al
275 ; KNL-NEXT: movq %rcx, (%rsi)
276 ; KNL-NEXT: retq
277213 %t = call {i64, i1} @llvm.sadd.with.overflow.i64(i64 2, i64 %v1)
278214 %val = extractvalue {i64, i1} %t, 0
279215 %obit = extractvalue {i64, i1} %t, 1
298234 ; FAST-NEXT: andb $1, %al
299235 ; FAST-NEXT: movzbl %al, %eax
300236 ; FAST-NEXT: retq
301 ;
302 ; KNL-LABEL: saddoi64imm2:
303 ; KNL: ## %bb.0:
304 ; KNL-NEXT: addq $-2147483648, %rdi ## imm = 0x80000000
305 ; KNL-NEXT: seto %al
306 ; KNL-NEXT: movq %rdi, (%rsi)
307 ; KNL-NEXT: retq
308237 %t = call {i64, i1} @llvm.sadd.with.overflow.i64(i64 %v1, i64 -2147483648)
309238 %val = extractvalue {i64, i1} %t, 0
310239 %obit = extractvalue {i64, i1} %t, 1
330259 ; FAST-NEXT: andb $1, %cl
331260 ; FAST-NEXT: movzbl %cl, %eax
332261 ; FAST-NEXT: retq
333 ;
334 ; KNL-LABEL: saddoi64imm3:
335 ; KNL: ## %bb.0:
336 ; KNL-NEXT: movabsq $-21474836489, %rcx ## imm = 0xFFFFFFFAFFFFFFF7
337 ; KNL-NEXT: addq %rdi, %rcx
338 ; KNL-NEXT: seto %al
339 ; KNL-NEXT: movq %rcx, (%rsi)
340 ; KNL-NEXT: retq
341262 %t = call {i64, i1} @llvm.sadd.with.overflow.i64(i64 %v1, i64 -21474836489)
342263 %val = extractvalue {i64, i1} %t, 0
343264 %obit = extractvalue {i64, i1} %t, 1
361282 ; FAST-NEXT: andb $1, %al
362283 ; FAST-NEXT: movzbl %al, %eax
363284 ; FAST-NEXT: retq
364 ;
365 ; KNL-LABEL: saddoi64imm4:
366 ; KNL: ## %bb.0:
367 ; KNL-NEXT: addq $2147483647, %rdi ## imm = 0x7FFFFFFF
368 ; KNL-NEXT: seto %al
369 ; KNL-NEXT: movq %rdi, (%rsi)
370 ; KNL-NEXT: retq
371285 %t = call {i64, i1} @llvm.sadd.with.overflow.i64(i64 %v1, i64 2147483647)
372286 %val = extractvalue {i64, i1} %t, 0
373287 %obit = extractvalue {i64, i1} %t, 1
393307 ; FAST-NEXT: andb $1, %cl
394308 ; FAST-NEXT: movzbl %cl, %eax
395309 ; FAST-NEXT: retq
396 ;
397 ; KNL-LABEL: saddoi64imm5:
398 ; KNL: ## %bb.0:
399 ; KNL-NEXT: movl $2147483648, %ecx ## imm = 0x80000000
400 ; KNL-NEXT: addq %rdi, %rcx
401 ; KNL-NEXT: seto %al
402 ; KNL-NEXT: movq %rcx, (%rsi)
403 ; KNL-NEXT: retq
404310 %t = call {i64, i1} @llvm.sadd.with.overflow.i64(i64 %v1, i64 2147483648)
405311 %val = extractvalue {i64, i1} %t, 0
406312 %obit = extractvalue {i64, i1} %t, 1
425331 ; FAST-NEXT: andb $1, %al
426332 ; FAST-NEXT: movzbl %al, %eax
427333 ; FAST-NEXT: retq
428 ;
429 ; KNL-LABEL: uaddoi32:
430 ; KNL: ## %bb.0:
431 ; KNL-NEXT: addl %esi, %edi
432 ; KNL-NEXT: setb %al
433 ; KNL-NEXT: movl %edi, (%rdx)
434 ; KNL-NEXT: retq
435334 %t = call {i32, i1} @llvm.uadd.with.overflow.i32(i32 %v1, i32 %v2)
436335 %val = extractvalue {i32, i1} %t, 0
437336 %obit = extractvalue {i32, i1} %t, 1
455354 ; FAST-NEXT: andb $1, %al
456355 ; FAST-NEXT: movzbl %al, %eax
457356 ; FAST-NEXT: retq
458 ;
459 ; KNL-LABEL: uaddoi64:
460 ; KNL: ## %bb.0:
461 ; KNL-NEXT: addq %rsi, %rdi
462 ; KNL-NEXT: setb %al
463 ; KNL-NEXT: movq %rdi, (%rdx)
464 ; KNL-NEXT: retq
465357 %t = call {i64, i1} @llvm.uadd.with.overflow.i64(i64 %v1, i64 %v2)
466358 %val = extractvalue {i64, i1} %t, 0
467359 %obit = extractvalue {i64, i1} %t, 1
486378 ; FAST-NEXT: andb $1, %al
487379 ; FAST-NEXT: movzbl %al, %eax
488380 ; FAST-NEXT: retq
489 ;
490 ; KNL-LABEL: uaddoinci8:
491 ; KNL: ## %bb.0:
492 ; KNL-NEXT: addb $1, %dil
493 ; KNL-NEXT: setb %al
494 ; KNL-NEXT: movb %dil, (%rsi)
495 ; KNL-NEXT: retq
496381 %t = call {i8, i1} @llvm.uadd.with.overflow.i8(i8 %v1, i8 1)
497382 %val = extractvalue {i8, i1} %t, 0
498383 %obit = extractvalue {i8, i1} %t, 1
516401 ; FAST-NEXT: andb $1, %al
517402 ; FAST-NEXT: movzbl %al, %eax
518403 ; FAST-NEXT: retq
519 ;
520 ; KNL-LABEL: uaddoinci16:
521 ; KNL: ## %bb.0:
522 ; KNL-NEXT: addw $1, %di
523 ; KNL-NEXT: setb %al
524 ; KNL-NEXT: movw %di, (%rsi)
525 ; KNL-NEXT: retq
526404 %t = call {i16, i1} @llvm.uadd.with.overflow.i16(i16 %v1, i16 1)
527405 %val = extractvalue {i16, i1} %t, 0
528406 %obit = extractvalue {i16, i1} %t, 1
546424 ; FAST-NEXT: andb $1, %al
547425 ; FAST-NEXT: movzbl %al, %eax
548426 ; FAST-NEXT: retq
549 ;
550 ; KNL-LABEL: uaddoinci32:
551 ; KNL: ## %bb.0:
552 ; KNL-NEXT: addl $1, %edi
553 ; KNL-NEXT: setb %al
554 ; KNL-NEXT: movl %edi, (%rsi)
555 ; KNL-NEXT: retq
556427 %t = call {i32, i1} @llvm.uadd.with.overflow.i32(i32 %v1, i32 1)
557428 %val = extractvalue {i32, i1} %t, 0
558429 %obit = extractvalue {i32, i1} %t, 1
576447 ; FAST-NEXT: andb $1, %al
577448 ; FAST-NEXT: movzbl %al, %eax
578449 ; FAST-NEXT: retq
579 ;
580 ; KNL-LABEL: uaddoinci64:
581 ; KNL: ## %bb.0:
582 ; KNL-NEXT: addq $1, %rdi
583 ; KNL-NEXT: setb %al
584 ; KNL-NEXT: movq %rdi, (%rsi)
585 ; KNL-NEXT: retq
586450 %t = call {i64, i1} @llvm.uadd.with.overflow.i64(i64 %v1, i64 1)
587451 %val = extractvalue {i64, i1} %t, 0
588452 %obit = extractvalue {i64, i1} %t, 1
607471 ; FAST-NEXT: andb $1, %al
608472 ; FAST-NEXT: movzbl %al, %eax
609473 ; FAST-NEXT: retq
610 ;
611 ; KNL-LABEL: ssuboi32:
612 ; KNL: ## %bb.0:
613 ; KNL-NEXT: subl %esi, %edi
614 ; KNL-NEXT: seto %al
615 ; KNL-NEXT: movl %edi, (%rdx)
616 ; KNL-NEXT: retq
617474 %t = call {i32, i1} @llvm.ssub.with.overflow.i32(i32 %v1, i32 %v2)
618475 %val = extractvalue {i32, i1} %t, 0
619476 %obit = extractvalue {i32, i1} %t, 1
637494 ; FAST-NEXT: andb $1, %al
638495 ; FAST-NEXT: movzbl %al, %eax
639496 ; FAST-NEXT: retq
640 ;
641 ; KNL-LABEL: ssuboi64:
642 ; KNL: ## %bb.0:
643 ; KNL-NEXT: subq %rsi, %rdi
644 ; KNL-NEXT: seto %al
645 ; KNL-NEXT: movq %rdi, (%rdx)
646 ; KNL-NEXT: retq
647497 %t = call {i64, i1} @llvm.ssub.with.overflow.i64(i64 %v1, i64 %v2)
648498 %val = extractvalue {i64, i1} %t, 0
649499 %obit = extractvalue {i64, i1} %t, 1
668518 ; FAST-NEXT: andb $1, %al
669519 ; FAST-NEXT: movzbl %al, %eax
670520 ; FAST-NEXT: retq
671 ;
672 ; KNL-LABEL: usuboi32:
673 ; KNL: ## %bb.0:
674 ; KNL-NEXT: subl %esi, %edi
675 ; KNL-NEXT: setb %al
676 ; KNL-NEXT: movl %edi, (%rdx)
677 ; KNL-NEXT: retq
678521 %t = call {i32, i1} @llvm.usub.with.overflow.i32(i32 %v1, i32 %v2)
679522 %val = extractvalue {i32, i1} %t, 0
680523 %obit = extractvalue {i32, i1} %t, 1
698541 ; FAST-NEXT: andb $1, %al
699542 ; FAST-NEXT: movzbl %al, %eax
700543 ; FAST-NEXT: retq
701 ;
702 ; KNL-LABEL: usuboi64:
703 ; KNL: ## %bb.0:
704 ; KNL-NEXT: subq %rsi, %rdi
705 ; KNL-NEXT: setb %al
706 ; KNL-NEXT: movq %rdi, (%rdx)
707 ; KNL-NEXT: retq
708544 %t = call {i64, i1} @llvm.usub.with.overflow.i64(i64 %v1, i64 %v2)
709545 %val = extractvalue {i64, i1} %t, 0
710546 %obit = extractvalue {i64, i1} %t, 1
731567 ; FAST-NEXT: addl %esi, %ecx
732568 ; FAST-NEXT: cmovol %edi, %eax
733569 ; FAST-NEXT: retq
734 ;
735 ; KNL-LABEL: saddoselecti32:
736 ; KNL: ## %bb.0:
737 ; KNL-NEXT: movl %esi, %eax
738 ; KNL-NEXT: movl %edi, %ecx
739 ; KNL-NEXT: addl %esi, %ecx
740 ; KNL-NEXT: cmovol %edi, %eax
741 ; KNL-NEXT: retq
742570 %t = call {i32, i1} @llvm.sadd.with.overflow.i32(i32 %v1, i32 %v2)
743571 %obit = extractvalue {i32, i1} %t, 1
744572 %ret = select i1 %obit, i32 %v1, i32 %v2
761589 ; FAST-NEXT: addq %rsi, %rcx
762590 ; FAST-NEXT: cmovoq %rdi, %rax
763591 ; FAST-NEXT: retq
764 ;
765 ; KNL-LABEL: saddoselecti64:
766 ; KNL: ## %bb.0:
767 ; KNL-NEXT: movq %rsi, %rax
768 ; KNL-NEXT: movq %rdi, %rcx
769 ; KNL-NEXT: addq %rsi, %rcx
770 ; KNL-NEXT: cmovoq %rdi, %rax
771 ; KNL-NEXT: retq
772592 %t = call {i64, i1} @llvm.sadd.with.overflow.i64(i64 %v1, i64 %v2)
773593 %obit = extractvalue {i64, i1} %t, 1
774594 %ret = select i1 %obit, i64 %v1, i64 %v2
791611 ; FAST-NEXT: addl %esi, %ecx
792612 ; FAST-NEXT: cmovbl %edi, %eax
793613 ; FAST-NEXT: retq
794 ;
795 ; KNL-LABEL: uaddoselecti32:
796 ; KNL: ## %bb.0:
797 ; KNL-NEXT: movl %esi, %eax
798 ; KNL-NEXT: movl %edi, %ecx
799 ; KNL-NEXT: addl %esi, %ecx
800 ; KNL-NEXT: cmovbl %edi, %eax
801 ; KNL-NEXT: retq
802614 %t = call {i32, i1} @llvm.uadd.with.overflow.i32(i32 %v1, i32 %v2)
803615 %obit = extractvalue {i32, i1} %t, 1
804616 %ret = select i1 %obit, i32 %v1, i32 %v2
821633 ; FAST-NEXT: addq %rsi, %rcx
822634 ; FAST-NEXT: cmovbq %rdi, %rax
823635 ; FAST-NEXT: retq
824 ;
825 ; KNL-LABEL: uaddoselecti64:
826 ; KNL: ## %bb.0:
827 ; KNL-NEXT: movq %rsi, %rax
828 ; KNL-NEXT: movq %rdi, %rcx
829 ; KNL-NEXT: addq %rsi, %rcx
830 ; KNL-NEXT: cmovbq %rdi, %rax
831 ; KNL-NEXT: retq
832636 %t = call {i64, i1} @llvm.uadd.with.overflow.i64(i64 %v1, i64 %v2)
833637 %obit = extractvalue {i64, i1} %t, 1
834638 %ret = select i1 %obit, i64 %v1, i64 %v2
849653 ; FAST-NEXT: cmpl %esi, %edi
850654 ; FAST-NEXT: cmovol %edi, %eax
851655 ; FAST-NEXT: retq
852 ;
853 ; KNL-LABEL: ssuboselecti32:
854 ; KNL: ## %bb.0:
855 ; KNL-NEXT: movl %esi, %eax
856 ; KNL-NEXT: cmpl %esi, %edi
857 ; KNL-NEXT: cmovol %edi, %eax
858 ; KNL-NEXT: retq
859656 %t = call {i32, i1} @llvm.ssub.with.overflow.i32(i32 %v1, i32 %v2)
860657 %obit = extractvalue {i32, i1} %t, 1
861658 %ret = select i1 %obit, i32 %v1, i32 %v2
876673 ; FAST-NEXT: cmpq %rsi, %rdi
877674 ; FAST-NEXT: cmovoq %rdi, %rax
878675 ; FAST-NEXT: retq
879 ;
880 ; KNL-LABEL: ssuboselecti64:
881 ; KNL: ## %bb.0:
882 ; KNL-NEXT: movq %rsi, %rax
883 ; KNL-NEXT: cmpq %rsi, %rdi
884 ; KNL-NEXT: cmovoq %rdi, %rax
885 ; KNL-NEXT: retq
886676 %t = call {i64, i1} @llvm.ssub.with.overflow.i64(i64 %v1, i64 %v2)
887677 %obit = extractvalue {i64, i1} %t, 1
888678 %ret = select i1 %obit, i64 %v1, i64 %v2
903693 ; FAST-NEXT: cmpl %esi, %edi
904694 ; FAST-NEXT: cmovbl %edi, %eax
905695 ; FAST-NEXT: retq
906 ;
907 ; KNL-LABEL: usuboselecti32:
908 ; KNL: ## %bb.0:
909 ; KNL-NEXT: movl %esi, %eax
910 ; KNL-NEXT: cmpl %esi, %edi
911 ; KNL-NEXT: cmovbl %edi, %eax
912 ; KNL-NEXT: retq
913696 %t = call {i32, i1} @llvm.usub.with.overflow.i32(i32 %v1, i32 %v2)
914697 %obit = extractvalue {i32, i1} %t, 1
915698 %ret = select i1 %obit, i32 %v1, i32 %v2
930713 ; FAST-NEXT: cmpq %rsi, %rdi
931714 ; FAST-NEXT: cmovbq %rdi, %rax
932715 ; FAST-NEXT: retq
933 ;
934 ; KNL-LABEL: usuboselecti64:
935 ; KNL: ## %bb.0:
936 ; KNL-NEXT: movq %rsi, %rax
937 ; KNL-NEXT: cmpq %rsi, %rdi
938 ; KNL-NEXT: cmovbq %rdi, %rax
939 ; KNL-NEXT: retq
940716 %t = call {i64, i1} @llvm.usub.with.overflow.i64(i64 %v1, i64 %v2)
941717 %obit = extractvalue {i64, i1} %t, 1
942718 %ret = select i1 %obit, i64 %v1, i64 %v2
972748 ; FAST-NEXT: andb $1, %al
973749 ; FAST-NEXT: movzbl %al, %eax
974750 ; FAST-NEXT: retq
975 ;
976 ; KNL-LABEL: saddobri32:
977 ; KNL: ## %bb.0:
978 ; KNL-NEXT: addl %esi, %edi
979 ; KNL-NEXT: jo LBB31_1
980 ; KNL-NEXT: ## %bb.2: ## %continue
981 ; KNL-NEXT: movb $1, %al
982 ; KNL-NEXT: retq
983 ; KNL-NEXT: LBB31_1: ## %overflow
984 ; KNL-NEXT: xorl %eax, %eax
985 ; KNL-NEXT: retq
986751 %t = call {i32, i1} @llvm.sadd.with.overflow.i32(i32 %v1, i32 %v2)
987752 %val = extractvalue {i32, i1} %t, 0
988753 %obit = extractvalue {i32, i1} %t, 1
1021786 ; FAST-NEXT: andb $1, %al
1022787 ; FAST-NEXT: movzbl %al, %eax
1023788 ; FAST-NEXT: retq
1024 ;
1025 ; KNL-LABEL: saddobri64:
1026 ; KNL: ## %bb.0:
1027 ; KNL-NEXT: addq %rsi, %rdi
1028 ; KNL-NEXT: jo LBB32_1
1029 ; KNL-NEXT: ## %bb.2: ## %continue
1030 ; KNL-NEXT: movb $1, %al
1031 ; KNL-NEXT: retq
1032 ; KNL-NEXT: LBB32_1: ## %overflow
1033 ; KNL-NEXT: xorl %eax, %eax
1034 ; KNL-NEXT: retq
1035789 %t = call {i64, i1} @llvm.sadd.with.overflow.i64(i64 %v1, i64 %v2)
1036790 %val = extractvalue {i64, i1} %t, 0
1037791 %obit = extractvalue {i64, i1} %t, 1
1070824 ; FAST-NEXT: andb $1, %al
1071825 ; FAST-NEXT: movzbl %al, %eax
1072826 ; FAST-NEXT: retq
1073 ;
1074 ; KNL-LABEL: uaddobri32:
1075 ; KNL: ## %bb.0:
1076 ; KNL-NEXT: addl %esi, %edi
1077 ; KNL-NEXT: jb LBB33_1
1078 ; KNL-NEXT: ## %bb.2: ## %continue
1079 ; KNL-NEXT: movb $1, %al
1080 ; KNL-NEXT: retq
1081 ; KNL-NEXT: LBB33_1: ## %overflow
1082 ; KNL-NEXT: xorl %eax, %eax
1083 ; KNL-NEXT: retq
1084827 %t = call {i32, i1} @llvm.uadd.with.overflow.i32(i32 %v1, i32 %v2)
1085828 %val = extractvalue {i32, i1} %t, 0
1086829 %obit = extractvalue {i32, i1} %t, 1
1119862 ; FAST-NEXT: andb $1, %al
1120863 ; FAST-NEXT: movzbl %al, %eax
1121864 ; FAST-NEXT: retq
1122 ;
1123 ; KNL-LABEL: uaddobri64:
1124 ; KNL: ## %bb.0:
1125 ; KNL-NEXT: addq %rsi, %rdi
1126 ; KNL-NEXT: jb LBB34_1
1127 ; KNL-NEXT: ## %bb.2: ## %continue
1128 ; KNL-NEXT: movb $1, %al
1129 ; KNL-NEXT: retq
1130 ; KNL-NEXT: LBB34_1: ## %overflow
1131 ; KNL-NEXT: xorl %eax, %eax
1132 ; KNL-NEXT: retq
1133865 %t = call {i64, i1} @llvm.uadd.with.overflow.i64(i64 %v1, i64 %v2)
1134866 %val = extractvalue {i64, i1} %t, 0
1135867 %obit = extractvalue {i64, i1} %t, 1
1168900 ; FAST-NEXT: andb $1, %al
1169901 ; FAST-NEXT: movzbl %al, %eax
1170902 ; FAST-NEXT: retq
1171 ;
1172 ; KNL-LABEL: ssubobri32:
1173 ; KNL: ## %bb.0:
1174 ; KNL-NEXT: cmpl %esi, %edi
1175 ; KNL-NEXT: jo LBB35_1
1176 ; KNL-NEXT: ## %bb.2: ## %continue
1177 ; KNL-NEXT: movb $1, %al
1178 ; KNL-NEXT: retq
1179 ; KNL-NEXT: LBB35_1: ## %overflow
1180 ; KNL-NEXT: xorl %eax, %eax
1181 ; KNL-NEXT: retq
1182903 %t = call {i32, i1} @llvm.ssub.with.overflow.i32(i32 %v1, i32 %v2)
1183904 %val = extractvalue {i32, i1} %t, 0
1184905 %obit = extractvalue {i32, i1} %t, 1
1217938 ; FAST-NEXT: andb $1, %al
1218939 ; FAST-NEXT: movzbl %al, %eax
1219940 ; FAST-NEXT: retq
1220 ;
1221 ; KNL-LABEL: ssubobri64:
1222 ; KNL: ## %bb.0:
1223 ; KNL-NEXT: cmpq %rsi, %rdi
1224 ; KNL-NEXT: jo LBB36_1
1225 ; KNL-NEXT: ## %bb.2: ## %continue
1226 ; KNL-NEXT: movb $1, %al
1227 ; KNL-NEXT: retq
1228 ; KNL-NEXT: LBB36_1: ## %overflow
1229 ; KNL-NEXT: xorl %eax, %eax
1230 ; KNL-NEXT: retq
1231941 %t = call {i64, i1} @llvm.ssub.with.overflow.i64(i64 %v1, i64 %v2)
1232942 %val = extractvalue {i64, i1} %t, 0
1233943 %obit = extractvalue {i64, i1} %t, 1
1266976 ; FAST-NEXT: andb $1, %al
1267977 ; FAST-NEXT: movzbl %al, %eax
1268978 ; FAST-NEXT: retq
1269 ;
1270 ; KNL-LABEL: usubobri32:
1271 ; KNL: ## %bb.0:
1272 ; KNL-NEXT: cmpl %esi, %edi
1273 ; KNL-NEXT: jb LBB37_1
1274 ; KNL-NEXT: ## %bb.2: ## %continue
1275 ; KNL-NEXT: movb $1, %al
1276 ; KNL-NEXT: retq
1277 ; KNL-NEXT: LBB37_1: ## %overflow
1278 ; KNL-NEXT: xorl %eax, %eax
1279 ; KNL-NEXT: retq
1280979 %t = call {i32, i1} @llvm.usub.with.overflow.i32(i32 %v1, i32 %v2)
1281980 %val = extractvalue {i32, i1} %t, 0
1282981 %obit = extractvalue {i32, i1} %t, 1
13151014 ; FAST-NEXT: andb $1, %al
13161015 ; FAST-NEXT: movzbl %al, %eax
13171016 ; FAST-NEXT: retq
1318 ;
1319 ; KNL-LABEL: usubobri64:
1320 ; KNL: ## %bb.0:
1321 ; KNL-NEXT: cmpq %rsi, %rdi
1322 ; KNL-NEXT: jb LBB38_1
1323 ; KNL-NEXT: ## %bb.2: ## %continue
1324 ; KNL-NEXT: movb $1, %al
1325 ; KNL-NEXT: retq
1326 ; KNL-NEXT: LBB38_1: ## %overflow
1327 ; KNL-NEXT: xorl %eax, %eax
1328 ; KNL-NEXT: retq
13291017 %t = call {i64, i1} @llvm.usub.with.overflow.i64(i64 %v1, i64 %v2)
13301018 %val = extractvalue {i64, i1} %t, 0
13311019 %obit = extractvalue {i64, i1} %t, 1
13541042 ; FAST-NEXT: addq %rcx, %rax
13551043 ; FAST-NEXT: xorl %edx, %edx
13561044 ; FAST-NEXT: retq
1357 ;
1358 ; KNL-LABEL: uaddoovf:
1359 ; KNL: ## %bb.0:
1360 ; KNL-NEXT: movzbl %dil, %ecx
1361 ; KNL-NEXT: movzbl %sil, %eax
1362 ; KNL-NEXT: addq %rcx, %rax
1363 ; KNL-NEXT: xorl %edx, %edx
1364 ; KNL-NEXT: retq
13651045 %1 = and i64 %a, 255
13661046 %2 = and i64 %b, 255
13671047 %t = call {i64, i1} @llvm.uadd.with.overflow.i64(i64 %1, i64 %2)
13821062 ; FAST-NEXT: notq %rax
13831063 ; FAST-NEXT: xorl %edx, %edx
13841064 ; FAST-NEXT: retq
1385 ;
1386 ; KNL-LABEL: usuboovf:
1387 ; KNL: ## %bb.0:
1388 ; KNL-NEXT: movq %rsi, %rax
1389 ; KNL-NEXT: notq %rax
1390 ; KNL-NEXT: xorl %edx, %edx
1391 ; KNL-NEXT: retq
13921065 %t0 = call {i64, i1} @llvm.usub.with.overflow.i64(i64 %a, i64 %a)
13931066 %v0 = extractvalue {i64, i1} %t0, 0
13941067 %o0 = extractvalue {i64, i1} %t0, 1
14251098 ; FAST-NEXT: cmovol %edi, %eax
14261099 ; FAST-NEXT: movl %ecx, (%rdx)
14271100 ; FAST-NEXT: retq
1428 ;
1429 ; KNL-LABEL: incovfselectstore:
1430 ; KNL: ## %bb.0:
1431 ; KNL-NEXT: movl %esi, %eax
1432 ; KNL-NEXT: ## kill: def $edi killed $edi def $rdi
1433 ; KNL-NEXT: leal 1(%rdi), %ecx
1434 ; KNL-NEXT: movl %edi, %esi
1435 ; KNL-NEXT: addl $1, %esi
1436 ; KNL-NEXT: cmovol %edi, %eax
1437 ; KNL-NEXT: movl %ecx, (%rdx)
1438 ; KNL-NEXT: retq
14391101 %t = call {i32, i1} @llvm.sadd.with.overflow.i32(i32 %v1, i32 1)
14401102 %obit = extractvalue {i32, i1} %t, 1
14411103 %ret = select i1 %obit, i32 %v1, i32 %v2
14651127 ; FAST-NEXT: cmovol %edi, %eax
14661128 ; FAST-NEXT: movl %ecx, (%rdx)
14671129 ; FAST-NEXT: retq
1468 ;
1469 ; KNL-LABEL: decovfselectstore:
1470 ; KNL: ## %bb.0:
1471 ; KNL-NEXT: movl %esi, %eax
1472 ; KNL-NEXT: ## kill: def $edi killed $edi def $rdi
1473 ; KNL-NEXT: leal -1(%rdi), %ecx
1474 ; KNL-NEXT: cmpl $1, %edi
1475 ; KNL-NEXT: cmovol %edi, %eax
1476 ; KNL-NEXT: movl %ecx, (%rdx)
1477 ; KNL-NEXT: retq
14781130 %t = call {i32, i1} @llvm.ssub.with.overflow.i32(i32 %v1, i32 1)
14791131 %obit = extractvalue {i32, i1} %t, 1
14801132 %ret = select i1 %obit, i32 %v1, i32 %v2