1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=riscv32 -global-isel -mattr=+f -verify-machineinstrs < %s \
3 ; RUN: -target-abi=ilp32f | FileCheck -check-prefix=CHECKIF %s
4 ; RUN: llc -mtriple=riscv64 -global-isel -mattr=+f -verify-machineinstrs < %s \
5 ; RUN: -target-abi=lp64f | FileCheck -check-prefix=CHECKIF %s
6 ; RUN: llc -mtriple=riscv32 -global-isel -verify-machineinstrs < %s \
7 ; RUN: | FileCheck -check-prefix=RV32I %s
8 ; RUN: llc -mtriple=riscv64 -global-isel -verify-machineinstrs < %s \
9 ; RUN: | FileCheck -check-prefix=RV64I %s
11 define i32 @fcmp_false(float %a, float %b) nounwind {
12 ; CHECKIF-LABEL: fcmp_false:
14 ; CHECKIF-NEXT: li a0, 0
17 ; RV32I-LABEL: fcmp_false:
19 ; RV32I-NEXT: li a0, 0
22 ; RV64I-LABEL: fcmp_false:
24 ; RV64I-NEXT: li a0, 0
26 %1 = fcmp false float %a, %b
27 %2 = zext i1 %1 to i32
31 ; FIXME: slli+srli on RV64 are unnecessary
32 define i32 @fcmp_oeq(float %a, float %b) nounwind {
33 ; CHECKIF-LABEL: fcmp_oeq:
35 ; CHECKIF-NEXT: feq.s a0, fa0, fa1
38 ; RV32I-LABEL: fcmp_oeq:
40 ; RV32I-NEXT: addi sp, sp, -16
41 ; RV32I-NEXT: sw ra, 12(sp) # 4-byte Folded Spill
42 ; RV32I-NEXT: call __eqsf2
43 ; RV32I-NEXT: seqz a0, a0
44 ; RV32I-NEXT: lw ra, 12(sp) # 4-byte Folded Reload
45 ; RV32I-NEXT: addi sp, sp, 16
48 ; RV64I-LABEL: fcmp_oeq:
50 ; RV64I-NEXT: addi sp, sp, -16
51 ; RV64I-NEXT: sd ra, 8(sp) # 8-byte Folded Spill
52 ; RV64I-NEXT: call __eqsf2
53 ; RV64I-NEXT: sext.w a0, a0
54 ; RV64I-NEXT: seqz a0, a0
55 ; RV64I-NEXT: ld ra, 8(sp) # 8-byte Folded Reload
56 ; RV64I-NEXT: addi sp, sp, 16
58 %1 = fcmp oeq float %a, %b
59 %2 = zext i1 %1 to i32
63 ; FIXME: sext.w on RV64 is unnecessary
64 define i32 @fcmp_ogt(float %a, float %b) nounwind {
65 ; CHECKIF-LABEL: fcmp_ogt:
67 ; CHECKIF-NEXT: flt.s a0, fa1, fa0
70 ; RV32I-LABEL: fcmp_ogt:
72 ; RV32I-NEXT: addi sp, sp, -16
73 ; RV32I-NEXT: sw ra, 12(sp) # 4-byte Folded Spill
74 ; RV32I-NEXT: call __gtsf2
75 ; RV32I-NEXT: sgtz a0, a0
76 ; RV32I-NEXT: lw ra, 12(sp) # 4-byte Folded Reload
77 ; RV32I-NEXT: addi sp, sp, 16
80 ; RV64I-LABEL: fcmp_ogt:
82 ; RV64I-NEXT: addi sp, sp, -16
83 ; RV64I-NEXT: sd ra, 8(sp) # 8-byte Folded Spill
84 ; RV64I-NEXT: call __gtsf2
85 ; RV64I-NEXT: sext.w a0, a0
86 ; RV64I-NEXT: sgtz a0, a0
87 ; RV64I-NEXT: ld ra, 8(sp) # 8-byte Folded Reload
88 ; RV64I-NEXT: addi sp, sp, 16
90 %1 = fcmp ogt float %a, %b
91 %2 = zext i1 %1 to i32
95 ; FIXME: sext.w on RV64 is unnecessary
96 define i32 @fcmp_oge(float %a, float %b) nounwind {
97 ; CHECKIF-LABEL: fcmp_oge:
99 ; CHECKIF-NEXT: fle.s a0, fa1, fa0
102 ; RV32I-LABEL: fcmp_oge:
104 ; RV32I-NEXT: addi sp, sp, -16
105 ; RV32I-NEXT: sw ra, 12(sp) # 4-byte Folded Spill
106 ; RV32I-NEXT: call __gesf2
107 ; RV32I-NEXT: slti a0, a0, 0
108 ; RV32I-NEXT: xori a0, a0, 1
109 ; RV32I-NEXT: lw ra, 12(sp) # 4-byte Folded Reload
110 ; RV32I-NEXT: addi sp, sp, 16
113 ; RV64I-LABEL: fcmp_oge:
115 ; RV64I-NEXT: addi sp, sp, -16
116 ; RV64I-NEXT: sd ra, 8(sp) # 8-byte Folded Spill
117 ; RV64I-NEXT: call __gesf2
118 ; RV64I-NEXT: sext.w a0, a0
119 ; RV64I-NEXT: slti a0, a0, 0
120 ; RV64I-NEXT: xori a0, a0, 1
121 ; RV64I-NEXT: ld ra, 8(sp) # 8-byte Folded Reload
122 ; RV64I-NEXT: addi sp, sp, 16
124 %1 = fcmp oge float %a, %b
125 %2 = zext i1 %1 to i32
129 ; FIXME: sext.w on RV64 is unnecessary
130 define i32 @fcmp_olt(float %a, float %b) nounwind {
131 ; CHECKIF-LABEL: fcmp_olt:
133 ; CHECKIF-NEXT: flt.s a0, fa0, fa1
136 ; RV32I-LABEL: fcmp_olt:
138 ; RV32I-NEXT: addi sp, sp, -16
139 ; RV32I-NEXT: sw ra, 12(sp) # 4-byte Folded Spill
140 ; RV32I-NEXT: call __ltsf2
141 ; RV32I-NEXT: slti a0, a0, 0
142 ; RV32I-NEXT: lw ra, 12(sp) # 4-byte Folded Reload
143 ; RV32I-NEXT: addi sp, sp, 16
146 ; RV64I-LABEL: fcmp_olt:
148 ; RV64I-NEXT: addi sp, sp, -16
149 ; RV64I-NEXT: sd ra, 8(sp) # 8-byte Folded Spill
150 ; RV64I-NEXT: call __ltsf2
151 ; RV64I-NEXT: sext.w a0, a0
152 ; RV64I-NEXT: slti a0, a0, 0
153 ; RV64I-NEXT: ld ra, 8(sp) # 8-byte Folded Reload
154 ; RV64I-NEXT: addi sp, sp, 16
156 %1 = fcmp olt float %a, %b
157 %2 = zext i1 %1 to i32
161 ; FIXME: sext.w on RV64 is unnecessary
162 ; FIXME: sgtz+xori can be slti a0, a0, 1
163 define i32 @fcmp_ole(float %a, float %b) nounwind {
164 ; CHECKIF-LABEL: fcmp_ole:
166 ; CHECKIF-NEXT: fle.s a0, fa0, fa1
169 ; RV32I-LABEL: fcmp_ole:
171 ; RV32I-NEXT: addi sp, sp, -16
172 ; RV32I-NEXT: sw ra, 12(sp) # 4-byte Folded Spill
173 ; RV32I-NEXT: call __lesf2
174 ; RV32I-NEXT: sgtz a0, a0
175 ; RV32I-NEXT: xori a0, a0, 1
176 ; RV32I-NEXT: lw ra, 12(sp) # 4-byte Folded Reload
177 ; RV32I-NEXT: addi sp, sp, 16
180 ; RV64I-LABEL: fcmp_ole:
182 ; RV64I-NEXT: addi sp, sp, -16
183 ; RV64I-NEXT: sd ra, 8(sp) # 8-byte Folded Spill
184 ; RV64I-NEXT: call __lesf2
185 ; RV64I-NEXT: sext.w a0, a0
186 ; RV64I-NEXT: sgtz a0, a0
187 ; RV64I-NEXT: xori a0, a0, 1
188 ; RV64I-NEXT: ld ra, 8(sp) # 8-byte Folded Reload
189 ; RV64I-NEXT: addi sp, sp, 16
191 %1 = fcmp ole float %a, %b
192 %2 = zext i1 %1 to i32
196 ; FIXME: slli+srli on RV64 are unnecessary
197 define i32 @fcmp_one(float %a, float %b) nounwind {
198 ; CHECKIF-LABEL: fcmp_one:
200 ; CHECKIF-NEXT: flt.s a0, fa0, fa1
201 ; CHECKIF-NEXT: flt.s a1, fa1, fa0
202 ; CHECKIF-NEXT: or a0, a0, a1
205 ; RV32I-LABEL: fcmp_one:
207 ; RV32I-NEXT: addi sp, sp, -16
208 ; RV32I-NEXT: sw ra, 12(sp) # 4-byte Folded Spill
209 ; RV32I-NEXT: sw s0, 8(sp) # 4-byte Folded Spill
210 ; RV32I-NEXT: sw s1, 4(sp) # 4-byte Folded Spill
211 ; RV32I-NEXT: sw s2, 0(sp) # 4-byte Folded Spill
212 ; RV32I-NEXT: mv s0, a0
213 ; RV32I-NEXT: mv s1, a1
214 ; RV32I-NEXT: call __eqsf2
215 ; RV32I-NEXT: snez s2, a0
216 ; RV32I-NEXT: mv a0, s0
217 ; RV32I-NEXT: mv a1, s1
218 ; RV32I-NEXT: call __unordsf2
219 ; RV32I-NEXT: seqz a0, a0
220 ; RV32I-NEXT: and a0, s2, a0
221 ; RV32I-NEXT: lw ra, 12(sp) # 4-byte Folded Reload
222 ; RV32I-NEXT: lw s0, 8(sp) # 4-byte Folded Reload
223 ; RV32I-NEXT: lw s1, 4(sp) # 4-byte Folded Reload
224 ; RV32I-NEXT: lw s2, 0(sp) # 4-byte Folded Reload
225 ; RV32I-NEXT: addi sp, sp, 16
228 ; RV64I-LABEL: fcmp_one:
230 ; RV64I-NEXT: addi sp, sp, -32
231 ; RV64I-NEXT: sd ra, 24(sp) # 8-byte Folded Spill
232 ; RV64I-NEXT: sd s0, 16(sp) # 8-byte Folded Spill
233 ; RV64I-NEXT: sd s1, 8(sp) # 8-byte Folded Spill
234 ; RV64I-NEXT: sd s2, 0(sp) # 8-byte Folded Spill
235 ; RV64I-NEXT: mv s0, a0
236 ; RV64I-NEXT: mv s1, a1
237 ; RV64I-NEXT: call __eqsf2
238 ; RV64I-NEXT: sext.w a0, a0
239 ; RV64I-NEXT: snez s2, a0
240 ; RV64I-NEXT: mv a0, s0
241 ; RV64I-NEXT: mv a1, s1
242 ; RV64I-NEXT: call __unordsf2
243 ; RV64I-NEXT: sext.w a0, a0
244 ; RV64I-NEXT: seqz a0, a0
245 ; RV64I-NEXT: and a0, s2, a0
246 ; RV64I-NEXT: ld ra, 24(sp) # 8-byte Folded Reload
247 ; RV64I-NEXT: ld s0, 16(sp) # 8-byte Folded Reload
248 ; RV64I-NEXT: ld s1, 8(sp) # 8-byte Folded Reload
249 ; RV64I-NEXT: ld s2, 0(sp) # 8-byte Folded Reload
250 ; RV64I-NEXT: addi sp, sp, 32
252 %1 = fcmp one float %a, %b
253 %2 = zext i1 %1 to i32
257 ; FIXME: slli+srli on RV64 are unnecessary
258 define i32 @fcmp_ord(float %a, float %b) nounwind {
259 ; CHECKIF-LABEL: fcmp_ord:
261 ; CHECKIF-NEXT: feq.s a0, fa0, fa0
262 ; CHECKIF-NEXT: feq.s a1, fa1, fa1
263 ; CHECKIF-NEXT: and a0, a0, a1
266 ; RV32I-LABEL: fcmp_ord:
268 ; RV32I-NEXT: addi sp, sp, -16
269 ; RV32I-NEXT: sw ra, 12(sp) # 4-byte Folded Spill
270 ; RV32I-NEXT: call __unordsf2
271 ; RV32I-NEXT: seqz a0, a0
272 ; RV32I-NEXT: lw ra, 12(sp) # 4-byte Folded Reload
273 ; RV32I-NEXT: addi sp, sp, 16
276 ; RV64I-LABEL: fcmp_ord:
278 ; RV64I-NEXT: addi sp, sp, -16
279 ; RV64I-NEXT: sd ra, 8(sp) # 8-byte Folded Spill
280 ; RV64I-NEXT: call __unordsf2
281 ; RV64I-NEXT: sext.w a0, a0
282 ; RV64I-NEXT: seqz a0, a0
283 ; RV64I-NEXT: ld ra, 8(sp) # 8-byte Folded Reload
284 ; RV64I-NEXT: addi sp, sp, 16
286 %1 = fcmp ord float %a, %b
287 %2 = zext i1 %1 to i32
291 ; FIXME: slli+srli on RV64 are unnecessary
292 define i32 @fcmp_ueq(float %a, float %b) nounwind {
293 ; CHECKIF-LABEL: fcmp_ueq:
295 ; CHECKIF-NEXT: flt.s a0, fa0, fa1
296 ; CHECKIF-NEXT: flt.s a1, fa1, fa0
297 ; CHECKIF-NEXT: or a0, a0, a1
298 ; CHECKIF-NEXT: xori a0, a0, 1
301 ; RV32I-LABEL: fcmp_ueq:
303 ; RV32I-NEXT: addi sp, sp, -16
304 ; RV32I-NEXT: sw ra, 12(sp) # 4-byte Folded Spill
305 ; RV32I-NEXT: sw s0, 8(sp) # 4-byte Folded Spill
306 ; RV32I-NEXT: sw s1, 4(sp) # 4-byte Folded Spill
307 ; RV32I-NEXT: sw s2, 0(sp) # 4-byte Folded Spill
308 ; RV32I-NEXT: mv s0, a0
309 ; RV32I-NEXT: mv s1, a1
310 ; RV32I-NEXT: call __eqsf2
311 ; RV32I-NEXT: seqz s2, a0
312 ; RV32I-NEXT: mv a0, s0
313 ; RV32I-NEXT: mv a1, s1
314 ; RV32I-NEXT: call __unordsf2
315 ; RV32I-NEXT: snez a0, a0
316 ; RV32I-NEXT: or a0, s2, a0
317 ; RV32I-NEXT: lw ra, 12(sp) # 4-byte Folded Reload
318 ; RV32I-NEXT: lw s0, 8(sp) # 4-byte Folded Reload
319 ; RV32I-NEXT: lw s1, 4(sp) # 4-byte Folded Reload
320 ; RV32I-NEXT: lw s2, 0(sp) # 4-byte Folded Reload
321 ; RV32I-NEXT: addi sp, sp, 16
324 ; RV64I-LABEL: fcmp_ueq:
326 ; RV64I-NEXT: addi sp, sp, -32
327 ; RV64I-NEXT: sd ra, 24(sp) # 8-byte Folded Spill
328 ; RV64I-NEXT: sd s0, 16(sp) # 8-byte Folded Spill
329 ; RV64I-NEXT: sd s1, 8(sp) # 8-byte Folded Spill
330 ; RV64I-NEXT: sd s2, 0(sp) # 8-byte Folded Spill
331 ; RV64I-NEXT: mv s0, a0
332 ; RV64I-NEXT: mv s1, a1
333 ; RV64I-NEXT: call __eqsf2
334 ; RV64I-NEXT: sext.w a0, a0
335 ; RV64I-NEXT: seqz s2, a0
336 ; RV64I-NEXT: mv a0, s0
337 ; RV64I-NEXT: mv a1, s1
338 ; RV64I-NEXT: call __unordsf2
339 ; RV64I-NEXT: sext.w a0, a0
340 ; RV64I-NEXT: snez a0, a0
341 ; RV64I-NEXT: or a0, s2, a0
342 ; RV64I-NEXT: ld ra, 24(sp) # 8-byte Folded Reload
343 ; RV64I-NEXT: ld s0, 16(sp) # 8-byte Folded Reload
344 ; RV64I-NEXT: ld s1, 8(sp) # 8-byte Folded Reload
345 ; RV64I-NEXT: ld s2, 0(sp) # 8-byte Folded Reload
346 ; RV64I-NEXT: addi sp, sp, 32
348 %1 = fcmp ueq float %a, %b
349 %2 = zext i1 %1 to i32
353 ; FIXME: sext.w on RV64 is unnecessary
354 define i32 @fcmp_ugt(float %a, float %b) nounwind {
355 ; CHECKIF-LABEL: fcmp_ugt:
357 ; CHECKIF-NEXT: fle.s a0, fa0, fa1
358 ; CHECKIF-NEXT: xori a0, a0, 1
361 ; RV32I-LABEL: fcmp_ugt:
363 ; RV32I-NEXT: addi sp, sp, -16
364 ; RV32I-NEXT: sw ra, 12(sp) # 4-byte Folded Spill
365 ; RV32I-NEXT: call __lesf2
366 ; RV32I-NEXT: sgtz a0, a0
367 ; RV32I-NEXT: lw ra, 12(sp) # 4-byte Folded Reload
368 ; RV32I-NEXT: addi sp, sp, 16
371 ; RV64I-LABEL: fcmp_ugt:
373 ; RV64I-NEXT: addi sp, sp, -16
374 ; RV64I-NEXT: sd ra, 8(sp) # 8-byte Folded Spill
375 ; RV64I-NEXT: call __lesf2
376 ; RV64I-NEXT: sext.w a0, a0
377 ; RV64I-NEXT: sgtz a0, a0
378 ; RV64I-NEXT: ld ra, 8(sp) # 8-byte Folded Reload
379 ; RV64I-NEXT: addi sp, sp, 16
381 %1 = fcmp ugt float %a, %b
382 %2 = zext i1 %1 to i32
386 ; FIXME: sext.w on RV64 is unnecessary
387 define i32 @fcmp_uge(float %a, float %b) nounwind {
388 ; CHECKIF-LABEL: fcmp_uge:
390 ; CHECKIF-NEXT: flt.s a0, fa0, fa1
391 ; CHECKIF-NEXT: xori a0, a0, 1
394 ; RV32I-LABEL: fcmp_uge:
396 ; RV32I-NEXT: addi sp, sp, -16
397 ; RV32I-NEXT: sw ra, 12(sp) # 4-byte Folded Spill
398 ; RV32I-NEXT: call __ltsf2
399 ; RV32I-NEXT: slti a0, a0, 0
400 ; RV32I-NEXT: xori a0, a0, 1
401 ; RV32I-NEXT: lw ra, 12(sp) # 4-byte Folded Reload
402 ; RV32I-NEXT: addi sp, sp, 16
405 ; RV64I-LABEL: fcmp_uge:
407 ; RV64I-NEXT: addi sp, sp, -16
408 ; RV64I-NEXT: sd ra, 8(sp) # 8-byte Folded Spill
409 ; RV64I-NEXT: call __ltsf2
410 ; RV64I-NEXT: sext.w a0, a0
411 ; RV64I-NEXT: slti a0, a0, 0
412 ; RV64I-NEXT: xori a0, a0, 1
413 ; RV64I-NEXT: ld ra, 8(sp) # 8-byte Folded Reload
414 ; RV64I-NEXT: addi sp, sp, 16
416 %1 = fcmp uge float %a, %b
417 %2 = zext i1 %1 to i32
421 ; FIXME: sext.w on RV64 is unnecessary
422 define i32 @fcmp_ult(float %a, float %b) nounwind {
423 ; CHECKIF-LABEL: fcmp_ult:
425 ; CHECKIF-NEXT: fle.s a0, fa1, fa0
426 ; CHECKIF-NEXT: xori a0, a0, 1
429 ; RV32I-LABEL: fcmp_ult:
431 ; RV32I-NEXT: addi sp, sp, -16
432 ; RV32I-NEXT: sw ra, 12(sp) # 4-byte Folded Spill
433 ; RV32I-NEXT: call __gesf2
434 ; RV32I-NEXT: slti a0, a0, 0
435 ; RV32I-NEXT: lw ra, 12(sp) # 4-byte Folded Reload
436 ; RV32I-NEXT: addi sp, sp, 16
439 ; RV64I-LABEL: fcmp_ult:
441 ; RV64I-NEXT: addi sp, sp, -16
442 ; RV64I-NEXT: sd ra, 8(sp) # 8-byte Folded Spill
443 ; RV64I-NEXT: call __gesf2
444 ; RV64I-NEXT: sext.w a0, a0
445 ; RV64I-NEXT: slti a0, a0, 0
446 ; RV64I-NEXT: ld ra, 8(sp) # 8-byte Folded Reload
447 ; RV64I-NEXT: addi sp, sp, 16
449 %1 = fcmp ult float %a, %b
450 %2 = zext i1 %1 to i32
454 ; FIXME: sext.w on RV64 is unnecessary
455 ; FIXME: sgtz+xori can be slti a0, a0, 1
456 define i32 @fcmp_ule(float %a, float %b) nounwind {
457 ; CHECKIF-LABEL: fcmp_ule:
459 ; CHECKIF-NEXT: flt.s a0, fa1, fa0
460 ; CHECKIF-NEXT: xori a0, a0, 1
463 ; RV32I-LABEL: fcmp_ule:
465 ; RV32I-NEXT: addi sp, sp, -16
466 ; RV32I-NEXT: sw ra, 12(sp) # 4-byte Folded Spill
467 ; RV32I-NEXT: call __gtsf2
468 ; RV32I-NEXT: sgtz a0, a0
469 ; RV32I-NEXT: xori a0, a0, 1
470 ; RV32I-NEXT: lw ra, 12(sp) # 4-byte Folded Reload
471 ; RV32I-NEXT: addi sp, sp, 16
474 ; RV64I-LABEL: fcmp_ule:
476 ; RV64I-NEXT: addi sp, sp, -16
477 ; RV64I-NEXT: sd ra, 8(sp) # 8-byte Folded Spill
478 ; RV64I-NEXT: call __gtsf2
479 ; RV64I-NEXT: sext.w a0, a0
480 ; RV64I-NEXT: sgtz a0, a0
481 ; RV64I-NEXT: xori a0, a0, 1
482 ; RV64I-NEXT: ld ra, 8(sp) # 8-byte Folded Reload
483 ; RV64I-NEXT: addi sp, sp, 16
485 %1 = fcmp ule float %a, %b
486 %2 = zext i1 %1 to i32
490 ; FIXME: slli+srli on RV64 are unnecessary
491 define i32 @fcmp_une(float %a, float %b) nounwind {
492 ; CHECKIF-LABEL: fcmp_une:
494 ; CHECKIF-NEXT: feq.s a0, fa0, fa1
495 ; CHECKIF-NEXT: xori a0, a0, 1
498 ; RV32I-LABEL: fcmp_une:
500 ; RV32I-NEXT: addi sp, sp, -16
501 ; RV32I-NEXT: sw ra, 12(sp) # 4-byte Folded Spill
502 ; RV32I-NEXT: call __nesf2
503 ; RV32I-NEXT: snez a0, a0
504 ; RV32I-NEXT: lw ra, 12(sp) # 4-byte Folded Reload
505 ; RV32I-NEXT: addi sp, sp, 16
508 ; RV64I-LABEL: fcmp_une:
510 ; RV64I-NEXT: addi sp, sp, -16
511 ; RV64I-NEXT: sd ra, 8(sp) # 8-byte Folded Spill
512 ; RV64I-NEXT: call __nesf2
513 ; RV64I-NEXT: sext.w a0, a0
514 ; RV64I-NEXT: snez a0, a0
515 ; RV64I-NEXT: ld ra, 8(sp) # 8-byte Folded Reload
516 ; RV64I-NEXT: addi sp, sp, 16
518 %1 = fcmp une float %a, %b
519 %2 = zext i1 %1 to i32
523 ; FIXME: slli+srli on RV64 are unnecessary
524 define i32 @fcmp_uno(float %a, float %b) nounwind {
525 ; CHECKIF-LABEL: fcmp_uno:
527 ; CHECKIF-NEXT: feq.s a0, fa0, fa0
528 ; CHECKIF-NEXT: feq.s a1, fa1, fa1
529 ; CHECKIF-NEXT: and a0, a0, a1
530 ; CHECKIF-NEXT: xori a0, a0, 1
533 ; RV32I-LABEL: fcmp_uno:
535 ; RV32I-NEXT: addi sp, sp, -16
536 ; RV32I-NEXT: sw ra, 12(sp) # 4-byte Folded Spill
537 ; RV32I-NEXT: call __unordsf2
538 ; RV32I-NEXT: snez a0, a0
539 ; RV32I-NEXT: lw ra, 12(sp) # 4-byte Folded Reload
540 ; RV32I-NEXT: addi sp, sp, 16
543 ; RV64I-LABEL: fcmp_uno:
545 ; RV64I-NEXT: addi sp, sp, -16
546 ; RV64I-NEXT: sd ra, 8(sp) # 8-byte Folded Spill
547 ; RV64I-NEXT: call __unordsf2
548 ; RV64I-NEXT: sext.w a0, a0
549 ; RV64I-NEXT: snez a0, a0
550 ; RV64I-NEXT: ld ra, 8(sp) # 8-byte Folded Reload
551 ; RV64I-NEXT: addi sp, sp, 16
553 %1 = fcmp uno float %a, %b
554 %2 = zext i1 %1 to i32
558 define i32 @fcmp_true(float %a, float %b) nounwind {
559 ; CHECKIF-LABEL: fcmp_true:
561 ; CHECKIF-NEXT: li a0, 1
564 ; RV32I-LABEL: fcmp_true:
566 ; RV32I-NEXT: li a0, 1
569 ; RV64I-LABEL: fcmp_true:
571 ; RV64I-NEXT: li a0, 1
573 %1 = fcmp true float %a, %b
574 %2 = zext i1 %1 to i32