1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -O0 -mtriple=mipsel-linux-gnu -global-isel -verify-machineinstrs %s -o -| FileCheck %s -check-prefixes=MIPS32,FP32
3 ; RUN: llc -O0 -mtriple=mipsel-linux-gnu -mattr=+fp64,+mips32r2 -global-isel -verify-machineinstrs %s -o -| FileCheck %s -check-prefixes=MIPS32,FP64
5 define i1 @false_s(float %x, float %y) {
6 ; MIPS32-LABEL: false_s:
7 ; MIPS32: # %bb.0: # %entry
8 ; MIPS32-NEXT: ori $2, $zero, 0
12 %cmp = fcmp false float %x, %y
15 define i1 @true_s(float %x, float %y) {
16 ; MIPS32-LABEL: true_s:
17 ; MIPS32: # %bb.0: # %entry
18 ; MIPS32-NEXT: addiu $2, $zero, 65535
22 %cmp = fcmp true float %x, %y
27 define i1 @uno_s(float %x, float %y) {
28 ; MIPS32-LABEL: uno_s:
29 ; MIPS32: # %bb.0: # %entry
30 ; MIPS32-NEXT: addiu $1, $zero, 1
31 ; MIPS32-NEXT: c.un.s $f12, $f14
32 ; MIPS32-NEXT: movf $1, $zero, $fcc0
33 ; MIPS32-NEXT: move $2, $1
37 %cmp = fcmp uno float %x, %y
40 define i1 @ord_s(float %x, float %y) {
41 ; MIPS32-LABEL: ord_s:
42 ; MIPS32: # %bb.0: # %entry
43 ; MIPS32-NEXT: addiu $1, $zero, 1
44 ; MIPS32-NEXT: c.un.s $f12, $f14
45 ; MIPS32-NEXT: movt $1, $zero, $fcc0
46 ; MIPS32-NEXT: move $2, $1
50 %cmp = fcmp ord float %x, %y
55 define i1 @oeq_s(float %x, float %y) {
56 ; MIPS32-LABEL: oeq_s:
57 ; MIPS32: # %bb.0: # %entry
58 ; MIPS32-NEXT: addiu $1, $zero, 1
59 ; MIPS32-NEXT: c.eq.s $f12, $f14
60 ; MIPS32-NEXT: movf $1, $zero, $fcc0
61 ; MIPS32-NEXT: move $2, $1
65 %cmp = fcmp oeq float %x, %y
68 define i1 @une_s(float %x, float %y) {
69 ; MIPS32-LABEL: une_s:
70 ; MIPS32: # %bb.0: # %entry
71 ; MIPS32-NEXT: addiu $1, $zero, 1
72 ; MIPS32-NEXT: c.eq.s $f12, $f14
73 ; MIPS32-NEXT: movt $1, $zero, $fcc0
74 ; MIPS32-NEXT: move $2, $1
78 %cmp = fcmp une float %x, %y
83 define i1 @ueq_s(float %x, float %y) {
84 ; MIPS32-LABEL: ueq_s:
85 ; MIPS32: # %bb.0: # %entry
86 ; MIPS32-NEXT: addiu $1, $zero, 1
87 ; MIPS32-NEXT: c.ueq.s $f12, $f14
88 ; MIPS32-NEXT: movf $1, $zero, $fcc0
89 ; MIPS32-NEXT: move $2, $1
93 %cmp = fcmp ueq float %x, %y
96 define i1 @one_s(float %x, float %y) {
97 ; MIPS32-LABEL: one_s:
98 ; MIPS32: # %bb.0: # %entry
99 ; MIPS32-NEXT: addiu $1, $zero, 1
100 ; MIPS32-NEXT: c.ueq.s $f12, $f14
101 ; MIPS32-NEXT: movt $1, $zero, $fcc0
102 ; MIPS32-NEXT: move $2, $1
103 ; MIPS32-NEXT: jr $ra
106 %cmp = fcmp one float %x, %y
111 define i1 @olt_s(float %x, float %y) {
112 ; MIPS32-LABEL: olt_s:
113 ; MIPS32: # %bb.0: # %entry
114 ; MIPS32-NEXT: addiu $1, $zero, 1
115 ; MIPS32-NEXT: c.olt.s $f12, $f14
116 ; MIPS32-NEXT: movf $1, $zero, $fcc0
117 ; MIPS32-NEXT: move $2, $1
118 ; MIPS32-NEXT: jr $ra
121 %cmp = fcmp olt float %x, %y
124 define i1 @uge_s(float %x, float %y) {
125 ; MIPS32-LABEL: uge_s:
126 ; MIPS32: # %bb.0: # %entry
127 ; MIPS32-NEXT: addiu $1, $zero, 1
128 ; MIPS32-NEXT: c.olt.s $f12, $f14
129 ; MIPS32-NEXT: movt $1, $zero, $fcc0
130 ; MIPS32-NEXT: move $2, $1
131 ; MIPS32-NEXT: jr $ra
134 %cmp = fcmp uge float %x, %y
139 define i1 @ult_s(float %x, float %y) {
140 ; MIPS32-LABEL: ult_s:
141 ; MIPS32: # %bb.0: # %entry
142 ; MIPS32-NEXT: addiu $1, $zero, 1
143 ; MIPS32-NEXT: c.ult.s $f12, $f14
144 ; MIPS32-NEXT: movf $1, $zero, $fcc0
145 ; MIPS32-NEXT: move $2, $1
146 ; MIPS32-NEXT: jr $ra
149 %cmp = fcmp ult float %x, %y
152 define i1 @oge_s(float %x, float %y) {
153 ; MIPS32-LABEL: oge_s:
154 ; MIPS32: # %bb.0: # %entry
155 ; MIPS32-NEXT: addiu $1, $zero, 1
156 ; MIPS32-NEXT: c.ult.s $f12, $f14
157 ; MIPS32-NEXT: movt $1, $zero, $fcc0
158 ; MIPS32-NEXT: move $2, $1
159 ; MIPS32-NEXT: jr $ra
162 %cmp = fcmp oge float %x, %y
167 define i1 @ole_s(float %x, float %y) {
168 ; MIPS32-LABEL: ole_s:
169 ; MIPS32: # %bb.0: # %entry
170 ; MIPS32-NEXT: addiu $1, $zero, 1
171 ; MIPS32-NEXT: c.ole.s $f12, $f14
172 ; MIPS32-NEXT: movf $1, $zero, $fcc0
173 ; MIPS32-NEXT: move $2, $1
174 ; MIPS32-NEXT: jr $ra
177 %cmp = fcmp ole float %x, %y
180 define i1 @ugt_s(float %x, float %y) {
181 ; MIPS32-LABEL: ugt_s:
182 ; MIPS32: # %bb.0: # %entry
183 ; MIPS32-NEXT: addiu $1, $zero, 1
184 ; MIPS32-NEXT: c.ole.s $f12, $f14
185 ; MIPS32-NEXT: movt $1, $zero, $fcc0
186 ; MIPS32-NEXT: move $2, $1
187 ; MIPS32-NEXT: jr $ra
190 %cmp = fcmp ugt float %x, %y
195 define i1 @ule_s(float %x, float %y) {
196 ; MIPS32-LABEL: ule_s:
197 ; MIPS32: # %bb.0: # %entry
198 ; MIPS32-NEXT: addiu $1, $zero, 1
199 ; MIPS32-NEXT: c.ule.s $f12, $f14
200 ; MIPS32-NEXT: movf $1, $zero, $fcc0
201 ; MIPS32-NEXT: move $2, $1
202 ; MIPS32-NEXT: jr $ra
205 %cmp = fcmp ule float %x, %y
208 define i1 @ogt_s(float %x, float %y) {
209 ; MIPS32-LABEL: ogt_s:
210 ; MIPS32: # %bb.0: # %entry
211 ; MIPS32-NEXT: addiu $1, $zero, 1
212 ; MIPS32-NEXT: c.ule.s $f12, $f14
213 ; MIPS32-NEXT: movt $1, $zero, $fcc0
214 ; MIPS32-NEXT: move $2, $1
215 ; MIPS32-NEXT: jr $ra
218 %cmp = fcmp ogt float %x, %y
223 define i1 @false_d(double %x, double %y) {
224 ; MIPS32-LABEL: false_d:
225 ; MIPS32: # %bb.0: # %entry
226 ; MIPS32-NEXT: ori $2, $zero, 0
227 ; MIPS32-NEXT: jr $ra
230 %cmp = fcmp false double %x, %y
233 define i1 @true_d(double %x, double %y) {
234 ; MIPS32-LABEL: true_d:
235 ; MIPS32: # %bb.0: # %entry
236 ; MIPS32-NEXT: addiu $2, $zero, 65535
237 ; MIPS32-NEXT: jr $ra
240 %cmp = fcmp true double %x, %y
245 define i1 @uno_d(double %x, double %y) {
246 ; MIPS32-LABEL: uno_d:
247 ; MIPS32: # %bb.0: # %entry
248 ; MIPS32-NEXT: addiu $1, $zero, 1
249 ; MIPS32-NEXT: c.un.d $f12, $f14
250 ; MIPS32-NEXT: movf $1, $zero, $fcc0
251 ; MIPS32-NEXT: move $2, $1
252 ; MIPS32-NEXT: jr $ra
255 %cmp = fcmp uno double %x, %y
258 define i1 @ord_d(double %x, double %y) {
259 ; MIPS32-LABEL: ord_d:
260 ; MIPS32: # %bb.0: # %entry
261 ; MIPS32-NEXT: addiu $1, $zero, 1
262 ; MIPS32-NEXT: c.un.d $f12, $f14
263 ; MIPS32-NEXT: movt $1, $zero, $fcc0
264 ; MIPS32-NEXT: move $2, $1
265 ; MIPS32-NEXT: jr $ra
268 %cmp = fcmp ord double %x, %y
273 define i1 @oeq_d(double %x, double %y) {
274 ; MIPS32-LABEL: oeq_d:
275 ; MIPS32: # %bb.0: # %entry
276 ; MIPS32-NEXT: addiu $1, $zero, 1
277 ; MIPS32-NEXT: c.eq.d $f12, $f14
278 ; MIPS32-NEXT: movf $1, $zero, $fcc0
279 ; MIPS32-NEXT: move $2, $1
280 ; MIPS32-NEXT: jr $ra
283 %cmp = fcmp oeq double %x, %y
286 define i1 @une_d(double %x, double %y) {
287 ; MIPS32-LABEL: une_d:
288 ; MIPS32: # %bb.0: # %entry
289 ; MIPS32-NEXT: addiu $1, $zero, 1
290 ; MIPS32-NEXT: c.eq.d $f12, $f14
291 ; MIPS32-NEXT: movt $1, $zero, $fcc0
292 ; MIPS32-NEXT: move $2, $1
293 ; MIPS32-NEXT: jr $ra
296 %cmp = fcmp une double %x, %y
301 define i1 @ueq_d(double %x, double %y) {
302 ; MIPS32-LABEL: ueq_d:
303 ; MIPS32: # %bb.0: # %entry
304 ; MIPS32-NEXT: addiu $1, $zero, 1
305 ; MIPS32-NEXT: c.ueq.d $f12, $f14
306 ; MIPS32-NEXT: movf $1, $zero, $fcc0
307 ; MIPS32-NEXT: move $2, $1
308 ; MIPS32-NEXT: jr $ra
311 %cmp = fcmp ueq double %x, %y
314 define i1 @one_d(double %x, double %y) {
315 ; MIPS32-LABEL: one_d:
316 ; MIPS32: # %bb.0: # %entry
317 ; MIPS32-NEXT: addiu $1, $zero, 1
318 ; MIPS32-NEXT: c.ueq.d $f12, $f14
319 ; MIPS32-NEXT: movt $1, $zero, $fcc0
320 ; MIPS32-NEXT: move $2, $1
321 ; MIPS32-NEXT: jr $ra
324 %cmp = fcmp one double %x, %y
329 define i1 @olt_d(double %x, double %y) {
330 ; MIPS32-LABEL: olt_d:
331 ; MIPS32: # %bb.0: # %entry
332 ; MIPS32-NEXT: addiu $1, $zero, 1
333 ; MIPS32-NEXT: c.olt.d $f12, $f14
334 ; MIPS32-NEXT: movf $1, $zero, $fcc0
335 ; MIPS32-NEXT: move $2, $1
336 ; MIPS32-NEXT: jr $ra
339 %cmp = fcmp olt double %x, %y
342 define i1 @uge_d(double %x, double %y) {
343 ; MIPS32-LABEL: uge_d:
344 ; MIPS32: # %bb.0: # %entry
345 ; MIPS32-NEXT: addiu $1, $zero, 1
346 ; MIPS32-NEXT: c.olt.d $f12, $f14
347 ; MIPS32-NEXT: movt $1, $zero, $fcc0
348 ; MIPS32-NEXT: move $2, $1
349 ; MIPS32-NEXT: jr $ra
352 %cmp = fcmp uge double %x, %y
357 define i1 @ult_d(double %x, double %y) {
358 ; MIPS32-LABEL: ult_d:
359 ; MIPS32: # %bb.0: # %entry
360 ; MIPS32-NEXT: addiu $1, $zero, 1
361 ; MIPS32-NEXT: c.ult.d $f12, $f14
362 ; MIPS32-NEXT: movf $1, $zero, $fcc0
363 ; MIPS32-NEXT: move $2, $1
364 ; MIPS32-NEXT: jr $ra
367 %cmp = fcmp ult double %x, %y
370 define i1 @oge_d(double %x, double %y) {
371 ; MIPS32-LABEL: oge_d:
372 ; MIPS32: # %bb.0: # %entry
373 ; MIPS32-NEXT: addiu $1, $zero, 1
374 ; MIPS32-NEXT: c.ult.d $f12, $f14
375 ; MIPS32-NEXT: movt $1, $zero, $fcc0
376 ; MIPS32-NEXT: move $2, $1
377 ; MIPS32-NEXT: jr $ra
380 %cmp = fcmp oge double %x, %y
385 define i1 @ole_d(double %x, double %y) {
386 ; MIPS32-LABEL: ole_d:
387 ; MIPS32: # %bb.0: # %entry
388 ; MIPS32-NEXT: addiu $1, $zero, 1
389 ; MIPS32-NEXT: c.ole.d $f12, $f14
390 ; MIPS32-NEXT: movf $1, $zero, $fcc0
391 ; MIPS32-NEXT: move $2, $1
392 ; MIPS32-NEXT: jr $ra
395 %cmp = fcmp ole double %x, %y
398 define i1 @ugt_d(double %x, double %y) {
399 ; MIPS32-LABEL: ugt_d:
400 ; MIPS32: # %bb.0: # %entry
401 ; MIPS32-NEXT: addiu $1, $zero, 1
402 ; MIPS32-NEXT: c.ole.d $f12, $f14
403 ; MIPS32-NEXT: movt $1, $zero, $fcc0
404 ; MIPS32-NEXT: move $2, $1
405 ; MIPS32-NEXT: jr $ra
408 %cmp = fcmp ugt double %x, %y
413 define i1 @ule_d(double %x, double %y) {
414 ; MIPS32-LABEL: ule_d:
415 ; MIPS32: # %bb.0: # %entry
416 ; MIPS32-NEXT: addiu $1, $zero, 1
417 ; MIPS32-NEXT: c.ule.d $f12, $f14
418 ; MIPS32-NEXT: movf $1, $zero, $fcc0
419 ; MIPS32-NEXT: move $2, $1
420 ; MIPS32-NEXT: jr $ra
423 %cmp = fcmp ule double %x, %y
426 define i1 @ogt_d(double %x, double %y) {
427 ; MIPS32-LABEL: ogt_d:
428 ; MIPS32: # %bb.0: # %entry
429 ; MIPS32-NEXT: addiu $1, $zero, 1
430 ; MIPS32-NEXT: c.ule.d $f12, $f14
431 ; MIPS32-NEXT: movt $1, $zero, $fcc0
432 ; MIPS32-NEXT: move $2, $1
433 ; MIPS32-NEXT: jr $ra
436 %cmp = fcmp ogt double %x, %y