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=RV32IFD %s
4 ; RUN: llc -mtriple=riscv64 -mattr=+d -verify-machineinstrs < %s \
5 ; RUN: -target-abi=lp64d | FileCheck -check-prefix=RV64IFD %s
6 ; RUN: llc -mtriple=riscv32 -mattr=+zdinx -verify-machineinstrs < %s \
7 ; RUN: -target-abi=ilp32 | FileCheck -check-prefix=RV32IZFINXZDINX %s
8 ; RUN: llc -mtriple=riscv64 -mattr=+zdinx -verify-machineinstrs < %s \
9 ; RUN: -target-abi=lp64 | FileCheck -check-prefix=RV64IZFINXZDINX %s
12 declare void @exit(i32)
14 define void @br_fcmp_false(double %a, double %b) nounwind {
15 ; RV32IFD-LABEL: br_fcmp_false:
17 ; RV32IFD-NEXT: li a0, 1
18 ; RV32IFD-NEXT: bnez a0, .LBB0_2
19 ; RV32IFD-NEXT: # %bb.1: # %if.then
21 ; RV32IFD-NEXT: .LBB0_2: # %if.else
22 ; RV32IFD-NEXT: addi sp, sp, -16
23 ; RV32IFD-NEXT: sw ra, 12(sp) # 4-byte Folded Spill
24 ; RV32IFD-NEXT: call abort@plt
26 ; RV64IFD-LABEL: br_fcmp_false:
28 ; RV64IFD-NEXT: li a0, 1
29 ; RV64IFD-NEXT: bnez a0, .LBB0_2
30 ; RV64IFD-NEXT: # %bb.1: # %if.then
32 ; RV64IFD-NEXT: .LBB0_2: # %if.else
33 ; RV64IFD-NEXT: addi sp, sp, -16
34 ; RV64IFD-NEXT: sd ra, 8(sp) # 8-byte Folded Spill
35 ; RV64IFD-NEXT: call abort@plt
37 ; RV32IZFINXZDINX-LABEL: br_fcmp_false:
38 ; RV32IZFINXZDINX: # %bb.0:
39 ; RV32IZFINXZDINX-NEXT: li a0, 1
40 ; RV32IZFINXZDINX-NEXT: bnez a0, .LBB0_2
41 ; RV32IZFINXZDINX-NEXT: # %bb.1: # %if.then
42 ; RV32IZFINXZDINX-NEXT: ret
43 ; RV32IZFINXZDINX-NEXT: .LBB0_2: # %if.else
44 ; RV32IZFINXZDINX-NEXT: addi sp, sp, -16
45 ; RV32IZFINXZDINX-NEXT: sw ra, 12(sp) # 4-byte Folded Spill
46 ; RV32IZFINXZDINX-NEXT: call abort@plt
48 ; RV64IZFINXZDINX-LABEL: br_fcmp_false:
49 ; RV64IZFINXZDINX: # %bb.0:
50 ; RV64IZFINXZDINX-NEXT: li a0, 1
51 ; RV64IZFINXZDINX-NEXT: bnez a0, .LBB0_2
52 ; RV64IZFINXZDINX-NEXT: # %bb.1: # %if.then
53 ; RV64IZFINXZDINX-NEXT: ret
54 ; RV64IZFINXZDINX-NEXT: .LBB0_2: # %if.else
55 ; RV64IZFINXZDINX-NEXT: addi sp, sp, -16
56 ; RV64IZFINXZDINX-NEXT: sd ra, 8(sp) # 8-byte Folded Spill
57 ; RV64IZFINXZDINX-NEXT: call abort@plt
58 %1 = fcmp false double %a, %b
59 br i1 %1, label %if.then, label %if.else
63 tail call void @abort()
67 define void @br_fcmp_oeq(double %a, double %b) nounwind {
68 ; RV32IFD-LABEL: br_fcmp_oeq:
70 ; RV32IFD-NEXT: feq.d a0, fa0, fa1
71 ; RV32IFD-NEXT: bnez a0, .LBB1_2
72 ; RV32IFD-NEXT: # %bb.1: # %if.else
74 ; RV32IFD-NEXT: .LBB1_2: # %if.then
75 ; RV32IFD-NEXT: addi sp, sp, -16
76 ; RV32IFD-NEXT: sw ra, 12(sp) # 4-byte Folded Spill
77 ; RV32IFD-NEXT: call abort@plt
79 ; RV64IFD-LABEL: br_fcmp_oeq:
81 ; RV64IFD-NEXT: feq.d a0, fa0, fa1
82 ; RV64IFD-NEXT: bnez a0, .LBB1_2
83 ; RV64IFD-NEXT: # %bb.1: # %if.else
85 ; RV64IFD-NEXT: .LBB1_2: # %if.then
86 ; RV64IFD-NEXT: addi sp, sp, -16
87 ; RV64IFD-NEXT: sd ra, 8(sp) # 8-byte Folded Spill
88 ; RV64IFD-NEXT: call abort@plt
90 ; RV32IZFINXZDINX-LABEL: br_fcmp_oeq:
91 ; RV32IZFINXZDINX: # %bb.0:
92 ; RV32IZFINXZDINX-NEXT: addi sp, sp, -16
93 ; RV32IZFINXZDINX-NEXT: sw ra, 12(sp) # 4-byte Folded Spill
94 ; RV32IZFINXZDINX-NEXT: sw a2, 0(sp)
95 ; RV32IZFINXZDINX-NEXT: sw a3, 4(sp)
96 ; RV32IZFINXZDINX-NEXT: lw a2, 0(sp)
97 ; RV32IZFINXZDINX-NEXT: lw a3, 4(sp)
98 ; RV32IZFINXZDINX-NEXT: sw a0, 0(sp)
99 ; RV32IZFINXZDINX-NEXT: sw a1, 4(sp)
100 ; RV32IZFINXZDINX-NEXT: lw a0, 0(sp)
101 ; RV32IZFINXZDINX-NEXT: lw a1, 4(sp)
102 ; RV32IZFINXZDINX-NEXT: feq.d a0, a0, a2
103 ; RV32IZFINXZDINX-NEXT: bnez a0, .LBB1_2
104 ; RV32IZFINXZDINX-NEXT: # %bb.1: # %if.else
105 ; RV32IZFINXZDINX-NEXT: lw ra, 12(sp) # 4-byte Folded Reload
106 ; RV32IZFINXZDINX-NEXT: addi sp, sp, 16
107 ; RV32IZFINXZDINX-NEXT: ret
108 ; RV32IZFINXZDINX-NEXT: .LBB1_2: # %if.then
109 ; RV32IZFINXZDINX-NEXT: call abort@plt
111 ; RV64IZFINXZDINX-LABEL: br_fcmp_oeq:
112 ; RV64IZFINXZDINX: # %bb.0:
113 ; RV64IZFINXZDINX-NEXT: feq.d a0, a0, a1
114 ; RV64IZFINXZDINX-NEXT: bnez a0, .LBB1_2
115 ; RV64IZFINXZDINX-NEXT: # %bb.1: # %if.else
116 ; RV64IZFINXZDINX-NEXT: ret
117 ; RV64IZFINXZDINX-NEXT: .LBB1_2: # %if.then
118 ; RV64IZFINXZDINX-NEXT: addi sp, sp, -16
119 ; RV64IZFINXZDINX-NEXT: sd ra, 8(sp) # 8-byte Folded Spill
120 ; RV64IZFINXZDINX-NEXT: call abort@plt
121 %1 = fcmp oeq double %a, %b
122 br i1 %1, label %if.then, label %if.else
126 tail call void @abort()
130 ; TODO: generated code quality for this is very poor due to
131 ; DAGCombiner::visitXOR converting the legal setoeq to setune, which requires
133 define void @br_fcmp_oeq_alt(double %a, double %b) nounwind {
134 ; RV32IFD-LABEL: br_fcmp_oeq_alt:
136 ; RV32IFD-NEXT: feq.d a0, fa0, fa1
137 ; RV32IFD-NEXT: bnez a0, .LBB2_2
138 ; RV32IFD-NEXT: # %bb.1: # %if.else
140 ; RV32IFD-NEXT: .LBB2_2: # %if.then
141 ; RV32IFD-NEXT: addi sp, sp, -16
142 ; RV32IFD-NEXT: sw ra, 12(sp) # 4-byte Folded Spill
143 ; RV32IFD-NEXT: call abort@plt
145 ; RV64IFD-LABEL: br_fcmp_oeq_alt:
147 ; RV64IFD-NEXT: feq.d a0, fa0, fa1
148 ; RV64IFD-NEXT: bnez a0, .LBB2_2
149 ; RV64IFD-NEXT: # %bb.1: # %if.else
151 ; RV64IFD-NEXT: .LBB2_2: # %if.then
152 ; RV64IFD-NEXT: addi sp, sp, -16
153 ; RV64IFD-NEXT: sd ra, 8(sp) # 8-byte Folded Spill
154 ; RV64IFD-NEXT: call abort@plt
156 ; RV32IZFINXZDINX-LABEL: br_fcmp_oeq_alt:
157 ; RV32IZFINXZDINX: # %bb.0:
158 ; RV32IZFINXZDINX-NEXT: addi sp, sp, -16
159 ; RV32IZFINXZDINX-NEXT: sw ra, 12(sp) # 4-byte Folded Spill
160 ; RV32IZFINXZDINX-NEXT: sw a2, 0(sp)
161 ; RV32IZFINXZDINX-NEXT: sw a3, 4(sp)
162 ; RV32IZFINXZDINX-NEXT: lw a2, 0(sp)
163 ; RV32IZFINXZDINX-NEXT: lw a3, 4(sp)
164 ; RV32IZFINXZDINX-NEXT: sw a0, 0(sp)
165 ; RV32IZFINXZDINX-NEXT: sw a1, 4(sp)
166 ; RV32IZFINXZDINX-NEXT: lw a0, 0(sp)
167 ; RV32IZFINXZDINX-NEXT: lw a1, 4(sp)
168 ; RV32IZFINXZDINX-NEXT: feq.d a0, a0, a2
169 ; RV32IZFINXZDINX-NEXT: bnez a0, .LBB2_2
170 ; RV32IZFINXZDINX-NEXT: # %bb.1: # %if.else
171 ; RV32IZFINXZDINX-NEXT: lw ra, 12(sp) # 4-byte Folded Reload
172 ; RV32IZFINXZDINX-NEXT: addi sp, sp, 16
173 ; RV32IZFINXZDINX-NEXT: ret
174 ; RV32IZFINXZDINX-NEXT: .LBB2_2: # %if.then
175 ; RV32IZFINXZDINX-NEXT: call abort@plt
177 ; RV64IZFINXZDINX-LABEL: br_fcmp_oeq_alt:
178 ; RV64IZFINXZDINX: # %bb.0:
179 ; RV64IZFINXZDINX-NEXT: feq.d a0, a0, a1
180 ; RV64IZFINXZDINX-NEXT: bnez a0, .LBB2_2
181 ; RV64IZFINXZDINX-NEXT: # %bb.1: # %if.else
182 ; RV64IZFINXZDINX-NEXT: ret
183 ; RV64IZFINXZDINX-NEXT: .LBB2_2: # %if.then
184 ; RV64IZFINXZDINX-NEXT: addi sp, sp, -16
185 ; RV64IZFINXZDINX-NEXT: sd ra, 8(sp) # 8-byte Folded Spill
186 ; RV64IZFINXZDINX-NEXT: call abort@plt
187 %1 = fcmp oeq double %a, %b
188 br i1 %1, label %if.then, label %if.else
190 tail call void @abort()
196 define void @br_fcmp_ogt(double %a, double %b) nounwind {
197 ; RV32IFD-LABEL: br_fcmp_ogt:
199 ; RV32IFD-NEXT: flt.d a0, fa1, fa0
200 ; RV32IFD-NEXT: bnez a0, .LBB3_2
201 ; RV32IFD-NEXT: # %bb.1: # %if.else
203 ; RV32IFD-NEXT: .LBB3_2: # %if.then
204 ; RV32IFD-NEXT: addi sp, sp, -16
205 ; RV32IFD-NEXT: sw ra, 12(sp) # 4-byte Folded Spill
206 ; RV32IFD-NEXT: call abort@plt
208 ; RV64IFD-LABEL: br_fcmp_ogt:
210 ; RV64IFD-NEXT: flt.d a0, fa1, fa0
211 ; RV64IFD-NEXT: bnez a0, .LBB3_2
212 ; RV64IFD-NEXT: # %bb.1: # %if.else
214 ; RV64IFD-NEXT: .LBB3_2: # %if.then
215 ; RV64IFD-NEXT: addi sp, sp, -16
216 ; RV64IFD-NEXT: sd ra, 8(sp) # 8-byte Folded Spill
217 ; RV64IFD-NEXT: call abort@plt
219 ; RV32IZFINXZDINX-LABEL: br_fcmp_ogt:
220 ; RV32IZFINXZDINX: # %bb.0:
221 ; RV32IZFINXZDINX-NEXT: addi sp, sp, -16
222 ; RV32IZFINXZDINX-NEXT: sw ra, 12(sp) # 4-byte Folded Spill
223 ; RV32IZFINXZDINX-NEXT: sw a0, 0(sp)
224 ; RV32IZFINXZDINX-NEXT: sw a1, 4(sp)
225 ; RV32IZFINXZDINX-NEXT: lw a0, 0(sp)
226 ; RV32IZFINXZDINX-NEXT: lw a1, 4(sp)
227 ; RV32IZFINXZDINX-NEXT: sw a2, 0(sp)
228 ; RV32IZFINXZDINX-NEXT: sw a3, 4(sp)
229 ; RV32IZFINXZDINX-NEXT: lw a2, 0(sp)
230 ; RV32IZFINXZDINX-NEXT: lw a3, 4(sp)
231 ; RV32IZFINXZDINX-NEXT: flt.d a0, a2, a0
232 ; RV32IZFINXZDINX-NEXT: bnez a0, .LBB3_2
233 ; RV32IZFINXZDINX-NEXT: # %bb.1: # %if.else
234 ; RV32IZFINXZDINX-NEXT: lw ra, 12(sp) # 4-byte Folded Reload
235 ; RV32IZFINXZDINX-NEXT: addi sp, sp, 16
236 ; RV32IZFINXZDINX-NEXT: ret
237 ; RV32IZFINXZDINX-NEXT: .LBB3_2: # %if.then
238 ; RV32IZFINXZDINX-NEXT: call abort@plt
240 ; RV64IZFINXZDINX-LABEL: br_fcmp_ogt:
241 ; RV64IZFINXZDINX: # %bb.0:
242 ; RV64IZFINXZDINX-NEXT: flt.d a0, a1, a0
243 ; RV64IZFINXZDINX-NEXT: bnez a0, .LBB3_2
244 ; RV64IZFINXZDINX-NEXT: # %bb.1: # %if.else
245 ; RV64IZFINXZDINX-NEXT: ret
246 ; RV64IZFINXZDINX-NEXT: .LBB3_2: # %if.then
247 ; RV64IZFINXZDINX-NEXT: addi sp, sp, -16
248 ; RV64IZFINXZDINX-NEXT: sd ra, 8(sp) # 8-byte Folded Spill
249 ; RV64IZFINXZDINX-NEXT: call abort@plt
250 %1 = fcmp ogt double %a, %b
251 br i1 %1, label %if.then, label %if.else
255 tail call void @abort()
259 define void @br_fcmp_oge(double %a, double %b) nounwind {
260 ; RV32IFD-LABEL: br_fcmp_oge:
262 ; RV32IFD-NEXT: fle.d a0, fa1, fa0
263 ; RV32IFD-NEXT: bnez a0, .LBB4_2
264 ; RV32IFD-NEXT: # %bb.1: # %if.else
266 ; RV32IFD-NEXT: .LBB4_2: # %if.then
267 ; RV32IFD-NEXT: addi sp, sp, -16
268 ; RV32IFD-NEXT: sw ra, 12(sp) # 4-byte Folded Spill
269 ; RV32IFD-NEXT: call abort@plt
271 ; RV64IFD-LABEL: br_fcmp_oge:
273 ; RV64IFD-NEXT: fle.d a0, fa1, fa0
274 ; RV64IFD-NEXT: bnez a0, .LBB4_2
275 ; RV64IFD-NEXT: # %bb.1: # %if.else
277 ; RV64IFD-NEXT: .LBB4_2: # %if.then
278 ; RV64IFD-NEXT: addi sp, sp, -16
279 ; RV64IFD-NEXT: sd ra, 8(sp) # 8-byte Folded Spill
280 ; RV64IFD-NEXT: call abort@plt
282 ; RV32IZFINXZDINX-LABEL: br_fcmp_oge:
283 ; RV32IZFINXZDINX: # %bb.0:
284 ; RV32IZFINXZDINX-NEXT: addi sp, sp, -16
285 ; RV32IZFINXZDINX-NEXT: sw ra, 12(sp) # 4-byte Folded Spill
286 ; RV32IZFINXZDINX-NEXT: sw a0, 0(sp)
287 ; RV32IZFINXZDINX-NEXT: sw a1, 4(sp)
288 ; RV32IZFINXZDINX-NEXT: lw a0, 0(sp)
289 ; RV32IZFINXZDINX-NEXT: lw a1, 4(sp)
290 ; RV32IZFINXZDINX-NEXT: sw a2, 0(sp)
291 ; RV32IZFINXZDINX-NEXT: sw a3, 4(sp)
292 ; RV32IZFINXZDINX-NEXT: lw a2, 0(sp)
293 ; RV32IZFINXZDINX-NEXT: lw a3, 4(sp)
294 ; RV32IZFINXZDINX-NEXT: fle.d a0, a2, a0
295 ; RV32IZFINXZDINX-NEXT: bnez a0, .LBB4_2
296 ; RV32IZFINXZDINX-NEXT: # %bb.1: # %if.else
297 ; RV32IZFINXZDINX-NEXT: lw ra, 12(sp) # 4-byte Folded Reload
298 ; RV32IZFINXZDINX-NEXT: addi sp, sp, 16
299 ; RV32IZFINXZDINX-NEXT: ret
300 ; RV32IZFINXZDINX-NEXT: .LBB4_2: # %if.then
301 ; RV32IZFINXZDINX-NEXT: call abort@plt
303 ; RV64IZFINXZDINX-LABEL: br_fcmp_oge:
304 ; RV64IZFINXZDINX: # %bb.0:
305 ; RV64IZFINXZDINX-NEXT: fle.d a0, a1, a0
306 ; RV64IZFINXZDINX-NEXT: bnez a0, .LBB4_2
307 ; RV64IZFINXZDINX-NEXT: # %bb.1: # %if.else
308 ; RV64IZFINXZDINX-NEXT: ret
309 ; RV64IZFINXZDINX-NEXT: .LBB4_2: # %if.then
310 ; RV64IZFINXZDINX-NEXT: addi sp, sp, -16
311 ; RV64IZFINXZDINX-NEXT: sd ra, 8(sp) # 8-byte Folded Spill
312 ; RV64IZFINXZDINX-NEXT: call abort@plt
313 %1 = fcmp oge double %a, %b
314 br i1 %1, label %if.then, label %if.else
318 tail call void @abort()
322 define void @br_fcmp_olt(double %a, double %b) nounwind {
323 ; RV32IFD-LABEL: br_fcmp_olt:
325 ; RV32IFD-NEXT: flt.d a0, fa0, fa1
326 ; RV32IFD-NEXT: bnez a0, .LBB5_2
327 ; RV32IFD-NEXT: # %bb.1: # %if.else
329 ; RV32IFD-NEXT: .LBB5_2: # %if.then
330 ; RV32IFD-NEXT: addi sp, sp, -16
331 ; RV32IFD-NEXT: sw ra, 12(sp) # 4-byte Folded Spill
332 ; RV32IFD-NEXT: call abort@plt
334 ; RV64IFD-LABEL: br_fcmp_olt:
336 ; RV64IFD-NEXT: flt.d a0, fa0, fa1
337 ; RV64IFD-NEXT: bnez a0, .LBB5_2
338 ; RV64IFD-NEXT: # %bb.1: # %if.else
340 ; RV64IFD-NEXT: .LBB5_2: # %if.then
341 ; RV64IFD-NEXT: addi sp, sp, -16
342 ; RV64IFD-NEXT: sd ra, 8(sp) # 8-byte Folded Spill
343 ; RV64IFD-NEXT: call abort@plt
345 ; RV32IZFINXZDINX-LABEL: br_fcmp_olt:
346 ; RV32IZFINXZDINX: # %bb.0:
347 ; RV32IZFINXZDINX-NEXT: addi sp, sp, -16
348 ; RV32IZFINXZDINX-NEXT: sw ra, 12(sp) # 4-byte Folded Spill
349 ; RV32IZFINXZDINX-NEXT: sw a2, 0(sp)
350 ; RV32IZFINXZDINX-NEXT: sw a3, 4(sp)
351 ; RV32IZFINXZDINX-NEXT: lw a2, 0(sp)
352 ; RV32IZFINXZDINX-NEXT: lw a3, 4(sp)
353 ; RV32IZFINXZDINX-NEXT: sw a0, 0(sp)
354 ; RV32IZFINXZDINX-NEXT: sw a1, 4(sp)
355 ; RV32IZFINXZDINX-NEXT: lw a0, 0(sp)
356 ; RV32IZFINXZDINX-NEXT: lw a1, 4(sp)
357 ; RV32IZFINXZDINX-NEXT: flt.d a0, a0, a2
358 ; RV32IZFINXZDINX-NEXT: bnez a0, .LBB5_2
359 ; RV32IZFINXZDINX-NEXT: # %bb.1: # %if.else
360 ; RV32IZFINXZDINX-NEXT: lw ra, 12(sp) # 4-byte Folded Reload
361 ; RV32IZFINXZDINX-NEXT: addi sp, sp, 16
362 ; RV32IZFINXZDINX-NEXT: ret
363 ; RV32IZFINXZDINX-NEXT: .LBB5_2: # %if.then
364 ; RV32IZFINXZDINX-NEXT: call abort@plt
366 ; RV64IZFINXZDINX-LABEL: br_fcmp_olt:
367 ; RV64IZFINXZDINX: # %bb.0:
368 ; RV64IZFINXZDINX-NEXT: flt.d a0, a0, a1
369 ; RV64IZFINXZDINX-NEXT: bnez a0, .LBB5_2
370 ; RV64IZFINXZDINX-NEXT: # %bb.1: # %if.else
371 ; RV64IZFINXZDINX-NEXT: ret
372 ; RV64IZFINXZDINX-NEXT: .LBB5_2: # %if.then
373 ; RV64IZFINXZDINX-NEXT: addi sp, sp, -16
374 ; RV64IZFINXZDINX-NEXT: sd ra, 8(sp) # 8-byte Folded Spill
375 ; RV64IZFINXZDINX-NEXT: call abort@plt
376 %1 = fcmp olt double %a, %b
377 br i1 %1, label %if.then, label %if.else
381 tail call void @abort()
385 define void @br_fcmp_ole(double %a, double %b) nounwind {
386 ; RV32IFD-LABEL: br_fcmp_ole:
388 ; RV32IFD-NEXT: fle.d a0, fa0, fa1
389 ; RV32IFD-NEXT: bnez a0, .LBB6_2
390 ; RV32IFD-NEXT: # %bb.1: # %if.else
392 ; RV32IFD-NEXT: .LBB6_2: # %if.then
393 ; RV32IFD-NEXT: addi sp, sp, -16
394 ; RV32IFD-NEXT: sw ra, 12(sp) # 4-byte Folded Spill
395 ; RV32IFD-NEXT: call abort@plt
397 ; RV64IFD-LABEL: br_fcmp_ole:
399 ; RV64IFD-NEXT: fle.d a0, fa0, fa1
400 ; RV64IFD-NEXT: bnez a0, .LBB6_2
401 ; RV64IFD-NEXT: # %bb.1: # %if.else
403 ; RV64IFD-NEXT: .LBB6_2: # %if.then
404 ; RV64IFD-NEXT: addi sp, sp, -16
405 ; RV64IFD-NEXT: sd ra, 8(sp) # 8-byte Folded Spill
406 ; RV64IFD-NEXT: call abort@plt
408 ; RV32IZFINXZDINX-LABEL: br_fcmp_ole:
409 ; RV32IZFINXZDINX: # %bb.0:
410 ; RV32IZFINXZDINX-NEXT: addi sp, sp, -16
411 ; RV32IZFINXZDINX-NEXT: sw ra, 12(sp) # 4-byte Folded Spill
412 ; RV32IZFINXZDINX-NEXT: sw a2, 0(sp)
413 ; RV32IZFINXZDINX-NEXT: sw a3, 4(sp)
414 ; RV32IZFINXZDINX-NEXT: lw a2, 0(sp)
415 ; RV32IZFINXZDINX-NEXT: lw a3, 4(sp)
416 ; RV32IZFINXZDINX-NEXT: sw a0, 0(sp)
417 ; RV32IZFINXZDINX-NEXT: sw a1, 4(sp)
418 ; RV32IZFINXZDINX-NEXT: lw a0, 0(sp)
419 ; RV32IZFINXZDINX-NEXT: lw a1, 4(sp)
420 ; RV32IZFINXZDINX-NEXT: fle.d a0, a0, a2
421 ; RV32IZFINXZDINX-NEXT: bnez a0, .LBB6_2
422 ; RV32IZFINXZDINX-NEXT: # %bb.1: # %if.else
423 ; RV32IZFINXZDINX-NEXT: lw ra, 12(sp) # 4-byte Folded Reload
424 ; RV32IZFINXZDINX-NEXT: addi sp, sp, 16
425 ; RV32IZFINXZDINX-NEXT: ret
426 ; RV32IZFINXZDINX-NEXT: .LBB6_2: # %if.then
427 ; RV32IZFINXZDINX-NEXT: call abort@plt
429 ; RV64IZFINXZDINX-LABEL: br_fcmp_ole:
430 ; RV64IZFINXZDINX: # %bb.0:
431 ; RV64IZFINXZDINX-NEXT: fle.d a0, a0, a1
432 ; RV64IZFINXZDINX-NEXT: bnez a0, .LBB6_2
433 ; RV64IZFINXZDINX-NEXT: # %bb.1: # %if.else
434 ; RV64IZFINXZDINX-NEXT: ret
435 ; RV64IZFINXZDINX-NEXT: .LBB6_2: # %if.then
436 ; RV64IZFINXZDINX-NEXT: addi sp, sp, -16
437 ; RV64IZFINXZDINX-NEXT: sd ra, 8(sp) # 8-byte Folded Spill
438 ; RV64IZFINXZDINX-NEXT: call abort@plt
439 %1 = fcmp ole double %a, %b
440 br i1 %1, label %if.then, label %if.else
444 tail call void @abort()
448 define void @br_fcmp_one(double %a, double %b) nounwind {
449 ; RV32IFD-LABEL: br_fcmp_one:
451 ; RV32IFD-NEXT: flt.d a0, fa0, fa1
452 ; RV32IFD-NEXT: flt.d a1, fa1, fa0
453 ; RV32IFD-NEXT: or a0, a1, a0
454 ; RV32IFD-NEXT: bnez a0, .LBB7_2
455 ; RV32IFD-NEXT: # %bb.1: # %if.else
457 ; RV32IFD-NEXT: .LBB7_2: # %if.then
458 ; RV32IFD-NEXT: addi sp, sp, -16
459 ; RV32IFD-NEXT: sw ra, 12(sp) # 4-byte Folded Spill
460 ; RV32IFD-NEXT: call abort@plt
462 ; RV64IFD-LABEL: br_fcmp_one:
464 ; RV64IFD-NEXT: flt.d a0, fa0, fa1
465 ; RV64IFD-NEXT: flt.d a1, fa1, fa0
466 ; RV64IFD-NEXT: or a0, a1, a0
467 ; RV64IFD-NEXT: bnez a0, .LBB7_2
468 ; RV64IFD-NEXT: # %bb.1: # %if.else
470 ; RV64IFD-NEXT: .LBB7_2: # %if.then
471 ; RV64IFD-NEXT: addi sp, sp, -16
472 ; RV64IFD-NEXT: sd ra, 8(sp) # 8-byte Folded Spill
473 ; RV64IFD-NEXT: call abort@plt
475 ; RV32IZFINXZDINX-LABEL: br_fcmp_one:
476 ; RV32IZFINXZDINX: # %bb.0:
477 ; RV32IZFINXZDINX-NEXT: addi sp, sp, -16
478 ; RV32IZFINXZDINX-NEXT: sw ra, 12(sp) # 4-byte Folded Spill
479 ; RV32IZFINXZDINX-NEXT: sw a2, 0(sp)
480 ; RV32IZFINXZDINX-NEXT: sw a3, 4(sp)
481 ; RV32IZFINXZDINX-NEXT: lw a2, 0(sp)
482 ; RV32IZFINXZDINX-NEXT: lw a3, 4(sp)
483 ; RV32IZFINXZDINX-NEXT: sw a0, 0(sp)
484 ; RV32IZFINXZDINX-NEXT: sw a1, 4(sp)
485 ; RV32IZFINXZDINX-NEXT: lw a0, 0(sp)
486 ; RV32IZFINXZDINX-NEXT: lw a1, 4(sp)
487 ; RV32IZFINXZDINX-NEXT: flt.d a4, a0, a2
488 ; RV32IZFINXZDINX-NEXT: flt.d a0, a2, a0
489 ; RV32IZFINXZDINX-NEXT: or a0, a0, a4
490 ; RV32IZFINXZDINX-NEXT: bnez a0, .LBB7_2
491 ; RV32IZFINXZDINX-NEXT: # %bb.1: # %if.else
492 ; RV32IZFINXZDINX-NEXT: lw ra, 12(sp) # 4-byte Folded Reload
493 ; RV32IZFINXZDINX-NEXT: addi sp, sp, 16
494 ; RV32IZFINXZDINX-NEXT: ret
495 ; RV32IZFINXZDINX-NEXT: .LBB7_2: # %if.then
496 ; RV32IZFINXZDINX-NEXT: call abort@plt
498 ; RV64IZFINXZDINX-LABEL: br_fcmp_one:
499 ; RV64IZFINXZDINX: # %bb.0:
500 ; RV64IZFINXZDINX-NEXT: flt.d a2, a0, a1
501 ; RV64IZFINXZDINX-NEXT: flt.d a0, a1, a0
502 ; RV64IZFINXZDINX-NEXT: or a0, a0, a2
503 ; RV64IZFINXZDINX-NEXT: bnez a0, .LBB7_2
504 ; RV64IZFINXZDINX-NEXT: # %bb.1: # %if.else
505 ; RV64IZFINXZDINX-NEXT: ret
506 ; RV64IZFINXZDINX-NEXT: .LBB7_2: # %if.then
507 ; RV64IZFINXZDINX-NEXT: addi sp, sp, -16
508 ; RV64IZFINXZDINX-NEXT: sd ra, 8(sp) # 8-byte Folded Spill
509 ; RV64IZFINXZDINX-NEXT: call abort@plt
510 %1 = fcmp one double %a, %b
511 br i1 %1, label %if.then, label %if.else
515 tail call void @abort()
519 define void @br_fcmp_ord(double %a, double %b) nounwind {
520 ; RV32IFD-LABEL: br_fcmp_ord:
522 ; RV32IFD-NEXT: feq.d a0, fa1, fa1
523 ; RV32IFD-NEXT: feq.d a1, fa0, fa0
524 ; RV32IFD-NEXT: and a0, a1, a0
525 ; RV32IFD-NEXT: bnez a0, .LBB8_2
526 ; RV32IFD-NEXT: # %bb.1: # %if.else
528 ; RV32IFD-NEXT: .LBB8_2: # %if.then
529 ; RV32IFD-NEXT: addi sp, sp, -16
530 ; RV32IFD-NEXT: sw ra, 12(sp) # 4-byte Folded Spill
531 ; RV32IFD-NEXT: call abort@plt
533 ; RV64IFD-LABEL: br_fcmp_ord:
535 ; RV64IFD-NEXT: feq.d a0, fa1, fa1
536 ; RV64IFD-NEXT: feq.d a1, fa0, fa0
537 ; RV64IFD-NEXT: and a0, a1, a0
538 ; RV64IFD-NEXT: bnez a0, .LBB8_2
539 ; RV64IFD-NEXT: # %bb.1: # %if.else
541 ; RV64IFD-NEXT: .LBB8_2: # %if.then
542 ; RV64IFD-NEXT: addi sp, sp, -16
543 ; RV64IFD-NEXT: sd ra, 8(sp) # 8-byte Folded Spill
544 ; RV64IFD-NEXT: call abort@plt
546 ; RV32IZFINXZDINX-LABEL: br_fcmp_ord:
547 ; RV32IZFINXZDINX: # %bb.0:
548 ; RV32IZFINXZDINX-NEXT: addi sp, sp, -16
549 ; RV32IZFINXZDINX-NEXT: sw ra, 12(sp) # 4-byte Folded Spill
550 ; RV32IZFINXZDINX-NEXT: sw a0, 0(sp)
551 ; RV32IZFINXZDINX-NEXT: sw a1, 4(sp)
552 ; RV32IZFINXZDINX-NEXT: lw a0, 0(sp)
553 ; RV32IZFINXZDINX-NEXT: lw a1, 4(sp)
554 ; RV32IZFINXZDINX-NEXT: sw a2, 0(sp)
555 ; RV32IZFINXZDINX-NEXT: sw a3, 4(sp)
556 ; RV32IZFINXZDINX-NEXT: lw a2, 0(sp)
557 ; RV32IZFINXZDINX-NEXT: lw a3, 4(sp)
558 ; RV32IZFINXZDINX-NEXT: feq.d a2, a2, a2
559 ; RV32IZFINXZDINX-NEXT: feq.d a0, a0, a0
560 ; RV32IZFINXZDINX-NEXT: and a0, a0, a2
561 ; RV32IZFINXZDINX-NEXT: bnez a0, .LBB8_2
562 ; RV32IZFINXZDINX-NEXT: # %bb.1: # %if.else
563 ; RV32IZFINXZDINX-NEXT: lw ra, 12(sp) # 4-byte Folded Reload
564 ; RV32IZFINXZDINX-NEXT: addi sp, sp, 16
565 ; RV32IZFINXZDINX-NEXT: ret
566 ; RV32IZFINXZDINX-NEXT: .LBB8_2: # %if.then
567 ; RV32IZFINXZDINX-NEXT: call abort@plt
569 ; RV64IZFINXZDINX-LABEL: br_fcmp_ord:
570 ; RV64IZFINXZDINX: # %bb.0:
571 ; RV64IZFINXZDINX-NEXT: feq.d a1, a1, a1
572 ; RV64IZFINXZDINX-NEXT: feq.d a0, a0, a0
573 ; RV64IZFINXZDINX-NEXT: and a0, a0, a1
574 ; RV64IZFINXZDINX-NEXT: bnez a0, .LBB8_2
575 ; RV64IZFINXZDINX-NEXT: # %bb.1: # %if.else
576 ; RV64IZFINXZDINX-NEXT: ret
577 ; RV64IZFINXZDINX-NEXT: .LBB8_2: # %if.then
578 ; RV64IZFINXZDINX-NEXT: addi sp, sp, -16
579 ; RV64IZFINXZDINX-NEXT: sd ra, 8(sp) # 8-byte Folded Spill
580 ; RV64IZFINXZDINX-NEXT: call abort@plt
581 %1 = fcmp ord double %a, %b
582 br i1 %1, label %if.then, label %if.else
586 tail call void @abort()
590 define void @br_fcmp_ueq(double %a, double %b) nounwind {
591 ; RV32IFD-LABEL: br_fcmp_ueq:
593 ; RV32IFD-NEXT: flt.d a0, fa0, fa1
594 ; RV32IFD-NEXT: flt.d a1, fa1, fa0
595 ; RV32IFD-NEXT: or a0, a1, a0
596 ; RV32IFD-NEXT: beqz a0, .LBB9_2
597 ; RV32IFD-NEXT: # %bb.1: # %if.else
599 ; RV32IFD-NEXT: .LBB9_2: # %if.then
600 ; RV32IFD-NEXT: addi sp, sp, -16
601 ; RV32IFD-NEXT: sw ra, 12(sp) # 4-byte Folded Spill
602 ; RV32IFD-NEXT: call abort@plt
604 ; RV64IFD-LABEL: br_fcmp_ueq:
606 ; RV64IFD-NEXT: flt.d a0, fa0, fa1
607 ; RV64IFD-NEXT: flt.d a1, fa1, fa0
608 ; RV64IFD-NEXT: or a0, a1, a0
609 ; RV64IFD-NEXT: beqz a0, .LBB9_2
610 ; RV64IFD-NEXT: # %bb.1: # %if.else
612 ; RV64IFD-NEXT: .LBB9_2: # %if.then
613 ; RV64IFD-NEXT: addi sp, sp, -16
614 ; RV64IFD-NEXT: sd ra, 8(sp) # 8-byte Folded Spill
615 ; RV64IFD-NEXT: call abort@plt
617 ; RV32IZFINXZDINX-LABEL: br_fcmp_ueq:
618 ; RV32IZFINXZDINX: # %bb.0:
619 ; RV32IZFINXZDINX-NEXT: addi sp, sp, -16
620 ; RV32IZFINXZDINX-NEXT: sw ra, 12(sp) # 4-byte Folded Spill
621 ; RV32IZFINXZDINX-NEXT: sw a2, 0(sp)
622 ; RV32IZFINXZDINX-NEXT: sw a3, 4(sp)
623 ; RV32IZFINXZDINX-NEXT: lw a2, 0(sp)
624 ; RV32IZFINXZDINX-NEXT: lw a3, 4(sp)
625 ; RV32IZFINXZDINX-NEXT: sw a0, 0(sp)
626 ; RV32IZFINXZDINX-NEXT: sw a1, 4(sp)
627 ; RV32IZFINXZDINX-NEXT: lw a0, 0(sp)
628 ; RV32IZFINXZDINX-NEXT: lw a1, 4(sp)
629 ; RV32IZFINXZDINX-NEXT: flt.d a4, a0, a2
630 ; RV32IZFINXZDINX-NEXT: flt.d a0, a2, a0
631 ; RV32IZFINXZDINX-NEXT: or a0, a0, a4
632 ; RV32IZFINXZDINX-NEXT: beqz a0, .LBB9_2
633 ; RV32IZFINXZDINX-NEXT: # %bb.1: # %if.else
634 ; RV32IZFINXZDINX-NEXT: lw ra, 12(sp) # 4-byte Folded Reload
635 ; RV32IZFINXZDINX-NEXT: addi sp, sp, 16
636 ; RV32IZFINXZDINX-NEXT: ret
637 ; RV32IZFINXZDINX-NEXT: .LBB9_2: # %if.then
638 ; RV32IZFINXZDINX-NEXT: call abort@plt
640 ; RV64IZFINXZDINX-LABEL: br_fcmp_ueq:
641 ; RV64IZFINXZDINX: # %bb.0:
642 ; RV64IZFINXZDINX-NEXT: flt.d a2, a0, a1
643 ; RV64IZFINXZDINX-NEXT: flt.d a0, a1, a0
644 ; RV64IZFINXZDINX-NEXT: or a0, a0, a2
645 ; RV64IZFINXZDINX-NEXT: beqz a0, .LBB9_2
646 ; RV64IZFINXZDINX-NEXT: # %bb.1: # %if.else
647 ; RV64IZFINXZDINX-NEXT: ret
648 ; RV64IZFINXZDINX-NEXT: .LBB9_2: # %if.then
649 ; RV64IZFINXZDINX-NEXT: addi sp, sp, -16
650 ; RV64IZFINXZDINX-NEXT: sd ra, 8(sp) # 8-byte Folded Spill
651 ; RV64IZFINXZDINX-NEXT: call abort@plt
652 %1 = fcmp ueq double %a, %b
653 br i1 %1, label %if.then, label %if.else
657 tail call void @abort()
661 define void @br_fcmp_ugt(double %a, double %b) nounwind {
662 ; RV32IFD-LABEL: br_fcmp_ugt:
664 ; RV32IFD-NEXT: fle.d a0, fa0, fa1
665 ; RV32IFD-NEXT: beqz a0, .LBB10_2
666 ; RV32IFD-NEXT: # %bb.1: # %if.else
668 ; RV32IFD-NEXT: .LBB10_2: # %if.then
669 ; RV32IFD-NEXT: addi sp, sp, -16
670 ; RV32IFD-NEXT: sw ra, 12(sp) # 4-byte Folded Spill
671 ; RV32IFD-NEXT: call abort@plt
673 ; RV64IFD-LABEL: br_fcmp_ugt:
675 ; RV64IFD-NEXT: fle.d a0, fa0, fa1
676 ; RV64IFD-NEXT: beqz a0, .LBB10_2
677 ; RV64IFD-NEXT: # %bb.1: # %if.else
679 ; RV64IFD-NEXT: .LBB10_2: # %if.then
680 ; RV64IFD-NEXT: addi sp, sp, -16
681 ; RV64IFD-NEXT: sd ra, 8(sp) # 8-byte Folded Spill
682 ; RV64IFD-NEXT: call abort@plt
684 ; RV32IZFINXZDINX-LABEL: br_fcmp_ugt:
685 ; RV32IZFINXZDINX: # %bb.0:
686 ; RV32IZFINXZDINX-NEXT: addi sp, sp, -16
687 ; RV32IZFINXZDINX-NEXT: sw ra, 12(sp) # 4-byte Folded Spill
688 ; RV32IZFINXZDINX-NEXT: sw a2, 0(sp)
689 ; RV32IZFINXZDINX-NEXT: sw a3, 4(sp)
690 ; RV32IZFINXZDINX-NEXT: lw a2, 0(sp)
691 ; RV32IZFINXZDINX-NEXT: lw a3, 4(sp)
692 ; RV32IZFINXZDINX-NEXT: sw a0, 0(sp)
693 ; RV32IZFINXZDINX-NEXT: sw a1, 4(sp)
694 ; RV32IZFINXZDINX-NEXT: lw a0, 0(sp)
695 ; RV32IZFINXZDINX-NEXT: lw a1, 4(sp)
696 ; RV32IZFINXZDINX-NEXT: fle.d a0, a0, a2
697 ; RV32IZFINXZDINX-NEXT: beqz a0, .LBB10_2
698 ; RV32IZFINXZDINX-NEXT: # %bb.1: # %if.else
699 ; RV32IZFINXZDINX-NEXT: lw ra, 12(sp) # 4-byte Folded Reload
700 ; RV32IZFINXZDINX-NEXT: addi sp, sp, 16
701 ; RV32IZFINXZDINX-NEXT: ret
702 ; RV32IZFINXZDINX-NEXT: .LBB10_2: # %if.then
703 ; RV32IZFINXZDINX-NEXT: call abort@plt
705 ; RV64IZFINXZDINX-LABEL: br_fcmp_ugt:
706 ; RV64IZFINXZDINX: # %bb.0:
707 ; RV64IZFINXZDINX-NEXT: fle.d a0, a0, a1
708 ; RV64IZFINXZDINX-NEXT: beqz a0, .LBB10_2
709 ; RV64IZFINXZDINX-NEXT: # %bb.1: # %if.else
710 ; RV64IZFINXZDINX-NEXT: ret
711 ; RV64IZFINXZDINX-NEXT: .LBB10_2: # %if.then
712 ; RV64IZFINXZDINX-NEXT: addi sp, sp, -16
713 ; RV64IZFINXZDINX-NEXT: sd ra, 8(sp) # 8-byte Folded Spill
714 ; RV64IZFINXZDINX-NEXT: call abort@plt
715 %1 = fcmp ugt double %a, %b
716 br i1 %1, label %if.then, label %if.else
720 tail call void @abort()
724 define void @br_fcmp_uge(double %a, double %b) nounwind {
725 ; RV32IFD-LABEL: br_fcmp_uge:
727 ; RV32IFD-NEXT: flt.d a0, fa0, fa1
728 ; RV32IFD-NEXT: beqz a0, .LBB11_2
729 ; RV32IFD-NEXT: # %bb.1: # %if.else
731 ; RV32IFD-NEXT: .LBB11_2: # %if.then
732 ; RV32IFD-NEXT: addi sp, sp, -16
733 ; RV32IFD-NEXT: sw ra, 12(sp) # 4-byte Folded Spill
734 ; RV32IFD-NEXT: call abort@plt
736 ; RV64IFD-LABEL: br_fcmp_uge:
738 ; RV64IFD-NEXT: flt.d a0, fa0, fa1
739 ; RV64IFD-NEXT: beqz a0, .LBB11_2
740 ; RV64IFD-NEXT: # %bb.1: # %if.else
742 ; RV64IFD-NEXT: .LBB11_2: # %if.then
743 ; RV64IFD-NEXT: addi sp, sp, -16
744 ; RV64IFD-NEXT: sd ra, 8(sp) # 8-byte Folded Spill
745 ; RV64IFD-NEXT: call abort@plt
747 ; RV32IZFINXZDINX-LABEL: br_fcmp_uge:
748 ; RV32IZFINXZDINX: # %bb.0:
749 ; RV32IZFINXZDINX-NEXT: addi sp, sp, -16
750 ; RV32IZFINXZDINX-NEXT: sw ra, 12(sp) # 4-byte Folded Spill
751 ; RV32IZFINXZDINX-NEXT: sw a2, 0(sp)
752 ; RV32IZFINXZDINX-NEXT: sw a3, 4(sp)
753 ; RV32IZFINXZDINX-NEXT: lw a2, 0(sp)
754 ; RV32IZFINXZDINX-NEXT: lw a3, 4(sp)
755 ; RV32IZFINXZDINX-NEXT: sw a0, 0(sp)
756 ; RV32IZFINXZDINX-NEXT: sw a1, 4(sp)
757 ; RV32IZFINXZDINX-NEXT: lw a0, 0(sp)
758 ; RV32IZFINXZDINX-NEXT: lw a1, 4(sp)
759 ; RV32IZFINXZDINX-NEXT: flt.d a0, a0, a2
760 ; RV32IZFINXZDINX-NEXT: beqz a0, .LBB11_2
761 ; RV32IZFINXZDINX-NEXT: # %bb.1: # %if.else
762 ; RV32IZFINXZDINX-NEXT: lw ra, 12(sp) # 4-byte Folded Reload
763 ; RV32IZFINXZDINX-NEXT: addi sp, sp, 16
764 ; RV32IZFINXZDINX-NEXT: ret
765 ; RV32IZFINXZDINX-NEXT: .LBB11_2: # %if.then
766 ; RV32IZFINXZDINX-NEXT: call abort@plt
768 ; RV64IZFINXZDINX-LABEL: br_fcmp_uge:
769 ; RV64IZFINXZDINX: # %bb.0:
770 ; RV64IZFINXZDINX-NEXT: flt.d a0, a0, a1
771 ; RV64IZFINXZDINX-NEXT: beqz a0, .LBB11_2
772 ; RV64IZFINXZDINX-NEXT: # %bb.1: # %if.else
773 ; RV64IZFINXZDINX-NEXT: ret
774 ; RV64IZFINXZDINX-NEXT: .LBB11_2: # %if.then
775 ; RV64IZFINXZDINX-NEXT: addi sp, sp, -16
776 ; RV64IZFINXZDINX-NEXT: sd ra, 8(sp) # 8-byte Folded Spill
777 ; RV64IZFINXZDINX-NEXT: call abort@plt
778 %1 = fcmp uge double %a, %b
779 br i1 %1, label %if.then, label %if.else
783 tail call void @abort()
787 define void @br_fcmp_ult(double %a, double %b) nounwind {
788 ; RV32IFD-LABEL: br_fcmp_ult:
790 ; RV32IFD-NEXT: fle.d a0, fa1, fa0
791 ; RV32IFD-NEXT: beqz a0, .LBB12_2
792 ; RV32IFD-NEXT: # %bb.1: # %if.else
794 ; RV32IFD-NEXT: .LBB12_2: # %if.then
795 ; RV32IFD-NEXT: addi sp, sp, -16
796 ; RV32IFD-NEXT: sw ra, 12(sp) # 4-byte Folded Spill
797 ; RV32IFD-NEXT: call abort@plt
799 ; RV64IFD-LABEL: br_fcmp_ult:
801 ; RV64IFD-NEXT: fle.d a0, fa1, fa0
802 ; RV64IFD-NEXT: beqz a0, .LBB12_2
803 ; RV64IFD-NEXT: # %bb.1: # %if.else
805 ; RV64IFD-NEXT: .LBB12_2: # %if.then
806 ; RV64IFD-NEXT: addi sp, sp, -16
807 ; RV64IFD-NEXT: sd ra, 8(sp) # 8-byte Folded Spill
808 ; RV64IFD-NEXT: call abort@plt
810 ; RV32IZFINXZDINX-LABEL: br_fcmp_ult:
811 ; RV32IZFINXZDINX: # %bb.0:
812 ; RV32IZFINXZDINX-NEXT: addi sp, sp, -16
813 ; RV32IZFINXZDINX-NEXT: sw ra, 12(sp) # 4-byte Folded Spill
814 ; RV32IZFINXZDINX-NEXT: sw a0, 0(sp)
815 ; RV32IZFINXZDINX-NEXT: sw a1, 4(sp)
816 ; RV32IZFINXZDINX-NEXT: lw a0, 0(sp)
817 ; RV32IZFINXZDINX-NEXT: lw a1, 4(sp)
818 ; RV32IZFINXZDINX-NEXT: sw a2, 0(sp)
819 ; RV32IZFINXZDINX-NEXT: sw a3, 4(sp)
820 ; RV32IZFINXZDINX-NEXT: lw a2, 0(sp)
821 ; RV32IZFINXZDINX-NEXT: lw a3, 4(sp)
822 ; RV32IZFINXZDINX-NEXT: fle.d a0, a2, a0
823 ; RV32IZFINXZDINX-NEXT: beqz a0, .LBB12_2
824 ; RV32IZFINXZDINX-NEXT: # %bb.1: # %if.else
825 ; RV32IZFINXZDINX-NEXT: lw ra, 12(sp) # 4-byte Folded Reload
826 ; RV32IZFINXZDINX-NEXT: addi sp, sp, 16
827 ; RV32IZFINXZDINX-NEXT: ret
828 ; RV32IZFINXZDINX-NEXT: .LBB12_2: # %if.then
829 ; RV32IZFINXZDINX-NEXT: call abort@plt
831 ; RV64IZFINXZDINX-LABEL: br_fcmp_ult:
832 ; RV64IZFINXZDINX: # %bb.0:
833 ; RV64IZFINXZDINX-NEXT: fle.d a0, a1, a0
834 ; RV64IZFINXZDINX-NEXT: beqz a0, .LBB12_2
835 ; RV64IZFINXZDINX-NEXT: # %bb.1: # %if.else
836 ; RV64IZFINXZDINX-NEXT: ret
837 ; RV64IZFINXZDINX-NEXT: .LBB12_2: # %if.then
838 ; RV64IZFINXZDINX-NEXT: addi sp, sp, -16
839 ; RV64IZFINXZDINX-NEXT: sd ra, 8(sp) # 8-byte Folded Spill
840 ; RV64IZFINXZDINX-NEXT: call abort@plt
841 %1 = fcmp ult double %a, %b
842 br i1 %1, label %if.then, label %if.else
846 tail call void @abort()
850 define void @br_fcmp_ule(double %a, double %b) nounwind {
851 ; RV32IFD-LABEL: br_fcmp_ule:
853 ; RV32IFD-NEXT: flt.d a0, fa1, fa0
854 ; RV32IFD-NEXT: beqz a0, .LBB13_2
855 ; RV32IFD-NEXT: # %bb.1: # %if.else
857 ; RV32IFD-NEXT: .LBB13_2: # %if.then
858 ; RV32IFD-NEXT: addi sp, sp, -16
859 ; RV32IFD-NEXT: sw ra, 12(sp) # 4-byte Folded Spill
860 ; RV32IFD-NEXT: call abort@plt
862 ; RV64IFD-LABEL: br_fcmp_ule:
864 ; RV64IFD-NEXT: flt.d a0, fa1, fa0
865 ; RV64IFD-NEXT: beqz a0, .LBB13_2
866 ; RV64IFD-NEXT: # %bb.1: # %if.else
868 ; RV64IFD-NEXT: .LBB13_2: # %if.then
869 ; RV64IFD-NEXT: addi sp, sp, -16
870 ; RV64IFD-NEXT: sd ra, 8(sp) # 8-byte Folded Spill
871 ; RV64IFD-NEXT: call abort@plt
873 ; RV32IZFINXZDINX-LABEL: br_fcmp_ule:
874 ; RV32IZFINXZDINX: # %bb.0:
875 ; RV32IZFINXZDINX-NEXT: addi sp, sp, -16
876 ; RV32IZFINXZDINX-NEXT: sw ra, 12(sp) # 4-byte Folded Spill
877 ; RV32IZFINXZDINX-NEXT: sw a0, 0(sp)
878 ; RV32IZFINXZDINX-NEXT: sw a1, 4(sp)
879 ; RV32IZFINXZDINX-NEXT: lw a0, 0(sp)
880 ; RV32IZFINXZDINX-NEXT: lw a1, 4(sp)
881 ; RV32IZFINXZDINX-NEXT: sw a2, 0(sp)
882 ; RV32IZFINXZDINX-NEXT: sw a3, 4(sp)
883 ; RV32IZFINXZDINX-NEXT: lw a2, 0(sp)
884 ; RV32IZFINXZDINX-NEXT: lw a3, 4(sp)
885 ; RV32IZFINXZDINX-NEXT: flt.d a0, a2, a0
886 ; RV32IZFINXZDINX-NEXT: beqz a0, .LBB13_2
887 ; RV32IZFINXZDINX-NEXT: # %bb.1: # %if.else
888 ; RV32IZFINXZDINX-NEXT: lw ra, 12(sp) # 4-byte Folded Reload
889 ; RV32IZFINXZDINX-NEXT: addi sp, sp, 16
890 ; RV32IZFINXZDINX-NEXT: ret
891 ; RV32IZFINXZDINX-NEXT: .LBB13_2: # %if.then
892 ; RV32IZFINXZDINX-NEXT: call abort@plt
894 ; RV64IZFINXZDINX-LABEL: br_fcmp_ule:
895 ; RV64IZFINXZDINX: # %bb.0:
896 ; RV64IZFINXZDINX-NEXT: flt.d a0, a1, a0
897 ; RV64IZFINXZDINX-NEXT: beqz a0, .LBB13_2
898 ; RV64IZFINXZDINX-NEXT: # %bb.1: # %if.else
899 ; RV64IZFINXZDINX-NEXT: ret
900 ; RV64IZFINXZDINX-NEXT: .LBB13_2: # %if.then
901 ; RV64IZFINXZDINX-NEXT: addi sp, sp, -16
902 ; RV64IZFINXZDINX-NEXT: sd ra, 8(sp) # 8-byte Folded Spill
903 ; RV64IZFINXZDINX-NEXT: call abort@plt
904 %1 = fcmp ule double %a, %b
905 br i1 %1, label %if.then, label %if.else
909 tail call void @abort()
913 define void @br_fcmp_une(double %a, double %b) nounwind {
914 ; RV32IFD-LABEL: br_fcmp_une:
916 ; RV32IFD-NEXT: feq.d a0, fa0, fa1
917 ; RV32IFD-NEXT: beqz a0, .LBB14_2
918 ; RV32IFD-NEXT: # %bb.1: # %if.else
920 ; RV32IFD-NEXT: .LBB14_2: # %if.then
921 ; RV32IFD-NEXT: addi sp, sp, -16
922 ; RV32IFD-NEXT: sw ra, 12(sp) # 4-byte Folded Spill
923 ; RV32IFD-NEXT: call abort@plt
925 ; RV64IFD-LABEL: br_fcmp_une:
927 ; RV64IFD-NEXT: feq.d a0, fa0, fa1
928 ; RV64IFD-NEXT: beqz a0, .LBB14_2
929 ; RV64IFD-NEXT: # %bb.1: # %if.else
931 ; RV64IFD-NEXT: .LBB14_2: # %if.then
932 ; RV64IFD-NEXT: addi sp, sp, -16
933 ; RV64IFD-NEXT: sd ra, 8(sp) # 8-byte Folded Spill
934 ; RV64IFD-NEXT: call abort@plt
936 ; RV32IZFINXZDINX-LABEL: br_fcmp_une:
937 ; RV32IZFINXZDINX: # %bb.0:
938 ; RV32IZFINXZDINX-NEXT: addi sp, sp, -16
939 ; RV32IZFINXZDINX-NEXT: sw ra, 12(sp) # 4-byte Folded Spill
940 ; RV32IZFINXZDINX-NEXT: sw a2, 0(sp)
941 ; RV32IZFINXZDINX-NEXT: sw a3, 4(sp)
942 ; RV32IZFINXZDINX-NEXT: lw a2, 0(sp)
943 ; RV32IZFINXZDINX-NEXT: lw a3, 4(sp)
944 ; RV32IZFINXZDINX-NEXT: sw a0, 0(sp)
945 ; RV32IZFINXZDINX-NEXT: sw a1, 4(sp)
946 ; RV32IZFINXZDINX-NEXT: lw a0, 0(sp)
947 ; RV32IZFINXZDINX-NEXT: lw a1, 4(sp)
948 ; RV32IZFINXZDINX-NEXT: feq.d a0, a0, a2
949 ; RV32IZFINXZDINX-NEXT: beqz a0, .LBB14_2
950 ; RV32IZFINXZDINX-NEXT: # %bb.1: # %if.else
951 ; RV32IZFINXZDINX-NEXT: lw ra, 12(sp) # 4-byte Folded Reload
952 ; RV32IZFINXZDINX-NEXT: addi sp, sp, 16
953 ; RV32IZFINXZDINX-NEXT: ret
954 ; RV32IZFINXZDINX-NEXT: .LBB14_2: # %if.then
955 ; RV32IZFINXZDINX-NEXT: call abort@plt
957 ; RV64IZFINXZDINX-LABEL: br_fcmp_une:
958 ; RV64IZFINXZDINX: # %bb.0:
959 ; RV64IZFINXZDINX-NEXT: feq.d a0, a0, a1
960 ; RV64IZFINXZDINX-NEXT: beqz a0, .LBB14_2
961 ; RV64IZFINXZDINX-NEXT: # %bb.1: # %if.else
962 ; RV64IZFINXZDINX-NEXT: ret
963 ; RV64IZFINXZDINX-NEXT: .LBB14_2: # %if.then
964 ; RV64IZFINXZDINX-NEXT: addi sp, sp, -16
965 ; RV64IZFINXZDINX-NEXT: sd ra, 8(sp) # 8-byte Folded Spill
966 ; RV64IZFINXZDINX-NEXT: call abort@plt
967 %1 = fcmp une double %a, %b
968 br i1 %1, label %if.then, label %if.else
972 tail call void @abort()
976 define void @br_fcmp_uno(double %a, double %b) nounwind {
977 ; RV32IFD-LABEL: br_fcmp_uno:
979 ; RV32IFD-NEXT: feq.d a0, fa1, fa1
980 ; RV32IFD-NEXT: feq.d a1, fa0, fa0
981 ; RV32IFD-NEXT: and a0, a1, a0
982 ; RV32IFD-NEXT: beqz a0, .LBB15_2
983 ; RV32IFD-NEXT: # %bb.1: # %if.else
985 ; RV32IFD-NEXT: .LBB15_2: # %if.then
986 ; RV32IFD-NEXT: addi sp, sp, -16
987 ; RV32IFD-NEXT: sw ra, 12(sp) # 4-byte Folded Spill
988 ; RV32IFD-NEXT: call abort@plt
990 ; RV64IFD-LABEL: br_fcmp_uno:
992 ; RV64IFD-NEXT: feq.d a0, fa1, fa1
993 ; RV64IFD-NEXT: feq.d a1, fa0, fa0
994 ; RV64IFD-NEXT: and a0, a1, a0
995 ; RV64IFD-NEXT: beqz a0, .LBB15_2
996 ; RV64IFD-NEXT: # %bb.1: # %if.else
998 ; RV64IFD-NEXT: .LBB15_2: # %if.then
999 ; RV64IFD-NEXT: addi sp, sp, -16
1000 ; RV64IFD-NEXT: sd ra, 8(sp) # 8-byte Folded Spill
1001 ; RV64IFD-NEXT: call abort@plt
1003 ; RV32IZFINXZDINX-LABEL: br_fcmp_uno:
1004 ; RV32IZFINXZDINX: # %bb.0:
1005 ; RV32IZFINXZDINX-NEXT: addi sp, sp, -16
1006 ; RV32IZFINXZDINX-NEXT: sw ra, 12(sp) # 4-byte Folded Spill
1007 ; RV32IZFINXZDINX-NEXT: sw a0, 0(sp)
1008 ; RV32IZFINXZDINX-NEXT: sw a1, 4(sp)
1009 ; RV32IZFINXZDINX-NEXT: lw a0, 0(sp)
1010 ; RV32IZFINXZDINX-NEXT: lw a1, 4(sp)
1011 ; RV32IZFINXZDINX-NEXT: sw a2, 0(sp)
1012 ; RV32IZFINXZDINX-NEXT: sw a3, 4(sp)
1013 ; RV32IZFINXZDINX-NEXT: lw a2, 0(sp)
1014 ; RV32IZFINXZDINX-NEXT: lw a3, 4(sp)
1015 ; RV32IZFINXZDINX-NEXT: feq.d a2, a2, a2
1016 ; RV32IZFINXZDINX-NEXT: feq.d a0, a0, a0
1017 ; RV32IZFINXZDINX-NEXT: and a0, a0, a2
1018 ; RV32IZFINXZDINX-NEXT: beqz a0, .LBB15_2
1019 ; RV32IZFINXZDINX-NEXT: # %bb.1: # %if.else
1020 ; RV32IZFINXZDINX-NEXT: lw ra, 12(sp) # 4-byte Folded Reload
1021 ; RV32IZFINXZDINX-NEXT: addi sp, sp, 16
1022 ; RV32IZFINXZDINX-NEXT: ret
1023 ; RV32IZFINXZDINX-NEXT: .LBB15_2: # %if.then
1024 ; RV32IZFINXZDINX-NEXT: call abort@plt
1026 ; RV64IZFINXZDINX-LABEL: br_fcmp_uno:
1027 ; RV64IZFINXZDINX: # %bb.0:
1028 ; RV64IZFINXZDINX-NEXT: feq.d a1, a1, a1
1029 ; RV64IZFINXZDINX-NEXT: feq.d a0, a0, a0
1030 ; RV64IZFINXZDINX-NEXT: and a0, a0, a1
1031 ; RV64IZFINXZDINX-NEXT: beqz a0, .LBB15_2
1032 ; RV64IZFINXZDINX-NEXT: # %bb.1: # %if.else
1033 ; RV64IZFINXZDINX-NEXT: ret
1034 ; RV64IZFINXZDINX-NEXT: .LBB15_2: # %if.then
1035 ; RV64IZFINXZDINX-NEXT: addi sp, sp, -16
1036 ; RV64IZFINXZDINX-NEXT: sd ra, 8(sp) # 8-byte Folded Spill
1037 ; RV64IZFINXZDINX-NEXT: call abort@plt
1038 %1 = fcmp uno double %a, %b
1039 br i1 %1, label %if.then, label %if.else
1043 tail call void @abort()
1047 define void @br_fcmp_true(double %a, double %b) nounwind {
1048 ; RV32IFD-LABEL: br_fcmp_true:
1050 ; RV32IFD-NEXT: li a0, 1
1051 ; RV32IFD-NEXT: bnez a0, .LBB16_2
1052 ; RV32IFD-NEXT: # %bb.1: # %if.else
1054 ; RV32IFD-NEXT: .LBB16_2: # %if.then
1055 ; RV32IFD-NEXT: addi sp, sp, -16
1056 ; RV32IFD-NEXT: sw ra, 12(sp) # 4-byte Folded Spill
1057 ; RV32IFD-NEXT: call abort@plt
1059 ; RV64IFD-LABEL: br_fcmp_true:
1061 ; RV64IFD-NEXT: li a0, 1
1062 ; RV64IFD-NEXT: bnez a0, .LBB16_2
1063 ; RV64IFD-NEXT: # %bb.1: # %if.else
1065 ; RV64IFD-NEXT: .LBB16_2: # %if.then
1066 ; RV64IFD-NEXT: addi sp, sp, -16
1067 ; RV64IFD-NEXT: sd ra, 8(sp) # 8-byte Folded Spill
1068 ; RV64IFD-NEXT: call abort@plt
1070 ; RV32IZFINXZDINX-LABEL: br_fcmp_true:
1071 ; RV32IZFINXZDINX: # %bb.0:
1072 ; RV32IZFINXZDINX-NEXT: li a0, 1
1073 ; RV32IZFINXZDINX-NEXT: bnez a0, .LBB16_2
1074 ; RV32IZFINXZDINX-NEXT: # %bb.1: # %if.else
1075 ; RV32IZFINXZDINX-NEXT: ret
1076 ; RV32IZFINXZDINX-NEXT: .LBB16_2: # %if.then
1077 ; RV32IZFINXZDINX-NEXT: addi sp, sp, -16
1078 ; RV32IZFINXZDINX-NEXT: sw ra, 12(sp) # 4-byte Folded Spill
1079 ; RV32IZFINXZDINX-NEXT: call abort@plt
1081 ; RV64IZFINXZDINX-LABEL: br_fcmp_true:
1082 ; RV64IZFINXZDINX: # %bb.0:
1083 ; RV64IZFINXZDINX-NEXT: li a0, 1
1084 ; RV64IZFINXZDINX-NEXT: bnez a0, .LBB16_2
1085 ; RV64IZFINXZDINX-NEXT: # %bb.1: # %if.else
1086 ; RV64IZFINXZDINX-NEXT: ret
1087 ; RV64IZFINXZDINX-NEXT: .LBB16_2: # %if.then
1088 ; RV64IZFINXZDINX-NEXT: addi sp, sp, -16
1089 ; RV64IZFINXZDINX-NEXT: sd ra, 8(sp) # 8-byte Folded Spill
1090 ; RV64IZFINXZDINX-NEXT: call abort@plt
1091 %1 = fcmp true double %a, %b
1092 br i1 %1, label %if.then, label %if.else
1096 tail call void @abort()