forked from OSchip/llvm-project
[x86] add tests for logic of setcc (PR40611); NFC
llvm-svn: 353789
This commit is contained in:
parent
14fb86310f
commit
093b896dcb
|
@ -482,3 +482,33 @@ define <4 x i1> @and_eq_vec(<4 x i32> %a, <4 x i32> %b, <4 x i32> %c, <4 x i32>
|
|||
ret <4 x i1> %and
|
||||
}
|
||||
|
||||
define i1 @or_icmps_const_1bit_diff(i8 %x) {
|
||||
; CHECK-LABEL: or_icmps_const_1bit_diff:
|
||||
; CHECK: # %bb.0:
|
||||
; CHECK-NEXT: cmpb $43, %dil
|
||||
; CHECK-NEXT: sete %cl
|
||||
; CHECK-NEXT: cmpb $45, %dil
|
||||
; CHECK-NEXT: sete %al
|
||||
; CHECK-NEXT: orb %cl, %al
|
||||
; CHECK-NEXT: retq
|
||||
%a = icmp eq i8 %x, 43
|
||||
%b = icmp eq i8 %x, 45
|
||||
%r = or i1 %a, %b
|
||||
ret i1 %r
|
||||
}
|
||||
|
||||
define i1 @and_icmps_const_1bit_diff(i32 %x) {
|
||||
; CHECK-LABEL: and_icmps_const_1bit_diff:
|
||||
; CHECK: # %bb.0:
|
||||
; CHECK-NEXT: cmpl $44, %edi
|
||||
; CHECK-NEXT: setne %cl
|
||||
; CHECK-NEXT: cmpl $60, %edi
|
||||
; CHECK-NEXT: setne %al
|
||||
; CHECK-NEXT: andb %cl, %al
|
||||
; CHECK-NEXT: retq
|
||||
%a = icmp ne i32 %x, 44
|
||||
%b = icmp ne i32 %x, 60
|
||||
%r = and i1 %a, %b
|
||||
ret i1 %r
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue