1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=riscv32 -mattr=+experimental-zfh -verify-machineinstrs \
3 ; RUN: -target-abi ilp32f < %s | FileCheck -check-prefix=RV32IZFH %s
4 ; RUN: llc -mtriple=riscv64 -mattr=+experimental-zfh -verify-machineinstrs \
5 ; RUN: -target-abi lp64f < %s | FileCheck -check-prefix=RV64IZFH %s
8 declare void @exit(i32)
9 declare half @dummy(half)
11 define void @br_fcmp_false(half %a, half %b) nounwind {
12 ; RV32IZFH-LABEL: br_fcmp_false:
14 ; RV32IZFH-NEXT: addi sp, sp, -16
15 ; RV32IZFH-NEXT: sw ra, 12(sp) # 4-byte Folded Spill
16 ; RV32IZFH-NEXT: addi a0, zero, 1
17 ; RV32IZFH-NEXT: bnez a0, .LBB0_2
18 ; RV32IZFH-NEXT: # %bb.1: # %if.then
19 ; RV32IZFH-NEXT: lw ra, 12(sp) # 4-byte Folded Reload
20 ; RV32IZFH-NEXT: addi sp, sp, 16
22 ; RV32IZFH-NEXT: .LBB0_2: # %if.else
23 ; RV32IZFH-NEXT: call abort@plt
25 ; RV64IZFH-LABEL: br_fcmp_false:
27 ; RV64IZFH-NEXT: addi sp, sp, -16
28 ; RV64IZFH-NEXT: sd ra, 8(sp) # 8-byte Folded Spill
29 ; RV64IZFH-NEXT: addi a0, zero, 1
30 ; RV64IZFH-NEXT: bnez a0, .LBB0_2
31 ; RV64IZFH-NEXT: # %bb.1: # %if.then
32 ; RV64IZFH-NEXT: ld ra, 8(sp) # 8-byte Folded Reload
33 ; RV64IZFH-NEXT: addi sp, sp, 16
35 ; RV64IZFH-NEXT: .LBB0_2: # %if.else
36 ; RV64IZFH-NEXT: call abort@plt
37 %1 = fcmp false half %a, %b
38 br i1 %1, label %if.then, label %if.else
42 tail call void @abort()
46 define void @br_fcmp_oeq(half %a, half %b) nounwind {
47 ; RV32IZFH-LABEL: br_fcmp_oeq:
49 ; RV32IZFH-NEXT: addi sp, sp, -16
50 ; RV32IZFH-NEXT: sw ra, 12(sp) # 4-byte Folded Spill
51 ; RV32IZFH-NEXT: feq.h a0, fa0, fa1
52 ; RV32IZFH-NEXT: bnez a0, .LBB1_2
53 ; RV32IZFH-NEXT: # %bb.1: # %if.else
54 ; RV32IZFH-NEXT: lw ra, 12(sp) # 4-byte Folded Reload
55 ; RV32IZFH-NEXT: addi sp, sp, 16
57 ; RV32IZFH-NEXT: .LBB1_2: # %if.then
58 ; RV32IZFH-NEXT: call abort@plt
60 ; RV64IZFH-LABEL: br_fcmp_oeq:
62 ; RV64IZFH-NEXT: addi sp, sp, -16
63 ; RV64IZFH-NEXT: sd ra, 8(sp) # 8-byte Folded Spill
64 ; RV64IZFH-NEXT: feq.h a0, fa0, fa1
65 ; RV64IZFH-NEXT: bnez a0, .LBB1_2
66 ; RV64IZFH-NEXT: # %bb.1: # %if.else
67 ; RV64IZFH-NEXT: ld ra, 8(sp) # 8-byte Folded Reload
68 ; RV64IZFH-NEXT: addi sp, sp, 16
70 ; RV64IZFH-NEXT: .LBB1_2: # %if.then
71 ; RV64IZFH-NEXT: call abort@plt
72 %1 = fcmp oeq half %a, %b
73 br i1 %1, label %if.then, label %if.else
77 tail call void @abort()
81 ; TODO: generated code quality for this is very poor due to
82 ; DAGCombiner::visitXOR converting the legal setoeq to setune, which requires
84 define void @br_fcmp_oeq_alt(half %a, half %b) nounwind {
85 ; RV32IZFH-LABEL: br_fcmp_oeq_alt:
87 ; RV32IZFH-NEXT: addi sp, sp, -16
88 ; RV32IZFH-NEXT: sw ra, 12(sp) # 4-byte Folded Spill
89 ; RV32IZFH-NEXT: feq.h a0, fa0, fa1
90 ; RV32IZFH-NEXT: bnez a0, .LBB2_2
91 ; RV32IZFH-NEXT: # %bb.1: # %if.else
92 ; RV32IZFH-NEXT: lw ra, 12(sp) # 4-byte Folded Reload
93 ; RV32IZFH-NEXT: addi sp, sp, 16
95 ; RV32IZFH-NEXT: .LBB2_2: # %if.then
96 ; RV32IZFH-NEXT: call abort@plt
98 ; RV64IZFH-LABEL: br_fcmp_oeq_alt:
100 ; RV64IZFH-NEXT: addi sp, sp, -16
101 ; RV64IZFH-NEXT: sd ra, 8(sp) # 8-byte Folded Spill
102 ; RV64IZFH-NEXT: feq.h a0, fa0, fa1
103 ; RV64IZFH-NEXT: bnez a0, .LBB2_2
104 ; RV64IZFH-NEXT: # %bb.1: # %if.else
105 ; RV64IZFH-NEXT: ld ra, 8(sp) # 8-byte Folded Reload
106 ; RV64IZFH-NEXT: addi sp, sp, 16
108 ; RV64IZFH-NEXT: .LBB2_2: # %if.then
109 ; RV64IZFH-NEXT: call abort@plt
110 %1 = fcmp oeq half %a, %b
111 br i1 %1, label %if.then, label %if.else
113 tail call void @abort()
119 define void @br_fcmp_ogt(half %a, half %b) nounwind {
120 ; RV32IZFH-LABEL: br_fcmp_ogt:
122 ; RV32IZFH-NEXT: addi sp, sp, -16
123 ; RV32IZFH-NEXT: sw ra, 12(sp) # 4-byte Folded Spill
124 ; RV32IZFH-NEXT: flt.h a0, fa1, fa0
125 ; RV32IZFH-NEXT: bnez a0, .LBB3_2
126 ; RV32IZFH-NEXT: # %bb.1: # %if.else
127 ; RV32IZFH-NEXT: lw ra, 12(sp) # 4-byte Folded Reload
128 ; RV32IZFH-NEXT: addi sp, sp, 16
130 ; RV32IZFH-NEXT: .LBB3_2: # %if.then
131 ; RV32IZFH-NEXT: call abort@plt
133 ; RV64IZFH-LABEL: br_fcmp_ogt:
135 ; RV64IZFH-NEXT: addi sp, sp, -16
136 ; RV64IZFH-NEXT: sd ra, 8(sp) # 8-byte Folded Spill
137 ; RV64IZFH-NEXT: flt.h a0, fa1, fa0
138 ; RV64IZFH-NEXT: bnez a0, .LBB3_2
139 ; RV64IZFH-NEXT: # %bb.1: # %if.else
140 ; RV64IZFH-NEXT: ld ra, 8(sp) # 8-byte Folded Reload
141 ; RV64IZFH-NEXT: addi sp, sp, 16
143 ; RV64IZFH-NEXT: .LBB3_2: # %if.then
144 ; RV64IZFH-NEXT: call abort@plt
145 %1 = fcmp ogt half %a, %b
146 br i1 %1, label %if.then, label %if.else
150 tail call void @abort()
154 define void @br_fcmp_oge(half %a, half %b) nounwind {
155 ; RV32IZFH-LABEL: br_fcmp_oge:
157 ; RV32IZFH-NEXT: addi sp, sp, -16
158 ; RV32IZFH-NEXT: sw ra, 12(sp) # 4-byte Folded Spill
159 ; RV32IZFH-NEXT: fle.h a0, fa1, fa0
160 ; RV32IZFH-NEXT: bnez a0, .LBB4_2
161 ; RV32IZFH-NEXT: # %bb.1: # %if.else
162 ; RV32IZFH-NEXT: lw ra, 12(sp) # 4-byte Folded Reload
163 ; RV32IZFH-NEXT: addi sp, sp, 16
165 ; RV32IZFH-NEXT: .LBB4_2: # %if.then
166 ; RV32IZFH-NEXT: call abort@plt
168 ; RV64IZFH-LABEL: br_fcmp_oge:
170 ; RV64IZFH-NEXT: addi sp, sp, -16
171 ; RV64IZFH-NEXT: sd ra, 8(sp) # 8-byte Folded Spill
172 ; RV64IZFH-NEXT: fle.h a0, fa1, fa0
173 ; RV64IZFH-NEXT: bnez a0, .LBB4_2
174 ; RV64IZFH-NEXT: # %bb.1: # %if.else
175 ; RV64IZFH-NEXT: ld ra, 8(sp) # 8-byte Folded Reload
176 ; RV64IZFH-NEXT: addi sp, sp, 16
178 ; RV64IZFH-NEXT: .LBB4_2: # %if.then
179 ; RV64IZFH-NEXT: call abort@plt
180 %1 = fcmp oge half %a, %b
181 br i1 %1, label %if.then, label %if.else
185 tail call void @abort()
189 define void @br_fcmp_olt(half %a, half %b) nounwind {
190 ; RV32IZFH-LABEL: br_fcmp_olt:
192 ; RV32IZFH-NEXT: addi sp, sp, -16
193 ; RV32IZFH-NEXT: sw ra, 12(sp) # 4-byte Folded Spill
194 ; RV32IZFH-NEXT: flt.h a0, fa0, fa1
195 ; RV32IZFH-NEXT: bnez a0, .LBB5_2
196 ; RV32IZFH-NEXT: # %bb.1: # %if.else
197 ; RV32IZFH-NEXT: lw ra, 12(sp) # 4-byte Folded Reload
198 ; RV32IZFH-NEXT: addi sp, sp, 16
200 ; RV32IZFH-NEXT: .LBB5_2: # %if.then
201 ; RV32IZFH-NEXT: call abort@plt
203 ; RV64IZFH-LABEL: br_fcmp_olt:
205 ; RV64IZFH-NEXT: addi sp, sp, -16
206 ; RV64IZFH-NEXT: sd ra, 8(sp) # 8-byte Folded Spill
207 ; RV64IZFH-NEXT: flt.h a0, fa0, fa1
208 ; RV64IZFH-NEXT: bnez a0, .LBB5_2
209 ; RV64IZFH-NEXT: # %bb.1: # %if.else
210 ; RV64IZFH-NEXT: ld ra, 8(sp) # 8-byte Folded Reload
211 ; RV64IZFH-NEXT: addi sp, sp, 16
213 ; RV64IZFH-NEXT: .LBB5_2: # %if.then
214 ; RV64IZFH-NEXT: call abort@plt
215 %1 = fcmp olt half %a, %b
216 br i1 %1, label %if.then, label %if.else
220 tail call void @abort()
224 define void @br_fcmp_ole(half %a, half %b) nounwind {
225 ; RV32IZFH-LABEL: br_fcmp_ole:
227 ; RV32IZFH-NEXT: addi sp, sp, -16
228 ; RV32IZFH-NEXT: sw ra, 12(sp) # 4-byte Folded Spill
229 ; RV32IZFH-NEXT: fle.h a0, fa0, fa1
230 ; RV32IZFH-NEXT: bnez a0, .LBB6_2
231 ; RV32IZFH-NEXT: # %bb.1: # %if.else
232 ; RV32IZFH-NEXT: lw ra, 12(sp) # 4-byte Folded Reload
233 ; RV32IZFH-NEXT: addi sp, sp, 16
235 ; RV32IZFH-NEXT: .LBB6_2: # %if.then
236 ; RV32IZFH-NEXT: call abort@plt
238 ; RV64IZFH-LABEL: br_fcmp_ole:
240 ; RV64IZFH-NEXT: addi sp, sp, -16
241 ; RV64IZFH-NEXT: sd ra, 8(sp) # 8-byte Folded Spill
242 ; RV64IZFH-NEXT: fle.h a0, fa0, fa1
243 ; RV64IZFH-NEXT: bnez a0, .LBB6_2
244 ; RV64IZFH-NEXT: # %bb.1: # %if.else
245 ; RV64IZFH-NEXT: ld ra, 8(sp) # 8-byte Folded Reload
246 ; RV64IZFH-NEXT: addi sp, sp, 16
248 ; RV64IZFH-NEXT: .LBB6_2: # %if.then
249 ; RV64IZFH-NEXT: call abort@plt
250 %1 = fcmp ole half %a, %b
251 br i1 %1, label %if.then, label %if.else
255 tail call void @abort()
259 define void @br_fcmp_one(half %a, half %b) nounwind {
260 ; RV32IZFH-LABEL: br_fcmp_one:
262 ; RV32IZFH-NEXT: addi sp, sp, -16
263 ; RV32IZFH-NEXT: sw ra, 12(sp) # 4-byte Folded Spill
264 ; RV32IZFH-NEXT: flt.h a0, fa0, fa1
265 ; RV32IZFH-NEXT: flt.h a1, fa1, fa0
266 ; RV32IZFH-NEXT: or a0, a1, a0
267 ; RV32IZFH-NEXT: bnez a0, .LBB7_2
268 ; RV32IZFH-NEXT: # %bb.1: # %if.else
269 ; RV32IZFH-NEXT: lw ra, 12(sp) # 4-byte Folded Reload
270 ; RV32IZFH-NEXT: addi sp, sp, 16
272 ; RV32IZFH-NEXT: .LBB7_2: # %if.then
273 ; RV32IZFH-NEXT: call abort@plt
275 ; RV64IZFH-LABEL: br_fcmp_one:
277 ; RV64IZFH-NEXT: addi sp, sp, -16
278 ; RV64IZFH-NEXT: sd ra, 8(sp) # 8-byte Folded Spill
279 ; RV64IZFH-NEXT: flt.h a0, fa0, fa1
280 ; RV64IZFH-NEXT: flt.h a1, fa1, fa0
281 ; RV64IZFH-NEXT: or a0, a1, a0
282 ; RV64IZFH-NEXT: bnez a0, .LBB7_2
283 ; RV64IZFH-NEXT: # %bb.1: # %if.else
284 ; RV64IZFH-NEXT: ld ra, 8(sp) # 8-byte Folded Reload
285 ; RV64IZFH-NEXT: addi sp, sp, 16
287 ; RV64IZFH-NEXT: .LBB7_2: # %if.then
288 ; RV64IZFH-NEXT: call abort@plt
289 %1 = fcmp one half %a, %b
290 br i1 %1, label %if.then, label %if.else
294 tail call void @abort()
298 define void @br_fcmp_ord(half %a, half %b) nounwind {
299 ; RV32IZFH-LABEL: br_fcmp_ord:
301 ; RV32IZFH-NEXT: addi sp, sp, -16
302 ; RV32IZFH-NEXT: sw ra, 12(sp) # 4-byte Folded Spill
303 ; RV32IZFH-NEXT: feq.h a0, fa1, fa1
304 ; RV32IZFH-NEXT: feq.h a1, fa0, fa0
305 ; RV32IZFH-NEXT: and a0, a1, a0
306 ; RV32IZFH-NEXT: bnez a0, .LBB8_2
307 ; RV32IZFH-NEXT: # %bb.1: # %if.else
308 ; RV32IZFH-NEXT: lw ra, 12(sp) # 4-byte Folded Reload
309 ; RV32IZFH-NEXT: addi sp, sp, 16
311 ; RV32IZFH-NEXT: .LBB8_2: # %if.then
312 ; RV32IZFH-NEXT: call abort@plt
314 ; RV64IZFH-LABEL: br_fcmp_ord:
316 ; RV64IZFH-NEXT: addi sp, sp, -16
317 ; RV64IZFH-NEXT: sd ra, 8(sp) # 8-byte Folded Spill
318 ; RV64IZFH-NEXT: feq.h a0, fa1, fa1
319 ; RV64IZFH-NEXT: feq.h a1, fa0, fa0
320 ; RV64IZFH-NEXT: and a0, a1, a0
321 ; RV64IZFH-NEXT: bnez a0, .LBB8_2
322 ; RV64IZFH-NEXT: # %bb.1: # %if.else
323 ; RV64IZFH-NEXT: ld ra, 8(sp) # 8-byte Folded Reload
324 ; RV64IZFH-NEXT: addi sp, sp, 16
326 ; RV64IZFH-NEXT: .LBB8_2: # %if.then
327 ; RV64IZFH-NEXT: call abort@plt
328 %1 = fcmp ord half %a, %b
329 br i1 %1, label %if.then, label %if.else
333 tail call void @abort()
337 define void @br_fcmp_ueq(half %a, half %b) nounwind {
338 ; RV32IZFH-LABEL: br_fcmp_ueq:
340 ; RV32IZFH-NEXT: addi sp, sp, -16
341 ; RV32IZFH-NEXT: sw ra, 12(sp) # 4-byte Folded Spill
342 ; RV32IZFH-NEXT: flt.h a0, fa0, fa1
343 ; RV32IZFH-NEXT: flt.h a1, fa1, fa0
344 ; RV32IZFH-NEXT: or a0, a1, a0
345 ; RV32IZFH-NEXT: beqz a0, .LBB9_2
346 ; RV32IZFH-NEXT: # %bb.1: # %if.else
347 ; RV32IZFH-NEXT: lw ra, 12(sp) # 4-byte Folded Reload
348 ; RV32IZFH-NEXT: addi sp, sp, 16
350 ; RV32IZFH-NEXT: .LBB9_2: # %if.then
351 ; RV32IZFH-NEXT: call abort@plt
353 ; RV64IZFH-LABEL: br_fcmp_ueq:
355 ; RV64IZFH-NEXT: addi sp, sp, -16
356 ; RV64IZFH-NEXT: sd ra, 8(sp) # 8-byte Folded Spill
357 ; RV64IZFH-NEXT: flt.h a0, fa0, fa1
358 ; RV64IZFH-NEXT: flt.h a1, fa1, fa0
359 ; RV64IZFH-NEXT: or a0, a1, a0
360 ; RV64IZFH-NEXT: beqz a0, .LBB9_2
361 ; RV64IZFH-NEXT: # %bb.1: # %if.else
362 ; RV64IZFH-NEXT: ld ra, 8(sp) # 8-byte Folded Reload
363 ; RV64IZFH-NEXT: addi sp, sp, 16
365 ; RV64IZFH-NEXT: .LBB9_2: # %if.then
366 ; RV64IZFH-NEXT: call abort@plt
367 %1 = fcmp ueq half %a, %b
368 br i1 %1, label %if.then, label %if.else
372 tail call void @abort()
376 define void @br_fcmp_ugt(half %a, half %b) nounwind {
377 ; RV32IZFH-LABEL: br_fcmp_ugt:
379 ; RV32IZFH-NEXT: addi sp, sp, -16
380 ; RV32IZFH-NEXT: sw ra, 12(sp) # 4-byte Folded Spill
381 ; RV32IZFH-NEXT: fle.h a0, fa0, fa1
382 ; RV32IZFH-NEXT: beqz a0, .LBB10_2
383 ; RV32IZFH-NEXT: # %bb.1: # %if.else
384 ; RV32IZFH-NEXT: lw ra, 12(sp) # 4-byte Folded Reload
385 ; RV32IZFH-NEXT: addi sp, sp, 16
387 ; RV32IZFH-NEXT: .LBB10_2: # %if.then
388 ; RV32IZFH-NEXT: call abort@plt
390 ; RV64IZFH-LABEL: br_fcmp_ugt:
392 ; RV64IZFH-NEXT: addi sp, sp, -16
393 ; RV64IZFH-NEXT: sd ra, 8(sp) # 8-byte Folded Spill
394 ; RV64IZFH-NEXT: fle.h a0, fa0, fa1
395 ; RV64IZFH-NEXT: beqz a0, .LBB10_2
396 ; RV64IZFH-NEXT: # %bb.1: # %if.else
397 ; RV64IZFH-NEXT: ld ra, 8(sp) # 8-byte Folded Reload
398 ; RV64IZFH-NEXT: addi sp, sp, 16
400 ; RV64IZFH-NEXT: .LBB10_2: # %if.then
401 ; RV64IZFH-NEXT: call abort@plt
402 %1 = fcmp ugt half %a, %b
403 br i1 %1, label %if.then, label %if.else
407 tail call void @abort()
411 define void @br_fcmp_uge(half %a, half %b) nounwind {
412 ; RV32IZFH-LABEL: br_fcmp_uge:
414 ; RV32IZFH-NEXT: addi sp, sp, -16
415 ; RV32IZFH-NEXT: sw ra, 12(sp) # 4-byte Folded Spill
416 ; RV32IZFH-NEXT: flt.h a0, fa0, fa1
417 ; RV32IZFH-NEXT: beqz a0, .LBB11_2
418 ; RV32IZFH-NEXT: # %bb.1: # %if.else
419 ; RV32IZFH-NEXT: lw ra, 12(sp) # 4-byte Folded Reload
420 ; RV32IZFH-NEXT: addi sp, sp, 16
422 ; RV32IZFH-NEXT: .LBB11_2: # %if.then
423 ; RV32IZFH-NEXT: call abort@plt
425 ; RV64IZFH-LABEL: br_fcmp_uge:
427 ; RV64IZFH-NEXT: addi sp, sp, -16
428 ; RV64IZFH-NEXT: sd ra, 8(sp) # 8-byte Folded Spill
429 ; RV64IZFH-NEXT: flt.h a0, fa0, fa1
430 ; RV64IZFH-NEXT: beqz a0, .LBB11_2
431 ; RV64IZFH-NEXT: # %bb.1: # %if.else
432 ; RV64IZFH-NEXT: ld ra, 8(sp) # 8-byte Folded Reload
433 ; RV64IZFH-NEXT: addi sp, sp, 16
435 ; RV64IZFH-NEXT: .LBB11_2: # %if.then
436 ; RV64IZFH-NEXT: call abort@plt
437 %1 = fcmp uge half %a, %b
438 br i1 %1, label %if.then, label %if.else
442 tail call void @abort()
446 define void @br_fcmp_ult(half %a, half %b) nounwind {
447 ; RV32IZFH-LABEL: br_fcmp_ult:
449 ; RV32IZFH-NEXT: addi sp, sp, -16
450 ; RV32IZFH-NEXT: sw ra, 12(sp) # 4-byte Folded Spill
451 ; RV32IZFH-NEXT: fle.h a0, fa1, fa0
452 ; RV32IZFH-NEXT: beqz a0, .LBB12_2
453 ; RV32IZFH-NEXT: # %bb.1: # %if.else
454 ; RV32IZFH-NEXT: lw ra, 12(sp) # 4-byte Folded Reload
455 ; RV32IZFH-NEXT: addi sp, sp, 16
457 ; RV32IZFH-NEXT: .LBB12_2: # %if.then
458 ; RV32IZFH-NEXT: call abort@plt
460 ; RV64IZFH-LABEL: br_fcmp_ult:
462 ; RV64IZFH-NEXT: addi sp, sp, -16
463 ; RV64IZFH-NEXT: sd ra, 8(sp) # 8-byte Folded Spill
464 ; RV64IZFH-NEXT: fle.h a0, fa1, fa0
465 ; RV64IZFH-NEXT: beqz a0, .LBB12_2
466 ; RV64IZFH-NEXT: # %bb.1: # %if.else
467 ; RV64IZFH-NEXT: ld ra, 8(sp) # 8-byte Folded Reload
468 ; RV64IZFH-NEXT: addi sp, sp, 16
470 ; RV64IZFH-NEXT: .LBB12_2: # %if.then
471 ; RV64IZFH-NEXT: call abort@plt
472 %1 = fcmp ult half %a, %b
473 br i1 %1, label %if.then, label %if.else
477 tail call void @abort()
481 define void @br_fcmp_ule(half %a, half %b) nounwind {
482 ; RV32IZFH-LABEL: br_fcmp_ule:
484 ; RV32IZFH-NEXT: addi sp, sp, -16
485 ; RV32IZFH-NEXT: sw ra, 12(sp) # 4-byte Folded Spill
486 ; RV32IZFH-NEXT: flt.h a0, fa1, fa0
487 ; RV32IZFH-NEXT: beqz a0, .LBB13_2
488 ; RV32IZFH-NEXT: # %bb.1: # %if.else
489 ; RV32IZFH-NEXT: lw ra, 12(sp) # 4-byte Folded Reload
490 ; RV32IZFH-NEXT: addi sp, sp, 16
492 ; RV32IZFH-NEXT: .LBB13_2: # %if.then
493 ; RV32IZFH-NEXT: call abort@plt
495 ; RV64IZFH-LABEL: br_fcmp_ule:
497 ; RV64IZFH-NEXT: addi sp, sp, -16
498 ; RV64IZFH-NEXT: sd ra, 8(sp) # 8-byte Folded Spill
499 ; RV64IZFH-NEXT: flt.h a0, fa1, fa0
500 ; RV64IZFH-NEXT: beqz a0, .LBB13_2
501 ; RV64IZFH-NEXT: # %bb.1: # %if.else
502 ; RV64IZFH-NEXT: ld ra, 8(sp) # 8-byte Folded Reload
503 ; RV64IZFH-NEXT: addi sp, sp, 16
505 ; RV64IZFH-NEXT: .LBB13_2: # %if.then
506 ; RV64IZFH-NEXT: call abort@plt
507 %1 = fcmp ule half %a, %b
508 br i1 %1, label %if.then, label %if.else
512 tail call void @abort()
516 define void @br_fcmp_une(half %a, half %b) nounwind {
517 ; RV32IZFH-LABEL: br_fcmp_une:
519 ; RV32IZFH-NEXT: addi sp, sp, -16
520 ; RV32IZFH-NEXT: sw ra, 12(sp) # 4-byte Folded Spill
521 ; RV32IZFH-NEXT: feq.h a0, fa0, fa1
522 ; RV32IZFH-NEXT: beqz a0, .LBB14_2
523 ; RV32IZFH-NEXT: # %bb.1: # %if.else
524 ; RV32IZFH-NEXT: lw ra, 12(sp) # 4-byte Folded Reload
525 ; RV32IZFH-NEXT: addi sp, sp, 16
527 ; RV32IZFH-NEXT: .LBB14_2: # %if.then
528 ; RV32IZFH-NEXT: call abort@plt
530 ; RV64IZFH-LABEL: br_fcmp_une:
532 ; RV64IZFH-NEXT: addi sp, sp, -16
533 ; RV64IZFH-NEXT: sd ra, 8(sp) # 8-byte Folded Spill
534 ; RV64IZFH-NEXT: feq.h a0, fa0, fa1
535 ; RV64IZFH-NEXT: beqz a0, .LBB14_2
536 ; RV64IZFH-NEXT: # %bb.1: # %if.else
537 ; RV64IZFH-NEXT: ld ra, 8(sp) # 8-byte Folded Reload
538 ; RV64IZFH-NEXT: addi sp, sp, 16
540 ; RV64IZFH-NEXT: .LBB14_2: # %if.then
541 ; RV64IZFH-NEXT: call abort@plt
542 %1 = fcmp une half %a, %b
543 br i1 %1, label %if.then, label %if.else
547 tail call void @abort()
551 define void @br_fcmp_uno(half %a, half %b) nounwind {
552 ; TODO: sltiu+bne -> beq
553 ; RV32IZFH-LABEL: br_fcmp_uno:
555 ; RV32IZFH-NEXT: addi sp, sp, -16
556 ; RV32IZFH-NEXT: sw ra, 12(sp) # 4-byte Folded Spill
557 ; RV32IZFH-NEXT: feq.h a0, fa1, fa1
558 ; RV32IZFH-NEXT: feq.h a1, fa0, fa0
559 ; RV32IZFH-NEXT: and a0, a1, a0
560 ; RV32IZFH-NEXT: beqz a0, .LBB15_2
561 ; RV32IZFH-NEXT: # %bb.1: # %if.else
562 ; RV32IZFH-NEXT: lw ra, 12(sp) # 4-byte Folded Reload
563 ; RV32IZFH-NEXT: addi sp, sp, 16
565 ; RV32IZFH-NEXT: .LBB15_2: # %if.then
566 ; RV32IZFH-NEXT: call abort@plt
568 ; RV64IZFH-LABEL: br_fcmp_uno:
570 ; RV64IZFH-NEXT: addi sp, sp, -16
571 ; RV64IZFH-NEXT: sd ra, 8(sp) # 8-byte Folded Spill
572 ; RV64IZFH-NEXT: feq.h a0, fa1, fa1
573 ; RV64IZFH-NEXT: feq.h a1, fa0, fa0
574 ; RV64IZFH-NEXT: and a0, a1, a0
575 ; RV64IZFH-NEXT: beqz a0, .LBB15_2
576 ; RV64IZFH-NEXT: # %bb.1: # %if.else
577 ; RV64IZFH-NEXT: ld ra, 8(sp) # 8-byte Folded Reload
578 ; RV64IZFH-NEXT: addi sp, sp, 16
580 ; RV64IZFH-NEXT: .LBB15_2: # %if.then
581 ; RV64IZFH-NEXT: call abort@plt
582 %1 = fcmp uno half %a, %b
583 br i1 %1, label %if.then, label %if.else
587 tail call void @abort()
591 define void @br_fcmp_true(half %a, half %b) nounwind {
592 ; RV32IZFH-LABEL: br_fcmp_true:
594 ; RV32IZFH-NEXT: addi sp, sp, -16
595 ; RV32IZFH-NEXT: sw ra, 12(sp) # 4-byte Folded Spill
596 ; RV32IZFH-NEXT: addi a0, zero, 1
597 ; RV32IZFH-NEXT: bnez a0, .LBB16_2
598 ; RV32IZFH-NEXT: # %bb.1: # %if.else
599 ; RV32IZFH-NEXT: lw ra, 12(sp) # 4-byte Folded Reload
600 ; RV32IZFH-NEXT: addi sp, sp, 16
602 ; RV32IZFH-NEXT: .LBB16_2: # %if.then
603 ; RV32IZFH-NEXT: call abort@plt
605 ; RV64IZFH-LABEL: br_fcmp_true:
607 ; RV64IZFH-NEXT: addi sp, sp, -16
608 ; RV64IZFH-NEXT: sd ra, 8(sp) # 8-byte Folded Spill
609 ; RV64IZFH-NEXT: addi a0, zero, 1
610 ; RV64IZFH-NEXT: bnez a0, .LBB16_2
611 ; RV64IZFH-NEXT: # %bb.1: # %if.else
612 ; RV64IZFH-NEXT: ld ra, 8(sp) # 8-byte Folded Reload
613 ; RV64IZFH-NEXT: addi sp, sp, 16
615 ; RV64IZFH-NEXT: .LBB16_2: # %if.then
616 ; RV64IZFH-NEXT: call abort@plt
617 %1 = fcmp true half %a, %b
618 br i1 %1, label %if.then, label %if.else
622 tail call void @abort()