1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=riscv32 -mattr=+d -verify-machineinstrs < %s \
3 ; RUN: -target-abi=ilp32d | FileCheck -check-prefix=CHECKIFD %s
4 ; RUN: llc -mtriple=riscv64 -mattr=+d -verify-machineinstrs < %s \
5 ; RUN: -target-abi=lp64d | FileCheck -check-prefix=CHECKIFD %s
6 ; RUN: llc -mtriple=riscv32 -mattr=+zdinx -verify-machineinstrs < %s \
7 ; RUN: -target-abi=ilp32 | FileCheck -check-prefixes=CHECKIZFINXZDINX,CHECKRV32IZFINXZDINX %s
8 ; RUN: llc -mtriple=riscv64 -mattr=+zdinx -verify-machineinstrs < %s \
9 ; RUN: -target-abi=lp64 | FileCheck -check-prefixes=CHECKIZFINXZDINX,CHECKRV64IZFINXZDINX %s
10 ; RUN: llc -mtriple=riscv32 -verify-machineinstrs < %s \
11 ; RUN: | FileCheck -check-prefix=RV32I %s
12 ; RUN: llc -mtriple=riscv64 -verify-machineinstrs < %s \
13 ; RUN: | FileCheck -check-prefix=RV64I %s
15 define i32 @fcmp_false(double %a, double %b) nounwind {
16 ; CHECKIFD-LABEL: fcmp_false:
18 ; CHECKIFD-NEXT: li a0, 0
21 ; CHECKIZFINXZDINX-LABEL: fcmp_false:
22 ; CHECKIZFINXZDINX: # %bb.0:
23 ; CHECKIZFINXZDINX-NEXT: li a0, 0
24 ; CHECKIZFINXZDINX-NEXT: ret
26 ; RV32I-LABEL: fcmp_false:
28 ; RV32I-NEXT: li a0, 0
31 ; RV64I-LABEL: fcmp_false:
33 ; RV64I-NEXT: li a0, 0
35 %1 = fcmp false double %a, %b
36 %2 = zext i1 %1 to i32
40 define i32 @fcmp_oeq(double %a, double %b) nounwind {
41 ; CHECKIFD-LABEL: fcmp_oeq:
43 ; CHECKIFD-NEXT: feq.d a0, fa0, fa1
46 ; CHECKRV32IZFINXZDINX-LABEL: fcmp_oeq:
47 ; CHECKRV32IZFINXZDINX: # %bb.0:
48 ; CHECKRV32IZFINXZDINX-NEXT: addi sp, sp, -16
49 ; CHECKRV32IZFINXZDINX-NEXT: sw a2, 8(sp)
50 ; CHECKRV32IZFINXZDINX-NEXT: sw a3, 12(sp)
51 ; CHECKRV32IZFINXZDINX-NEXT: lw a2, 8(sp)
52 ; CHECKRV32IZFINXZDINX-NEXT: lw a3, 12(sp)
53 ; CHECKRV32IZFINXZDINX-NEXT: sw a0, 8(sp)
54 ; CHECKRV32IZFINXZDINX-NEXT: sw a1, 12(sp)
55 ; CHECKRV32IZFINXZDINX-NEXT: lw a0, 8(sp)
56 ; CHECKRV32IZFINXZDINX-NEXT: lw a1, 12(sp)
57 ; CHECKRV32IZFINXZDINX-NEXT: feq.d a0, a0, a2
58 ; CHECKRV32IZFINXZDINX-NEXT: addi sp, sp, 16
59 ; CHECKRV32IZFINXZDINX-NEXT: ret
61 ; CHECKRV64IZFINXZDINX-LABEL: fcmp_oeq:
62 ; CHECKRV64IZFINXZDINX: # %bb.0:
63 ; CHECKRV64IZFINXZDINX-NEXT: feq.d a0, a0, a1
64 ; CHECKRV64IZFINXZDINX-NEXT: ret
66 ; RV32I-LABEL: fcmp_oeq:
68 ; RV32I-NEXT: addi sp, sp, -16
69 ; RV32I-NEXT: sw ra, 12(sp) # 4-byte Folded Spill
70 ; RV32I-NEXT: call __eqdf2
71 ; RV32I-NEXT: seqz a0, a0
72 ; RV32I-NEXT: lw ra, 12(sp) # 4-byte Folded Reload
73 ; RV32I-NEXT: addi sp, sp, 16
76 ; RV64I-LABEL: fcmp_oeq:
78 ; RV64I-NEXT: addi sp, sp, -16
79 ; RV64I-NEXT: sd ra, 8(sp) # 8-byte Folded Spill
80 ; RV64I-NEXT: call __eqdf2
81 ; RV64I-NEXT: seqz a0, a0
82 ; RV64I-NEXT: ld ra, 8(sp) # 8-byte Folded Reload
83 ; RV64I-NEXT: addi sp, sp, 16
85 %1 = fcmp oeq double %a, %b
86 %2 = zext i1 %1 to i32
90 define i32 @fcmp_ogt(double %a, double %b) nounwind {
91 ; CHECKIFD-LABEL: fcmp_ogt:
93 ; CHECKIFD-NEXT: flt.d a0, fa1, fa0
96 ; CHECKRV32IZFINXZDINX-LABEL: fcmp_ogt:
97 ; CHECKRV32IZFINXZDINX: # %bb.0:
98 ; CHECKRV32IZFINXZDINX-NEXT: addi sp, sp, -16
99 ; CHECKRV32IZFINXZDINX-NEXT: sw a0, 8(sp)
100 ; CHECKRV32IZFINXZDINX-NEXT: sw a1, 12(sp)
101 ; CHECKRV32IZFINXZDINX-NEXT: lw a0, 8(sp)
102 ; CHECKRV32IZFINXZDINX-NEXT: lw a1, 12(sp)
103 ; CHECKRV32IZFINXZDINX-NEXT: sw a2, 8(sp)
104 ; CHECKRV32IZFINXZDINX-NEXT: sw a3, 12(sp)
105 ; CHECKRV32IZFINXZDINX-NEXT: lw a2, 8(sp)
106 ; CHECKRV32IZFINXZDINX-NEXT: lw a3, 12(sp)
107 ; CHECKRV32IZFINXZDINX-NEXT: flt.d a0, a2, a0
108 ; CHECKRV32IZFINXZDINX-NEXT: addi sp, sp, 16
109 ; CHECKRV32IZFINXZDINX-NEXT: ret
111 ; CHECKRV64IZFINXZDINX-LABEL: fcmp_ogt:
112 ; CHECKRV64IZFINXZDINX: # %bb.0:
113 ; CHECKRV64IZFINXZDINX-NEXT: flt.d a0, a1, a0
114 ; CHECKRV64IZFINXZDINX-NEXT: ret
116 ; RV32I-LABEL: fcmp_ogt:
118 ; RV32I-NEXT: addi sp, sp, -16
119 ; RV32I-NEXT: sw ra, 12(sp) # 4-byte Folded Spill
120 ; RV32I-NEXT: call __gtdf2
121 ; RV32I-NEXT: sgtz a0, a0
122 ; RV32I-NEXT: lw ra, 12(sp) # 4-byte Folded Reload
123 ; RV32I-NEXT: addi sp, sp, 16
126 ; RV64I-LABEL: fcmp_ogt:
128 ; RV64I-NEXT: addi sp, sp, -16
129 ; RV64I-NEXT: sd ra, 8(sp) # 8-byte Folded Spill
130 ; RV64I-NEXT: call __gtdf2
131 ; RV64I-NEXT: sgtz a0, a0
132 ; RV64I-NEXT: ld ra, 8(sp) # 8-byte Folded Reload
133 ; RV64I-NEXT: addi sp, sp, 16
135 %1 = fcmp ogt double %a, %b
136 %2 = zext i1 %1 to i32
140 define i32 @fcmp_oge(double %a, double %b) nounwind {
141 ; CHECKIFD-LABEL: fcmp_oge:
143 ; CHECKIFD-NEXT: fle.d a0, fa1, fa0
146 ; CHECKRV32IZFINXZDINX-LABEL: fcmp_oge:
147 ; CHECKRV32IZFINXZDINX: # %bb.0:
148 ; CHECKRV32IZFINXZDINX-NEXT: addi sp, sp, -16
149 ; CHECKRV32IZFINXZDINX-NEXT: sw a0, 8(sp)
150 ; CHECKRV32IZFINXZDINX-NEXT: sw a1, 12(sp)
151 ; CHECKRV32IZFINXZDINX-NEXT: lw a0, 8(sp)
152 ; CHECKRV32IZFINXZDINX-NEXT: lw a1, 12(sp)
153 ; CHECKRV32IZFINXZDINX-NEXT: sw a2, 8(sp)
154 ; CHECKRV32IZFINXZDINX-NEXT: sw a3, 12(sp)
155 ; CHECKRV32IZFINXZDINX-NEXT: lw a2, 8(sp)
156 ; CHECKRV32IZFINXZDINX-NEXT: lw a3, 12(sp)
157 ; CHECKRV32IZFINXZDINX-NEXT: fle.d a0, a2, a0
158 ; CHECKRV32IZFINXZDINX-NEXT: addi sp, sp, 16
159 ; CHECKRV32IZFINXZDINX-NEXT: ret
161 ; CHECKRV64IZFINXZDINX-LABEL: fcmp_oge:
162 ; CHECKRV64IZFINXZDINX: # %bb.0:
163 ; CHECKRV64IZFINXZDINX-NEXT: fle.d a0, a1, a0
164 ; CHECKRV64IZFINXZDINX-NEXT: ret
166 ; RV32I-LABEL: fcmp_oge:
168 ; RV32I-NEXT: addi sp, sp, -16
169 ; RV32I-NEXT: sw ra, 12(sp) # 4-byte Folded Spill
170 ; RV32I-NEXT: call __gedf2
171 ; RV32I-NEXT: slti a0, a0, 0
172 ; RV32I-NEXT: xori a0, a0, 1
173 ; RV32I-NEXT: lw ra, 12(sp) # 4-byte Folded Reload
174 ; RV32I-NEXT: addi sp, sp, 16
177 ; RV64I-LABEL: fcmp_oge:
179 ; RV64I-NEXT: addi sp, sp, -16
180 ; RV64I-NEXT: sd ra, 8(sp) # 8-byte Folded Spill
181 ; RV64I-NEXT: call __gedf2
182 ; RV64I-NEXT: slti a0, a0, 0
183 ; RV64I-NEXT: xori a0, a0, 1
184 ; RV64I-NEXT: ld ra, 8(sp) # 8-byte Folded Reload
185 ; RV64I-NEXT: addi sp, sp, 16
187 %1 = fcmp oge double %a, %b
188 %2 = zext i1 %1 to i32
192 define i32 @fcmp_olt(double %a, double %b) nounwind {
193 ; CHECKIFD-LABEL: fcmp_olt:
195 ; CHECKIFD-NEXT: flt.d a0, fa0, fa1
198 ; CHECKRV32IZFINXZDINX-LABEL: fcmp_olt:
199 ; CHECKRV32IZFINXZDINX: # %bb.0:
200 ; CHECKRV32IZFINXZDINX-NEXT: addi sp, sp, -16
201 ; CHECKRV32IZFINXZDINX-NEXT: sw a2, 8(sp)
202 ; CHECKRV32IZFINXZDINX-NEXT: sw a3, 12(sp)
203 ; CHECKRV32IZFINXZDINX-NEXT: lw a2, 8(sp)
204 ; CHECKRV32IZFINXZDINX-NEXT: lw a3, 12(sp)
205 ; CHECKRV32IZFINXZDINX-NEXT: sw a0, 8(sp)
206 ; CHECKRV32IZFINXZDINX-NEXT: sw a1, 12(sp)
207 ; CHECKRV32IZFINXZDINX-NEXT: lw a0, 8(sp)
208 ; CHECKRV32IZFINXZDINX-NEXT: lw a1, 12(sp)
209 ; CHECKRV32IZFINXZDINX-NEXT: flt.d a0, a0, a2
210 ; CHECKRV32IZFINXZDINX-NEXT: addi sp, sp, 16
211 ; CHECKRV32IZFINXZDINX-NEXT: ret
213 ; CHECKRV64IZFINXZDINX-LABEL: fcmp_olt:
214 ; CHECKRV64IZFINXZDINX: # %bb.0:
215 ; CHECKRV64IZFINXZDINX-NEXT: flt.d a0, a0, a1
216 ; CHECKRV64IZFINXZDINX-NEXT: ret
218 ; RV32I-LABEL: fcmp_olt:
220 ; RV32I-NEXT: addi sp, sp, -16
221 ; RV32I-NEXT: sw ra, 12(sp) # 4-byte Folded Spill
222 ; RV32I-NEXT: call __ltdf2
223 ; RV32I-NEXT: slti a0, a0, 0
224 ; RV32I-NEXT: lw ra, 12(sp) # 4-byte Folded Reload
225 ; RV32I-NEXT: addi sp, sp, 16
228 ; RV64I-LABEL: fcmp_olt:
230 ; RV64I-NEXT: addi sp, sp, -16
231 ; RV64I-NEXT: sd ra, 8(sp) # 8-byte Folded Spill
232 ; RV64I-NEXT: call __ltdf2
233 ; RV64I-NEXT: slti a0, a0, 0
234 ; RV64I-NEXT: ld ra, 8(sp) # 8-byte Folded Reload
235 ; RV64I-NEXT: addi sp, sp, 16
237 %1 = fcmp olt double %a, %b
238 %2 = zext i1 %1 to i32
242 define i32 @fcmp_ole(double %a, double %b) nounwind {
243 ; CHECKIFD-LABEL: fcmp_ole:
245 ; CHECKIFD-NEXT: fle.d a0, fa0, fa1
248 ; CHECKRV32IZFINXZDINX-LABEL: fcmp_ole:
249 ; CHECKRV32IZFINXZDINX: # %bb.0:
250 ; CHECKRV32IZFINXZDINX-NEXT: addi sp, sp, -16
251 ; CHECKRV32IZFINXZDINX-NEXT: sw a2, 8(sp)
252 ; CHECKRV32IZFINXZDINX-NEXT: sw a3, 12(sp)
253 ; CHECKRV32IZFINXZDINX-NEXT: lw a2, 8(sp)
254 ; CHECKRV32IZFINXZDINX-NEXT: lw a3, 12(sp)
255 ; CHECKRV32IZFINXZDINX-NEXT: sw a0, 8(sp)
256 ; CHECKRV32IZFINXZDINX-NEXT: sw a1, 12(sp)
257 ; CHECKRV32IZFINXZDINX-NEXT: lw a0, 8(sp)
258 ; CHECKRV32IZFINXZDINX-NEXT: lw a1, 12(sp)
259 ; CHECKRV32IZFINXZDINX-NEXT: fle.d a0, a0, a2
260 ; CHECKRV32IZFINXZDINX-NEXT: addi sp, sp, 16
261 ; CHECKRV32IZFINXZDINX-NEXT: ret
263 ; CHECKRV64IZFINXZDINX-LABEL: fcmp_ole:
264 ; CHECKRV64IZFINXZDINX: # %bb.0:
265 ; CHECKRV64IZFINXZDINX-NEXT: fle.d a0, a0, a1
266 ; CHECKRV64IZFINXZDINX-NEXT: ret
268 ; RV32I-LABEL: fcmp_ole:
270 ; RV32I-NEXT: addi sp, sp, -16
271 ; RV32I-NEXT: sw ra, 12(sp) # 4-byte Folded Spill
272 ; RV32I-NEXT: call __ledf2
273 ; RV32I-NEXT: slti a0, a0, 1
274 ; RV32I-NEXT: lw ra, 12(sp) # 4-byte Folded Reload
275 ; RV32I-NEXT: addi sp, sp, 16
278 ; RV64I-LABEL: fcmp_ole:
280 ; RV64I-NEXT: addi sp, sp, -16
281 ; RV64I-NEXT: sd ra, 8(sp) # 8-byte Folded Spill
282 ; RV64I-NEXT: call __ledf2
283 ; RV64I-NEXT: slti a0, a0, 1
284 ; RV64I-NEXT: ld ra, 8(sp) # 8-byte Folded Reload
285 ; RV64I-NEXT: addi sp, sp, 16
287 %1 = fcmp ole double %a, %b
288 %2 = zext i1 %1 to i32
292 define i32 @fcmp_one(double %a, double %b) nounwind {
293 ; CHECKIFD-LABEL: fcmp_one:
295 ; CHECKIFD-NEXT: flt.d a0, fa0, fa1
296 ; CHECKIFD-NEXT: flt.d a1, fa1, fa0
297 ; CHECKIFD-NEXT: or a0, a1, a0
300 ; CHECKRV32IZFINXZDINX-LABEL: fcmp_one:
301 ; CHECKRV32IZFINXZDINX: # %bb.0:
302 ; CHECKRV32IZFINXZDINX-NEXT: addi sp, sp, -16
303 ; CHECKRV32IZFINXZDINX-NEXT: sw a2, 8(sp)
304 ; CHECKRV32IZFINXZDINX-NEXT: sw a3, 12(sp)
305 ; CHECKRV32IZFINXZDINX-NEXT: lw a2, 8(sp)
306 ; CHECKRV32IZFINXZDINX-NEXT: lw a3, 12(sp)
307 ; CHECKRV32IZFINXZDINX-NEXT: sw a0, 8(sp)
308 ; CHECKRV32IZFINXZDINX-NEXT: sw a1, 12(sp)
309 ; CHECKRV32IZFINXZDINX-NEXT: lw a0, 8(sp)
310 ; CHECKRV32IZFINXZDINX-NEXT: lw a1, 12(sp)
311 ; CHECKRV32IZFINXZDINX-NEXT: flt.d a4, a0, a2
312 ; CHECKRV32IZFINXZDINX-NEXT: flt.d a0, a2, a0
313 ; CHECKRV32IZFINXZDINX-NEXT: or a0, a0, a4
314 ; CHECKRV32IZFINXZDINX-NEXT: addi sp, sp, 16
315 ; CHECKRV32IZFINXZDINX-NEXT: ret
317 ; CHECKRV64IZFINXZDINX-LABEL: fcmp_one:
318 ; CHECKRV64IZFINXZDINX: # %bb.0:
319 ; CHECKRV64IZFINXZDINX-NEXT: flt.d a2, a0, a1
320 ; CHECKRV64IZFINXZDINX-NEXT: flt.d a0, a1, a0
321 ; CHECKRV64IZFINXZDINX-NEXT: or a0, a0, a2
322 ; CHECKRV64IZFINXZDINX-NEXT: ret
324 ; RV32I-LABEL: fcmp_one:
326 ; RV32I-NEXT: addi sp, sp, -32
327 ; RV32I-NEXT: sw ra, 28(sp) # 4-byte Folded Spill
328 ; RV32I-NEXT: sw s0, 24(sp) # 4-byte Folded Spill
329 ; RV32I-NEXT: sw s1, 20(sp) # 4-byte Folded Spill
330 ; RV32I-NEXT: sw s2, 16(sp) # 4-byte Folded Spill
331 ; RV32I-NEXT: sw s3, 12(sp) # 4-byte Folded Spill
332 ; RV32I-NEXT: sw s4, 8(sp) # 4-byte Folded Spill
333 ; RV32I-NEXT: mv s0, a3
334 ; RV32I-NEXT: mv s1, a2
335 ; RV32I-NEXT: mv s2, a1
336 ; RV32I-NEXT: mv s3, a0
337 ; RV32I-NEXT: call __eqdf2
338 ; RV32I-NEXT: snez s4, a0
339 ; RV32I-NEXT: mv a0, s3
340 ; RV32I-NEXT: mv a1, s2
341 ; RV32I-NEXT: mv a2, s1
342 ; RV32I-NEXT: mv a3, s0
343 ; RV32I-NEXT: call __unorddf2
344 ; RV32I-NEXT: seqz a0, a0
345 ; RV32I-NEXT: and a0, a0, s4
346 ; RV32I-NEXT: lw ra, 28(sp) # 4-byte Folded Reload
347 ; RV32I-NEXT: lw s0, 24(sp) # 4-byte Folded Reload
348 ; RV32I-NEXT: lw s1, 20(sp) # 4-byte Folded Reload
349 ; RV32I-NEXT: lw s2, 16(sp) # 4-byte Folded Reload
350 ; RV32I-NEXT: lw s3, 12(sp) # 4-byte Folded Reload
351 ; RV32I-NEXT: lw s4, 8(sp) # 4-byte Folded Reload
352 ; RV32I-NEXT: addi sp, sp, 32
355 ; RV64I-LABEL: fcmp_one:
357 ; RV64I-NEXT: addi sp, sp, -32
358 ; RV64I-NEXT: sd ra, 24(sp) # 8-byte Folded Spill
359 ; RV64I-NEXT: sd s0, 16(sp) # 8-byte Folded Spill
360 ; RV64I-NEXT: sd s1, 8(sp) # 8-byte Folded Spill
361 ; RV64I-NEXT: sd s2, 0(sp) # 8-byte Folded Spill
362 ; RV64I-NEXT: mv s0, a1
363 ; RV64I-NEXT: mv s1, a0
364 ; RV64I-NEXT: call __eqdf2
365 ; RV64I-NEXT: snez s2, a0
366 ; RV64I-NEXT: mv a0, s1
367 ; RV64I-NEXT: mv a1, s0
368 ; RV64I-NEXT: call __unorddf2
369 ; RV64I-NEXT: seqz a0, a0
370 ; RV64I-NEXT: and a0, a0, s2
371 ; RV64I-NEXT: ld ra, 24(sp) # 8-byte Folded Reload
372 ; RV64I-NEXT: ld s0, 16(sp) # 8-byte Folded Reload
373 ; RV64I-NEXT: ld s1, 8(sp) # 8-byte Folded Reload
374 ; RV64I-NEXT: ld s2, 0(sp) # 8-byte Folded Reload
375 ; RV64I-NEXT: addi sp, sp, 32
377 %1 = fcmp one double %a, %b
378 %2 = zext i1 %1 to i32
382 define i32 @fcmp_ord(double %a, double %b) nounwind {
383 ; CHECKIFD-LABEL: fcmp_ord:
385 ; CHECKIFD-NEXT: feq.d a0, fa1, fa1
386 ; CHECKIFD-NEXT: feq.d a1, fa0, fa0
387 ; CHECKIFD-NEXT: and a0, a1, a0
390 ; CHECKRV32IZFINXZDINX-LABEL: fcmp_ord:
391 ; CHECKRV32IZFINXZDINX: # %bb.0:
392 ; CHECKRV32IZFINXZDINX-NEXT: addi sp, sp, -16
393 ; CHECKRV32IZFINXZDINX-NEXT: sw a0, 8(sp)
394 ; CHECKRV32IZFINXZDINX-NEXT: sw a1, 12(sp)
395 ; CHECKRV32IZFINXZDINX-NEXT: lw a0, 8(sp)
396 ; CHECKRV32IZFINXZDINX-NEXT: lw a1, 12(sp)
397 ; CHECKRV32IZFINXZDINX-NEXT: sw a2, 8(sp)
398 ; CHECKRV32IZFINXZDINX-NEXT: sw a3, 12(sp)
399 ; CHECKRV32IZFINXZDINX-NEXT: lw a2, 8(sp)
400 ; CHECKRV32IZFINXZDINX-NEXT: lw a3, 12(sp)
401 ; CHECKRV32IZFINXZDINX-NEXT: feq.d a2, a2, a2
402 ; CHECKRV32IZFINXZDINX-NEXT: feq.d a0, a0, a0
403 ; CHECKRV32IZFINXZDINX-NEXT: and a0, a0, a2
404 ; CHECKRV32IZFINXZDINX-NEXT: addi sp, sp, 16
405 ; CHECKRV32IZFINXZDINX-NEXT: ret
407 ; CHECKRV64IZFINXZDINX-LABEL: fcmp_ord:
408 ; CHECKRV64IZFINXZDINX: # %bb.0:
409 ; CHECKRV64IZFINXZDINX-NEXT: feq.d a1, a1, a1
410 ; CHECKRV64IZFINXZDINX-NEXT: feq.d a0, a0, a0
411 ; CHECKRV64IZFINXZDINX-NEXT: and a0, a0, a1
412 ; CHECKRV64IZFINXZDINX-NEXT: ret
414 ; RV32I-LABEL: fcmp_ord:
416 ; RV32I-NEXT: addi sp, sp, -16
417 ; RV32I-NEXT: sw ra, 12(sp) # 4-byte Folded Spill
418 ; RV32I-NEXT: call __unorddf2
419 ; RV32I-NEXT: seqz a0, a0
420 ; RV32I-NEXT: lw ra, 12(sp) # 4-byte Folded Reload
421 ; RV32I-NEXT: addi sp, sp, 16
424 ; RV64I-LABEL: fcmp_ord:
426 ; RV64I-NEXT: addi sp, sp, -16
427 ; RV64I-NEXT: sd ra, 8(sp) # 8-byte Folded Spill
428 ; RV64I-NEXT: call __unorddf2
429 ; RV64I-NEXT: seqz a0, a0
430 ; RV64I-NEXT: ld ra, 8(sp) # 8-byte Folded Reload
431 ; RV64I-NEXT: addi sp, sp, 16
433 %1 = fcmp ord double %a, %b
434 %2 = zext i1 %1 to i32
438 define i32 @fcmp_ueq(double %a, double %b) nounwind {
439 ; CHECKIFD-LABEL: fcmp_ueq:
441 ; CHECKIFD-NEXT: flt.d a0, fa0, fa1
442 ; CHECKIFD-NEXT: flt.d a1, fa1, fa0
443 ; CHECKIFD-NEXT: or a0, a1, a0
444 ; CHECKIFD-NEXT: xori a0, a0, 1
447 ; CHECKRV32IZFINXZDINX-LABEL: fcmp_ueq:
448 ; CHECKRV32IZFINXZDINX: # %bb.0:
449 ; CHECKRV32IZFINXZDINX-NEXT: addi sp, sp, -16
450 ; CHECKRV32IZFINXZDINX-NEXT: sw a2, 8(sp)
451 ; CHECKRV32IZFINXZDINX-NEXT: sw a3, 12(sp)
452 ; CHECKRV32IZFINXZDINX-NEXT: lw a2, 8(sp)
453 ; CHECKRV32IZFINXZDINX-NEXT: lw a3, 12(sp)
454 ; CHECKRV32IZFINXZDINX-NEXT: sw a0, 8(sp)
455 ; CHECKRV32IZFINXZDINX-NEXT: sw a1, 12(sp)
456 ; CHECKRV32IZFINXZDINX-NEXT: lw a0, 8(sp)
457 ; CHECKRV32IZFINXZDINX-NEXT: lw a1, 12(sp)
458 ; CHECKRV32IZFINXZDINX-NEXT: flt.d a4, a0, a2
459 ; CHECKRV32IZFINXZDINX-NEXT: flt.d a0, a2, a0
460 ; CHECKRV32IZFINXZDINX-NEXT: or a0, a0, a4
461 ; CHECKRV32IZFINXZDINX-NEXT: xori a0, a0, 1
462 ; CHECKRV32IZFINXZDINX-NEXT: addi sp, sp, 16
463 ; CHECKRV32IZFINXZDINX-NEXT: ret
465 ; CHECKRV64IZFINXZDINX-LABEL: fcmp_ueq:
466 ; CHECKRV64IZFINXZDINX: # %bb.0:
467 ; CHECKRV64IZFINXZDINX-NEXT: flt.d a2, a0, a1
468 ; CHECKRV64IZFINXZDINX-NEXT: flt.d a0, a1, a0
469 ; CHECKRV64IZFINXZDINX-NEXT: or a0, a0, a2
470 ; CHECKRV64IZFINXZDINX-NEXT: xori a0, a0, 1
471 ; CHECKRV64IZFINXZDINX-NEXT: ret
473 ; RV32I-LABEL: fcmp_ueq:
475 ; RV32I-NEXT: addi sp, sp, -32
476 ; RV32I-NEXT: sw ra, 28(sp) # 4-byte Folded Spill
477 ; RV32I-NEXT: sw s0, 24(sp) # 4-byte Folded Spill
478 ; RV32I-NEXT: sw s1, 20(sp) # 4-byte Folded Spill
479 ; RV32I-NEXT: sw s2, 16(sp) # 4-byte Folded Spill
480 ; RV32I-NEXT: sw s3, 12(sp) # 4-byte Folded Spill
481 ; RV32I-NEXT: sw s4, 8(sp) # 4-byte Folded Spill
482 ; RV32I-NEXT: mv s0, a3
483 ; RV32I-NEXT: mv s1, a2
484 ; RV32I-NEXT: mv s2, a1
485 ; RV32I-NEXT: mv s3, a0
486 ; RV32I-NEXT: call __eqdf2
487 ; RV32I-NEXT: seqz s4, a0
488 ; RV32I-NEXT: mv a0, s3
489 ; RV32I-NEXT: mv a1, s2
490 ; RV32I-NEXT: mv a2, s1
491 ; RV32I-NEXT: mv a3, s0
492 ; RV32I-NEXT: call __unorddf2
493 ; RV32I-NEXT: snez a0, a0
494 ; RV32I-NEXT: or a0, a0, s4
495 ; RV32I-NEXT: lw ra, 28(sp) # 4-byte Folded Reload
496 ; RV32I-NEXT: lw s0, 24(sp) # 4-byte Folded Reload
497 ; RV32I-NEXT: lw s1, 20(sp) # 4-byte Folded Reload
498 ; RV32I-NEXT: lw s2, 16(sp) # 4-byte Folded Reload
499 ; RV32I-NEXT: lw s3, 12(sp) # 4-byte Folded Reload
500 ; RV32I-NEXT: lw s4, 8(sp) # 4-byte Folded Reload
501 ; RV32I-NEXT: addi sp, sp, 32
504 ; RV64I-LABEL: fcmp_ueq:
506 ; RV64I-NEXT: addi sp, sp, -32
507 ; RV64I-NEXT: sd ra, 24(sp) # 8-byte Folded Spill
508 ; RV64I-NEXT: sd s0, 16(sp) # 8-byte Folded Spill
509 ; RV64I-NEXT: sd s1, 8(sp) # 8-byte Folded Spill
510 ; RV64I-NEXT: sd s2, 0(sp) # 8-byte Folded Spill
511 ; RV64I-NEXT: mv s0, a1
512 ; RV64I-NEXT: mv s1, a0
513 ; RV64I-NEXT: call __eqdf2
514 ; RV64I-NEXT: seqz s2, a0
515 ; RV64I-NEXT: mv a0, s1
516 ; RV64I-NEXT: mv a1, s0
517 ; RV64I-NEXT: call __unorddf2
518 ; RV64I-NEXT: snez a0, a0
519 ; RV64I-NEXT: or a0, a0, s2
520 ; RV64I-NEXT: ld ra, 24(sp) # 8-byte Folded Reload
521 ; RV64I-NEXT: ld s0, 16(sp) # 8-byte Folded Reload
522 ; RV64I-NEXT: ld s1, 8(sp) # 8-byte Folded Reload
523 ; RV64I-NEXT: ld s2, 0(sp) # 8-byte Folded Reload
524 ; RV64I-NEXT: addi sp, sp, 32
526 %1 = fcmp ueq double %a, %b
527 %2 = zext i1 %1 to i32
531 define i32 @fcmp_ugt(double %a, double %b) nounwind {
532 ; CHECKIFD-LABEL: fcmp_ugt:
534 ; CHECKIFD-NEXT: fle.d a0, fa0, fa1
535 ; CHECKIFD-NEXT: xori a0, a0, 1
538 ; CHECKRV32IZFINXZDINX-LABEL: fcmp_ugt:
539 ; CHECKRV32IZFINXZDINX: # %bb.0:
540 ; CHECKRV32IZFINXZDINX-NEXT: addi sp, sp, -16
541 ; CHECKRV32IZFINXZDINX-NEXT: sw a2, 8(sp)
542 ; CHECKRV32IZFINXZDINX-NEXT: sw a3, 12(sp)
543 ; CHECKRV32IZFINXZDINX-NEXT: lw a2, 8(sp)
544 ; CHECKRV32IZFINXZDINX-NEXT: lw a3, 12(sp)
545 ; CHECKRV32IZFINXZDINX-NEXT: sw a0, 8(sp)
546 ; CHECKRV32IZFINXZDINX-NEXT: sw a1, 12(sp)
547 ; CHECKRV32IZFINXZDINX-NEXT: lw a0, 8(sp)
548 ; CHECKRV32IZFINXZDINX-NEXT: lw a1, 12(sp)
549 ; CHECKRV32IZFINXZDINX-NEXT: fle.d a0, a0, a2
550 ; CHECKRV32IZFINXZDINX-NEXT: xori a0, a0, 1
551 ; CHECKRV32IZFINXZDINX-NEXT: addi sp, sp, 16
552 ; CHECKRV32IZFINXZDINX-NEXT: ret
554 ; CHECKRV64IZFINXZDINX-LABEL: fcmp_ugt:
555 ; CHECKRV64IZFINXZDINX: # %bb.0:
556 ; CHECKRV64IZFINXZDINX-NEXT: fle.d a0, a0, a1
557 ; CHECKRV64IZFINXZDINX-NEXT: xori a0, a0, 1
558 ; CHECKRV64IZFINXZDINX-NEXT: ret
560 ; RV32I-LABEL: fcmp_ugt:
562 ; RV32I-NEXT: addi sp, sp, -16
563 ; RV32I-NEXT: sw ra, 12(sp) # 4-byte Folded Spill
564 ; RV32I-NEXT: call __ledf2
565 ; RV32I-NEXT: sgtz a0, a0
566 ; RV32I-NEXT: lw ra, 12(sp) # 4-byte Folded Reload
567 ; RV32I-NEXT: addi sp, sp, 16
570 ; RV64I-LABEL: fcmp_ugt:
572 ; RV64I-NEXT: addi sp, sp, -16
573 ; RV64I-NEXT: sd ra, 8(sp) # 8-byte Folded Spill
574 ; RV64I-NEXT: call __ledf2
575 ; RV64I-NEXT: sgtz a0, a0
576 ; RV64I-NEXT: ld ra, 8(sp) # 8-byte Folded Reload
577 ; RV64I-NEXT: addi sp, sp, 16
579 %1 = fcmp ugt double %a, %b
580 %2 = zext i1 %1 to i32
584 define i32 @fcmp_uge(double %a, double %b) nounwind {
585 ; CHECKIFD-LABEL: fcmp_uge:
587 ; CHECKIFD-NEXT: flt.d a0, fa0, fa1
588 ; CHECKIFD-NEXT: xori a0, a0, 1
591 ; CHECKRV32IZFINXZDINX-LABEL: fcmp_uge:
592 ; CHECKRV32IZFINXZDINX: # %bb.0:
593 ; CHECKRV32IZFINXZDINX-NEXT: addi sp, sp, -16
594 ; CHECKRV32IZFINXZDINX-NEXT: sw a2, 8(sp)
595 ; CHECKRV32IZFINXZDINX-NEXT: sw a3, 12(sp)
596 ; CHECKRV32IZFINXZDINX-NEXT: lw a2, 8(sp)
597 ; CHECKRV32IZFINXZDINX-NEXT: lw a3, 12(sp)
598 ; CHECKRV32IZFINXZDINX-NEXT: sw a0, 8(sp)
599 ; CHECKRV32IZFINXZDINX-NEXT: sw a1, 12(sp)
600 ; CHECKRV32IZFINXZDINX-NEXT: lw a0, 8(sp)
601 ; CHECKRV32IZFINXZDINX-NEXT: lw a1, 12(sp)
602 ; CHECKRV32IZFINXZDINX-NEXT: flt.d a0, a0, a2
603 ; CHECKRV32IZFINXZDINX-NEXT: xori a0, a0, 1
604 ; CHECKRV32IZFINXZDINX-NEXT: addi sp, sp, 16
605 ; CHECKRV32IZFINXZDINX-NEXT: ret
607 ; CHECKRV64IZFINXZDINX-LABEL: fcmp_uge:
608 ; CHECKRV64IZFINXZDINX: # %bb.0:
609 ; CHECKRV64IZFINXZDINX-NEXT: flt.d a0, a0, a1
610 ; CHECKRV64IZFINXZDINX-NEXT: xori a0, a0, 1
611 ; CHECKRV64IZFINXZDINX-NEXT: ret
613 ; RV32I-LABEL: fcmp_uge:
615 ; RV32I-NEXT: addi sp, sp, -16
616 ; RV32I-NEXT: sw ra, 12(sp) # 4-byte Folded Spill
617 ; RV32I-NEXT: call __ltdf2
618 ; RV32I-NEXT: slti a0, a0, 0
619 ; RV32I-NEXT: xori a0, a0, 1
620 ; RV32I-NEXT: lw ra, 12(sp) # 4-byte Folded Reload
621 ; RV32I-NEXT: addi sp, sp, 16
624 ; RV64I-LABEL: fcmp_uge:
626 ; RV64I-NEXT: addi sp, sp, -16
627 ; RV64I-NEXT: sd ra, 8(sp) # 8-byte Folded Spill
628 ; RV64I-NEXT: call __ltdf2
629 ; RV64I-NEXT: slti a0, a0, 0
630 ; RV64I-NEXT: xori a0, a0, 1
631 ; RV64I-NEXT: ld ra, 8(sp) # 8-byte Folded Reload
632 ; RV64I-NEXT: addi sp, sp, 16
634 %1 = fcmp uge double %a, %b
635 %2 = zext i1 %1 to i32
639 define i32 @fcmp_ult(double %a, double %b) nounwind {
640 ; CHECKIFD-LABEL: fcmp_ult:
642 ; CHECKIFD-NEXT: fle.d a0, fa1, fa0
643 ; CHECKIFD-NEXT: xori a0, a0, 1
646 ; CHECKRV32IZFINXZDINX-LABEL: fcmp_ult:
647 ; CHECKRV32IZFINXZDINX: # %bb.0:
648 ; CHECKRV32IZFINXZDINX-NEXT: addi sp, sp, -16
649 ; CHECKRV32IZFINXZDINX-NEXT: sw a0, 8(sp)
650 ; CHECKRV32IZFINXZDINX-NEXT: sw a1, 12(sp)
651 ; CHECKRV32IZFINXZDINX-NEXT: lw a0, 8(sp)
652 ; CHECKRV32IZFINXZDINX-NEXT: lw a1, 12(sp)
653 ; CHECKRV32IZFINXZDINX-NEXT: sw a2, 8(sp)
654 ; CHECKRV32IZFINXZDINX-NEXT: sw a3, 12(sp)
655 ; CHECKRV32IZFINXZDINX-NEXT: lw a2, 8(sp)
656 ; CHECKRV32IZFINXZDINX-NEXT: lw a3, 12(sp)
657 ; CHECKRV32IZFINXZDINX-NEXT: fle.d a0, a2, a0
658 ; CHECKRV32IZFINXZDINX-NEXT: xori a0, a0, 1
659 ; CHECKRV32IZFINXZDINX-NEXT: addi sp, sp, 16
660 ; CHECKRV32IZFINXZDINX-NEXT: ret
662 ; CHECKRV64IZFINXZDINX-LABEL: fcmp_ult:
663 ; CHECKRV64IZFINXZDINX: # %bb.0:
664 ; CHECKRV64IZFINXZDINX-NEXT: fle.d a0, a1, a0
665 ; CHECKRV64IZFINXZDINX-NEXT: xori a0, a0, 1
666 ; CHECKRV64IZFINXZDINX-NEXT: ret
668 ; RV32I-LABEL: fcmp_ult:
670 ; RV32I-NEXT: addi sp, sp, -16
671 ; RV32I-NEXT: sw ra, 12(sp) # 4-byte Folded Spill
672 ; RV32I-NEXT: call __gedf2
673 ; RV32I-NEXT: slti a0, a0, 0
674 ; RV32I-NEXT: lw ra, 12(sp) # 4-byte Folded Reload
675 ; RV32I-NEXT: addi sp, sp, 16
678 ; RV64I-LABEL: fcmp_ult:
680 ; RV64I-NEXT: addi sp, sp, -16
681 ; RV64I-NEXT: sd ra, 8(sp) # 8-byte Folded Spill
682 ; RV64I-NEXT: call __gedf2
683 ; RV64I-NEXT: slti a0, a0, 0
684 ; RV64I-NEXT: ld ra, 8(sp) # 8-byte Folded Reload
685 ; RV64I-NEXT: addi sp, sp, 16
687 %1 = fcmp ult double %a, %b
688 %2 = zext i1 %1 to i32
692 define i32 @fcmp_ule(double %a, double %b) nounwind {
693 ; CHECKIFD-LABEL: fcmp_ule:
695 ; CHECKIFD-NEXT: flt.d a0, fa1, fa0
696 ; CHECKIFD-NEXT: xori a0, a0, 1
699 ; CHECKRV32IZFINXZDINX-LABEL: fcmp_ule:
700 ; CHECKRV32IZFINXZDINX: # %bb.0:
701 ; CHECKRV32IZFINXZDINX-NEXT: addi sp, sp, -16
702 ; CHECKRV32IZFINXZDINX-NEXT: sw a0, 8(sp)
703 ; CHECKRV32IZFINXZDINX-NEXT: sw a1, 12(sp)
704 ; CHECKRV32IZFINXZDINX-NEXT: lw a0, 8(sp)
705 ; CHECKRV32IZFINXZDINX-NEXT: lw a1, 12(sp)
706 ; CHECKRV32IZFINXZDINX-NEXT: sw a2, 8(sp)
707 ; CHECKRV32IZFINXZDINX-NEXT: sw a3, 12(sp)
708 ; CHECKRV32IZFINXZDINX-NEXT: lw a2, 8(sp)
709 ; CHECKRV32IZFINXZDINX-NEXT: lw a3, 12(sp)
710 ; CHECKRV32IZFINXZDINX-NEXT: flt.d a0, a2, a0
711 ; CHECKRV32IZFINXZDINX-NEXT: xori a0, a0, 1
712 ; CHECKRV32IZFINXZDINX-NEXT: addi sp, sp, 16
713 ; CHECKRV32IZFINXZDINX-NEXT: ret
715 ; CHECKRV64IZFINXZDINX-LABEL: fcmp_ule:
716 ; CHECKRV64IZFINXZDINX: # %bb.0:
717 ; CHECKRV64IZFINXZDINX-NEXT: flt.d a0, a1, a0
718 ; CHECKRV64IZFINXZDINX-NEXT: xori a0, a0, 1
719 ; CHECKRV64IZFINXZDINX-NEXT: ret
721 ; RV32I-LABEL: fcmp_ule:
723 ; RV32I-NEXT: addi sp, sp, -16
724 ; RV32I-NEXT: sw ra, 12(sp) # 4-byte Folded Spill
725 ; RV32I-NEXT: call __gtdf2
726 ; RV32I-NEXT: slti a0, a0, 1
727 ; RV32I-NEXT: lw ra, 12(sp) # 4-byte Folded Reload
728 ; RV32I-NEXT: addi sp, sp, 16
731 ; RV64I-LABEL: fcmp_ule:
733 ; RV64I-NEXT: addi sp, sp, -16
734 ; RV64I-NEXT: sd ra, 8(sp) # 8-byte Folded Spill
735 ; RV64I-NEXT: call __gtdf2
736 ; RV64I-NEXT: slti a0, a0, 1
737 ; RV64I-NEXT: ld ra, 8(sp) # 8-byte Folded Reload
738 ; RV64I-NEXT: addi sp, sp, 16
740 %1 = fcmp ule double %a, %b
741 %2 = zext i1 %1 to i32
745 define i32 @fcmp_une(double %a, double %b) nounwind {
746 ; CHECKIFD-LABEL: fcmp_une:
748 ; CHECKIFD-NEXT: feq.d a0, fa0, fa1
749 ; CHECKIFD-NEXT: xori a0, a0, 1
752 ; CHECKRV32IZFINXZDINX-LABEL: fcmp_une:
753 ; CHECKRV32IZFINXZDINX: # %bb.0:
754 ; CHECKRV32IZFINXZDINX-NEXT: addi sp, sp, -16
755 ; CHECKRV32IZFINXZDINX-NEXT: sw a2, 8(sp)
756 ; CHECKRV32IZFINXZDINX-NEXT: sw a3, 12(sp)
757 ; CHECKRV32IZFINXZDINX-NEXT: lw a2, 8(sp)
758 ; CHECKRV32IZFINXZDINX-NEXT: lw a3, 12(sp)
759 ; CHECKRV32IZFINXZDINX-NEXT: sw a0, 8(sp)
760 ; CHECKRV32IZFINXZDINX-NEXT: sw a1, 12(sp)
761 ; CHECKRV32IZFINXZDINX-NEXT: lw a0, 8(sp)
762 ; CHECKRV32IZFINXZDINX-NEXT: lw a1, 12(sp)
763 ; CHECKRV32IZFINXZDINX-NEXT: feq.d a0, a0, a2
764 ; CHECKRV32IZFINXZDINX-NEXT: xori a0, a0, 1
765 ; CHECKRV32IZFINXZDINX-NEXT: addi sp, sp, 16
766 ; CHECKRV32IZFINXZDINX-NEXT: ret
768 ; CHECKRV64IZFINXZDINX-LABEL: fcmp_une:
769 ; CHECKRV64IZFINXZDINX: # %bb.0:
770 ; CHECKRV64IZFINXZDINX-NEXT: feq.d a0, a0, a1
771 ; CHECKRV64IZFINXZDINX-NEXT: xori a0, a0, 1
772 ; CHECKRV64IZFINXZDINX-NEXT: ret
774 ; RV32I-LABEL: fcmp_une:
776 ; RV32I-NEXT: addi sp, sp, -16
777 ; RV32I-NEXT: sw ra, 12(sp) # 4-byte Folded Spill
778 ; RV32I-NEXT: call __nedf2
779 ; RV32I-NEXT: snez a0, a0
780 ; RV32I-NEXT: lw ra, 12(sp) # 4-byte Folded Reload
781 ; RV32I-NEXT: addi sp, sp, 16
784 ; RV64I-LABEL: fcmp_une:
786 ; RV64I-NEXT: addi sp, sp, -16
787 ; RV64I-NEXT: sd ra, 8(sp) # 8-byte Folded Spill
788 ; RV64I-NEXT: call __nedf2
789 ; RV64I-NEXT: snez a0, a0
790 ; RV64I-NEXT: ld ra, 8(sp) # 8-byte Folded Reload
791 ; RV64I-NEXT: addi sp, sp, 16
793 %1 = fcmp une double %a, %b
794 %2 = zext i1 %1 to i32
798 define i32 @fcmp_uno(double %a, double %b) nounwind {
799 ; CHECKIFD-LABEL: fcmp_uno:
801 ; CHECKIFD-NEXT: feq.d a0, fa1, fa1
802 ; CHECKIFD-NEXT: feq.d a1, fa0, fa0
803 ; CHECKIFD-NEXT: and a0, a1, a0
804 ; CHECKIFD-NEXT: xori a0, a0, 1
807 ; CHECKRV32IZFINXZDINX-LABEL: fcmp_uno:
808 ; CHECKRV32IZFINXZDINX: # %bb.0:
809 ; CHECKRV32IZFINXZDINX-NEXT: addi sp, sp, -16
810 ; CHECKRV32IZFINXZDINX-NEXT: sw a0, 8(sp)
811 ; CHECKRV32IZFINXZDINX-NEXT: sw a1, 12(sp)
812 ; CHECKRV32IZFINXZDINX-NEXT: lw a0, 8(sp)
813 ; CHECKRV32IZFINXZDINX-NEXT: lw a1, 12(sp)
814 ; CHECKRV32IZFINXZDINX-NEXT: sw a2, 8(sp)
815 ; CHECKRV32IZFINXZDINX-NEXT: sw a3, 12(sp)
816 ; CHECKRV32IZFINXZDINX-NEXT: lw a2, 8(sp)
817 ; CHECKRV32IZFINXZDINX-NEXT: lw a3, 12(sp)
818 ; CHECKRV32IZFINXZDINX-NEXT: feq.d a2, a2, a2
819 ; CHECKRV32IZFINXZDINX-NEXT: feq.d a0, a0, a0
820 ; CHECKRV32IZFINXZDINX-NEXT: and a0, a0, a2
821 ; CHECKRV32IZFINXZDINX-NEXT: xori a0, a0, 1
822 ; CHECKRV32IZFINXZDINX-NEXT: addi sp, sp, 16
823 ; CHECKRV32IZFINXZDINX-NEXT: ret
825 ; CHECKRV64IZFINXZDINX-LABEL: fcmp_uno:
826 ; CHECKRV64IZFINXZDINX: # %bb.0:
827 ; CHECKRV64IZFINXZDINX-NEXT: feq.d a1, a1, a1
828 ; CHECKRV64IZFINXZDINX-NEXT: feq.d a0, a0, a0
829 ; CHECKRV64IZFINXZDINX-NEXT: and a0, a0, a1
830 ; CHECKRV64IZFINXZDINX-NEXT: xori a0, a0, 1
831 ; CHECKRV64IZFINXZDINX-NEXT: ret
833 ; RV32I-LABEL: fcmp_uno:
835 ; RV32I-NEXT: addi sp, sp, -16
836 ; RV32I-NEXT: sw ra, 12(sp) # 4-byte Folded Spill
837 ; RV32I-NEXT: call __unorddf2
838 ; RV32I-NEXT: snez a0, a0
839 ; RV32I-NEXT: lw ra, 12(sp) # 4-byte Folded Reload
840 ; RV32I-NEXT: addi sp, sp, 16
843 ; RV64I-LABEL: fcmp_uno:
845 ; RV64I-NEXT: addi sp, sp, -16
846 ; RV64I-NEXT: sd ra, 8(sp) # 8-byte Folded Spill
847 ; RV64I-NEXT: call __unorddf2
848 ; RV64I-NEXT: snez a0, a0
849 ; RV64I-NEXT: ld ra, 8(sp) # 8-byte Folded Reload
850 ; RV64I-NEXT: addi sp, sp, 16
852 %1 = fcmp uno double %a, %b
853 %2 = zext i1 %1 to i32
857 define i32 @fcmp_true(double %a, double %b) nounwind {
858 ; CHECKIFD-LABEL: fcmp_true:
860 ; CHECKIFD-NEXT: li a0, 1
863 ; CHECKIZFINXZDINX-LABEL: fcmp_true:
864 ; CHECKIZFINXZDINX: # %bb.0:
865 ; CHECKIZFINXZDINX-NEXT: li a0, 1
866 ; CHECKIZFINXZDINX-NEXT: ret
868 ; RV32I-LABEL: fcmp_true:
870 ; RV32I-NEXT: li a0, 1
873 ; RV64I-LABEL: fcmp_true:
875 ; RV64I-NEXT: li a0, 1
877 %1 = fcmp true double %a, %b
878 %2 = zext i1 %1 to i32