File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
llvm/test/CodeGen/LoongArch Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -601,3 +601,25 @@ define i1 @andn_icmp_ult_i8_nn(i8 %a, i8 %b) nounwind {
601
601
%cmp = icmp ult i8 %and , %b
602
602
ret i1 %cmp
603
603
}
604
+
605
+ define i1 @andn_icmp_eq_i8_i32 (i8 signext %a , i8 signext %b ) nounwind {
606
+ ; LA32-LABEL: andn_icmp_eq_i8_i32:
607
+ ; LA32: # %bb.0:
608
+ ; LA32-NEXT: andn $a0, $a1, $a0
609
+ ; LA32-NEXT: andi $a0, $a0, 255
610
+ ; LA32-NEXT: sltui $a0, $a0, 1
611
+ ; LA32-NEXT: ret
612
+ ;
613
+ ; LA64-LABEL: andn_icmp_eq_i8_i32:
614
+ ; LA64: # %bb.0:
615
+ ; LA64-NEXT: andn $a0, $a1, $a0
616
+ ; LA64-NEXT: andi $a0, $a0, 255
617
+ ; LA64-NEXT: sltui $a0, $a0, 1
618
+ ; LA64-NEXT: ret
619
+ %x = zext i8 %a to i32
620
+ %y = zext i8 %b to i32
621
+ %not = xor i32 %x , -1
622
+ %and = and i32 %not , %y
623
+ %cmp = icmp eq i32 %and , 0
624
+ ret i1 %cmp
625
+ }
You can’t perform that action at this time.
0 commit comments