1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=riscv32 -mattr=+f,+d -target-abi=ilp32 -verify-machineinstrs < %s \
5 define fastcc float @callee(<32 x float> %A) nounwind {
8 ; CHECK-NEXT: fmv.x.w a0, fa0
10 %B = extractelement <32 x float> %A, i32 0
14 ; With the fastcc, arguments will be passed by fa0-fa7 and ft0-ft11.
15 ; The rest will be pushed on the stack.
16 define float @caller(<32 x float> %A) nounwind {
17 ; CHECK-LABEL: caller:
19 ; CHECK-NEXT: addi sp, sp, -64
20 ; CHECK-NEXT: sw ra, 60(sp) # 4-byte Folded Spill
21 ; CHECK-NEXT: fmv.w.x fa0, a0
22 ; CHECK-NEXT: fmv.w.x fa1, a1
23 ; CHECK-NEXT: fmv.w.x fa2, a2
24 ; CHECK-NEXT: fmv.w.x fa3, a3
25 ; CHECK-NEXT: fmv.w.x fa4, a4
26 ; CHECK-NEXT: flw ft0, 64(sp)
27 ; CHECK-NEXT: flw ft1, 68(sp)
28 ; CHECK-NEXT: flw ft2, 72(sp)
29 ; CHECK-NEXT: flw ft3, 76(sp)
30 ; CHECK-NEXT: flw ft4, 80(sp)
31 ; CHECK-NEXT: flw ft5, 84(sp)
32 ; CHECK-NEXT: flw ft6, 88(sp)
33 ; CHECK-NEXT: flw ft7, 92(sp)
34 ; CHECK-NEXT: flw ft8, 96(sp)
35 ; CHECK-NEXT: flw ft9, 100(sp)
36 ; CHECK-NEXT: flw ft10, 104(sp)
37 ; CHECK-NEXT: flw ft11, 108(sp)
38 ; CHECK-NEXT: flw fs0, 112(sp)
39 ; CHECK-NEXT: flw fs1, 116(sp)
40 ; CHECK-NEXT: flw fs2, 120(sp)
41 ; CHECK-NEXT: flw fs3, 124(sp)
42 ; CHECK-NEXT: flw fs4, 128(sp)
43 ; CHECK-NEXT: flw fs5, 132(sp)
44 ; CHECK-NEXT: flw fs6, 136(sp)
45 ; CHECK-NEXT: flw fs7, 140(sp)
46 ; CHECK-NEXT: flw fs8, 144(sp)
47 ; CHECK-NEXT: flw fs9, 148(sp)
48 ; CHECK-NEXT: flw fs10, 152(sp)
49 ; CHECK-NEXT: flw fs11, 156(sp)
50 ; CHECK-NEXT: fmv.w.x fa5, a5
51 ; CHECK-NEXT: fmv.w.x fa6, a6
52 ; CHECK-NEXT: fmv.w.x fa7, a7
53 ; CHECK-NEXT: fsw fs11, 44(sp)
54 ; CHECK-NEXT: fsw fs10, 40(sp)
55 ; CHECK-NEXT: fsw fs9, 36(sp)
56 ; CHECK-NEXT: fsw fs8, 32(sp)
57 ; CHECK-NEXT: fsw fs7, 28(sp)
58 ; CHECK-NEXT: fsw fs6, 24(sp)
59 ; CHECK-NEXT: fsw fs5, 20(sp)
60 ; CHECK-NEXT: fsw fs4, 16(sp)
61 ; CHECK-NEXT: fsw fs3, 12(sp)
62 ; CHECK-NEXT: fsw fs2, 8(sp)
63 ; CHECK-NEXT: fsw fs1, 4(sp)
64 ; CHECK-NEXT: fsw fs0, 0(sp)
65 ; CHECK-NEXT: call callee
66 ; CHECK-NEXT: lw ra, 60(sp) # 4-byte Folded Reload
67 ; CHECK-NEXT: addi sp, sp, 64
69 %C = call fastcc float @callee(<32 x float> %A)