1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=riscv32 -mattr=+f -target-abi ilp32f -verify-machineinstrs < %s \
3 ; RUN: | FileCheck -check-prefix=RV32IF %s
4 ; RUN: llc -mtriple=riscv64 -mattr=+f -target-abi lp64f -verify-machineinstrs < %s \
5 ; RUN: | FileCheck -check-prefix=RV64IF %s
7 ; These test that we can use both the architectural names (x*) and the ABI names
8 ; (a*, s*, t* etc) to refer to registers in inline asm constraint lists. In each
9 ; case, the named register should be used for the source register of the `addi`.
10 ; It is very likely that `a0` will be chosen as the designation register, but
11 ; this is left to the compiler to choose.
13 ; The inline assembly will, by default, contain the ABI names for the registers.
15 ; Parenthesised registers in comments are the other aliases for this register.
18 define i32 @explicit_register_f0(float %a) nounwind {
19 ; RV32IF-LABEL: explicit_register_f0:
21 ; RV32IF-NEXT: fmv.s ft0, fa0
23 ; RV32IF-NEXT: fcvt.w.s a0, ft0
24 ; RV32IF-NEXT: #NO_APP
27 ; RV64IF-LABEL: explicit_register_f0:
29 ; RV64IF-NEXT: fmv.s ft0, fa0
31 ; RV64IF-NEXT: fcvt.w.s a0, ft0
32 ; RV64IF-NEXT: #NO_APP
34 %1 = tail call i32 asm "fcvt.w.s $0, $1", "=r,{f0}"(float %a)
38 define i32 @explicit_register_ft0(float %a) nounwind {
39 ; RV32IF-LABEL: explicit_register_ft0:
41 ; RV32IF-NEXT: fmv.s ft0, fa0
43 ; RV32IF-NEXT: fcvt.w.s a0, ft0
44 ; RV32IF-NEXT: #NO_APP
47 ; RV64IF-LABEL: explicit_register_ft0:
49 ; RV64IF-NEXT: fmv.s ft0, fa0
51 ; RV64IF-NEXT: fcvt.w.s a0, ft0
52 ; RV64IF-NEXT: #NO_APP
54 %1 = tail call i32 asm "fcvt.w.s $0, $1", "=r,{ft0}"(float %a)
58 define i32 @explicit_register_f1(float %a) nounwind {
59 ; RV32IF-LABEL: explicit_register_f1:
61 ; RV32IF-NEXT: fmv.s ft1, fa0
63 ; RV32IF-NEXT: fcvt.w.s a0, ft1
64 ; RV32IF-NEXT: #NO_APP
67 ; RV64IF-LABEL: explicit_register_f1:
69 ; RV64IF-NEXT: fmv.s ft1, fa0
71 ; RV64IF-NEXT: fcvt.w.s a0, ft1
72 ; RV64IF-NEXT: #NO_APP
74 %1 = tail call i32 asm "fcvt.w.s $0, $1", "=r,{f1}"(float %a)
78 define i32 @explicit_register_ft1(float %a) nounwind {
79 ; RV32IF-LABEL: explicit_register_ft1:
81 ; RV32IF-NEXT: fmv.s ft1, fa0
83 ; RV32IF-NEXT: fcvt.w.s a0, ft1
84 ; RV32IF-NEXT: #NO_APP
87 ; RV64IF-LABEL: explicit_register_ft1:
89 ; RV64IF-NEXT: fmv.s ft1, fa0
91 ; RV64IF-NEXT: fcvt.w.s a0, ft1
92 ; RV64IF-NEXT: #NO_APP
94 %1 = tail call i32 asm "fcvt.w.s $0, $1", "=r,{ft1}"(float %a)
98 define i32 @explicit_register_f2(float %a) nounwind {
99 ; RV32IF-LABEL: explicit_register_f2:
101 ; RV32IF-NEXT: fmv.s ft2, fa0
103 ; RV32IF-NEXT: fcvt.w.s a0, ft2
104 ; RV32IF-NEXT: #NO_APP
107 ; RV64IF-LABEL: explicit_register_f2:
109 ; RV64IF-NEXT: fmv.s ft2, fa0
111 ; RV64IF-NEXT: fcvt.w.s a0, ft2
112 ; RV64IF-NEXT: #NO_APP
114 %1 = tail call i32 asm "fcvt.w.s $0, $1", "=r,{f2}"(float %a)
118 define i32 @explicit_register_ft2(float %a) nounwind {
119 ; RV32IF-LABEL: explicit_register_ft2:
121 ; RV32IF-NEXT: fmv.s ft2, fa0
123 ; RV32IF-NEXT: fcvt.w.s a0, ft2
124 ; RV32IF-NEXT: #NO_APP
127 ; RV64IF-LABEL: explicit_register_ft2:
129 ; RV64IF-NEXT: fmv.s ft2, fa0
131 ; RV64IF-NEXT: fcvt.w.s a0, ft2
132 ; RV64IF-NEXT: #NO_APP
134 %1 = tail call i32 asm "fcvt.w.s $0, $1", "=r,{ft2}"(float %a)
138 define i32 @explicit_register_f3(float %a) nounwind {
139 ; RV32IF-LABEL: explicit_register_f3:
141 ; RV32IF-NEXT: fmv.s ft3, fa0
143 ; RV32IF-NEXT: fcvt.w.s a0, ft3
144 ; RV32IF-NEXT: #NO_APP
147 ; RV64IF-LABEL: explicit_register_f3:
149 ; RV64IF-NEXT: fmv.s ft3, fa0
151 ; RV64IF-NEXT: fcvt.w.s a0, ft3
152 ; RV64IF-NEXT: #NO_APP
154 %1 = tail call i32 asm "fcvt.w.s $0, $1", "=r,{f3}"(float %a)
158 define i32 @explicit_register_ft3(float %a) nounwind {
159 ; RV32IF-LABEL: explicit_register_ft3:
161 ; RV32IF-NEXT: fmv.s ft3, fa0
163 ; RV32IF-NEXT: fcvt.w.s a0, ft3
164 ; RV32IF-NEXT: #NO_APP
167 ; RV64IF-LABEL: explicit_register_ft3:
169 ; RV64IF-NEXT: fmv.s ft3, fa0
171 ; RV64IF-NEXT: fcvt.w.s a0, ft3
172 ; RV64IF-NEXT: #NO_APP
174 %1 = tail call i32 asm "fcvt.w.s $0, $1", "=r,{ft3}"(float %a)
178 define i32 @explicit_register_f4(float %a) nounwind {
179 ; RV32IF-LABEL: explicit_register_f4:
181 ; RV32IF-NEXT: fmv.s ft4, fa0
183 ; RV32IF-NEXT: fcvt.w.s a0, ft4
184 ; RV32IF-NEXT: #NO_APP
187 ; RV64IF-LABEL: explicit_register_f4:
189 ; RV64IF-NEXT: fmv.s ft4, fa0
191 ; RV64IF-NEXT: fcvt.w.s a0, ft4
192 ; RV64IF-NEXT: #NO_APP
194 %1 = tail call i32 asm "fcvt.w.s $0, $1", "=r,{f4}"(float %a)
198 define i32 @explicit_register_ft4(float %a) nounwind {
199 ; RV32IF-LABEL: explicit_register_ft4:
201 ; RV32IF-NEXT: fmv.s ft4, fa0
203 ; RV32IF-NEXT: fcvt.w.s a0, ft4
204 ; RV32IF-NEXT: #NO_APP
207 ; RV64IF-LABEL: explicit_register_ft4:
209 ; RV64IF-NEXT: fmv.s ft4, fa0
211 ; RV64IF-NEXT: fcvt.w.s a0, ft4
212 ; RV64IF-NEXT: #NO_APP
214 %1 = tail call i32 asm "fcvt.w.s $0, $1", "=r,{ft4}"(float %a)
218 define i32 @explicit_register_f5(float %a) nounwind {
219 ; RV32IF-LABEL: explicit_register_f5:
221 ; RV32IF-NEXT: fmv.s ft5, fa0
223 ; RV32IF-NEXT: fcvt.w.s a0, ft5
224 ; RV32IF-NEXT: #NO_APP
227 ; RV64IF-LABEL: explicit_register_f5:
229 ; RV64IF-NEXT: fmv.s ft5, fa0
231 ; RV64IF-NEXT: fcvt.w.s a0, ft5
232 ; RV64IF-NEXT: #NO_APP
234 %1 = tail call i32 asm "fcvt.w.s $0, $1", "=r,{f5}"(float %a)
238 define i32 @explicit_register_ft5(float %a) nounwind {
239 ; RV32IF-LABEL: explicit_register_ft5:
241 ; RV32IF-NEXT: fmv.s ft5, fa0
243 ; RV32IF-NEXT: fcvt.w.s a0, ft5
244 ; RV32IF-NEXT: #NO_APP
247 ; RV64IF-LABEL: explicit_register_ft5:
249 ; RV64IF-NEXT: fmv.s ft5, fa0
251 ; RV64IF-NEXT: fcvt.w.s a0, ft5
252 ; RV64IF-NEXT: #NO_APP
254 %1 = tail call i32 asm "fcvt.w.s $0, $1", "=r,{ft5}"(float %a)
258 define i32 @explicit_register_f6(float %a) nounwind {
259 ; RV32IF-LABEL: explicit_register_f6:
261 ; RV32IF-NEXT: fmv.s ft6, fa0
263 ; RV32IF-NEXT: fcvt.w.s a0, ft6
264 ; RV32IF-NEXT: #NO_APP
267 ; RV64IF-LABEL: explicit_register_f6:
269 ; RV64IF-NEXT: fmv.s ft6, fa0
271 ; RV64IF-NEXT: fcvt.w.s a0, ft6
272 ; RV64IF-NEXT: #NO_APP
274 %1 = tail call i32 asm "fcvt.w.s $0, $1", "=r,{f6}"(float %a)
278 define i32 @explicit_register_ft6(float %a) nounwind {
279 ; RV32IF-LABEL: explicit_register_ft6:
281 ; RV32IF-NEXT: fmv.s ft6, fa0
283 ; RV32IF-NEXT: fcvt.w.s a0, ft6
284 ; RV32IF-NEXT: #NO_APP
287 ; RV64IF-LABEL: explicit_register_ft6:
289 ; RV64IF-NEXT: fmv.s ft6, fa0
291 ; RV64IF-NEXT: fcvt.w.s a0, ft6
292 ; RV64IF-NEXT: #NO_APP
294 %1 = tail call i32 asm "fcvt.w.s $0, $1", "=r,{ft6}"(float %a)
298 define i32 @explicit_register_f7(float %a) nounwind {
299 ; RV32IF-LABEL: explicit_register_f7:
301 ; RV32IF-NEXT: fmv.s ft7, fa0
303 ; RV32IF-NEXT: fcvt.w.s a0, ft7
304 ; RV32IF-NEXT: #NO_APP
307 ; RV64IF-LABEL: explicit_register_f7:
309 ; RV64IF-NEXT: fmv.s ft7, fa0
311 ; RV64IF-NEXT: fcvt.w.s a0, ft7
312 ; RV64IF-NEXT: #NO_APP
314 %1 = tail call i32 asm "fcvt.w.s $0, $1", "=r,{f7}"(float %a)
318 define i32 @explicit_register_ft7(float %a) nounwind {
319 ; RV32IF-LABEL: explicit_register_ft7:
321 ; RV32IF-NEXT: fmv.s ft7, fa0
323 ; RV32IF-NEXT: fcvt.w.s a0, ft7
324 ; RV32IF-NEXT: #NO_APP
327 ; RV64IF-LABEL: explicit_register_ft7:
329 ; RV64IF-NEXT: fmv.s ft7, fa0
331 ; RV64IF-NEXT: fcvt.w.s a0, ft7
332 ; RV64IF-NEXT: #NO_APP
334 %1 = tail call i32 asm "fcvt.w.s $0, $1", "=r,{ft7}"(float %a)
339 ; NOTE: This test uses `f8` (`fs0`) as an input, so it should be saved.
340 define i32 @explicit_register_f8(float %a) nounwind {
341 ; RV32IF-LABEL: explicit_register_f8:
343 ; RV32IF-NEXT: addi sp, sp, -16
344 ; RV32IF-NEXT: fsw fs0, 12(sp) # 4-byte Folded Spill
345 ; RV32IF-NEXT: fmv.s fs0, fa0
347 ; RV32IF-NEXT: fcvt.w.s a0, fs0
348 ; RV32IF-NEXT: #NO_APP
349 ; RV32IF-NEXT: flw fs0, 12(sp) # 4-byte Folded Reload
350 ; RV32IF-NEXT: addi sp, sp, 16
353 ; RV64IF-LABEL: explicit_register_f8:
355 ; RV64IF-NEXT: addi sp, sp, -16
356 ; RV64IF-NEXT: fsw fs0, 12(sp) # 4-byte Folded Spill
357 ; RV64IF-NEXT: fmv.s fs0, fa0
359 ; RV64IF-NEXT: fcvt.w.s a0, fs0
360 ; RV64IF-NEXT: #NO_APP
361 ; RV64IF-NEXT: flw fs0, 12(sp) # 4-byte Folded Reload
362 ; RV64IF-NEXT: addi sp, sp, 16
364 %1 = tail call i32 asm "fcvt.w.s $0, $1", "=r,{f8}"(float %a)
368 ; NOTE: This test uses `fs0` (`f8`) as an input, so it should be saved.
369 define i32 @explicit_register_fs0(float %a) nounwind {
370 ; RV32IF-LABEL: explicit_register_fs0:
372 ; RV32IF-NEXT: addi sp, sp, -16
373 ; RV32IF-NEXT: fsw fs0, 12(sp) # 4-byte Folded Spill
374 ; RV32IF-NEXT: fmv.s fs0, fa0
376 ; RV32IF-NEXT: fcvt.w.s a0, fs0
377 ; RV32IF-NEXT: #NO_APP
378 ; RV32IF-NEXT: flw fs0, 12(sp) # 4-byte Folded Reload
379 ; RV32IF-NEXT: addi sp, sp, 16
382 ; RV64IF-LABEL: explicit_register_fs0:
384 ; RV64IF-NEXT: addi sp, sp, -16
385 ; RV64IF-NEXT: fsw fs0, 12(sp) # 4-byte Folded Spill
386 ; RV64IF-NEXT: fmv.s fs0, fa0
388 ; RV64IF-NEXT: fcvt.w.s a0, fs0
389 ; RV64IF-NEXT: #NO_APP
390 ; RV64IF-NEXT: flw fs0, 12(sp) # 4-byte Folded Reload
391 ; RV64IF-NEXT: addi sp, sp, 16
393 %1 = tail call i32 asm "fcvt.w.s $0, $1", "=r,{fs0}"(float %a)
397 ; NOTE: This test uses `f9` (`fs1`) as an input, so it should be saved.
398 define i32 @explicit_register_f9(float %a) nounwind {
399 ; RV32IF-LABEL: explicit_register_f9:
401 ; RV32IF-NEXT: addi sp, sp, -16
402 ; RV32IF-NEXT: fsw fs1, 12(sp) # 4-byte Folded Spill
403 ; RV32IF-NEXT: fmv.s fs1, fa0
405 ; RV32IF-NEXT: fcvt.w.s a0, fs1
406 ; RV32IF-NEXT: #NO_APP
407 ; RV32IF-NEXT: flw fs1, 12(sp) # 4-byte Folded Reload
408 ; RV32IF-NEXT: addi sp, sp, 16
411 ; RV64IF-LABEL: explicit_register_f9:
413 ; RV64IF-NEXT: addi sp, sp, -16
414 ; RV64IF-NEXT: fsw fs1, 12(sp) # 4-byte Folded Spill
415 ; RV64IF-NEXT: fmv.s fs1, fa0
417 ; RV64IF-NEXT: fcvt.w.s a0, fs1
418 ; RV64IF-NEXT: #NO_APP
419 ; RV64IF-NEXT: flw fs1, 12(sp) # 4-byte Folded Reload
420 ; RV64IF-NEXT: addi sp, sp, 16
422 %1 = tail call i32 asm "fcvt.w.s $0, $1", "=r,{f9}"(float %a)
426 ; NOTE: This test uses `fs1` (`f9`) as an input, so it should be saved.
427 define i32 @explicit_register_fs1(float %a) nounwind {
428 ; RV32IF-LABEL: explicit_register_fs1:
430 ; RV32IF-NEXT: addi sp, sp, -16
431 ; RV32IF-NEXT: fsw fs1, 12(sp) # 4-byte Folded Spill
432 ; RV32IF-NEXT: fmv.s fs1, fa0
434 ; RV32IF-NEXT: fcvt.w.s a0, fs1
435 ; RV32IF-NEXT: #NO_APP
436 ; RV32IF-NEXT: flw fs1, 12(sp) # 4-byte Folded Reload
437 ; RV32IF-NEXT: addi sp, sp, 16
440 ; RV64IF-LABEL: explicit_register_fs1:
442 ; RV64IF-NEXT: addi sp, sp, -16
443 ; RV64IF-NEXT: fsw fs1, 12(sp) # 4-byte Folded Spill
444 ; RV64IF-NEXT: fmv.s fs1, fa0
446 ; RV64IF-NEXT: fcvt.w.s a0, fs1
447 ; RV64IF-NEXT: #NO_APP
448 ; RV64IF-NEXT: flw fs1, 12(sp) # 4-byte Folded Reload
449 ; RV64IF-NEXT: addi sp, sp, 16
451 %1 = tail call i32 asm "fcvt.w.s $0, $1", "=r,{fs1}"(float %a)
455 define i32 @explicit_register_f10(float %a) nounwind {
456 ; RV32IF-LABEL: explicit_register_f10:
459 ; RV32IF-NEXT: fcvt.w.s a0, fa0
460 ; RV32IF-NEXT: #NO_APP
463 ; RV64IF-LABEL: explicit_register_f10:
466 ; RV64IF-NEXT: fcvt.w.s a0, fa0
467 ; RV64IF-NEXT: #NO_APP
469 %1 = tail call i32 asm "fcvt.w.s $0, $1", "=r,{f10}"(float %a)
473 define i32 @explicit_register_fa0(float %a) nounwind {
474 ; RV32IF-LABEL: explicit_register_fa0:
477 ; RV32IF-NEXT: fcvt.w.s a0, fa0
478 ; RV32IF-NEXT: #NO_APP
481 ; RV64IF-LABEL: explicit_register_fa0:
484 ; RV64IF-NEXT: fcvt.w.s a0, fa0
485 ; RV64IF-NEXT: #NO_APP
487 %1 = tail call i32 asm "fcvt.w.s $0, $1", "=r,{fa0}"(float %a)
491 define i32 @explicit_register_f11(float %a) nounwind {
492 ; RV32IF-LABEL: explicit_register_f11:
494 ; RV32IF-NEXT: fmv.s fa1, fa0
496 ; RV32IF-NEXT: fcvt.w.s a0, fa1
497 ; RV32IF-NEXT: #NO_APP
500 ; RV64IF-LABEL: explicit_register_f11:
502 ; RV64IF-NEXT: fmv.s fa1, fa0
504 ; RV64IF-NEXT: fcvt.w.s a0, fa1
505 ; RV64IF-NEXT: #NO_APP
507 %1 = tail call i32 asm "fcvt.w.s $0, $1", "=r,{f11}"(float %a)
511 define i32 @explicit_register_fa1(float %a) nounwind {
512 ; RV32IF-LABEL: explicit_register_fa1:
514 ; RV32IF-NEXT: fmv.s fa1, fa0
516 ; RV32IF-NEXT: fcvt.w.s a0, fa1
517 ; RV32IF-NEXT: #NO_APP
520 ; RV64IF-LABEL: explicit_register_fa1:
522 ; RV64IF-NEXT: fmv.s fa1, fa0
524 ; RV64IF-NEXT: fcvt.w.s a0, fa1
525 ; RV64IF-NEXT: #NO_APP
527 %1 = tail call i32 asm "fcvt.w.s $0, $1", "=r,{fa1}"(float %a)
531 define i32 @explicit_register_f12(float %a) nounwind {
532 ; RV32IF-LABEL: explicit_register_f12:
534 ; RV32IF-NEXT: fmv.s fa2, fa0
536 ; RV32IF-NEXT: fcvt.w.s a0, fa2
537 ; RV32IF-NEXT: #NO_APP
540 ; RV64IF-LABEL: explicit_register_f12:
542 ; RV64IF-NEXT: fmv.s fa2, fa0
544 ; RV64IF-NEXT: fcvt.w.s a0, fa2
545 ; RV64IF-NEXT: #NO_APP
547 %1 = tail call i32 asm "fcvt.w.s $0, $1", "=r,{f12}"(float %a)
551 define i32 @explicit_register_fa2(float %a) nounwind {
552 ; RV32IF-LABEL: explicit_register_fa2:
554 ; RV32IF-NEXT: fmv.s fa2, fa0
556 ; RV32IF-NEXT: fcvt.w.s a0, fa2
557 ; RV32IF-NEXT: #NO_APP
560 ; RV64IF-LABEL: explicit_register_fa2:
562 ; RV64IF-NEXT: fmv.s fa2, fa0
564 ; RV64IF-NEXT: fcvt.w.s a0, fa2
565 ; RV64IF-NEXT: #NO_APP
567 %1 = tail call i32 asm "fcvt.w.s $0, $1", "=r,{fa2}"(float %a)
571 define i32 @explicit_register_f13(float %a) nounwind {
572 ; RV32IF-LABEL: explicit_register_f13:
574 ; RV32IF-NEXT: fmv.s fa3, fa0
576 ; RV32IF-NEXT: fcvt.w.s a0, fa3
577 ; RV32IF-NEXT: #NO_APP
580 ; RV64IF-LABEL: explicit_register_f13:
582 ; RV64IF-NEXT: fmv.s fa3, fa0
584 ; RV64IF-NEXT: fcvt.w.s a0, fa3
585 ; RV64IF-NEXT: #NO_APP
587 %1 = tail call i32 asm "fcvt.w.s $0, $1", "=r,{f13}"(float %a)
591 define i32 @explicit_register_fa3(float %a) nounwind {
592 ; RV32IF-LABEL: explicit_register_fa3:
594 ; RV32IF-NEXT: fmv.s fa3, fa0
596 ; RV32IF-NEXT: fcvt.w.s a0, fa3
597 ; RV32IF-NEXT: #NO_APP
600 ; RV64IF-LABEL: explicit_register_fa3:
602 ; RV64IF-NEXT: fmv.s fa3, fa0
604 ; RV64IF-NEXT: fcvt.w.s a0, fa3
605 ; RV64IF-NEXT: #NO_APP
607 %1 = tail call i32 asm "fcvt.w.s $0, $1", "=r,{fa3}"(float %a)
611 define i32 @explicit_register_f14(float %a) nounwind {
612 ; RV32IF-LABEL: explicit_register_f14:
614 ; RV32IF-NEXT: fmv.s fa4, fa0
616 ; RV32IF-NEXT: fcvt.w.s a0, fa4
617 ; RV32IF-NEXT: #NO_APP
620 ; RV64IF-LABEL: explicit_register_f14:
622 ; RV64IF-NEXT: fmv.s fa4, fa0
624 ; RV64IF-NEXT: fcvt.w.s a0, fa4
625 ; RV64IF-NEXT: #NO_APP
627 %1 = tail call i32 asm "fcvt.w.s $0, $1", "=r,{f14}"(float %a)
631 define i32 @explicit_register_fa4(float %a) nounwind {
632 ; RV32IF-LABEL: explicit_register_fa4:
634 ; RV32IF-NEXT: fmv.s fa4, fa0
636 ; RV32IF-NEXT: fcvt.w.s a0, fa4
637 ; RV32IF-NEXT: #NO_APP
640 ; RV64IF-LABEL: explicit_register_fa4:
642 ; RV64IF-NEXT: fmv.s fa4, fa0
644 ; RV64IF-NEXT: fcvt.w.s a0, fa4
645 ; RV64IF-NEXT: #NO_APP
647 %1 = tail call i32 asm "fcvt.w.s $0, $1", "=r,{fa4}"(float %a)
651 define i32 @explicit_register_f15(float %a) nounwind {
652 ; RV32IF-LABEL: explicit_register_f15:
654 ; RV32IF-NEXT: fmv.s fa5, fa0
656 ; RV32IF-NEXT: fcvt.w.s a0, fa5
657 ; RV32IF-NEXT: #NO_APP
660 ; RV64IF-LABEL: explicit_register_f15:
662 ; RV64IF-NEXT: fmv.s fa5, fa0
664 ; RV64IF-NEXT: fcvt.w.s a0, fa5
665 ; RV64IF-NEXT: #NO_APP
667 %1 = tail call i32 asm "fcvt.w.s $0, $1", "=r,{f15}"(float %a)
671 define i32 @explicit_register_fa5(float %a) nounwind {
672 ; RV32IF-LABEL: explicit_register_fa5:
674 ; RV32IF-NEXT: fmv.s fa5, fa0
676 ; RV32IF-NEXT: fcvt.w.s a0, fa5
677 ; RV32IF-NEXT: #NO_APP
680 ; RV64IF-LABEL: explicit_register_fa5:
682 ; RV64IF-NEXT: fmv.s fa5, fa0
684 ; RV64IF-NEXT: fcvt.w.s a0, fa5
685 ; RV64IF-NEXT: #NO_APP
687 %1 = tail call i32 asm "fcvt.w.s $0, $1", "=r,{fa5}"(float %a)
691 define i32 @explicit_register_f16(float %a) nounwind {
692 ; RV32IF-LABEL: explicit_register_f16:
694 ; RV32IF-NEXT: fmv.s fa6, fa0
696 ; RV32IF-NEXT: fcvt.w.s a0, fa6
697 ; RV32IF-NEXT: #NO_APP
700 ; RV64IF-LABEL: explicit_register_f16:
702 ; RV64IF-NEXT: fmv.s fa6, fa0
704 ; RV64IF-NEXT: fcvt.w.s a0, fa6
705 ; RV64IF-NEXT: #NO_APP
707 %1 = tail call i32 asm "fcvt.w.s $0, $1", "=r,{f16}"(float %a)
711 define i32 @explicit_register_fa6(float %a) nounwind {
712 ; RV32IF-LABEL: explicit_register_fa6:
714 ; RV32IF-NEXT: fmv.s fa6, fa0
716 ; RV32IF-NEXT: fcvt.w.s a0, fa6
717 ; RV32IF-NEXT: #NO_APP
720 ; RV64IF-LABEL: explicit_register_fa6:
722 ; RV64IF-NEXT: fmv.s fa6, fa0
724 ; RV64IF-NEXT: fcvt.w.s a0, fa6
725 ; RV64IF-NEXT: #NO_APP
727 %1 = tail call i32 asm "fcvt.w.s $0, $1", "=r,{fa6}"(float %a)
731 define i32 @explicit_register_f17(float %a) nounwind {
732 ; RV32IF-LABEL: explicit_register_f17:
734 ; RV32IF-NEXT: fmv.s fa7, fa0
736 ; RV32IF-NEXT: fcvt.w.s a0, fa7
737 ; RV32IF-NEXT: #NO_APP
740 ; RV64IF-LABEL: explicit_register_f17:
742 ; RV64IF-NEXT: fmv.s fa7, fa0
744 ; RV64IF-NEXT: fcvt.w.s a0, fa7
745 ; RV64IF-NEXT: #NO_APP
747 %1 = tail call i32 asm "fcvt.w.s $0, $1", "=r,{f17}"(float %a)
751 define i32 @explicit_register_fa7(float %a) nounwind {
752 ; RV32IF-LABEL: explicit_register_fa7:
754 ; RV32IF-NEXT: fmv.s fa7, fa0
756 ; RV32IF-NEXT: fcvt.w.s a0, fa7
757 ; RV32IF-NEXT: #NO_APP
760 ; RV64IF-LABEL: explicit_register_fa7:
762 ; RV64IF-NEXT: fmv.s fa7, fa0
764 ; RV64IF-NEXT: fcvt.w.s a0, fa7
765 ; RV64IF-NEXT: #NO_APP
767 %1 = tail call i32 asm "fcvt.w.s $0, $1", "=r,{fa7}"(float %a)
771 ; NOTE: This test uses `f18` (`fs2`) as an input, so it should be saved.
772 define i32 @explicit_register_f18(float %a) nounwind {
773 ; RV32IF-LABEL: explicit_register_f18:
775 ; RV32IF-NEXT: addi sp, sp, -16
776 ; RV32IF-NEXT: fsw fs2, 12(sp) # 4-byte Folded Spill
777 ; RV32IF-NEXT: fmv.s fs2, fa0
779 ; RV32IF-NEXT: fcvt.w.s a0, fs2
780 ; RV32IF-NEXT: #NO_APP
781 ; RV32IF-NEXT: flw fs2, 12(sp) # 4-byte Folded Reload
782 ; RV32IF-NEXT: addi sp, sp, 16
785 ; RV64IF-LABEL: explicit_register_f18:
787 ; RV64IF-NEXT: addi sp, sp, -16
788 ; RV64IF-NEXT: fsw fs2, 12(sp) # 4-byte Folded Spill
789 ; RV64IF-NEXT: fmv.s fs2, fa0
791 ; RV64IF-NEXT: fcvt.w.s a0, fs2
792 ; RV64IF-NEXT: #NO_APP
793 ; RV64IF-NEXT: flw fs2, 12(sp) # 4-byte Folded Reload
794 ; RV64IF-NEXT: addi sp, sp, 16
796 %1 = tail call i32 asm "fcvt.w.s $0, $1", "=r,{f18}"(float %a)
800 ; NOTE: This test uses `fs2` (`f18`) as an input, so it should be saved.
801 define i32 @explicit_register_fs2(float %a) nounwind {
802 ; RV32IF-LABEL: explicit_register_fs2:
804 ; RV32IF-NEXT: addi sp, sp, -16
805 ; RV32IF-NEXT: fsw fs2, 12(sp) # 4-byte Folded Spill
806 ; RV32IF-NEXT: fmv.s fs2, fa0
808 ; RV32IF-NEXT: fcvt.w.s a0, fs2
809 ; RV32IF-NEXT: #NO_APP
810 ; RV32IF-NEXT: flw fs2, 12(sp) # 4-byte Folded Reload
811 ; RV32IF-NEXT: addi sp, sp, 16
814 ; RV64IF-LABEL: explicit_register_fs2:
816 ; RV64IF-NEXT: addi sp, sp, -16
817 ; RV64IF-NEXT: fsw fs2, 12(sp) # 4-byte Folded Spill
818 ; RV64IF-NEXT: fmv.s fs2, fa0
820 ; RV64IF-NEXT: fcvt.w.s a0, fs2
821 ; RV64IF-NEXT: #NO_APP
822 ; RV64IF-NEXT: flw fs2, 12(sp) # 4-byte Folded Reload
823 ; RV64IF-NEXT: addi sp, sp, 16
825 %1 = tail call i32 asm "fcvt.w.s $0, $1", "=r,{fs2}"(float %a)
829 ; NOTE: This test uses `f19` (`fs3`) as an input, so it should be saved.
830 define i32 @explicit_register_f19(float %a) nounwind {
831 ; RV32IF-LABEL: explicit_register_f19:
833 ; RV32IF-NEXT: addi sp, sp, -16
834 ; RV32IF-NEXT: fsw fs3, 12(sp) # 4-byte Folded Spill
835 ; RV32IF-NEXT: fmv.s fs3, fa0
837 ; RV32IF-NEXT: fcvt.w.s a0, fs3
838 ; RV32IF-NEXT: #NO_APP
839 ; RV32IF-NEXT: flw fs3, 12(sp) # 4-byte Folded Reload
840 ; RV32IF-NEXT: addi sp, sp, 16
843 ; RV64IF-LABEL: explicit_register_f19:
845 ; RV64IF-NEXT: addi sp, sp, -16
846 ; RV64IF-NEXT: fsw fs3, 12(sp) # 4-byte Folded Spill
847 ; RV64IF-NEXT: fmv.s fs3, fa0
849 ; RV64IF-NEXT: fcvt.w.s a0, fs3
850 ; RV64IF-NEXT: #NO_APP
851 ; RV64IF-NEXT: flw fs3, 12(sp) # 4-byte Folded Reload
852 ; RV64IF-NEXT: addi sp, sp, 16
854 %1 = tail call i32 asm "fcvt.w.s $0, $1", "=r,{f19}"(float %a)
858 ; NOTE: This test uses `fs3` (`f19`) as an input, so it should be saved.
859 define i32 @explicit_register_fs3(float %a) nounwind {
860 ; RV32IF-LABEL: explicit_register_fs3:
862 ; RV32IF-NEXT: addi sp, sp, -16
863 ; RV32IF-NEXT: fsw fs3, 12(sp) # 4-byte Folded Spill
864 ; RV32IF-NEXT: fmv.s fs3, fa0
866 ; RV32IF-NEXT: fcvt.w.s a0, fs3
867 ; RV32IF-NEXT: #NO_APP
868 ; RV32IF-NEXT: flw fs3, 12(sp) # 4-byte Folded Reload
869 ; RV32IF-NEXT: addi sp, sp, 16
872 ; RV64IF-LABEL: explicit_register_fs3:
874 ; RV64IF-NEXT: addi sp, sp, -16
875 ; RV64IF-NEXT: fsw fs3, 12(sp) # 4-byte Folded Spill
876 ; RV64IF-NEXT: fmv.s fs3, fa0
878 ; RV64IF-NEXT: fcvt.w.s a0, fs3
879 ; RV64IF-NEXT: #NO_APP
880 ; RV64IF-NEXT: flw fs3, 12(sp) # 4-byte Folded Reload
881 ; RV64IF-NEXT: addi sp, sp, 16
883 %1 = tail call i32 asm "fcvt.w.s $0, $1", "=r,{fs3}"(float %a)
887 ; NOTE: This test uses `f20` (`fs4`) as an input, so it should be saved.
888 define i32 @explicit_register_f20(float %a) nounwind {
889 ; RV32IF-LABEL: explicit_register_f20:
891 ; RV32IF-NEXT: addi sp, sp, -16
892 ; RV32IF-NEXT: fsw fs4, 12(sp) # 4-byte Folded Spill
893 ; RV32IF-NEXT: fmv.s fs4, fa0
895 ; RV32IF-NEXT: fcvt.w.s a0, fs4
896 ; RV32IF-NEXT: #NO_APP
897 ; RV32IF-NEXT: flw fs4, 12(sp) # 4-byte Folded Reload
898 ; RV32IF-NEXT: addi sp, sp, 16
901 ; RV64IF-LABEL: explicit_register_f20:
903 ; RV64IF-NEXT: addi sp, sp, -16
904 ; RV64IF-NEXT: fsw fs4, 12(sp) # 4-byte Folded Spill
905 ; RV64IF-NEXT: fmv.s fs4, fa0
907 ; RV64IF-NEXT: fcvt.w.s a0, fs4
908 ; RV64IF-NEXT: #NO_APP
909 ; RV64IF-NEXT: flw fs4, 12(sp) # 4-byte Folded Reload
910 ; RV64IF-NEXT: addi sp, sp, 16
912 %1 = tail call i32 asm "fcvt.w.s $0, $1", "=r,{f20}"(float %a)
916 ; NOTE: This test uses `fs4` (`f20`) as an input, so it should be saved.
917 define i32 @explicit_register_fs4(float %a) nounwind {
918 ; RV32IF-LABEL: explicit_register_fs4:
920 ; RV32IF-NEXT: addi sp, sp, -16
921 ; RV32IF-NEXT: fsw fs4, 12(sp) # 4-byte Folded Spill
922 ; RV32IF-NEXT: fmv.s fs4, fa0
924 ; RV32IF-NEXT: fcvt.w.s a0, fs4
925 ; RV32IF-NEXT: #NO_APP
926 ; RV32IF-NEXT: flw fs4, 12(sp) # 4-byte Folded Reload
927 ; RV32IF-NEXT: addi sp, sp, 16
930 ; RV64IF-LABEL: explicit_register_fs4:
932 ; RV64IF-NEXT: addi sp, sp, -16
933 ; RV64IF-NEXT: fsw fs4, 12(sp) # 4-byte Folded Spill
934 ; RV64IF-NEXT: fmv.s fs4, fa0
936 ; RV64IF-NEXT: fcvt.w.s a0, fs4
937 ; RV64IF-NEXT: #NO_APP
938 ; RV64IF-NEXT: flw fs4, 12(sp) # 4-byte Folded Reload
939 ; RV64IF-NEXT: addi sp, sp, 16
941 %1 = tail call i32 asm "fcvt.w.s $0, $1", "=r,{fs4}"(float %a)
945 ; NOTE: This test uses `f21` (`fs5`) as an input, so it should be saved.
946 define i32 @explicit_register_f21(float %a) nounwind {
947 ; RV32IF-LABEL: explicit_register_f21:
949 ; RV32IF-NEXT: addi sp, sp, -16
950 ; RV32IF-NEXT: fsw fs5, 12(sp) # 4-byte Folded Spill
951 ; RV32IF-NEXT: fmv.s fs5, fa0
953 ; RV32IF-NEXT: fcvt.w.s a0, fs5
954 ; RV32IF-NEXT: #NO_APP
955 ; RV32IF-NEXT: flw fs5, 12(sp) # 4-byte Folded Reload
956 ; RV32IF-NEXT: addi sp, sp, 16
959 ; RV64IF-LABEL: explicit_register_f21:
961 ; RV64IF-NEXT: addi sp, sp, -16
962 ; RV64IF-NEXT: fsw fs5, 12(sp) # 4-byte Folded Spill
963 ; RV64IF-NEXT: fmv.s fs5, fa0
965 ; RV64IF-NEXT: fcvt.w.s a0, fs5
966 ; RV64IF-NEXT: #NO_APP
967 ; RV64IF-NEXT: flw fs5, 12(sp) # 4-byte Folded Reload
968 ; RV64IF-NEXT: addi sp, sp, 16
970 %1 = tail call i32 asm "fcvt.w.s $0, $1", "=r,{f21}"(float %a)
974 ; NOTE: This test uses `fs5` (`f21`) as an input, so it should be saved.
975 define i32 @explicit_register_fs5(float %a) nounwind {
976 ; RV32IF-LABEL: explicit_register_fs5:
978 ; RV32IF-NEXT: addi sp, sp, -16
979 ; RV32IF-NEXT: fsw fs5, 12(sp) # 4-byte Folded Spill
980 ; RV32IF-NEXT: fmv.s fs5, fa0
982 ; RV32IF-NEXT: fcvt.w.s a0, fs5
983 ; RV32IF-NEXT: #NO_APP
984 ; RV32IF-NEXT: flw fs5, 12(sp) # 4-byte Folded Reload
985 ; RV32IF-NEXT: addi sp, sp, 16
988 ; RV64IF-LABEL: explicit_register_fs5:
990 ; RV64IF-NEXT: addi sp, sp, -16
991 ; RV64IF-NEXT: fsw fs5, 12(sp) # 4-byte Folded Spill
992 ; RV64IF-NEXT: fmv.s fs5, fa0
994 ; RV64IF-NEXT: fcvt.w.s a0, fs5
995 ; RV64IF-NEXT: #NO_APP
996 ; RV64IF-NEXT: flw fs5, 12(sp) # 4-byte Folded Reload
997 ; RV64IF-NEXT: addi sp, sp, 16
999 %1 = tail call i32 asm "fcvt.w.s $0, $1", "=r,{fs5}"(float %a)
1003 ; NOTE: This test uses `f22` (`fs6`) as an input, so it should be saved.
1004 define i32 @explicit_register_f22(float %a) nounwind {
1005 ; RV32IF-LABEL: explicit_register_f22:
1007 ; RV32IF-NEXT: addi sp, sp, -16
1008 ; RV32IF-NEXT: fsw fs6, 12(sp) # 4-byte Folded Spill
1009 ; RV32IF-NEXT: fmv.s fs6, fa0
1011 ; RV32IF-NEXT: fcvt.w.s a0, fs6
1012 ; RV32IF-NEXT: #NO_APP
1013 ; RV32IF-NEXT: flw fs6, 12(sp) # 4-byte Folded Reload
1014 ; RV32IF-NEXT: addi sp, sp, 16
1017 ; RV64IF-LABEL: explicit_register_f22:
1019 ; RV64IF-NEXT: addi sp, sp, -16
1020 ; RV64IF-NEXT: fsw fs6, 12(sp) # 4-byte Folded Spill
1021 ; RV64IF-NEXT: fmv.s fs6, fa0
1023 ; RV64IF-NEXT: fcvt.w.s a0, fs6
1024 ; RV64IF-NEXT: #NO_APP
1025 ; RV64IF-NEXT: flw fs6, 12(sp) # 4-byte Folded Reload
1026 ; RV64IF-NEXT: addi sp, sp, 16
1028 %1 = tail call i32 asm "fcvt.w.s $0, $1", "=r,{f22}"(float %a)
1032 ; NOTE: This test uses `fs6` (`f22`) as an input, so it should be saved.
1033 define i32 @explicit_register_fs6(float %a) nounwind {
1034 ; RV32IF-LABEL: explicit_register_fs6:
1036 ; RV32IF-NEXT: addi sp, sp, -16
1037 ; RV32IF-NEXT: fsw fs6, 12(sp) # 4-byte Folded Spill
1038 ; RV32IF-NEXT: fmv.s fs6, fa0
1040 ; RV32IF-NEXT: fcvt.w.s a0, fs6
1041 ; RV32IF-NEXT: #NO_APP
1042 ; RV32IF-NEXT: flw fs6, 12(sp) # 4-byte Folded Reload
1043 ; RV32IF-NEXT: addi sp, sp, 16
1046 ; RV64IF-LABEL: explicit_register_fs6:
1048 ; RV64IF-NEXT: addi sp, sp, -16
1049 ; RV64IF-NEXT: fsw fs6, 12(sp) # 4-byte Folded Spill
1050 ; RV64IF-NEXT: fmv.s fs6, fa0
1052 ; RV64IF-NEXT: fcvt.w.s a0, fs6
1053 ; RV64IF-NEXT: #NO_APP
1054 ; RV64IF-NEXT: flw fs6, 12(sp) # 4-byte Folded Reload
1055 ; RV64IF-NEXT: addi sp, sp, 16
1057 %1 = tail call i32 asm "fcvt.w.s $0, $1", "=r,{fs6}"(float %a)
1061 ; NOTE: This test uses `f23` (`fs7`) as an input, so it should be saved.
1062 define i32 @explicit_register_f23(float %a) nounwind {
1063 ; RV32IF-LABEL: explicit_register_f23:
1065 ; RV32IF-NEXT: addi sp, sp, -16
1066 ; RV32IF-NEXT: fsw fs7, 12(sp) # 4-byte Folded Spill
1067 ; RV32IF-NEXT: fmv.s fs7, fa0
1069 ; RV32IF-NEXT: fcvt.w.s a0, fs7
1070 ; RV32IF-NEXT: #NO_APP
1071 ; RV32IF-NEXT: flw fs7, 12(sp) # 4-byte Folded Reload
1072 ; RV32IF-NEXT: addi sp, sp, 16
1075 ; RV64IF-LABEL: explicit_register_f23:
1077 ; RV64IF-NEXT: addi sp, sp, -16
1078 ; RV64IF-NEXT: fsw fs7, 12(sp) # 4-byte Folded Spill
1079 ; RV64IF-NEXT: fmv.s fs7, fa0
1081 ; RV64IF-NEXT: fcvt.w.s a0, fs7
1082 ; RV64IF-NEXT: #NO_APP
1083 ; RV64IF-NEXT: flw fs7, 12(sp) # 4-byte Folded Reload
1084 ; RV64IF-NEXT: addi sp, sp, 16
1086 %1 = tail call i32 asm "fcvt.w.s $0, $1", "=r,{f23}"(float %a)
1090 ; NOTE: This test uses `fs7` (`f23`) as an input, so it should be saved.
1091 define i32 @explicit_register_fs7(float %a) nounwind {
1092 ; RV32IF-LABEL: explicit_register_fs7:
1094 ; RV32IF-NEXT: addi sp, sp, -16
1095 ; RV32IF-NEXT: fsw fs7, 12(sp) # 4-byte Folded Spill
1096 ; RV32IF-NEXT: fmv.s fs7, fa0
1098 ; RV32IF-NEXT: fcvt.w.s a0, fs7
1099 ; RV32IF-NEXT: #NO_APP
1100 ; RV32IF-NEXT: flw fs7, 12(sp) # 4-byte Folded Reload
1101 ; RV32IF-NEXT: addi sp, sp, 16
1104 ; RV64IF-LABEL: explicit_register_fs7:
1106 ; RV64IF-NEXT: addi sp, sp, -16
1107 ; RV64IF-NEXT: fsw fs7, 12(sp) # 4-byte Folded Spill
1108 ; RV64IF-NEXT: fmv.s fs7, fa0
1110 ; RV64IF-NEXT: fcvt.w.s a0, fs7
1111 ; RV64IF-NEXT: #NO_APP
1112 ; RV64IF-NEXT: flw fs7, 12(sp) # 4-byte Folded Reload
1113 ; RV64IF-NEXT: addi sp, sp, 16
1115 %1 = tail call i32 asm "fcvt.w.s $0, $1", "=r,{fs7}"(float %a)
1119 ; NOTE: This test uses `f24` (`fs8`) as an input, so it should be saved.
1120 define i32 @explicit_register_f24(float %a) nounwind {
1121 ; RV32IF-LABEL: explicit_register_f24:
1123 ; RV32IF-NEXT: addi sp, sp, -16
1124 ; RV32IF-NEXT: fsw fs8, 12(sp) # 4-byte Folded Spill
1125 ; RV32IF-NEXT: fmv.s fs8, fa0
1127 ; RV32IF-NEXT: fcvt.w.s a0, fs8
1128 ; RV32IF-NEXT: #NO_APP
1129 ; RV32IF-NEXT: flw fs8, 12(sp) # 4-byte Folded Reload
1130 ; RV32IF-NEXT: addi sp, sp, 16
1133 ; RV64IF-LABEL: explicit_register_f24:
1135 ; RV64IF-NEXT: addi sp, sp, -16
1136 ; RV64IF-NEXT: fsw fs8, 12(sp) # 4-byte Folded Spill
1137 ; RV64IF-NEXT: fmv.s fs8, fa0
1139 ; RV64IF-NEXT: fcvt.w.s a0, fs8
1140 ; RV64IF-NEXT: #NO_APP
1141 ; RV64IF-NEXT: flw fs8, 12(sp) # 4-byte Folded Reload
1142 ; RV64IF-NEXT: addi sp, sp, 16
1144 %1 = tail call i32 asm "fcvt.w.s $0, $1", "=r,{f24}"(float %a)
1148 ; NOTE: This test uses `fs8` (`f24`) as an input, so it should be saved.
1149 define i32 @explicit_register_fs8(float %a) nounwind {
1150 ; RV32IF-LABEL: explicit_register_fs8:
1152 ; RV32IF-NEXT: addi sp, sp, -16
1153 ; RV32IF-NEXT: fsw fs8, 12(sp) # 4-byte Folded Spill
1154 ; RV32IF-NEXT: fmv.s fs8, fa0
1156 ; RV32IF-NEXT: fcvt.w.s a0, fs8
1157 ; RV32IF-NEXT: #NO_APP
1158 ; RV32IF-NEXT: flw fs8, 12(sp) # 4-byte Folded Reload
1159 ; RV32IF-NEXT: addi sp, sp, 16
1162 ; RV64IF-LABEL: explicit_register_fs8:
1164 ; RV64IF-NEXT: addi sp, sp, -16
1165 ; RV64IF-NEXT: fsw fs8, 12(sp) # 4-byte Folded Spill
1166 ; RV64IF-NEXT: fmv.s fs8, fa0
1168 ; RV64IF-NEXT: fcvt.w.s a0, fs8
1169 ; RV64IF-NEXT: #NO_APP
1170 ; RV64IF-NEXT: flw fs8, 12(sp) # 4-byte Folded Reload
1171 ; RV64IF-NEXT: addi sp, sp, 16
1173 %1 = tail call i32 asm "fcvt.w.s $0, $1", "=r,{fs8}"(float %a)
1177 ; NOTE: This test uses `f25` (`fs9`) as an input, so it should be saved.
1178 define i32 @explicit_register_f25(float %a) nounwind {
1179 ; RV32IF-LABEL: explicit_register_f25:
1181 ; RV32IF-NEXT: addi sp, sp, -16
1182 ; RV32IF-NEXT: fsw fs9, 12(sp) # 4-byte Folded Spill
1183 ; RV32IF-NEXT: fmv.s fs9, fa0
1185 ; RV32IF-NEXT: fcvt.w.s a0, fs9
1186 ; RV32IF-NEXT: #NO_APP
1187 ; RV32IF-NEXT: flw fs9, 12(sp) # 4-byte Folded Reload
1188 ; RV32IF-NEXT: addi sp, sp, 16
1191 ; RV64IF-LABEL: explicit_register_f25:
1193 ; RV64IF-NEXT: addi sp, sp, -16
1194 ; RV64IF-NEXT: fsw fs9, 12(sp) # 4-byte Folded Spill
1195 ; RV64IF-NEXT: fmv.s fs9, fa0
1197 ; RV64IF-NEXT: fcvt.w.s a0, fs9
1198 ; RV64IF-NEXT: #NO_APP
1199 ; RV64IF-NEXT: flw fs9, 12(sp) # 4-byte Folded Reload
1200 ; RV64IF-NEXT: addi sp, sp, 16
1202 %1 = tail call i32 asm "fcvt.w.s $0, $1", "=r,{f25}"(float %a)
1206 ; NOTE: This test uses `fs9` (`f25`) as an input, so it should be saved.
1207 define i32 @explicit_register_fs9(float %a) nounwind {
1208 ; RV32IF-LABEL: explicit_register_fs9:
1210 ; RV32IF-NEXT: addi sp, sp, -16
1211 ; RV32IF-NEXT: fsw fs9, 12(sp) # 4-byte Folded Spill
1212 ; RV32IF-NEXT: fmv.s fs9, fa0
1214 ; RV32IF-NEXT: fcvt.w.s a0, fs9
1215 ; RV32IF-NEXT: #NO_APP
1216 ; RV32IF-NEXT: flw fs9, 12(sp) # 4-byte Folded Reload
1217 ; RV32IF-NEXT: addi sp, sp, 16
1220 ; RV64IF-LABEL: explicit_register_fs9:
1222 ; RV64IF-NEXT: addi sp, sp, -16
1223 ; RV64IF-NEXT: fsw fs9, 12(sp) # 4-byte Folded Spill
1224 ; RV64IF-NEXT: fmv.s fs9, fa0
1226 ; RV64IF-NEXT: fcvt.w.s a0, fs9
1227 ; RV64IF-NEXT: #NO_APP
1228 ; RV64IF-NEXT: flw fs9, 12(sp) # 4-byte Folded Reload
1229 ; RV64IF-NEXT: addi sp, sp, 16
1231 %1 = tail call i32 asm "fcvt.w.s $0, $1", "=r,{fs9}"(float %a)
1235 ; NOTE: This test uses `f26` (`fs10`) as an input, so it should be saved.
1236 define i32 @explicit_register_f26(float %a) nounwind {
1237 ; RV32IF-LABEL: explicit_register_f26:
1239 ; RV32IF-NEXT: addi sp, sp, -16
1240 ; RV32IF-NEXT: fsw fs10, 12(sp) # 4-byte Folded Spill
1241 ; RV32IF-NEXT: fmv.s fs10, fa0
1243 ; RV32IF-NEXT: fcvt.w.s a0, fs10
1244 ; RV32IF-NEXT: #NO_APP
1245 ; RV32IF-NEXT: flw fs10, 12(sp) # 4-byte Folded Reload
1246 ; RV32IF-NEXT: addi sp, sp, 16
1249 ; RV64IF-LABEL: explicit_register_f26:
1251 ; RV64IF-NEXT: addi sp, sp, -16
1252 ; RV64IF-NEXT: fsw fs10, 12(sp) # 4-byte Folded Spill
1253 ; RV64IF-NEXT: fmv.s fs10, fa0
1255 ; RV64IF-NEXT: fcvt.w.s a0, fs10
1256 ; RV64IF-NEXT: #NO_APP
1257 ; RV64IF-NEXT: flw fs10, 12(sp) # 4-byte Folded Reload
1258 ; RV64IF-NEXT: addi sp, sp, 16
1260 %1 = tail call i32 asm "fcvt.w.s $0, $1", "=r,{f26}"(float %a)
1264 ; NOTE: This test uses `fs10` (`f26`) as an input, so it should be saved.
1265 define i32 @explicit_register_fs10(float %a) nounwind {
1266 ; RV32IF-LABEL: explicit_register_fs10:
1268 ; RV32IF-NEXT: addi sp, sp, -16
1269 ; RV32IF-NEXT: fsw fs10, 12(sp) # 4-byte Folded Spill
1270 ; RV32IF-NEXT: fmv.s fs10, fa0
1272 ; RV32IF-NEXT: fcvt.w.s a0, fs10
1273 ; RV32IF-NEXT: #NO_APP
1274 ; RV32IF-NEXT: flw fs10, 12(sp) # 4-byte Folded Reload
1275 ; RV32IF-NEXT: addi sp, sp, 16
1278 ; RV64IF-LABEL: explicit_register_fs10:
1280 ; RV64IF-NEXT: addi sp, sp, -16
1281 ; RV64IF-NEXT: fsw fs10, 12(sp) # 4-byte Folded Spill
1282 ; RV64IF-NEXT: fmv.s fs10, fa0
1284 ; RV64IF-NEXT: fcvt.w.s a0, fs10
1285 ; RV64IF-NEXT: #NO_APP
1286 ; RV64IF-NEXT: flw fs10, 12(sp) # 4-byte Folded Reload
1287 ; RV64IF-NEXT: addi sp, sp, 16
1289 %1 = tail call i32 asm "fcvt.w.s $0, $1", "=r,{fs10}"(float %a)
1293 ; NOTE: This test uses `f27` (`fs11`) as an input, so it should be saved.
1294 define i32 @explicit_register_f27(float %a) nounwind {
1295 ; RV32IF-LABEL: explicit_register_f27:
1297 ; RV32IF-NEXT: addi sp, sp, -16
1298 ; RV32IF-NEXT: fsw fs11, 12(sp) # 4-byte Folded Spill
1299 ; RV32IF-NEXT: fmv.s fs11, fa0
1301 ; RV32IF-NEXT: fcvt.w.s a0, fs11
1302 ; RV32IF-NEXT: #NO_APP
1303 ; RV32IF-NEXT: flw fs11, 12(sp) # 4-byte Folded Reload
1304 ; RV32IF-NEXT: addi sp, sp, 16
1307 ; RV64IF-LABEL: explicit_register_f27:
1309 ; RV64IF-NEXT: addi sp, sp, -16
1310 ; RV64IF-NEXT: fsw fs11, 12(sp) # 4-byte Folded Spill
1311 ; RV64IF-NEXT: fmv.s fs11, fa0
1313 ; RV64IF-NEXT: fcvt.w.s a0, fs11
1314 ; RV64IF-NEXT: #NO_APP
1315 ; RV64IF-NEXT: flw fs11, 12(sp) # 4-byte Folded Reload
1316 ; RV64IF-NEXT: addi sp, sp, 16
1318 %1 = tail call i32 asm "fcvt.w.s $0, $1", "=r,{f27}"(float %a)
1322 ; NOTE: This test uses `fs11` (`f27`) as an input, so it should be saved.
1323 define i32 @explicit_register_fs11(float %a) nounwind {
1324 ; RV32IF-LABEL: explicit_register_fs11:
1326 ; RV32IF-NEXT: addi sp, sp, -16
1327 ; RV32IF-NEXT: fsw fs11, 12(sp) # 4-byte Folded Spill
1328 ; RV32IF-NEXT: fmv.s fs11, fa0
1330 ; RV32IF-NEXT: fcvt.w.s a0, fs11
1331 ; RV32IF-NEXT: #NO_APP
1332 ; RV32IF-NEXT: flw fs11, 12(sp) # 4-byte Folded Reload
1333 ; RV32IF-NEXT: addi sp, sp, 16
1336 ; RV64IF-LABEL: explicit_register_fs11:
1338 ; RV64IF-NEXT: addi sp, sp, -16
1339 ; RV64IF-NEXT: fsw fs11, 12(sp) # 4-byte Folded Spill
1340 ; RV64IF-NEXT: fmv.s fs11, fa0
1342 ; RV64IF-NEXT: fcvt.w.s a0, fs11
1343 ; RV64IF-NEXT: #NO_APP
1344 ; RV64IF-NEXT: flw fs11, 12(sp) # 4-byte Folded Reload
1345 ; RV64IF-NEXT: addi sp, sp, 16
1347 %1 = tail call i32 asm "fcvt.w.s $0, $1", "=r,{fs11}"(float %a)
1351 define i32 @explicit_register_f28(float %a) nounwind {
1352 ; RV32IF-LABEL: explicit_register_f28:
1354 ; RV32IF-NEXT: fmv.s ft8, fa0
1356 ; RV32IF-NEXT: fcvt.w.s a0, ft8
1357 ; RV32IF-NEXT: #NO_APP
1360 ; RV64IF-LABEL: explicit_register_f28:
1362 ; RV64IF-NEXT: fmv.s ft8, fa0
1364 ; RV64IF-NEXT: fcvt.w.s a0, ft8
1365 ; RV64IF-NEXT: #NO_APP
1367 %1 = tail call i32 asm "fcvt.w.s $0, $1", "=r,{f28}"(float %a)
1371 define i32 @explicit_register_ft8(float %a) nounwind {
1372 ; RV32IF-LABEL: explicit_register_ft8:
1374 ; RV32IF-NEXT: fmv.s ft8, fa0
1376 ; RV32IF-NEXT: fcvt.w.s a0, ft8
1377 ; RV32IF-NEXT: #NO_APP
1380 ; RV64IF-LABEL: explicit_register_ft8:
1382 ; RV64IF-NEXT: fmv.s ft8, fa0
1384 ; RV64IF-NEXT: fcvt.w.s a0, ft8
1385 ; RV64IF-NEXT: #NO_APP
1387 %1 = tail call i32 asm "fcvt.w.s $0, $1", "=r,{ft8}"(float %a)
1391 define i32 @explicit_register_f29(float %a) nounwind {
1392 ; RV32IF-LABEL: explicit_register_f29:
1394 ; RV32IF-NEXT: fmv.s ft9, fa0
1396 ; RV32IF-NEXT: fcvt.w.s a0, ft9
1397 ; RV32IF-NEXT: #NO_APP
1400 ; RV64IF-LABEL: explicit_register_f29:
1402 ; RV64IF-NEXT: fmv.s ft9, fa0
1404 ; RV64IF-NEXT: fcvt.w.s a0, ft9
1405 ; RV64IF-NEXT: #NO_APP
1407 %1 = tail call i32 asm "fcvt.w.s $0, $1", "=r,{f29}"(float %a)
1411 define i32 @explicit_register_ft9(float %a) nounwind {
1412 ; RV32IF-LABEL: explicit_register_ft9:
1414 ; RV32IF-NEXT: fmv.s ft9, fa0
1416 ; RV32IF-NEXT: fcvt.w.s a0, ft9
1417 ; RV32IF-NEXT: #NO_APP
1420 ; RV64IF-LABEL: explicit_register_ft9:
1422 ; RV64IF-NEXT: fmv.s ft9, fa0
1424 ; RV64IF-NEXT: fcvt.w.s a0, ft9
1425 ; RV64IF-NEXT: #NO_APP
1427 %1 = tail call i32 asm "fcvt.w.s $0, $1", "=r,{ft9}"(float %a)
1431 define i32 @explicit_register_f30(float %a) nounwind {
1432 ; RV32IF-LABEL: explicit_register_f30:
1434 ; RV32IF-NEXT: fmv.s ft10, fa0
1436 ; RV32IF-NEXT: fcvt.w.s a0, ft10
1437 ; RV32IF-NEXT: #NO_APP
1440 ; RV64IF-LABEL: explicit_register_f30:
1442 ; RV64IF-NEXT: fmv.s ft10, fa0
1444 ; RV64IF-NEXT: fcvt.w.s a0, ft10
1445 ; RV64IF-NEXT: #NO_APP
1447 %1 = tail call i32 asm "fcvt.w.s $0, $1", "=r,{f30}"(float %a)
1451 define i32 @explicit_register_ft10(float %a) nounwind {
1452 ; RV32IF-LABEL: explicit_register_ft10:
1454 ; RV32IF-NEXT: fmv.s ft10, fa0
1456 ; RV32IF-NEXT: fcvt.w.s a0, ft10
1457 ; RV32IF-NEXT: #NO_APP
1460 ; RV64IF-LABEL: explicit_register_ft10:
1462 ; RV64IF-NEXT: fmv.s ft10, fa0
1464 ; RV64IF-NEXT: fcvt.w.s a0, ft10
1465 ; RV64IF-NEXT: #NO_APP
1467 %1 = tail call i32 asm "fcvt.w.s $0, $1", "=r,{ft10}"(float %a)
1471 define i32 @explicit_register_f31(float %a) nounwind {
1472 ; RV32IF-LABEL: explicit_register_f31:
1474 ; RV32IF-NEXT: fmv.s ft11, fa0
1476 ; RV32IF-NEXT: fcvt.w.s a0, ft11
1477 ; RV32IF-NEXT: #NO_APP
1480 ; RV64IF-LABEL: explicit_register_f31:
1482 ; RV64IF-NEXT: fmv.s ft11, fa0
1484 ; RV64IF-NEXT: fcvt.w.s a0, ft11
1485 ; RV64IF-NEXT: #NO_APP
1487 %1 = tail call i32 asm "fcvt.w.s $0, $1", "=r,{f31}"(float %a)
1491 define i32 @explicit_register_ft11(float %a) nounwind {
1492 ; RV32IF-LABEL: explicit_register_ft11:
1494 ; RV32IF-NEXT: fmv.s ft11, fa0
1496 ; RV32IF-NEXT: fcvt.w.s a0, ft11
1497 ; RV32IF-NEXT: #NO_APP
1500 ; RV64IF-LABEL: explicit_register_ft11:
1502 ; RV64IF-NEXT: fmv.s ft11, fa0
1504 ; RV64IF-NEXT: fcvt.w.s a0, ft11
1505 ; RV64IF-NEXT: #NO_APP
1507 %1 = tail call i32 asm "fcvt.w.s $0, $1", "=r,{ft11}"(float %a)