1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc --mtriple=loongarch32 < %s | FileCheck %s --check-prefix=LA32
3 ; RUN: llc --mtriple=loongarch64 < %s | FileCheck %s --check-prefix=LA64
5 define i1 @andn_icmp_eq_i8(i8 signext %a, i8 signext %b) nounwind {
6 ; LA32-LABEL: andn_icmp_eq_i8:
8 ; LA32-NEXT: andn $a0, $a1, $a0
9 ; LA32-NEXT: sltui $a0, $a0, 1
12 ; LA64-LABEL: andn_icmp_eq_i8:
14 ; LA64-NEXT: andn $a0, $a1, $a0
15 ; LA64-NEXT: sltui $a0, $a0, 1
18 %cmpeq = icmp eq i8 %and, %b
22 define i1 @andn_icmp_eq_i16(i16 signext %a, i16 signext %b) nounwind {
23 ; LA32-LABEL: andn_icmp_eq_i16:
25 ; LA32-NEXT: andn $a0, $a1, $a0
26 ; LA32-NEXT: sltui $a0, $a0, 1
29 ; LA64-LABEL: andn_icmp_eq_i16:
31 ; LA64-NEXT: andn $a0, $a1, $a0
32 ; LA64-NEXT: sltui $a0, $a0, 1
35 %cmpeq = icmp eq i16 %and, %b
39 define i1 @andn_icmp_eq_i32(i32 signext %a, i32 signext %b) nounwind {
40 ; LA32-LABEL: andn_icmp_eq_i32:
42 ; LA32-NEXT: andn $a0, $a1, $a0
43 ; LA32-NEXT: sltui $a0, $a0, 1
46 ; LA64-LABEL: andn_icmp_eq_i32:
48 ; LA64-NEXT: andn $a0, $a1, $a0
49 ; LA64-NEXT: sltui $a0, $a0, 1
52 %cmpeq = icmp eq i32 %and, %b
56 define i1 @andn_icmp_eq_i64(i64 %a, i64 %b) nounwind {
57 ; LA32-LABEL: andn_icmp_eq_i64:
59 ; LA32-NEXT: andn $a1, $a3, $a1
60 ; LA32-NEXT: andn $a0, $a2, $a0
61 ; LA32-NEXT: or $a0, $a0, $a1
62 ; LA32-NEXT: sltui $a0, $a0, 1
65 ; LA64-LABEL: andn_icmp_eq_i64:
67 ; LA64-NEXT: andn $a0, $a1, $a0
68 ; LA64-NEXT: sltui $a0, $a0, 1
71 %cmpeq = icmp eq i64 %and, %b
75 define i1 @andn_icmp_ne_i8(i8 signext %a, i8 signext %b) nounwind {
76 ; LA32-LABEL: andn_icmp_ne_i8:
78 ; LA32-NEXT: andn $a0, $a1, $a0
79 ; LA32-NEXT: sltu $a0, $zero, $a0
82 ; LA64-LABEL: andn_icmp_ne_i8:
84 ; LA64-NEXT: andn $a0, $a1, $a0
85 ; LA64-NEXT: sltu $a0, $zero, $a0
88 %cmpne = icmp ne i8 %and, %b
92 define i1 @andn_icmp_ne_i16(i16 signext %a, i16 signext %b) nounwind {
93 ; LA32-LABEL: andn_icmp_ne_i16:
95 ; LA32-NEXT: andn $a0, $a1, $a0
96 ; LA32-NEXT: sltu $a0, $zero, $a0
99 ; LA64-LABEL: andn_icmp_ne_i16:
101 ; LA64-NEXT: andn $a0, $a1, $a0
102 ; LA64-NEXT: sltu $a0, $zero, $a0
104 %and = and i16 %a, %b
105 %cmpne = icmp ne i16 %and, %b
109 define i1 @andn_icmp_ne_i32(i32 signext %a, i32 signext %b) nounwind {
110 ; LA32-LABEL: andn_icmp_ne_i32:
112 ; LA32-NEXT: andn $a0, $a1, $a0
113 ; LA32-NEXT: sltu $a0, $zero, $a0
116 ; LA64-LABEL: andn_icmp_ne_i32:
118 ; LA64-NEXT: andn $a0, $a1, $a0
119 ; LA64-NEXT: sltu $a0, $zero, $a0
121 %and = and i32 %a, %b
122 %cmpne = icmp ne i32 %and, %b
126 define i1 @andn_icmp_ne_i64(i64 %a, i64 %b) nounwind {
127 ; LA32-LABEL: andn_icmp_ne_i64:
129 ; LA32-NEXT: andn $a1, $a3, $a1
130 ; LA32-NEXT: andn $a0, $a2, $a0
131 ; LA32-NEXT: or $a0, $a0, $a1
132 ; LA32-NEXT: sltu $a0, $zero, $a0
135 ; LA64-LABEL: andn_icmp_ne_i64:
137 ; LA64-NEXT: andn $a0, $a1, $a0
138 ; LA64-NEXT: sltu $a0, $zero, $a0
140 %and = and i64 %a, %b
141 %cmpne = icmp ne i64 %and, %b