1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=riscv32 -mattr=+d,+zfh,+zvfh,+v -target-abi=ilp32d \
3 ; RUN: -verify-machineinstrs < %s | FileCheck %s
4 ; RUN: llc -mtriple=riscv64 -mattr=+d,+zfh,+zvfh,+v -target-abi=lp64d \
5 ; RUN: -verify-machineinstrs < %s | FileCheck %s
7 ; This tests a mix of vfmacc and vfmadd by using different operand orders to
8 ; trigger commuting in TwoAddressInstructionPass.
10 declare <vscale x 1 x half> @llvm.experimental.constrained.fma.nxv1f16(<vscale x 1 x half>, <vscale x 1 x half>, <vscale x 1 x half>, metadata, metadata)
12 define <vscale x 1 x half> @vfmadd_vv_nxv1f16(<vscale x 1 x half> %va, <vscale x 1 x half> %vb, <vscale x 1 x half> %vc) strictfp {
13 ; CHECK-LABEL: vfmadd_vv_nxv1f16:
15 ; CHECK-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
16 ; CHECK-NEXT: vfmadd.vv v8, v9, v10
18 %vd = call <vscale x 1 x half> @llvm.experimental.constrained.fma.nxv1f16(<vscale x 1 x half> %va, <vscale x 1 x half> %vb, <vscale x 1 x half> %vc, metadata !"round.dynamic", metadata !"fpexcept.strict")
19 ret <vscale x 1 x half> %vd
22 define <vscale x 1 x half> @vfmadd_vf_nxv1f16(<vscale x 1 x half> %va, <vscale x 1 x half> %vb, half %c) strictfp {
23 ; CHECK-LABEL: vfmadd_vf_nxv1f16:
25 ; CHECK-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
26 ; CHECK-NEXT: vfmadd.vf v8, fa0, v9
28 %head = insertelement <vscale x 1 x half> poison, half %c, i32 0
29 %splat = shufflevector <vscale x 1 x half> %head, <vscale x 1 x half> poison, <vscale x 1 x i32> zeroinitializer
30 %vd = call <vscale x 1 x half> @llvm.experimental.constrained.fma.nxv1f16(<vscale x 1 x half> %va, <vscale x 1 x half> %splat, <vscale x 1 x half> %vb, metadata !"round.dynamic", metadata !"fpexcept.strict")
31 ret <vscale x 1 x half> %vd
34 declare <vscale x 2 x half> @llvm.experimental.constrained.fma.nxv2f16(<vscale x 2 x half>, <vscale x 2 x half>, <vscale x 2 x half>, metadata, metadata)
36 define <vscale x 2 x half> @vfmadd_vv_nxv2f16(<vscale x 2 x half> %va, <vscale x 2 x half> %vb, <vscale x 2 x half> %vc) strictfp {
37 ; CHECK-LABEL: vfmadd_vv_nxv2f16:
39 ; CHECK-NEXT: vsetvli a0, zero, e16, mf2, ta, ma
40 ; CHECK-NEXT: vfmadd.vv v8, v10, v9
42 %vd = call <vscale x 2 x half> @llvm.experimental.constrained.fma.nxv2f16(<vscale x 2 x half> %va, <vscale x 2 x half> %vc, <vscale x 2 x half> %vb, metadata !"round.dynamic", metadata !"fpexcept.strict")
43 ret <vscale x 2 x half> %vd
46 define <vscale x 2 x half> @vfmadd_vf_nxv2f16(<vscale x 2 x half> %va, <vscale x 2 x half> %vb, half %c) strictfp {
47 ; CHECK-LABEL: vfmadd_vf_nxv2f16:
49 ; CHECK-NEXT: vsetvli a0, zero, e16, mf2, ta, ma
50 ; CHECK-NEXT: vfmacc.vf v8, fa0, v9
52 %head = insertelement <vscale x 2 x half> poison, half %c, i32 0
53 %splat = shufflevector <vscale x 2 x half> %head, <vscale x 2 x half> poison, <vscale x 2 x i32> zeroinitializer
54 %vd = call <vscale x 2 x half> @llvm.experimental.constrained.fma.nxv2f16(<vscale x 2 x half> %vb, <vscale x 2 x half> %splat, <vscale x 2 x half> %va, metadata !"round.dynamic", metadata !"fpexcept.strict")
55 ret <vscale x 2 x half> %vd
58 declare <vscale x 4 x half> @llvm.experimental.constrained.fma.nxv4f16(<vscale x 4 x half>, <vscale x 4 x half>, <vscale x 4 x half>, metadata, metadata)
60 define <vscale x 4 x half> @vfmadd_vv_nxv4f16(<vscale x 4 x half> %va, <vscale x 4 x half> %vb, <vscale x 4 x half> %vc) strictfp {
61 ; CHECK-LABEL: vfmadd_vv_nxv4f16:
63 ; CHECK-NEXT: vsetvli a0, zero, e16, m1, ta, ma
64 ; CHECK-NEXT: vfmadd.vv v8, v9, v10
66 %vd = call <vscale x 4 x half> @llvm.experimental.constrained.fma.nxv4f16(<vscale x 4 x half> %vb, <vscale x 4 x half> %va, <vscale x 4 x half> %vc, metadata !"round.dynamic", metadata !"fpexcept.strict")
67 ret <vscale x 4 x half> %vd
70 define <vscale x 4 x half> @vfmadd_vf_nxv4f16(<vscale x 4 x half> %va, <vscale x 4 x half> %vb, half %c) strictfp {
71 ; CHECK-LABEL: vfmadd_vf_nxv4f16:
73 ; CHECK-NEXT: vsetvli a0, zero, e16, m1, ta, ma
74 ; CHECK-NEXT: vfmadd.vf v8, fa0, v9
76 %head = insertelement <vscale x 4 x half> poison, half %c, i32 0
77 %splat = shufflevector <vscale x 4 x half> %head, <vscale x 4 x half> poison, <vscale x 4 x i32> zeroinitializer
78 %vd = call <vscale x 4 x half> @llvm.experimental.constrained.fma.nxv4f16(<vscale x 4 x half> %va, <vscale x 4 x half> %splat, <vscale x 4 x half> %vb, metadata !"round.dynamic", metadata !"fpexcept.strict")
79 ret <vscale x 4 x half> %vd
82 declare <vscale x 8 x half> @llvm.experimental.constrained.fma.nxv8f16(<vscale x 8 x half>, <vscale x 8 x half>, <vscale x 8 x half>, metadata, metadata)
84 define <vscale x 8 x half> @vfmadd_vv_nxv8f16(<vscale x 8 x half> %va, <vscale x 8 x half> %vb, <vscale x 8 x half> %vc) strictfp {
85 ; CHECK-LABEL: vfmadd_vv_nxv8f16:
87 ; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma
88 ; CHECK-NEXT: vfmacc.vv v8, v12, v10
90 %vd = call <vscale x 8 x half> @llvm.experimental.constrained.fma.nxv8f16(<vscale x 8 x half> %vb, <vscale x 8 x half> %vc, <vscale x 8 x half> %va, metadata !"round.dynamic", metadata !"fpexcept.strict")
91 ret <vscale x 8 x half> %vd
94 define <vscale x 8 x half> @vfmadd_vf_nxv8f16(<vscale x 8 x half> %va, <vscale x 8 x half> %vb, half %c) strictfp {
95 ; CHECK-LABEL: vfmadd_vf_nxv8f16:
97 ; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma
98 ; CHECK-NEXT: vfmacc.vf v8, fa0, v10
100 %head = insertelement <vscale x 8 x half> poison, half %c, i32 0
101 %splat = shufflevector <vscale x 8 x half> %head, <vscale x 8 x half> poison, <vscale x 8 x i32> zeroinitializer
102 %vd = call <vscale x 8 x half> @llvm.experimental.constrained.fma.nxv8f16(<vscale x 8 x half> %vb, <vscale x 8 x half> %splat, <vscale x 8 x half> %va, metadata !"round.dynamic", metadata !"fpexcept.strict")
103 ret <vscale x 8 x half> %vd
106 declare <vscale x 16 x half> @llvm.experimental.constrained.fma.nxv16f16(<vscale x 16 x half>, <vscale x 16 x half>, <vscale x 16 x half>, metadata, metadata)
108 define <vscale x 16 x half> @vfmadd_vv_nxv16f16(<vscale x 16 x half> %va, <vscale x 16 x half> %vb, <vscale x 16 x half> %vc) strictfp {
109 ; CHECK-LABEL: vfmadd_vv_nxv16f16:
111 ; CHECK-NEXT: vsetvli a0, zero, e16, m4, ta, ma
112 ; CHECK-NEXT: vfmadd.vv v8, v16, v12
114 %vd = call <vscale x 16 x half> @llvm.experimental.constrained.fma.nxv16f16(<vscale x 16 x half> %vc, <vscale x 16 x half> %va, <vscale x 16 x half> %vb, metadata !"round.dynamic", metadata !"fpexcept.strict")
115 ret <vscale x 16 x half> %vd
118 define <vscale x 16 x half> @vfmadd_vf_nxv16f16(<vscale x 16 x half> %va, <vscale x 16 x half> %vb, half %c) strictfp {
119 ; CHECK-LABEL: vfmadd_vf_nxv16f16:
121 ; CHECK-NEXT: vsetvli a0, zero, e16, m4, ta, ma
122 ; CHECK-NEXT: vfmadd.vf v8, fa0, v12
124 %head = insertelement <vscale x 16 x half> poison, half %c, i32 0
125 %splat = shufflevector <vscale x 16 x half> %head, <vscale x 16 x half> poison, <vscale x 16 x i32> zeroinitializer
126 %vd = call <vscale x 16 x half> @llvm.experimental.constrained.fma.nxv16f16(<vscale x 16 x half> %va, <vscale x 16 x half> %splat, <vscale x 16 x half> %vb, metadata !"round.dynamic", metadata !"fpexcept.strict")
127 ret <vscale x 16 x half> %vd
130 declare <vscale x 32 x half> @llvm.experimental.constrained.fma.nxv32f16(<vscale x 32 x half>, <vscale x 32 x half>, <vscale x 32 x half>, metadata, metadata)
132 define <vscale x 32 x half> @vfmadd_vv_nxv32f16(<vscale x 32 x half> %va, <vscale x 32 x half> %vb, <vscale x 32 x half> %vc) strictfp {
133 ; CHECK-LABEL: vfmadd_vv_nxv32f16:
135 ; CHECK-NEXT: vl8re16.v v24, (a0)
136 ; CHECK-NEXT: vsetvli a0, zero, e16, m8, ta, ma
137 ; CHECK-NEXT: vfmacc.vv v8, v16, v24
139 %vd = call <vscale x 32 x half> @llvm.experimental.constrained.fma.nxv32f16(<vscale x 32 x half> %vc, <vscale x 32 x half> %vb, <vscale x 32 x half> %va, metadata !"round.dynamic", metadata !"fpexcept.strict")
140 ret <vscale x 32 x half> %vd
143 define <vscale x 32 x half> @vfmadd_vf_nxv32f16(<vscale x 32 x half> %va, <vscale x 32 x half> %vb, half %c) strictfp {
144 ; CHECK-LABEL: vfmadd_vf_nxv32f16:
146 ; CHECK-NEXT: vsetvli a0, zero, e16, m8, ta, ma
147 ; CHECK-NEXT: vfmacc.vf v8, fa0, v16
149 %head = insertelement <vscale x 32 x half> poison, half %c, i32 0
150 %splat = shufflevector <vscale x 32 x half> %head, <vscale x 32 x half> poison, <vscale x 32 x i32> zeroinitializer
151 %vd = call <vscale x 32 x half> @llvm.experimental.constrained.fma.nxv32f16(<vscale x 32 x half> %vb, <vscale x 32 x half> %splat, <vscale x 32 x half> %va, metadata !"round.dynamic", metadata !"fpexcept.strict")
152 ret <vscale x 32 x half> %vd
155 declare <vscale x 1 x float> @llvm.experimental.constrained.fma.nxv1f32(<vscale x 1 x float>, <vscale x 1 x float>, <vscale x 1 x float>, metadata, metadata)
157 define <vscale x 1 x float> @vfmadd_vv_nxv1f32(<vscale x 1 x float> %va, <vscale x 1 x float> %vb, <vscale x 1 x float> %vc) strictfp {
158 ; CHECK-LABEL: vfmadd_vv_nxv1f32:
160 ; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma
161 ; CHECK-NEXT: vfmadd.vv v8, v9, v10
163 %vd = call <vscale x 1 x float> @llvm.experimental.constrained.fma.nxv1f32(<vscale x 1 x float> %va, <vscale x 1 x float> %vb, <vscale x 1 x float> %vc, metadata !"round.dynamic", metadata !"fpexcept.strict")
164 ret <vscale x 1 x float> %vd
167 define <vscale x 1 x float> @vfmadd_vf_nxv1f32(<vscale x 1 x float> %va, <vscale x 1 x float> %vb, float %c) strictfp {
168 ; CHECK-LABEL: vfmadd_vf_nxv1f32:
170 ; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma
171 ; CHECK-NEXT: vfmadd.vf v8, fa0, v9
173 %head = insertelement <vscale x 1 x float> poison, float %c, i32 0
174 %splat = shufflevector <vscale x 1 x float> %head, <vscale x 1 x float> poison, <vscale x 1 x i32> zeroinitializer
175 %vd = call <vscale x 1 x float> @llvm.experimental.constrained.fma.nxv1f32(<vscale x 1 x float> %va, <vscale x 1 x float> %splat, <vscale x 1 x float> %vb, metadata !"round.dynamic", metadata !"fpexcept.strict")
176 ret <vscale x 1 x float> %vd
179 declare <vscale x 2 x float> @llvm.experimental.constrained.fma.nxv2f32(<vscale x 2 x float>, <vscale x 2 x float>, <vscale x 2 x float>, metadata, metadata)
181 define <vscale x 2 x float> @vfmadd_vv_nxv2f32(<vscale x 2 x float> %va, <vscale x 2 x float> %vb, <vscale x 2 x float> %vc) strictfp {
182 ; CHECK-LABEL: vfmadd_vv_nxv2f32:
184 ; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma
185 ; CHECK-NEXT: vfmadd.vv v8, v10, v9
187 %vd = call <vscale x 2 x float> @llvm.experimental.constrained.fma.nxv2f32(<vscale x 2 x float> %va, <vscale x 2 x float> %vc, <vscale x 2 x float> %vb, metadata !"round.dynamic", metadata !"fpexcept.strict")
188 ret <vscale x 2 x float> %vd
191 define <vscale x 2 x float> @vfmadd_vf_nxv2f32(<vscale x 2 x float> %va, <vscale x 2 x float> %vb, float %c) strictfp {
192 ; CHECK-LABEL: vfmadd_vf_nxv2f32:
194 ; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma
195 ; CHECK-NEXT: vfmacc.vf v8, fa0, v9
197 %head = insertelement <vscale x 2 x float> poison, float %c, i32 0
198 %splat = shufflevector <vscale x 2 x float> %head, <vscale x 2 x float> poison, <vscale x 2 x i32> zeroinitializer
199 %vd = call <vscale x 2 x float> @llvm.experimental.constrained.fma.nxv2f32(<vscale x 2 x float> %vb, <vscale x 2 x float> %splat, <vscale x 2 x float> %va, metadata !"round.dynamic", metadata !"fpexcept.strict")
200 ret <vscale x 2 x float> %vd
203 declare <vscale x 4 x float> @llvm.experimental.constrained.fma.nxv4f32(<vscale x 4 x float>, <vscale x 4 x float>, <vscale x 4 x float>, metadata, metadata)
205 define <vscale x 4 x float> @vfmadd_vv_nxv4f32(<vscale x 4 x float> %va, <vscale x 4 x float> %vb, <vscale x 4 x float> %vc) strictfp {
206 ; CHECK-LABEL: vfmadd_vv_nxv4f32:
208 ; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma
209 ; CHECK-NEXT: vfmadd.vv v8, v10, v12
211 %vd = call <vscale x 4 x float> @llvm.experimental.constrained.fma.nxv4f32(<vscale x 4 x float> %vb, <vscale x 4 x float> %va, <vscale x 4 x float> %vc, metadata !"round.dynamic", metadata !"fpexcept.strict")
212 ret <vscale x 4 x float> %vd
215 define <vscale x 4 x float> @vfmadd_vf_nxv4f32(<vscale x 4 x float> %va, <vscale x 4 x float> %vb, float %c) strictfp {
216 ; CHECK-LABEL: vfmadd_vf_nxv4f32:
218 ; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma
219 ; CHECK-NEXT: vfmadd.vf v8, fa0, v10
221 %head = insertelement <vscale x 4 x float> poison, float %c, i32 0
222 %splat = shufflevector <vscale x 4 x float> %head, <vscale x 4 x float> poison, <vscale x 4 x i32> zeroinitializer
223 %vd = call <vscale x 4 x float> @llvm.experimental.constrained.fma.nxv4f32(<vscale x 4 x float> %va, <vscale x 4 x float> %splat, <vscale x 4 x float> %vb, metadata !"round.dynamic", metadata !"fpexcept.strict")
224 ret <vscale x 4 x float> %vd
227 declare <vscale x 8 x float> @llvm.experimental.constrained.fma.nxv8f32(<vscale x 8 x float>, <vscale x 8 x float>, <vscale x 8 x float>, metadata, metadata)
229 define <vscale x 8 x float> @vfmadd_vv_nxv8f32(<vscale x 8 x float> %va, <vscale x 8 x float> %vb, <vscale x 8 x float> %vc) strictfp {
230 ; CHECK-LABEL: vfmadd_vv_nxv8f32:
232 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
233 ; CHECK-NEXT: vfmacc.vv v8, v16, v12
235 %vd = call <vscale x 8 x float> @llvm.experimental.constrained.fma.nxv8f32(<vscale x 8 x float> %vb, <vscale x 8 x float> %vc, <vscale x 8 x float> %va, metadata !"round.dynamic", metadata !"fpexcept.strict")
236 ret <vscale x 8 x float> %vd
239 define <vscale x 8 x float> @vfmadd_vf_nxv8f32(<vscale x 8 x float> %va, <vscale x 8 x float> %vb, float %c) strictfp {
240 ; CHECK-LABEL: vfmadd_vf_nxv8f32:
242 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
243 ; CHECK-NEXT: vfmacc.vf v8, fa0, v12
245 %head = insertelement <vscale x 8 x float> poison, float %c, i32 0
246 %splat = shufflevector <vscale x 8 x float> %head, <vscale x 8 x float> poison, <vscale x 8 x i32> zeroinitializer
247 %vd = call <vscale x 8 x float> @llvm.experimental.constrained.fma.nxv8f32(<vscale x 8 x float> %vb, <vscale x 8 x float> %splat, <vscale x 8 x float> %va, metadata !"round.dynamic", metadata !"fpexcept.strict")
248 ret <vscale x 8 x float> %vd
251 declare <vscale x 16 x float> @llvm.experimental.constrained.fma.nxv16f32(<vscale x 16 x float>, <vscale x 16 x float>, <vscale x 16 x float>, metadata, metadata)
253 define <vscale x 16 x float> @vfmadd_vv_nxv16f32(<vscale x 16 x float> %va, <vscale x 16 x float> %vb, <vscale x 16 x float> %vc) strictfp {
254 ; CHECK-LABEL: vfmadd_vv_nxv16f32:
256 ; CHECK-NEXT: vl8re32.v v24, (a0)
257 ; CHECK-NEXT: vsetvli a0, zero, e32, m8, ta, ma
258 ; CHECK-NEXT: vfmadd.vv v8, v24, v16
260 %vd = call <vscale x 16 x float> @llvm.experimental.constrained.fma.nxv16f32(<vscale x 16 x float> %vc, <vscale x 16 x float> %va, <vscale x 16 x float> %vb, metadata !"round.dynamic", metadata !"fpexcept.strict")
261 ret <vscale x 16 x float> %vd
264 define <vscale x 16 x float> @vfmadd_vf_nxv16f32(<vscale x 16 x float> %va, <vscale x 16 x float> %vb, float %c) strictfp {
265 ; CHECK-LABEL: vfmadd_vf_nxv16f32:
267 ; CHECK-NEXT: vsetvli a0, zero, e32, m8, ta, ma
268 ; CHECK-NEXT: vfmadd.vf v8, fa0, v16
270 %head = insertelement <vscale x 16 x float> poison, float %c, i32 0
271 %splat = shufflevector <vscale x 16 x float> %head, <vscale x 16 x float> poison, <vscale x 16 x i32> zeroinitializer
272 %vd = call <vscale x 16 x float> @llvm.experimental.constrained.fma.nxv16f32(<vscale x 16 x float> %va, <vscale x 16 x float> %splat, <vscale x 16 x float> %vb, metadata !"round.dynamic", metadata !"fpexcept.strict")
273 ret <vscale x 16 x float> %vd
276 declare <vscale x 1 x double> @llvm.experimental.constrained.fma.nxv1f64(<vscale x 1 x double>, <vscale x 1 x double>, <vscale x 1 x double>, metadata, metadata)
278 define <vscale x 1 x double> @vfmadd_vv_nxv1f64(<vscale x 1 x double> %va, <vscale x 1 x double> %vb, <vscale x 1 x double> %vc) strictfp {
279 ; CHECK-LABEL: vfmadd_vv_nxv1f64:
281 ; CHECK-NEXT: vsetvli a0, zero, e64, m1, ta, ma
282 ; CHECK-NEXT: vfmadd.vv v8, v9, v10
284 %vd = call <vscale x 1 x double> @llvm.experimental.constrained.fma.nxv1f64(<vscale x 1 x double> %va, <vscale x 1 x double> %vb, <vscale x 1 x double> %vc, metadata !"round.dynamic", metadata !"fpexcept.strict")
285 ret <vscale x 1 x double> %vd
288 define <vscale x 1 x double> @vfmadd_vf_nxv1f64(<vscale x 1 x double> %va, <vscale x 1 x double> %vb, double %c) strictfp {
289 ; CHECK-LABEL: vfmadd_vf_nxv1f64:
291 ; CHECK-NEXT: vsetvli a0, zero, e64, m1, ta, ma
292 ; CHECK-NEXT: vfmadd.vf v8, fa0, v9
294 %head = insertelement <vscale x 1 x double> poison, double %c, i32 0
295 %splat = shufflevector <vscale x 1 x double> %head, <vscale x 1 x double> poison, <vscale x 1 x i32> zeroinitializer
296 %vd = call <vscale x 1 x double> @llvm.experimental.constrained.fma.nxv1f64(<vscale x 1 x double> %va, <vscale x 1 x double> %splat, <vscale x 1 x double> %vb, metadata !"round.dynamic", metadata !"fpexcept.strict")
297 ret <vscale x 1 x double> %vd
300 declare <vscale x 2 x double> @llvm.experimental.constrained.fma.nxv2f64(<vscale x 2 x double>, <vscale x 2 x double>, <vscale x 2 x double>, metadata, metadata)
302 define <vscale x 2 x double> @vfmadd_vv_nxv2f64(<vscale x 2 x double> %va, <vscale x 2 x double> %vb, <vscale x 2 x double> %vc) strictfp {
303 ; CHECK-LABEL: vfmadd_vv_nxv2f64:
305 ; CHECK-NEXT: vsetvli a0, zero, e64, m2, ta, ma
306 ; CHECK-NEXT: vfmadd.vv v8, v12, v10
308 %vd = call <vscale x 2 x double> @llvm.experimental.constrained.fma.nxv2f64(<vscale x 2 x double> %va, <vscale x 2 x double> %vc, <vscale x 2 x double> %vb, metadata !"round.dynamic", metadata !"fpexcept.strict")
309 ret <vscale x 2 x double> %vd
312 define <vscale x 2 x double> @vfmadd_vf_nxv2f64(<vscale x 2 x double> %va, <vscale x 2 x double> %vb, double %c) strictfp {
313 ; CHECK-LABEL: vfmadd_vf_nxv2f64:
315 ; CHECK-NEXT: vsetvli a0, zero, e64, m2, ta, ma
316 ; CHECK-NEXT: vfmacc.vf v8, fa0, v10
318 %head = insertelement <vscale x 2 x double> poison, double %c, i32 0
319 %splat = shufflevector <vscale x 2 x double> %head, <vscale x 2 x double> poison, <vscale x 2 x i32> zeroinitializer
320 %vd = call <vscale x 2 x double> @llvm.experimental.constrained.fma.nxv2f64(<vscale x 2 x double> %vb, <vscale x 2 x double> %splat, <vscale x 2 x double> %va, metadata !"round.dynamic", metadata !"fpexcept.strict")
321 ret <vscale x 2 x double> %vd
324 declare <vscale x 4 x double> @llvm.experimental.constrained.fma.nxv4f64(<vscale x 4 x double>, <vscale x 4 x double>, <vscale x 4 x double>, metadata, metadata)
326 define <vscale x 4 x double> @vfmadd_vv_nxv4f64(<vscale x 4 x double> %va, <vscale x 4 x double> %vb, <vscale x 4 x double> %vc) strictfp {
327 ; CHECK-LABEL: vfmadd_vv_nxv4f64:
329 ; CHECK-NEXT: vsetvli a0, zero, e64, m4, ta, ma
330 ; CHECK-NEXT: vfmadd.vv v8, v12, v16
332 %vd = call <vscale x 4 x double> @llvm.experimental.constrained.fma.nxv4f64(<vscale x 4 x double> %vb, <vscale x 4 x double> %va, <vscale x 4 x double> %vc, metadata !"round.dynamic", metadata !"fpexcept.strict")
333 ret <vscale x 4 x double> %vd
336 define <vscale x 4 x double> @vfmadd_vf_nxv4f64(<vscale x 4 x double> %va, <vscale x 4 x double> %vb, double %c) strictfp {
337 ; CHECK-LABEL: vfmadd_vf_nxv4f64:
339 ; CHECK-NEXT: vsetvli a0, zero, e64, m4, ta, ma
340 ; CHECK-NEXT: vfmadd.vf v8, fa0, v12
342 %head = insertelement <vscale x 4 x double> poison, double %c, i32 0
343 %splat = shufflevector <vscale x 4 x double> %head, <vscale x 4 x double> poison, <vscale x 4 x i32> zeroinitializer
344 %vd = call <vscale x 4 x double> @llvm.experimental.constrained.fma.nxv4f64(<vscale x 4 x double> %va, <vscale x 4 x double> %splat, <vscale x 4 x double> %vb, metadata !"round.dynamic", metadata !"fpexcept.strict")
345 ret <vscale x 4 x double> %vd
348 declare <vscale x 8 x double> @llvm.experimental.constrained.fma.nxv8f64(<vscale x 8 x double>, <vscale x 8 x double>, <vscale x 8 x double>, metadata, metadata)
350 define <vscale x 8 x double> @vfmadd_vv_nxv8f64(<vscale x 8 x double> %va, <vscale x 8 x double> %vb, <vscale x 8 x double> %vc) strictfp {
351 ; CHECK-LABEL: vfmadd_vv_nxv8f64:
353 ; CHECK-NEXT: vl8re64.v v24, (a0)
354 ; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma
355 ; CHECK-NEXT: vfmacc.vv v8, v16, v24
357 %vd = call <vscale x 8 x double> @llvm.experimental.constrained.fma.nxv8f64(<vscale x 8 x double> %vb, <vscale x 8 x double> %vc, <vscale x 8 x double> %va, metadata !"round.dynamic", metadata !"fpexcept.strict")
358 ret <vscale x 8 x double> %vd
361 define <vscale x 8 x double> @vfmadd_vf_nxv8f64(<vscale x 8 x double> %va, <vscale x 8 x double> %vb, double %c) strictfp {
362 ; CHECK-LABEL: vfmadd_vf_nxv8f64:
364 ; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma
365 ; CHECK-NEXT: vfmacc.vf v8, fa0, v16
367 %head = insertelement <vscale x 8 x double> poison, double %c, i32 0
368 %splat = shufflevector <vscale x 8 x double> %head, <vscale x 8 x double> poison, <vscale x 8 x i32> zeroinitializer
369 %vd = call <vscale x 8 x double> @llvm.experimental.constrained.fma.nxv8f64(<vscale x 8 x double> %vb, <vscale x 8 x double> %splat, <vscale x 8 x double> %va, metadata !"round.dynamic", metadata !"fpexcept.strict")
370 ret <vscale x 8 x double> %vd