1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=riscv64 -mattr=+d,+v,+zfh,+zvfh -target-abi lp64d -verify-machineinstrs < %s | FileCheck %s
3 ; RUN: llc -mtriple=riscv32 -mattr=+d,+v,+zfh,+zvfh -target-abi ilp32d -verify-machineinstrs < %s | FileCheck %s
5 declare half @llvm.riscv.vfmv.f.s.nxv1f16(<vscale x 1 x half>)
7 define half @intrinsic_vfmv.f.s_s_nxv1f16(<vscale x 1 x half> %0) nounwind {
8 ; CHECK-LABEL: intrinsic_vfmv.f.s_s_nxv1f16:
9 ; CHECK: # %bb.0: # %entry
10 ; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, ma
11 ; CHECK-NEXT: vfmv.f.s fa0, v8
14 %a = call half @llvm.riscv.vfmv.f.s.nxv1f16(<vscale x 1 x half> %0)
18 declare half @llvm.riscv.vfmv.f.s.nxv2f16(<vscale x 2 x half>)
20 define half @intrinsic_vfmv.f.s_s_nxv2f16(<vscale x 2 x half> %0) nounwind {
21 ; CHECK-LABEL: intrinsic_vfmv.f.s_s_nxv2f16:
22 ; CHECK: # %bb.0: # %entry
23 ; CHECK-NEXT: vsetivli zero, 1, e16, mf2, ta, ma
24 ; CHECK-NEXT: vfmv.f.s fa0, v8
27 %a = call half @llvm.riscv.vfmv.f.s.nxv2f16(<vscale x 2 x half> %0)
31 declare half @llvm.riscv.vfmv.f.s.nxv4f16(<vscale x 4 x half>)
33 define half @intrinsic_vfmv.f.s_s_nxv4f16(<vscale x 4 x half> %0) nounwind {
34 ; CHECK-LABEL: intrinsic_vfmv.f.s_s_nxv4f16:
35 ; CHECK: # %bb.0: # %entry
36 ; CHECK-NEXT: vsetivli zero, 1, e16, m1, ta, ma
37 ; CHECK-NEXT: vfmv.f.s fa0, v8
40 %a = call half @llvm.riscv.vfmv.f.s.nxv4f16(<vscale x 4 x half> %0)
44 declare half @llvm.riscv.vfmv.f.s.nxv8f16(<vscale x 8 x half>)
46 define half @intrinsic_vfmv.f.s_s_nxv8f16(<vscale x 8 x half> %0) nounwind {
47 ; CHECK-LABEL: intrinsic_vfmv.f.s_s_nxv8f16:
48 ; CHECK: # %bb.0: # %entry
49 ; CHECK-NEXT: vsetivli zero, 1, e16, m1, ta, ma
50 ; CHECK-NEXT: vfmv.f.s fa0, v8
53 %a = call half @llvm.riscv.vfmv.f.s.nxv8f16(<vscale x 8 x half> %0)
57 declare half @llvm.riscv.vfmv.f.s.nxv16f16(<vscale x 16 x half>)
59 define half @intrinsic_vfmv.f.s_s_nxv16f16(<vscale x 16 x half> %0) nounwind {
60 ; CHECK-LABEL: intrinsic_vfmv.f.s_s_nxv16f16:
61 ; CHECK: # %bb.0: # %entry
62 ; CHECK-NEXT: vsetivli zero, 1, e16, m1, ta, ma
63 ; CHECK-NEXT: vfmv.f.s fa0, v8
66 %a = call half @llvm.riscv.vfmv.f.s.nxv16f16(<vscale x 16 x half> %0)
70 declare half @llvm.riscv.vfmv.f.s.nxv32f16(<vscale x 32 x half>)
72 define half @intrinsic_vfmv.f.s_s_nxv32f16(<vscale x 32 x half> %0) nounwind {
73 ; CHECK-LABEL: intrinsic_vfmv.f.s_s_nxv32f16:
74 ; CHECK: # %bb.0: # %entry
75 ; CHECK-NEXT: vsetivli zero, 1, e16, m1, ta, ma
76 ; CHECK-NEXT: vfmv.f.s fa0, v8
79 %a = call half @llvm.riscv.vfmv.f.s.nxv32f16(<vscale x 32 x half> %0)
83 declare float @llvm.riscv.vfmv.f.s.nxv1f32(<vscale x 1 x float>)
85 define float @intrinsic_vfmv.f.s_s_nxv1f32(<vscale x 1 x float> %0) nounwind {
86 ; CHECK-LABEL: intrinsic_vfmv.f.s_s_nxv1f32:
87 ; CHECK: # %bb.0: # %entry
88 ; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, ma
89 ; CHECK-NEXT: vfmv.f.s fa0, v8
92 %a = call float @llvm.riscv.vfmv.f.s.nxv1f32(<vscale x 1 x float> %0)
96 declare float @llvm.riscv.vfmv.f.s.nxv2f32(<vscale x 2 x float>)
98 define float @intrinsic_vfmv.f.s_s_nxv2f32(<vscale x 2 x float> %0) nounwind {
99 ; CHECK-LABEL: intrinsic_vfmv.f.s_s_nxv2f32:
100 ; CHECK: # %bb.0: # %entry
101 ; CHECK-NEXT: vsetivli zero, 1, e32, m1, ta, ma
102 ; CHECK-NEXT: vfmv.f.s fa0, v8
105 %a = call float @llvm.riscv.vfmv.f.s.nxv2f32(<vscale x 2 x float> %0)
109 declare float @llvm.riscv.vfmv.f.s.nxv4f32(<vscale x 4 x float>)
111 define float @intrinsic_vfmv.f.s_s_nxv4f32(<vscale x 4 x float> %0) nounwind {
112 ; CHECK-LABEL: intrinsic_vfmv.f.s_s_nxv4f32:
113 ; CHECK: # %bb.0: # %entry
114 ; CHECK-NEXT: vsetivli zero, 1, e32, m1, ta, ma
115 ; CHECK-NEXT: vfmv.f.s fa0, v8
118 %a = call float @llvm.riscv.vfmv.f.s.nxv4f32(<vscale x 4 x float> %0)
122 declare float @llvm.riscv.vfmv.f.s.nxv8f32(<vscale x 8 x float>)
124 define float @intrinsic_vfmv.f.s_s_nxv8f32(<vscale x 8 x float> %0) nounwind {
125 ; CHECK-LABEL: intrinsic_vfmv.f.s_s_nxv8f32:
126 ; CHECK: # %bb.0: # %entry
127 ; CHECK-NEXT: vsetivli zero, 1, e32, m1, ta, ma
128 ; CHECK-NEXT: vfmv.f.s fa0, v8
131 %a = call float @llvm.riscv.vfmv.f.s.nxv8f32(<vscale x 8 x float> %0)
135 declare float @llvm.riscv.vfmv.f.s.nxv16f32(<vscale x 16 x float>)
137 define float @intrinsic_vfmv.f.s_s_nxv16f32(<vscale x 16 x float> %0) nounwind {
138 ; CHECK-LABEL: intrinsic_vfmv.f.s_s_nxv16f32:
139 ; CHECK: # %bb.0: # %entry
140 ; CHECK-NEXT: vsetivli zero, 1, e32, m1, ta, ma
141 ; CHECK-NEXT: vfmv.f.s fa0, v8
144 %a = call float @llvm.riscv.vfmv.f.s.nxv16f32(<vscale x 16 x float> %0)
148 declare double @llvm.riscv.vfmv.f.s.nxv1f64(<vscale x 1 x double>)
150 define double @intrinsic_vfmv.f.s_s_nxv1f64(<vscale x 1 x double> %0) nounwind {
151 ; CHECK-LABEL: intrinsic_vfmv.f.s_s_nxv1f64:
152 ; CHECK: # %bb.0: # %entry
153 ; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, ma
154 ; CHECK-NEXT: vfmv.f.s fa0, v8
157 %a = call double @llvm.riscv.vfmv.f.s.nxv1f64(<vscale x 1 x double> %0)
161 declare double @llvm.riscv.vfmv.f.s.nxv2f64(<vscale x 2 x double>)
163 define double @intrinsic_vfmv.f.s_s_nxv2f64(<vscale x 2 x double> %0) nounwind {
164 ; CHECK-LABEL: intrinsic_vfmv.f.s_s_nxv2f64:
165 ; CHECK: # %bb.0: # %entry
166 ; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, ma
167 ; CHECK-NEXT: vfmv.f.s fa0, v8
170 %a = call double @llvm.riscv.vfmv.f.s.nxv2f64(<vscale x 2 x double> %0)
174 declare double @llvm.riscv.vfmv.f.s.nxv4f64(<vscale x 4 x double>)
176 define double @intrinsic_vfmv.f.s_s_nxv4f64(<vscale x 4 x double> %0) nounwind {
177 ; CHECK-LABEL: intrinsic_vfmv.f.s_s_nxv4f64:
178 ; CHECK: # %bb.0: # %entry
179 ; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, ma
180 ; CHECK-NEXT: vfmv.f.s fa0, v8
183 %a = call double @llvm.riscv.vfmv.f.s.nxv4f64(<vscale x 4 x double> %0)
187 declare double @llvm.riscv.vfmv.f.s.nxv8f64(<vscale x 8 x double>)
189 define double @intrinsic_vfmv.f.s_s_nxv8f64(<vscale x 8 x double> %0) nounwind {
190 ; CHECK-LABEL: intrinsic_vfmv.f.s_s_nxv8f64:
191 ; CHECK: # %bb.0: # %entry
192 ; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, ma
193 ; CHECK-NEXT: vfmv.f.s fa0, v8
196 %a = call double @llvm.riscv.vfmv.f.s.nxv8f64(<vscale x 8 x double> %0)