1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -O0 -mtriple=mipsel-linux-gnu -run-pass=instruction-select -verify-machineinstrs %s -o - | FileCheck %s -check-prefixes=MIPS32
5 define void @eq_i32() {entry: ret void}
6 define void @ne_i32() {entry: ret void}
7 define void @sgt_i32() {entry: ret void}
8 define void @sge_i32() {entry: ret void}
9 define void @slt_i32() {entry: ret void}
10 define void @sle_i32() {entry: ret void}
11 define void @ugt_i32() {entry: ret void}
12 define void @uge_i32() {entry: ret void}
13 define void @ult_i32() {entry: ret void}
14 define void @ule_i32() {entry: ret void}
15 define void @eq_ptr() {entry: ret void}
24 tracksRegLiveness: true
29 ; MIPS32-LABEL: name: eq_i32
30 ; MIPS32: liveins: $a0, $a1
31 ; MIPS32: [[COPY:%[0-9]+]]:gpr32 = COPY $a0
32 ; MIPS32: [[COPY1:%[0-9]+]]:gpr32 = COPY $a1
33 ; MIPS32: [[XOR:%[0-9]+]]:gpr32 = XOR [[COPY]], [[COPY1]]
34 ; MIPS32: [[SLTiu:%[0-9]+]]:gpr32 = SLTiu [[XOR]], 1
35 ; MIPS32: $v0 = COPY [[SLTiu]]
36 ; MIPS32: RetRA implicit $v0
37 %0:gprb(s32) = COPY $a0
38 %1:gprb(s32) = COPY $a1
39 %4:gprb(s32) = G_ICMP intpred(eq), %0(s32), %1
40 %3:gprb(s32) = COPY %4(s32)
50 tracksRegLiveness: true
55 ; MIPS32-LABEL: name: ne_i32
56 ; MIPS32: liveins: $a0, $a1
57 ; MIPS32: [[COPY:%[0-9]+]]:gpr32 = COPY $a0
58 ; MIPS32: [[COPY1:%[0-9]+]]:gpr32 = COPY $a1
59 ; MIPS32: [[XOR:%[0-9]+]]:gpr32 = XOR [[COPY]], [[COPY1]]
60 ; MIPS32: [[SLTu:%[0-9]+]]:gpr32 = SLTu $zero, [[XOR]]
61 ; MIPS32: $v0 = COPY [[SLTu]]
62 ; MIPS32: RetRA implicit $v0
63 %0:gprb(s32) = COPY $a0
64 %1:gprb(s32) = COPY $a1
65 %4:gprb(s32) = G_ICMP intpred(ne), %0(s32), %1
66 %3:gprb(s32) = COPY %4(s32)
76 tracksRegLiveness: true
81 ; MIPS32-LABEL: name: sgt_i32
82 ; MIPS32: liveins: $a0, $a1
83 ; MIPS32: [[COPY:%[0-9]+]]:gpr32 = COPY $a0
84 ; MIPS32: [[COPY1:%[0-9]+]]:gpr32 = COPY $a1
85 ; MIPS32: [[SLT:%[0-9]+]]:gpr32 = SLT [[COPY1]], [[COPY]]
86 ; MIPS32: $v0 = COPY [[SLT]]
87 ; MIPS32: RetRA implicit $v0
88 %0:gprb(s32) = COPY $a0
89 %1:gprb(s32) = COPY $a1
90 %4:gprb(s32) = G_ICMP intpred(sgt), %0(s32), %1
91 %3:gprb(s32) = COPY %4(s32)
100 regBankSelected: true
101 tracksRegLiveness: true
106 ; MIPS32-LABEL: name: sge_i32
107 ; MIPS32: liveins: $a0, $a1
108 ; MIPS32: [[COPY:%[0-9]+]]:gpr32 = COPY $a0
109 ; MIPS32: [[COPY1:%[0-9]+]]:gpr32 = COPY $a1
110 ; MIPS32: [[SLT:%[0-9]+]]:gpr32 = SLT [[COPY]], [[COPY1]]
111 ; MIPS32: [[XORi:%[0-9]+]]:gpr32 = XORi [[SLT]], 1
112 ; MIPS32: $v0 = COPY [[XORi]]
113 ; MIPS32: RetRA implicit $v0
114 %0:gprb(s32) = COPY $a0
115 %1:gprb(s32) = COPY $a1
116 %4:gprb(s32) = G_ICMP intpred(sge), %0(s32), %1
117 %3:gprb(s32) = COPY %4(s32)
126 regBankSelected: true
127 tracksRegLiveness: true
132 ; MIPS32-LABEL: name: slt_i32
133 ; MIPS32: liveins: $a0, $a1
134 ; MIPS32: [[COPY:%[0-9]+]]:gpr32 = COPY $a0
135 ; MIPS32: [[COPY1:%[0-9]+]]:gpr32 = COPY $a1
136 ; MIPS32: [[SLT:%[0-9]+]]:gpr32 = SLT [[COPY]], [[COPY1]]
137 ; MIPS32: $v0 = COPY [[SLT]]
138 ; MIPS32: RetRA implicit $v0
139 %0:gprb(s32) = COPY $a0
140 %1:gprb(s32) = COPY $a1
141 %4:gprb(s32) = G_ICMP intpred(slt), %0(s32), %1
142 %3:gprb(s32) = COPY %4(s32)
151 regBankSelected: true
152 tracksRegLiveness: true
157 ; MIPS32-LABEL: name: sle_i32
158 ; MIPS32: liveins: $a0, $a1
159 ; MIPS32: [[COPY:%[0-9]+]]:gpr32 = COPY $a0
160 ; MIPS32: [[COPY1:%[0-9]+]]:gpr32 = COPY $a1
161 ; MIPS32: [[SLT:%[0-9]+]]:gpr32 = SLT [[COPY1]], [[COPY]]
162 ; MIPS32: [[XORi:%[0-9]+]]:gpr32 = XORi [[SLT]], 1
163 ; MIPS32: $v0 = COPY [[XORi]]
164 ; MIPS32: RetRA implicit $v0
165 %0:gprb(s32) = COPY $a0
166 %1:gprb(s32) = COPY $a1
167 %4:gprb(s32) = G_ICMP intpred(sle), %0(s32), %1
168 %3:gprb(s32) = COPY %4(s32)
177 regBankSelected: true
178 tracksRegLiveness: true
183 ; MIPS32-LABEL: name: ugt_i32
184 ; MIPS32: liveins: $a0, $a1
185 ; MIPS32: [[COPY:%[0-9]+]]:gpr32 = COPY $a0
186 ; MIPS32: [[COPY1:%[0-9]+]]:gpr32 = COPY $a1
187 ; MIPS32: [[SLTu:%[0-9]+]]:gpr32 = SLTu [[COPY1]], [[COPY]]
188 ; MIPS32: $v0 = COPY [[SLTu]]
189 ; MIPS32: RetRA implicit $v0
190 %0:gprb(s32) = COPY $a0
191 %1:gprb(s32) = COPY $a1
192 %4:gprb(s32) = G_ICMP intpred(ugt), %0(s32), %1
193 %3:gprb(s32) = COPY %4(s32)
202 regBankSelected: true
203 tracksRegLiveness: true
208 ; MIPS32-LABEL: name: uge_i32
209 ; MIPS32: liveins: $a0, $a1
210 ; MIPS32: [[COPY:%[0-9]+]]:gpr32 = COPY $a0
211 ; MIPS32: [[COPY1:%[0-9]+]]:gpr32 = COPY $a1
212 ; MIPS32: [[SLTu:%[0-9]+]]:gpr32 = SLTu [[COPY]], [[COPY1]]
213 ; MIPS32: [[XORi:%[0-9]+]]:gpr32 = XORi [[SLTu]], 1
214 ; MIPS32: $v0 = COPY [[XORi]]
215 ; MIPS32: RetRA implicit $v0
216 %0:gprb(s32) = COPY $a0
217 %1:gprb(s32) = COPY $a1
218 %4:gprb(s32) = G_ICMP intpred(uge), %0(s32), %1
219 %3:gprb(s32) = COPY %4(s32)
228 regBankSelected: true
229 tracksRegLiveness: true
234 ; MIPS32-LABEL: name: ult_i32
235 ; MIPS32: liveins: $a0, $a1
236 ; MIPS32: [[COPY:%[0-9]+]]:gpr32 = COPY $a0
237 ; MIPS32: [[COPY1:%[0-9]+]]:gpr32 = COPY $a1
238 ; MIPS32: [[SLTu:%[0-9]+]]:gpr32 = SLTu [[COPY]], [[COPY1]]
239 ; MIPS32: $v0 = COPY [[SLTu]]
240 ; MIPS32: RetRA implicit $v0
241 %0:gprb(s32) = COPY $a0
242 %1:gprb(s32) = COPY $a1
243 %4:gprb(s32) = G_ICMP intpred(ult), %0(s32), %1
244 %3:gprb(s32) = COPY %4(s32)
253 regBankSelected: true
254 tracksRegLiveness: true
259 ; MIPS32-LABEL: name: ule_i32
260 ; MIPS32: liveins: $a0, $a1
261 ; MIPS32: [[COPY:%[0-9]+]]:gpr32 = COPY $a0
262 ; MIPS32: [[COPY1:%[0-9]+]]:gpr32 = COPY $a1
263 ; MIPS32: [[SLTu:%[0-9]+]]:gpr32 = SLTu [[COPY1]], [[COPY]]
264 ; MIPS32: [[XORi:%[0-9]+]]:gpr32 = XORi [[SLTu]], 1
265 ; MIPS32: $v0 = COPY [[XORi]]
266 ; MIPS32: RetRA implicit $v0
267 %0:gprb(s32) = COPY $a0
268 %1:gprb(s32) = COPY $a1
269 %4:gprb(s32) = G_ICMP intpred(ule), %0(s32), %1
270 %3:gprb(s32) = COPY %4(s32)
279 regBankSelected: true
280 tracksRegLiveness: true
285 ; MIPS32-LABEL: name: eq_ptr
286 ; MIPS32: liveins: $a0, $a1
287 ; MIPS32: [[COPY:%[0-9]+]]:gpr32 = COPY $a0
288 ; MIPS32: [[COPY1:%[0-9]+]]:gpr32 = COPY $a1
289 ; MIPS32: [[XOR:%[0-9]+]]:gpr32 = XOR [[COPY]], [[COPY1]]
290 ; MIPS32: [[SLTiu:%[0-9]+]]:gpr32 = SLTiu [[XOR]], 1
291 ; MIPS32: $v0 = COPY [[SLTiu]]
292 ; MIPS32: RetRA implicit $v0
293 %0:gprb(p0) = COPY $a0
294 %1:gprb(p0) = COPY $a1
295 %4:gprb(s32) = G_ICMP intpred(eq), %0(p0), %1
296 %3:gprb(s32) = COPY %4(s32)