1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=riscv64 -verify-machineinstrs < %s \
3 ; RUN: | FileCheck -check-prefix=RV64I %s
5 ; The test cases check that the single float arguments won't be extended
6 ; when passing to softfloat functions.
7 ; RISCV backend using shouldExtendTypeInLibCall target hook to suppress
8 ; the extension generation.
10 define float @fadd_s(float %a, float %b) nounwind {
11 ; RV64I-LABEL: fadd_s:
13 ; RV64I-NEXT: addi sp, sp, -16
14 ; RV64I-NEXT: sd ra, 8(sp)
15 ; RV64I-NEXT: call __addsf3
16 ; RV64I-NEXT: ld ra, 8(sp)
17 ; RV64I-NEXT: addi sp, sp, 16
19 %1 = fadd float %a, %b
23 define float @fsub_s(float %a, float %b) nounwind {
24 ; RV64I-LABEL: fsub_s:
26 ; RV64I-NEXT: addi sp, sp, -16
27 ; RV64I-NEXT: sd ra, 8(sp)
28 ; RV64I-NEXT: call __subsf3
29 ; RV64I-NEXT: ld ra, 8(sp)
30 ; RV64I-NEXT: addi sp, sp, 16
32 %1 = fsub float %a, %b
36 define float @fmul_s(float %a, float %b) nounwind {
37 ; RV64I-LABEL: fmul_s:
39 ; RV64I-NEXT: addi sp, sp, -16
40 ; RV64I-NEXT: sd ra, 8(sp)
41 ; RV64I-NEXT: call __mulsf3
42 ; RV64I-NEXT: ld ra, 8(sp)
43 ; RV64I-NEXT: addi sp, sp, 16
45 %1 = fmul float %a, %b
49 define float @fdiv_s(float %a, float %b) nounwind {
50 ; RV64I-LABEL: fdiv_s:
52 ; RV64I-NEXT: addi sp, sp, -16
53 ; RV64I-NEXT: sd ra, 8(sp)
54 ; RV64I-NEXT: call __divsf3
55 ; RV64I-NEXT: ld ra, 8(sp)
56 ; RV64I-NEXT: addi sp, sp, 16
58 %1 = fdiv float %a, %b
62 define i32 @feq_s(float %a, float %b) nounwind {
65 ; RV64I-NEXT: addi sp, sp, -16
66 ; RV64I-NEXT: sd ra, 8(sp)
67 ; RV64I-NEXT: call __eqsf2
68 ; RV64I-NEXT: seqz a0, a0
69 ; RV64I-NEXT: ld ra, 8(sp)
70 ; RV64I-NEXT: addi sp, sp, 16
72 %1 = fcmp oeq float %a, %b
73 %2 = zext i1 %1 to i32
77 define i32 @flt_s(float %a, float %b) nounwind {
80 ; RV64I-NEXT: addi sp, sp, -16
81 ; RV64I-NEXT: sd ra, 8(sp)
82 ; RV64I-NEXT: call __ltsf2
83 ; RV64I-NEXT: sext.w a0, a0
84 ; RV64I-NEXT: slti a0, a0, 0
85 ; RV64I-NEXT: ld ra, 8(sp)
86 ; RV64I-NEXT: addi sp, sp, 16
88 %1 = fcmp olt float %a, %b
89 %2 = zext i1 %1 to i32
93 define i32 @fle_s(float %a, float %b) nounwind {
96 ; RV64I-NEXT: addi sp, sp, -16
97 ; RV64I-NEXT: sd ra, 8(sp)
98 ; RV64I-NEXT: call __lesf2
99 ; RV64I-NEXT: sext.w a0, a0
100 ; RV64I-NEXT: slti a0, a0, 1
101 ; RV64I-NEXT: ld ra, 8(sp)
102 ; RV64I-NEXT: addi sp, sp, 16
104 %1 = fcmp ole float %a, %b
105 %2 = zext i1 %1 to i32
109 define i32 @fcmp_ogt(float %a, float %b) nounwind {
110 ; RV64I-LABEL: fcmp_ogt:
112 ; RV64I-NEXT: addi sp, sp, -16
113 ; RV64I-NEXT: sd ra, 8(sp)
114 ; RV64I-NEXT: call __gtsf2
115 ; RV64I-NEXT: sext.w a0, a0
116 ; RV64I-NEXT: sgtz a0, a0
117 ; RV64I-NEXT: ld ra, 8(sp)
118 ; RV64I-NEXT: addi sp, sp, 16
120 %1 = fcmp ogt float %a, %b
121 %2 = zext i1 %1 to i32
125 define i32 @fcmp_oge(float %a, float %b) nounwind {
126 ; RV64I-LABEL: fcmp_oge:
128 ; RV64I-NEXT: addi sp, sp, -16
129 ; RV64I-NEXT: sd ra, 8(sp)
130 ; RV64I-NEXT: call __gesf2
131 ; RV64I-NEXT: sext.w a0, a0
132 ; RV64I-NEXT: addi a1, zero, -1
133 ; RV64I-NEXT: slt a0, a1, a0
134 ; RV64I-NEXT: ld ra, 8(sp)
135 ; RV64I-NEXT: addi sp, sp, 16
137 %1 = fcmp oge float %a, %b
138 %2 = zext i1 %1 to i32
142 define i32 @fcmp_ord(float %a, float %b) nounwind {
143 ; RV64I-LABEL: fcmp_ord:
145 ; RV64I-NEXT: addi sp, sp, -16
146 ; RV64I-NEXT: sd ra, 8(sp)
147 ; RV64I-NEXT: call __unordsf2
148 ; RV64I-NEXT: seqz a0, a0
149 ; RV64I-NEXT: ld ra, 8(sp)
150 ; RV64I-NEXT: addi sp, sp, 16
152 %1 = fcmp ord float %a, %b
153 %2 = zext i1 %1 to i32
157 define i32 @fcmp_une(float %a, float %b) nounwind {
158 ; RV64I-LABEL: fcmp_une:
160 ; RV64I-NEXT: addi sp, sp, -16
161 ; RV64I-NEXT: sd ra, 8(sp)
162 ; RV64I-NEXT: call __nesf2
163 ; RV64I-NEXT: snez a0, a0
164 ; RV64I-NEXT: ld ra, 8(sp)
165 ; RV64I-NEXT: addi sp, sp, 16
167 %1 = fcmp une float %a, %b
168 %2 = zext i1 %1 to i32
172 define i32 @fcvt_w_s(float %a) nounwind {
173 ; RV64I-LABEL: fcvt_w_s:
175 ; RV64I-NEXT: addi sp, sp, -16
176 ; RV64I-NEXT: sd ra, 8(sp)
177 ; RV64I-NEXT: call __fixsfdi
178 ; RV64I-NEXT: ld ra, 8(sp)
179 ; RV64I-NEXT: addi sp, sp, 16
181 %1 = fptosi float %a to i32
185 define i32 @fcvt_wu_s(float %a) nounwind {
186 ; RV64I-LABEL: fcvt_wu_s:
188 ; RV64I-NEXT: addi sp, sp, -16
189 ; RV64I-NEXT: sd ra, 8(sp)
190 ; RV64I-NEXT: call __fixunssfdi
191 ; RV64I-NEXT: ld ra, 8(sp)
192 ; RV64I-NEXT: addi sp, sp, 16
194 %1 = fptoui float %a to i32
198 define float @fcvt_s_w(i32 %a) nounwind {
199 ; RV64I-LABEL: fcvt_s_w:
201 ; RV64I-NEXT: addi sp, sp, -16
202 ; RV64I-NEXT: sd ra, 8(sp)
203 ; RV64I-NEXT: sext.w a0, a0
204 ; RV64I-NEXT: call __floatsisf
205 ; RV64I-NEXT: ld ra, 8(sp)
206 ; RV64I-NEXT: addi sp, sp, 16
208 %1 = sitofp i32 %a to float
212 define float @fcvt_s_wu(i32 %a) nounwind {
213 ; RV64I-LABEL: fcvt_s_wu:
215 ; RV64I-NEXT: addi sp, sp, -16
216 ; RV64I-NEXT: sd ra, 8(sp)
217 ; RV64I-NEXT: slli a0, a0, 32
218 ; RV64I-NEXT: srli a0, a0, 32
219 ; RV64I-NEXT: call __floatunsisf
220 ; RV64I-NEXT: ld ra, 8(sp)
221 ; RV64I-NEXT: addi sp, sp, 16
223 %1 = uitofp i32 %a to float
227 define i64 @fcvt_l_s(float %a) nounwind {
228 ; RV64I-LABEL: fcvt_l_s:
230 ; RV64I-NEXT: addi sp, sp, -16
231 ; RV64I-NEXT: sd ra, 8(sp)
232 ; RV64I-NEXT: call __fixsfdi
233 ; RV64I-NEXT: ld ra, 8(sp)
234 ; RV64I-NEXT: addi sp, sp, 16
236 %1 = fptosi float %a to i64
240 define i64 @fcvt_lu_s(float %a) nounwind {
241 ; RV64I-LABEL: fcvt_lu_s:
243 ; RV64I-NEXT: addi sp, sp, -16
244 ; RV64I-NEXT: sd ra, 8(sp)
245 ; RV64I-NEXT: call __fixunssfdi
246 ; RV64I-NEXT: ld ra, 8(sp)
247 ; RV64I-NEXT: addi sp, sp, 16
249 %1 = fptoui float %a to i64
253 define float @fcvt_s_l(i64 %a) nounwind {
254 ; RV64I-LABEL: fcvt_s_l:
256 ; RV64I-NEXT: addi sp, sp, -16
257 ; RV64I-NEXT: sd ra, 8(sp)
258 ; RV64I-NEXT: call __floatdisf
259 ; RV64I-NEXT: ld ra, 8(sp)
260 ; RV64I-NEXT: addi sp, sp, 16
262 %1 = sitofp i64 %a to float
266 define float @fcvt_s_lu(i64 %a) nounwind {
267 ; RV64I-LABEL: fcvt_s_lu:
269 ; RV64I-NEXT: addi sp, sp, -16
270 ; RV64I-NEXT: sd ra, 8(sp)
271 ; RV64I-NEXT: call __floatundisf
272 ; RV64I-NEXT: ld ra, 8(sp)
273 ; RV64I-NEXT: addi sp, sp, 16
275 %1 = uitofp i64 %a to float
279 declare float @llvm.sqrt.f32(float)
281 define float @fsqrt_s(float %a) nounwind {
282 ; RV64I-LABEL: fsqrt_s:
284 ; RV64I-NEXT: addi sp, sp, -16
285 ; RV64I-NEXT: sd ra, 8(sp)
286 ; RV64I-NEXT: call sqrtf
287 ; RV64I-NEXT: ld ra, 8(sp)
288 ; RV64I-NEXT: addi sp, sp, 16
290 %1 = call float @llvm.sqrt.f32(float %a)
294 declare float @llvm.copysign.f32(float, float)
296 define float @fsgnj_s(float %a, float %b) nounwind {
297 ; RV64I-LABEL: fsgnj_s:
299 ; RV64I-NEXT: lui a2, 524288
300 ; RV64I-NEXT: and a1, a1, a2
301 ; RV64I-NEXT: addiw a2, a2, -1
302 ; RV64I-NEXT: and a0, a0, a2
303 ; RV64I-NEXT: or a0, a0, a1
305 %1 = call float @llvm.copysign.f32(float %a, float %b)
309 declare float @llvm.minnum.f32(float, float)
311 define float @fmin_s(float %a, float %b) nounwind {
312 ; RV64I-LABEL: fmin_s:
314 ; RV64I-NEXT: addi sp, sp, -16
315 ; RV64I-NEXT: sd ra, 8(sp)
316 ; RV64I-NEXT: call fminf
317 ; RV64I-NEXT: ld ra, 8(sp)
318 ; RV64I-NEXT: addi sp, sp, 16
320 %1 = call float @llvm.minnum.f32(float %a, float %b)
324 declare float @llvm.maxnum.f32(float, float)
326 define float @fmax_s(float %a, float %b) nounwind {
327 ; RV64I-LABEL: fmax_s:
329 ; RV64I-NEXT: addi sp, sp, -16
330 ; RV64I-NEXT: sd ra, 8(sp)
331 ; RV64I-NEXT: call fmaxf
332 ; RV64I-NEXT: ld ra, 8(sp)
333 ; RV64I-NEXT: addi sp, sp, 16
335 %1 = call float @llvm.maxnum.f32(float %a, float %b)
340 declare float @llvm.fma.f32(float, float, float)
342 define float @fmadd_s(float %a, float %b, float %c) nounwind {
343 ; RV64I-LABEL: fmadd_s:
345 ; RV64I-NEXT: addi sp, sp, -16
346 ; RV64I-NEXT: sd ra, 8(sp)
347 ; RV64I-NEXT: call fmaf
348 ; RV64I-NEXT: ld ra, 8(sp)
349 ; RV64I-NEXT: addi sp, sp, 16
351 %1 = call float @llvm.fma.f32(float %a, float %b, float %c)
355 define float @fmsub_s(float %a, float %b, float %c) nounwind {
356 ; RV64I-LABEL: fmsub_s:
358 ; RV64I-NEXT: addi sp, sp, -32
359 ; RV64I-NEXT: sd ra, 24(sp)
360 ; RV64I-NEXT: sd s0, 16(sp)
361 ; RV64I-NEXT: sd s1, 8(sp)
362 ; RV64I-NEXT: mv s0, a1
363 ; RV64I-NEXT: mv s1, a0
364 ; RV64I-NEXT: mv a0, a2
365 ; RV64I-NEXT: mv a1, zero
366 ; RV64I-NEXT: call __addsf3
367 ; RV64I-NEXT: lui a1, 524288
368 ; RV64I-NEXT: xor a2, a0, a1
369 ; RV64I-NEXT: mv a0, s1
370 ; RV64I-NEXT: mv a1, s0
371 ; RV64I-NEXT: call fmaf
372 ; RV64I-NEXT: ld s1, 8(sp)
373 ; RV64I-NEXT: ld s0, 16(sp)
374 ; RV64I-NEXT: ld ra, 24(sp)
375 ; RV64I-NEXT: addi sp, sp, 32
377 %c_ = fadd float 0.0, %c ; avoid negation using xor
378 %negc = fsub float -0.0, %c_
379 %1 = call float @llvm.fma.f32(float %a, float %b, float %negc)
383 define float @fnmadd_s(float %a, float %b, float %c) nounwind {
384 ; RV64I-LABEL: fnmadd_s:
386 ; RV64I-NEXT: addi sp, sp, -32
387 ; RV64I-NEXT: sd ra, 24(sp)
388 ; RV64I-NEXT: sd s0, 16(sp)
389 ; RV64I-NEXT: sd s1, 8(sp)
390 ; RV64I-NEXT: sd s2, 0(sp)
391 ; RV64I-NEXT: mv s0, a2
392 ; RV64I-NEXT: mv s2, a1
393 ; RV64I-NEXT: mv a1, zero
394 ; RV64I-NEXT: call __addsf3
395 ; RV64I-NEXT: mv s1, a0
396 ; RV64I-NEXT: mv a0, s0
397 ; RV64I-NEXT: mv a1, zero
398 ; RV64I-NEXT: call __addsf3
399 ; RV64I-NEXT: lui a2, 524288
400 ; RV64I-NEXT: xor a1, s1, a2
401 ; RV64I-NEXT: xor a2, a0, a2
402 ; RV64I-NEXT: mv a0, a1
403 ; RV64I-NEXT: mv a1, s2
404 ; RV64I-NEXT: call fmaf
405 ; RV64I-NEXT: ld s2, 0(sp)
406 ; RV64I-NEXT: ld s1, 8(sp)
407 ; RV64I-NEXT: ld s0, 16(sp)
408 ; RV64I-NEXT: ld ra, 24(sp)
409 ; RV64I-NEXT: addi sp, sp, 32
411 %a_ = fadd float 0.0, %a
412 %c_ = fadd float 0.0, %c
413 %nega = fsub float -0.0, %a_
414 %negc = fsub float -0.0, %c_
415 %1 = call float @llvm.fma.f32(float %nega, float %b, float %negc)
419 define float @fnmsub_s(float %a, float %b, float %c) nounwind {
420 ; RV64I-LABEL: fnmsub_s:
422 ; RV64I-NEXT: addi sp, sp, -32
423 ; RV64I-NEXT: sd ra, 24(sp)
424 ; RV64I-NEXT: sd s0, 16(sp)
425 ; RV64I-NEXT: sd s1, 8(sp)
426 ; RV64I-NEXT: mv s0, a2
427 ; RV64I-NEXT: mv s1, a1
428 ; RV64I-NEXT: mv a1, zero
429 ; RV64I-NEXT: call __addsf3
430 ; RV64I-NEXT: lui a1, 524288
431 ; RV64I-NEXT: xor a0, a0, a1
432 ; RV64I-NEXT: mv a1, s1
433 ; RV64I-NEXT: mv a2, s0
434 ; RV64I-NEXT: call fmaf
435 ; RV64I-NEXT: ld s1, 8(sp)
436 ; RV64I-NEXT: ld s0, 16(sp)
437 ; RV64I-NEXT: ld ra, 24(sp)
438 ; RV64I-NEXT: addi sp, sp, 32
440 %a_ = fadd float 0.0, %a
441 %nega = fsub float -0.0, %a_
442 %1 = call float @llvm.fma.f32(float %nega, float %b, float %c)
446 declare float @llvm.ceil.f32(float)
448 define float @fceil_s(float %a) nounwind {
449 ; RV64I-LABEL: fceil_s:
451 ; RV64I-NEXT: addi sp, sp, -16
452 ; RV64I-NEXT: sd ra, 8(sp)
453 ; RV64I-NEXT: call ceilf
454 ; RV64I-NEXT: ld ra, 8(sp)
455 ; RV64I-NEXT: addi sp, sp, 16
457 %1 = call float @llvm.ceil.f32(float %a)
461 declare float @llvm.cos.f32(float)
463 define float @fcos_s(float %a) nounwind {
464 ; RV64I-LABEL: fcos_s:
466 ; RV64I-NEXT: addi sp, sp, -16
467 ; RV64I-NEXT: sd ra, 8(sp)
468 ; RV64I-NEXT: call cosf
469 ; RV64I-NEXT: ld ra, 8(sp)
470 ; RV64I-NEXT: addi sp, sp, 16
472 %1 = call float @llvm.cos.f32(float %a)
476 declare float @llvm.sin.f32(float)
478 define float @fsin_s(float %a) nounwind {
479 ; RV64I-LABEL: fsin_s:
481 ; RV64I-NEXT: addi sp, sp, -16
482 ; RV64I-NEXT: sd ra, 8(sp)
483 ; RV64I-NEXT: call sinf
484 ; RV64I-NEXT: ld ra, 8(sp)
485 ; RV64I-NEXT: addi sp, sp, 16
487 %1 = call float @llvm.sin.f32(float %a)
491 declare float @llvm.exp.f32(float)
493 define float @fexp_s(float %a) nounwind {
494 ; RV64I-LABEL: fexp_s:
496 ; RV64I-NEXT: addi sp, sp, -16
497 ; RV64I-NEXT: sd ra, 8(sp)
498 ; RV64I-NEXT: call expf
499 ; RV64I-NEXT: ld ra, 8(sp)
500 ; RV64I-NEXT: addi sp, sp, 16
502 %1 = call float @llvm.exp.f32(float %a)
506 declare float @llvm.exp2.f32(float)
508 define float @fexp2_s(float %a) nounwind {
509 ; RV64I-LABEL: fexp2_s:
511 ; RV64I-NEXT: addi sp, sp, -16
512 ; RV64I-NEXT: sd ra, 8(sp)
513 ; RV64I-NEXT: call exp2f
514 ; RV64I-NEXT: ld ra, 8(sp)
515 ; RV64I-NEXT: addi sp, sp, 16
517 %1 = call float @llvm.exp2.f32(float %a)
521 declare float @llvm.floor.f32(float)
523 define float @ffloor_s(float %a) nounwind {
524 ; RV64I-LABEL: ffloor_s:
526 ; RV64I-NEXT: addi sp, sp, -16
527 ; RV64I-NEXT: sd ra, 8(sp)
528 ; RV64I-NEXT: call floorf
529 ; RV64I-NEXT: ld ra, 8(sp)
530 ; RV64I-NEXT: addi sp, sp, 16
532 %1 = call float @llvm.floor.f32(float %a)
536 declare float @llvm.flog.f32(float)
538 define float @fflog_s(float %a) nounwind {
539 ; RV64I-LABEL: fflog_s:
541 ; RV64I-NEXT: addi sp, sp, -16
542 ; RV64I-NEXT: sd ra, 8(sp)
543 ; RV64I-NEXT: call llvm.flog.f32
544 ; RV64I-NEXT: ld ra, 8(sp)
545 ; RV64I-NEXT: addi sp, sp, 16
547 %1 = call float @llvm.flog.f32(float %a)
551 declare float @llvm.flog2.f32(float)
553 define float @fflog2_s(float %a) nounwind {
554 ; RV64I-LABEL: fflog2_s:
556 ; RV64I-NEXT: addi sp, sp, -16
557 ; RV64I-NEXT: sd ra, 8(sp)
558 ; RV64I-NEXT: call llvm.flog2.f32
559 ; RV64I-NEXT: ld ra, 8(sp)
560 ; RV64I-NEXT: addi sp, sp, 16
562 %1 = call float @llvm.flog2.f32(float %a)
566 declare float @llvm.flog10.f32(float)
568 define float @fflog10_s(float %a) nounwind {
569 ; RV64I-LABEL: fflog10_s:
571 ; RV64I-NEXT: addi sp, sp, -16
572 ; RV64I-NEXT: sd ra, 8(sp)
573 ; RV64I-NEXT: call llvm.flog10.f32
574 ; RV64I-NEXT: ld ra, 8(sp)
575 ; RV64I-NEXT: addi sp, sp, 16
577 %1 = call float @llvm.flog10.f32(float %a)
581 declare float @llvm.fnearbyint.f32(float)
583 define float @fnearbyint_s(float %a) nounwind {
584 ; RV64I-LABEL: fnearbyint_s:
586 ; RV64I-NEXT: addi sp, sp, -16
587 ; RV64I-NEXT: sd ra, 8(sp)
588 ; RV64I-NEXT: call llvm.fnearbyint.f32
589 ; RV64I-NEXT: ld ra, 8(sp)
590 ; RV64I-NEXT: addi sp, sp, 16
592 %1 = call float @llvm.fnearbyint.f32(float %a)
596 declare float @llvm.round.f32(float)
598 define float @fround_s(float %a) nounwind {
599 ; RV64I-LABEL: fround_s:
601 ; RV64I-NEXT: addi sp, sp, -16
602 ; RV64I-NEXT: sd ra, 8(sp)
603 ; RV64I-NEXT: call roundf
604 ; RV64I-NEXT: ld ra, 8(sp)
605 ; RV64I-NEXT: addi sp, sp, 16
607 %1 = call float @llvm.round.f32(float %a)
611 declare float @llvm.fpround.f32(float)
613 define float @fpround_s(float %a) nounwind {
614 ; RV64I-LABEL: fpround_s:
616 ; RV64I-NEXT: addi sp, sp, -16
617 ; RV64I-NEXT: sd ra, 8(sp)
618 ; RV64I-NEXT: call llvm.fpround.f32
619 ; RV64I-NEXT: ld ra, 8(sp)
620 ; RV64I-NEXT: addi sp, sp, 16
622 %1 = call float @llvm.fpround.f32(float %a)
626 declare float @llvm.rint.f32(float)
628 define float @frint_s(float %a) nounwind {
629 ; RV64I-LABEL: frint_s:
631 ; RV64I-NEXT: addi sp, sp, -16
632 ; RV64I-NEXT: sd ra, 8(sp)
633 ; RV64I-NEXT: call rintf
634 ; RV64I-NEXT: ld ra, 8(sp)
635 ; RV64I-NEXT: addi sp, sp, 16
637 %1 = call float @llvm.rint.f32(float %a)
641 declare float @llvm.rem.f32(float)
643 define float @frem_s(float %a) nounwind {
644 ; RV64I-LABEL: frem_s:
646 ; RV64I-NEXT: addi sp, sp, -16
647 ; RV64I-NEXT: sd ra, 8(sp)
648 ; RV64I-NEXT: call llvm.rem.f32
649 ; RV64I-NEXT: ld ra, 8(sp)
650 ; RV64I-NEXT: addi sp, sp, 16
652 %1 = call float @llvm.rem.f32(float %a)
656 declare float @llvm.pow.f32(float %Val, float %power)
658 define float @fpow_s(float %a, float %b) nounwind {
659 ; RV64I-LABEL: fpow_s:
661 ; RV64I-NEXT: addi sp, sp, -16
662 ; RV64I-NEXT: sd ra, 8(sp)
663 ; RV64I-NEXT: call powf
664 ; RV64I-NEXT: ld ra, 8(sp)
665 ; RV64I-NEXT: addi sp, sp, 16
667 %1 = call float @llvm.pow.f32(float %a, float %b)
671 declare float @llvm.powi.f32(float %Val, i32 %power)
673 define float @fpowi_s(float %a, i32 %b) nounwind {
674 ; RV64I-LABEL: fpowi_s:
676 ; RV64I-NEXT: addi sp, sp, -16
677 ; RV64I-NEXT: sd ra, 8(sp)
678 ; RV64I-NEXT: slli a1, a1, 32
679 ; RV64I-NEXT: srli a1, a1, 32
680 ; RV64I-NEXT: call __powisf2
681 ; RV64I-NEXT: ld ra, 8(sp)
682 ; RV64I-NEXT: addi sp, sp, 16
684 %1 = call float @llvm.powi.f32(float %a, i32 %b)
688 define double @fp_ext(float %a) nounwind {
689 ; RV64I-LABEL: fp_ext:
691 ; RV64I-NEXT: addi sp, sp, -16
692 ; RV64I-NEXT: sd ra, 8(sp)
693 ; RV64I-NEXT: call __extendsfdf2
694 ; RV64I-NEXT: ld ra, 8(sp)
695 ; RV64I-NEXT: addi sp, sp, 16
697 %conv = fpext float %a to double
701 define float @fp_trunc(double %a) nounwind {
702 ; RV64I-LABEL: fp_trunc:
704 ; RV64I-NEXT: addi sp, sp, -16
705 ; RV64I-NEXT: sd ra, 8(sp)
706 ; RV64I-NEXT: call __truncdfsf2
707 ; RV64I-NEXT: ld ra, 8(sp)
708 ; RV64I-NEXT: addi sp, sp, 16
710 %conv = fptrunc double %a to float