1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 3
2 ; RUN: llc < %s -mtriple=riscv64 -mattr=+d | FileCheck %s
4 define void @test(ptr %0, ptr %1) nounwind {
7 ; CHECK-NEXT: addi sp, sp, -80
8 ; CHECK-NEXT: sd ra, 72(sp) # 8-byte Folded Spill
9 ; CHECK-NEXT: sd s0, 64(sp) # 8-byte Folded Spill
10 ; CHECK-NEXT: sd s1, 56(sp) # 8-byte Folded Spill
11 ; CHECK-NEXT: fsd fs0, 48(sp) # 8-byte Folded Spill
12 ; CHECK-NEXT: fsd fs1, 40(sp) # 8-byte Folded Spill
13 ; CHECK-NEXT: fsd fs2, 32(sp) # 8-byte Folded Spill
14 ; CHECK-NEXT: fsd fs3, 24(sp) # 8-byte Folded Spill
15 ; CHECK-NEXT: fsd fs4, 16(sp) # 8-byte Folded Spill
16 ; CHECK-NEXT: fsd fs5, 8(sp) # 8-byte Folded Spill
17 ; CHECK-NEXT: fsd fs6, 0(sp) # 8-byte Folded Spill
18 ; CHECK-NEXT: mv s0, a1
19 ; CHECK-NEXT: mv s1, a0
20 ; CHECK-NEXT: lhu a0, 12(a0)
21 ; CHECK-NEXT: fmv.w.x fa0, a0
22 ; CHECK-NEXT: call __extendhfsf2
23 ; CHECK-NEXT: fmv.s fs0, fa0
24 ; CHECK-NEXT: lhu a0, 10(s1)
25 ; CHECK-NEXT: fmv.w.x fa0, a0
26 ; CHECK-NEXT: call __extendhfsf2
27 ; CHECK-NEXT: fmv.s fs1, fa0
28 ; CHECK-NEXT: lhu a0, 8(s1)
29 ; CHECK-NEXT: fmv.w.x fa0, a0
30 ; CHECK-NEXT: call __extendhfsf2
31 ; CHECK-NEXT: fmv.s fs2, fa0
32 ; CHECK-NEXT: lhu a0, 6(s1)
33 ; CHECK-NEXT: fmv.w.x fa0, a0
34 ; CHECK-NEXT: call __extendhfsf2
35 ; CHECK-NEXT: fmv.s fs3, fa0
36 ; CHECK-NEXT: lhu a0, 4(s1)
37 ; CHECK-NEXT: fmv.w.x fa0, a0
38 ; CHECK-NEXT: call __extendhfsf2
39 ; CHECK-NEXT: fmv.s fs4, fa0
40 ; CHECK-NEXT: lhu a0, 2(s1)
41 ; CHECK-NEXT: fmv.w.x fa0, a0
42 ; CHECK-NEXT: call __extendhfsf2
43 ; CHECK-NEXT: fmv.s fs5, fa0
44 ; CHECK-NEXT: lhu a0, 0(s1)
45 ; CHECK-NEXT: fmv.w.x fa0, a0
46 ; CHECK-NEXT: call __extendhfsf2
47 ; CHECK-NEXT: fcvt.d.s fs6, fa0
48 ; CHECK-NEXT: fcvt.d.s fs5, fs5
49 ; CHECK-NEXT: fcvt.d.s fs4, fs4
50 ; CHECK-NEXT: lhu a0, 14(s1)
51 ; CHECK-NEXT: fcvt.d.s fs3, fs3
52 ; CHECK-NEXT: fcvt.d.s fs2, fs2
53 ; CHECK-NEXT: fcvt.d.s fs1, fs1
54 ; CHECK-NEXT: fmv.w.x fa0, a0
55 ; CHECK-NEXT: fcvt.d.s fs0, fs0
56 ; CHECK-NEXT: call __extendhfsf2
57 ; CHECK-NEXT: fcvt.d.s fa5, fa0
58 ; CHECK-NEXT: fsd fa5, 56(s0)
59 ; CHECK-NEXT: fsd fs0, 48(s0)
60 ; CHECK-NEXT: fsd fs1, 40(s0)
61 ; CHECK-NEXT: fsd fs2, 32(s0)
62 ; CHECK-NEXT: fsd fs3, 24(s0)
63 ; CHECK-NEXT: fsd fs4, 16(s0)
64 ; CHECK-NEXT: fsd fs5, 8(s0)
65 ; CHECK-NEXT: fsd fs6, 0(s0)
66 ; CHECK-NEXT: ld ra, 72(sp) # 8-byte Folded Reload
67 ; CHECK-NEXT: ld s0, 64(sp) # 8-byte Folded Reload
68 ; CHECK-NEXT: ld s1, 56(sp) # 8-byte Folded Reload
69 ; CHECK-NEXT: fld fs0, 48(sp) # 8-byte Folded Reload
70 ; CHECK-NEXT: fld fs1, 40(sp) # 8-byte Folded Reload
71 ; CHECK-NEXT: fld fs2, 32(sp) # 8-byte Folded Reload
72 ; CHECK-NEXT: fld fs3, 24(sp) # 8-byte Folded Reload
73 ; CHECK-NEXT: fld fs4, 16(sp) # 8-byte Folded Reload
74 ; CHECK-NEXT: fld fs5, 8(sp) # 8-byte Folded Reload
75 ; CHECK-NEXT: fld fs6, 0(sp) # 8-byte Folded Reload
76 ; CHECK-NEXT: addi sp, sp, 80
78 %V1 = load <8 x half>, ptr %0
79 %V2 = fpext <8 x half> %V1 to <8 x double>
80 store <8 x double> %V2, ptr %1