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 --check-prefixes=CHECK,ZVFH
4 ; RUN: llc -mtriple=riscv64 -mattr=+d,+zfh,+zvfh,+v -target-abi=lp64d \
5 ; RUN: -verify-machineinstrs < %s | FileCheck %s --check-prefixes=CHECK,ZVFH
6 ; RUN: llc -mtriple=riscv32 -mattr=+d,+zfh,+zvfhmin,+v -target-abi=ilp32d \
7 ; RUN: -verify-machineinstrs < %s | FileCheck %s --check-prefixes=CHECK,ZVFHMIN
8 ; RUN: llc -mtriple=riscv64 -mattr=+d,+zfh,+zvfhmin,+v -target-abi=lp64d \
9 ; RUN: -verify-machineinstrs < %s | FileCheck %s --check-prefixes=CHECK,ZVFHMIN
11 declare <2 x half> @llvm.vp.fdiv.v2f16(<2 x half>, <2 x half>, <2 x i1>, i32)
13 define <2 x half> @vfdiv_vv_v2f16(<2 x half> %va, <2 x half> %b, <2 x i1> %m, i32 zeroext %evl) {
14 ; ZVFH-LABEL: vfdiv_vv_v2f16:
16 ; ZVFH-NEXT: vsetvli zero, a0, e16, mf4, ta, ma
17 ; ZVFH-NEXT: vfdiv.vv v8, v8, v9, v0.t
20 ; ZVFHMIN-LABEL: vfdiv_vv_v2f16:
22 ; ZVFHMIN-NEXT: vsetivli zero, 2, e16, mf4, ta, ma
23 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v9
24 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v9, v8
25 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
26 ; ZVFHMIN-NEXT: vfdiv.vv v9, v9, v10, v0.t
27 ; ZVFHMIN-NEXT: vsetivli zero, 2, e16, mf4, ta, ma
28 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v9
30 %v = call <2 x half> @llvm.vp.fdiv.v2f16(<2 x half> %va, <2 x half> %b, <2 x i1> %m, i32 %evl)
34 define <2 x half> @vfdiv_vv_v2f16_unmasked(<2 x half> %va, <2 x half> %b, i32 zeroext %evl) {
35 ; ZVFH-LABEL: vfdiv_vv_v2f16_unmasked:
37 ; ZVFH-NEXT: vsetvli zero, a0, e16, mf4, ta, ma
38 ; ZVFH-NEXT: vfdiv.vv v8, v8, v9
41 ; ZVFHMIN-LABEL: vfdiv_vv_v2f16_unmasked:
43 ; ZVFHMIN-NEXT: vsetivli zero, 2, e16, mf4, ta, ma
44 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v9
45 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v9, v8
46 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
47 ; ZVFHMIN-NEXT: vfdiv.vv v9, v9, v10
48 ; ZVFHMIN-NEXT: vsetivli zero, 2, e16, mf4, ta, ma
49 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v9
51 %v = call <2 x half> @llvm.vp.fdiv.v2f16(<2 x half> %va, <2 x half> %b, <2 x i1> splat (i1 true), i32 %evl)
55 define <2 x half> @vfdiv_vf_v2f16(<2 x half> %va, half %b, <2 x i1> %m, i32 zeroext %evl) {
56 ; ZVFH-LABEL: vfdiv_vf_v2f16:
58 ; ZVFH-NEXT: vsetvli zero, a0, e16, mf4, ta, ma
59 ; ZVFH-NEXT: vfdiv.vf v8, v8, fa0, v0.t
62 ; ZVFHMIN-LABEL: vfdiv_vf_v2f16:
64 ; ZVFHMIN-NEXT: fmv.x.h a1, fa0
65 ; ZVFHMIN-NEXT: vsetivli zero, 2, e16, mf4, ta, ma
66 ; ZVFHMIN-NEXT: vmv.v.x v9, a1
67 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v8
68 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v8, v9
69 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
70 ; ZVFHMIN-NEXT: vfdiv.vv v9, v10, v8, v0.t
71 ; ZVFHMIN-NEXT: vsetivli zero, 2, e16, mf4, ta, ma
72 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v9
74 %elt.head = insertelement <2 x half> poison, half %b, i32 0
75 %vb = shufflevector <2 x half> %elt.head, <2 x half> poison, <2 x i32> zeroinitializer
76 %v = call <2 x half> @llvm.vp.fdiv.v2f16(<2 x half> %va, <2 x half> %vb, <2 x i1> %m, i32 %evl)
80 define <2 x half> @vfdiv_vf_v2f16_unmasked(<2 x half> %va, half %b, i32 zeroext %evl) {
81 ; ZVFH-LABEL: vfdiv_vf_v2f16_unmasked:
83 ; ZVFH-NEXT: vsetvli zero, a0, e16, mf4, ta, ma
84 ; ZVFH-NEXT: vfdiv.vf v8, v8, fa0
87 ; ZVFHMIN-LABEL: vfdiv_vf_v2f16_unmasked:
89 ; ZVFHMIN-NEXT: fmv.x.h a1, fa0
90 ; ZVFHMIN-NEXT: vsetivli zero, 2, e16, mf4, ta, ma
91 ; ZVFHMIN-NEXT: vmv.v.x v9, a1
92 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v8
93 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v8, v9
94 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
95 ; ZVFHMIN-NEXT: vfdiv.vv v9, v10, v8
96 ; ZVFHMIN-NEXT: vsetivli zero, 2, e16, mf4, ta, ma
97 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v9
99 %elt.head = insertelement <2 x half> poison, half %b, i32 0
100 %vb = shufflevector <2 x half> %elt.head, <2 x half> poison, <2 x i32> zeroinitializer
101 %v = call <2 x half> @llvm.vp.fdiv.v2f16(<2 x half> %va, <2 x half> %vb, <2 x i1> splat (i1 true), i32 %evl)
105 declare <3 x half> @llvm.vp.fdiv.v3f16(<3 x half>, <3 x half>, <3 x i1>, i32)
107 define <3 x half> @vfdiv_vv_v3f16(<3 x half> %va, <3 x half> %b, <3 x i1> %m, i32 zeroext %evl) {
108 ; ZVFH-LABEL: vfdiv_vv_v3f16:
110 ; ZVFH-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
111 ; ZVFH-NEXT: vfdiv.vv v8, v8, v9, v0.t
114 ; ZVFHMIN-LABEL: vfdiv_vv_v3f16:
116 ; ZVFHMIN-NEXT: vsetivli zero, 4, e16, mf2, ta, ma
117 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v9
118 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v9, v8
119 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m1, ta, ma
120 ; ZVFHMIN-NEXT: vfdiv.vv v9, v9, v10, v0.t
121 ; ZVFHMIN-NEXT: vsetivli zero, 4, e16, mf2, ta, ma
122 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v9
124 %v = call <3 x half> @llvm.vp.fdiv.v3f16(<3 x half> %va, <3 x half> %b, <3 x i1> %m, i32 %evl)
128 declare <4 x half> @llvm.vp.fdiv.v4f16(<4 x half>, <4 x half>, <4 x i1>, i32)
130 define <4 x half> @vfdiv_vv_v4f16(<4 x half> %va, <4 x half> %b, <4 x i1> %m, i32 zeroext %evl) {
131 ; ZVFH-LABEL: vfdiv_vv_v4f16:
133 ; ZVFH-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
134 ; ZVFH-NEXT: vfdiv.vv v8, v8, v9, v0.t
137 ; ZVFHMIN-LABEL: vfdiv_vv_v4f16:
139 ; ZVFHMIN-NEXT: vsetivli zero, 4, e16, mf2, ta, ma
140 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v9
141 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v9, v8
142 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m1, ta, ma
143 ; ZVFHMIN-NEXT: vfdiv.vv v9, v9, v10, v0.t
144 ; ZVFHMIN-NEXT: vsetivli zero, 4, e16, mf2, ta, ma
145 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v9
147 %v = call <4 x half> @llvm.vp.fdiv.v4f16(<4 x half> %va, <4 x half> %b, <4 x i1> %m, i32 %evl)
151 define <4 x half> @vfdiv_vv_v4f16_unmasked(<4 x half> %va, <4 x half> %b, i32 zeroext %evl) {
152 ; ZVFH-LABEL: vfdiv_vv_v4f16_unmasked:
154 ; ZVFH-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
155 ; ZVFH-NEXT: vfdiv.vv v8, v8, v9
158 ; ZVFHMIN-LABEL: vfdiv_vv_v4f16_unmasked:
160 ; ZVFHMIN-NEXT: vsetivli zero, 4, e16, mf2, ta, ma
161 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v9
162 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v9, v8
163 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m1, ta, ma
164 ; ZVFHMIN-NEXT: vfdiv.vv v9, v9, v10
165 ; ZVFHMIN-NEXT: vsetivli zero, 4, e16, mf2, ta, ma
166 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v9
168 %v = call <4 x half> @llvm.vp.fdiv.v4f16(<4 x half> %va, <4 x half> %b, <4 x i1> splat (i1 true), i32 %evl)
172 define <4 x half> @vfdiv_vf_v4f16(<4 x half> %va, half %b, <4 x i1> %m, i32 zeroext %evl) {
173 ; ZVFH-LABEL: vfdiv_vf_v4f16:
175 ; ZVFH-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
176 ; ZVFH-NEXT: vfdiv.vf v8, v8, fa0, v0.t
179 ; ZVFHMIN-LABEL: vfdiv_vf_v4f16:
181 ; ZVFHMIN-NEXT: fmv.x.h a1, fa0
182 ; ZVFHMIN-NEXT: vsetivli zero, 4, e16, mf2, ta, ma
183 ; ZVFHMIN-NEXT: vmv.v.x v9, a1
184 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v8
185 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v8, v9
186 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m1, ta, ma
187 ; ZVFHMIN-NEXT: vfdiv.vv v9, v10, v8, v0.t
188 ; ZVFHMIN-NEXT: vsetivli zero, 4, e16, mf2, ta, ma
189 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v9
191 %elt.head = insertelement <4 x half> poison, half %b, i32 0
192 %vb = shufflevector <4 x half> %elt.head, <4 x half> poison, <4 x i32> zeroinitializer
193 %v = call <4 x half> @llvm.vp.fdiv.v4f16(<4 x half> %va, <4 x half> %vb, <4 x i1> %m, i32 %evl)
197 define <4 x half> @vfdiv_vf_v4f16_unmasked(<4 x half> %va, half %b, i32 zeroext %evl) {
198 ; ZVFH-LABEL: vfdiv_vf_v4f16_unmasked:
200 ; ZVFH-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
201 ; ZVFH-NEXT: vfdiv.vf v8, v8, fa0
204 ; ZVFHMIN-LABEL: vfdiv_vf_v4f16_unmasked:
206 ; ZVFHMIN-NEXT: fmv.x.h a1, fa0
207 ; ZVFHMIN-NEXT: vsetivli zero, 4, e16, mf2, ta, ma
208 ; ZVFHMIN-NEXT: vmv.v.x v9, a1
209 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v8
210 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v8, v9
211 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m1, ta, ma
212 ; ZVFHMIN-NEXT: vfdiv.vv v9, v10, v8
213 ; ZVFHMIN-NEXT: vsetivli zero, 4, e16, mf2, ta, ma
214 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v9
216 %elt.head = insertelement <4 x half> poison, half %b, i32 0
217 %vb = shufflevector <4 x half> %elt.head, <4 x half> poison, <4 x i32> zeroinitializer
218 %v = call <4 x half> @llvm.vp.fdiv.v4f16(<4 x half> %va, <4 x half> %vb, <4 x i1> splat (i1 true), i32 %evl)
222 declare <8 x half> @llvm.vp.fdiv.v8f16(<8 x half>, <8 x half>, <8 x i1>, i32)
224 define <8 x half> @vfdiv_vv_v8f16(<8 x half> %va, <8 x half> %b, <8 x i1> %m, i32 zeroext %evl) {
225 ; ZVFH-LABEL: vfdiv_vv_v8f16:
227 ; ZVFH-NEXT: vsetvli zero, a0, e16, m1, ta, ma
228 ; ZVFH-NEXT: vfdiv.vv v8, v8, v9, v0.t
231 ; ZVFHMIN-LABEL: vfdiv_vv_v8f16:
233 ; ZVFHMIN-NEXT: vsetivli zero, 8, e16, m1, ta, ma
234 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v9
235 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v8
236 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m2, ta, ma
237 ; ZVFHMIN-NEXT: vfdiv.vv v10, v12, v10, v0.t
238 ; ZVFHMIN-NEXT: vsetivli zero, 8, e16, m1, ta, ma
239 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v10
241 %v = call <8 x half> @llvm.vp.fdiv.v8f16(<8 x half> %va, <8 x half> %b, <8 x i1> %m, i32 %evl)
245 define <8 x half> @vfdiv_vv_v8f16_unmasked(<8 x half> %va, <8 x half> %b, i32 zeroext %evl) {
246 ; ZVFH-LABEL: vfdiv_vv_v8f16_unmasked:
248 ; ZVFH-NEXT: vsetvli zero, a0, e16, m1, ta, ma
249 ; ZVFH-NEXT: vfdiv.vv v8, v8, v9
252 ; ZVFHMIN-LABEL: vfdiv_vv_v8f16_unmasked:
254 ; ZVFHMIN-NEXT: vsetivli zero, 8, e16, m1, ta, ma
255 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v9
256 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v8
257 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m2, ta, ma
258 ; ZVFHMIN-NEXT: vfdiv.vv v10, v12, v10
259 ; ZVFHMIN-NEXT: vsetivli zero, 8, e16, m1, ta, ma
260 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v10
262 %v = call <8 x half> @llvm.vp.fdiv.v8f16(<8 x half> %va, <8 x half> %b, <8 x i1> splat (i1 true), i32 %evl)
266 define <8 x half> @vfdiv_vf_v8f16(<8 x half> %va, half %b, <8 x i1> %m, i32 zeroext %evl) {
267 ; ZVFH-LABEL: vfdiv_vf_v8f16:
269 ; ZVFH-NEXT: vsetvli zero, a0, e16, m1, ta, ma
270 ; ZVFH-NEXT: vfdiv.vf v8, v8, fa0, v0.t
273 ; ZVFHMIN-LABEL: vfdiv_vf_v8f16:
275 ; ZVFHMIN-NEXT: fmv.x.h a1, fa0
276 ; ZVFHMIN-NEXT: vsetivli zero, 8, e16, m1, ta, ma
277 ; ZVFHMIN-NEXT: vmv.v.x v9, a1
278 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v8
279 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v9
280 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m2, ta, ma
281 ; ZVFHMIN-NEXT: vfdiv.vv v10, v10, v12, v0.t
282 ; ZVFHMIN-NEXT: vsetivli zero, 8, e16, m1, ta, ma
283 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v10
285 %elt.head = insertelement <8 x half> poison, half %b, i32 0
286 %vb = shufflevector <8 x half> %elt.head, <8 x half> poison, <8 x i32> zeroinitializer
287 %v = call <8 x half> @llvm.vp.fdiv.v8f16(<8 x half> %va, <8 x half> %vb, <8 x i1> %m, i32 %evl)
291 define <8 x half> @vfdiv_vf_v8f16_unmasked(<8 x half> %va, half %b, i32 zeroext %evl) {
292 ; ZVFH-LABEL: vfdiv_vf_v8f16_unmasked:
294 ; ZVFH-NEXT: vsetvli zero, a0, e16, m1, ta, ma
295 ; ZVFH-NEXT: vfdiv.vf v8, v8, fa0
298 ; ZVFHMIN-LABEL: vfdiv_vf_v8f16_unmasked:
300 ; ZVFHMIN-NEXT: fmv.x.h a1, fa0
301 ; ZVFHMIN-NEXT: vsetivli zero, 8, e16, m1, ta, ma
302 ; ZVFHMIN-NEXT: vmv.v.x v9, a1
303 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v8
304 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v9
305 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m2, ta, ma
306 ; ZVFHMIN-NEXT: vfdiv.vv v10, v10, v12
307 ; ZVFHMIN-NEXT: vsetivli zero, 8, e16, m1, ta, ma
308 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v10
310 %elt.head = insertelement <8 x half> poison, half %b, i32 0
311 %vb = shufflevector <8 x half> %elt.head, <8 x half> poison, <8 x i32> zeroinitializer
312 %v = call <8 x half> @llvm.vp.fdiv.v8f16(<8 x half> %va, <8 x half> %vb, <8 x i1> splat (i1 true), i32 %evl)
316 declare <16 x half> @llvm.vp.fdiv.v16f16(<16 x half>, <16 x half>, <16 x i1>, i32)
318 define <16 x half> @vfdiv_vv_v16f16(<16 x half> %va, <16 x half> %b, <16 x i1> %m, i32 zeroext %evl) {
319 ; ZVFH-LABEL: vfdiv_vv_v16f16:
321 ; ZVFH-NEXT: vsetvli zero, a0, e16, m2, ta, ma
322 ; ZVFH-NEXT: vfdiv.vv v8, v8, v10, v0.t
325 ; ZVFHMIN-LABEL: vfdiv_vv_v16f16:
327 ; ZVFHMIN-NEXT: vsetivli zero, 16, e16, m2, ta, ma
328 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v10
329 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v8
330 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m4, ta, ma
331 ; ZVFHMIN-NEXT: vfdiv.vv v12, v16, v12, v0.t
332 ; ZVFHMIN-NEXT: vsetivli zero, 16, e16, m2, ta, ma
333 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v12
335 %v = call <16 x half> @llvm.vp.fdiv.v16f16(<16 x half> %va, <16 x half> %b, <16 x i1> %m, i32 %evl)
339 define <16 x half> @vfdiv_vv_v16f16_unmasked(<16 x half> %va, <16 x half> %b, i32 zeroext %evl) {
340 ; ZVFH-LABEL: vfdiv_vv_v16f16_unmasked:
342 ; ZVFH-NEXT: vsetvli zero, a0, e16, m2, ta, ma
343 ; ZVFH-NEXT: vfdiv.vv v8, v8, v10
346 ; ZVFHMIN-LABEL: vfdiv_vv_v16f16_unmasked:
348 ; ZVFHMIN-NEXT: vsetivli zero, 16, e16, m2, ta, ma
349 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v10
350 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v8
351 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m4, ta, ma
352 ; ZVFHMIN-NEXT: vfdiv.vv v12, v16, v12
353 ; ZVFHMIN-NEXT: vsetivli zero, 16, e16, m2, ta, ma
354 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v12
356 %v = call <16 x half> @llvm.vp.fdiv.v16f16(<16 x half> %va, <16 x half> %b, <16 x i1> splat (i1 true), i32 %evl)
360 define <16 x half> @vfdiv_vf_v16f16(<16 x half> %va, half %b, <16 x i1> %m, i32 zeroext %evl) {
361 ; ZVFH-LABEL: vfdiv_vf_v16f16:
363 ; ZVFH-NEXT: vsetvli zero, a0, e16, m2, ta, ma
364 ; ZVFH-NEXT: vfdiv.vf v8, v8, fa0, v0.t
367 ; ZVFHMIN-LABEL: vfdiv_vf_v16f16:
369 ; ZVFHMIN-NEXT: fmv.x.h a1, fa0
370 ; ZVFHMIN-NEXT: vsetivli zero, 16, e16, m2, ta, ma
371 ; ZVFHMIN-NEXT: vmv.v.x v10, a1
372 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v8
373 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v10
374 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m4, ta, ma
375 ; ZVFHMIN-NEXT: vfdiv.vv v12, v12, v16, v0.t
376 ; ZVFHMIN-NEXT: vsetivli zero, 16, e16, m2, ta, ma
377 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v12
379 %elt.head = insertelement <16 x half> poison, half %b, i32 0
380 %vb = shufflevector <16 x half> %elt.head, <16 x half> poison, <16 x i32> zeroinitializer
381 %v = call <16 x half> @llvm.vp.fdiv.v16f16(<16 x half> %va, <16 x half> %vb, <16 x i1> %m, i32 %evl)
385 define <16 x half> @vfdiv_vf_v16f16_unmasked(<16 x half> %va, half %b, i32 zeroext %evl) {
386 ; ZVFH-LABEL: vfdiv_vf_v16f16_unmasked:
388 ; ZVFH-NEXT: vsetvli zero, a0, e16, m2, ta, ma
389 ; ZVFH-NEXT: vfdiv.vf v8, v8, fa0
392 ; ZVFHMIN-LABEL: vfdiv_vf_v16f16_unmasked:
394 ; ZVFHMIN-NEXT: fmv.x.h a1, fa0
395 ; ZVFHMIN-NEXT: vsetivli zero, 16, e16, m2, ta, ma
396 ; ZVFHMIN-NEXT: vmv.v.x v10, a1
397 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v8
398 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v10
399 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m4, ta, ma
400 ; ZVFHMIN-NEXT: vfdiv.vv v12, v12, v16
401 ; ZVFHMIN-NEXT: vsetivli zero, 16, e16, m2, ta, ma
402 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v12
404 %elt.head = insertelement <16 x half> poison, half %b, i32 0
405 %vb = shufflevector <16 x half> %elt.head, <16 x half> poison, <16 x i32> zeroinitializer
406 %v = call <16 x half> @llvm.vp.fdiv.v16f16(<16 x half> %va, <16 x half> %vb, <16 x i1> splat (i1 true), i32 %evl)
410 declare <2 x float> @llvm.vp.fdiv.v2f32(<2 x float>, <2 x float>, <2 x i1>, i32)
412 define <2 x float> @vfdiv_vv_v2f32(<2 x float> %va, <2 x float> %b, <2 x i1> %m, i32 zeroext %evl) {
413 ; CHECK-LABEL: vfdiv_vv_v2f32:
415 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
416 ; CHECK-NEXT: vfdiv.vv v8, v8, v9, v0.t
418 %v = call <2 x float> @llvm.vp.fdiv.v2f32(<2 x float> %va, <2 x float> %b, <2 x i1> %m, i32 %evl)
422 define <2 x float> @vfdiv_vv_v2f32_unmasked(<2 x float> %va, <2 x float> %b, i32 zeroext %evl) {
423 ; CHECK-LABEL: vfdiv_vv_v2f32_unmasked:
425 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
426 ; CHECK-NEXT: vfdiv.vv v8, v8, v9
428 %v = call <2 x float> @llvm.vp.fdiv.v2f32(<2 x float> %va, <2 x float> %b, <2 x i1> splat (i1 true), i32 %evl)
432 define <2 x float> @vfdiv_vf_v2f32(<2 x float> %va, float %b, <2 x i1> %m, i32 zeroext %evl) {
433 ; CHECK-LABEL: vfdiv_vf_v2f32:
435 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
436 ; CHECK-NEXT: vfdiv.vf v8, v8, fa0, v0.t
438 %elt.head = insertelement <2 x float> poison, float %b, i32 0
439 %vb = shufflevector <2 x float> %elt.head, <2 x float> poison, <2 x i32> zeroinitializer
440 %v = call <2 x float> @llvm.vp.fdiv.v2f32(<2 x float> %va, <2 x float> %vb, <2 x i1> %m, i32 %evl)
444 define <2 x float> @vfdiv_vf_v2f32_unmasked(<2 x float> %va, float %b, i32 zeroext %evl) {
445 ; CHECK-LABEL: vfdiv_vf_v2f32_unmasked:
447 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
448 ; CHECK-NEXT: vfdiv.vf v8, v8, fa0
450 %elt.head = insertelement <2 x float> poison, float %b, i32 0
451 %vb = shufflevector <2 x float> %elt.head, <2 x float> poison, <2 x i32> zeroinitializer
452 %v = call <2 x float> @llvm.vp.fdiv.v2f32(<2 x float> %va, <2 x float> %vb, <2 x i1> splat (i1 true), i32 %evl)
456 declare <4 x float> @llvm.vp.fdiv.v4f32(<4 x float>, <4 x float>, <4 x i1>, i32)
458 define <4 x float> @vfdiv_vv_v4f32(<4 x float> %va, <4 x float> %b, <4 x i1> %m, i32 zeroext %evl) {
459 ; CHECK-LABEL: vfdiv_vv_v4f32:
461 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, ma
462 ; CHECK-NEXT: vfdiv.vv v8, v8, v9, v0.t
464 %v = call <4 x float> @llvm.vp.fdiv.v4f32(<4 x float> %va, <4 x float> %b, <4 x i1> %m, i32 %evl)
468 define <4 x float> @vfdiv_vv_v4f32_unmasked(<4 x float> %va, <4 x float> %b, i32 zeroext %evl) {
469 ; CHECK-LABEL: vfdiv_vv_v4f32_unmasked:
471 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, ma
472 ; CHECK-NEXT: vfdiv.vv v8, v8, v9
474 %v = call <4 x float> @llvm.vp.fdiv.v4f32(<4 x float> %va, <4 x float> %b, <4 x i1> splat (i1 true), i32 %evl)
478 define <4 x float> @vfdiv_vf_v4f32(<4 x float> %va, float %b, <4 x i1> %m, i32 zeroext %evl) {
479 ; CHECK-LABEL: vfdiv_vf_v4f32:
481 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, ma
482 ; CHECK-NEXT: vfdiv.vf v8, v8, fa0, v0.t
484 %elt.head = insertelement <4 x float> poison, float %b, i32 0
485 %vb = shufflevector <4 x float> %elt.head, <4 x float> poison, <4 x i32> zeroinitializer
486 %v = call <4 x float> @llvm.vp.fdiv.v4f32(<4 x float> %va, <4 x float> %vb, <4 x i1> %m, i32 %evl)
490 define <4 x float> @vfdiv_vf_v4f32_unmasked(<4 x float> %va, float %b, i32 zeroext %evl) {
491 ; CHECK-LABEL: vfdiv_vf_v4f32_unmasked:
493 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, ma
494 ; CHECK-NEXT: vfdiv.vf v8, v8, fa0
496 %elt.head = insertelement <4 x float> poison, float %b, i32 0
497 %vb = shufflevector <4 x float> %elt.head, <4 x float> poison, <4 x i32> zeroinitializer
498 %v = call <4 x float> @llvm.vp.fdiv.v4f32(<4 x float> %va, <4 x float> %vb, <4 x i1> splat (i1 true), i32 %evl)
502 declare <8 x float> @llvm.vp.fdiv.v8f32(<8 x float>, <8 x float>, <8 x i1>, i32)
504 define <8 x float> @vfdiv_vv_v8f32(<8 x float> %va, <8 x float> %b, <8 x i1> %m, i32 zeroext %evl) {
505 ; CHECK-LABEL: vfdiv_vv_v8f32:
507 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
508 ; CHECK-NEXT: vfdiv.vv v8, v8, v10, v0.t
510 %v = call <8 x float> @llvm.vp.fdiv.v8f32(<8 x float> %va, <8 x float> %b, <8 x i1> %m, i32 %evl)
514 define <8 x float> @vfdiv_vv_v8f32_unmasked(<8 x float> %va, <8 x float> %b, i32 zeroext %evl) {
515 ; CHECK-LABEL: vfdiv_vv_v8f32_unmasked:
517 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
518 ; CHECK-NEXT: vfdiv.vv v8, v8, v10
520 %v = call <8 x float> @llvm.vp.fdiv.v8f32(<8 x float> %va, <8 x float> %b, <8 x i1> splat (i1 true), i32 %evl)
524 define <8 x float> @vfdiv_vf_v8f32(<8 x float> %va, float %b, <8 x i1> %m, i32 zeroext %evl) {
525 ; CHECK-LABEL: vfdiv_vf_v8f32:
527 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
528 ; CHECK-NEXT: vfdiv.vf v8, v8, fa0, v0.t
530 %elt.head = insertelement <8 x float> poison, float %b, i32 0
531 %vb = shufflevector <8 x float> %elt.head, <8 x float> poison, <8 x i32> zeroinitializer
532 %v = call <8 x float> @llvm.vp.fdiv.v8f32(<8 x float> %va, <8 x float> %vb, <8 x i1> %m, i32 %evl)
536 define <8 x float> @vfdiv_vf_v8f32_unmasked(<8 x float> %va, float %b, i32 zeroext %evl) {
537 ; CHECK-LABEL: vfdiv_vf_v8f32_unmasked:
539 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
540 ; CHECK-NEXT: vfdiv.vf v8, v8, fa0
542 %elt.head = insertelement <8 x float> poison, float %b, i32 0
543 %vb = shufflevector <8 x float> %elt.head, <8 x float> poison, <8 x i32> zeroinitializer
544 %v = call <8 x float> @llvm.vp.fdiv.v8f32(<8 x float> %va, <8 x float> %vb, <8 x i1> splat (i1 true), i32 %evl)
548 declare <16 x float> @llvm.vp.fdiv.v16f32(<16 x float>, <16 x float>, <16 x i1>, i32)
550 define <16 x float> @vfdiv_vv_v16f32(<16 x float> %va, <16 x float> %b, <16 x i1> %m, i32 zeroext %evl) {
551 ; CHECK-LABEL: vfdiv_vv_v16f32:
553 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
554 ; CHECK-NEXT: vfdiv.vv v8, v8, v12, v0.t
556 %v = call <16 x float> @llvm.vp.fdiv.v16f32(<16 x float> %va, <16 x float> %b, <16 x i1> %m, i32 %evl)
560 define <16 x float> @vfdiv_vv_v16f32_unmasked(<16 x float> %va, <16 x float> %b, i32 zeroext %evl) {
561 ; CHECK-LABEL: vfdiv_vv_v16f32_unmasked:
563 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
564 ; CHECK-NEXT: vfdiv.vv v8, v8, v12
566 %v = call <16 x float> @llvm.vp.fdiv.v16f32(<16 x float> %va, <16 x float> %b, <16 x i1> splat (i1 true), i32 %evl)
570 define <16 x float> @vfdiv_vf_v16f32(<16 x float> %va, float %b, <16 x i1> %m, i32 zeroext %evl) {
571 ; CHECK-LABEL: vfdiv_vf_v16f32:
573 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
574 ; CHECK-NEXT: vfdiv.vf v8, v8, fa0, v0.t
576 %elt.head = insertelement <16 x float> poison, float %b, i32 0
577 %vb = shufflevector <16 x float> %elt.head, <16 x float> poison, <16 x i32> zeroinitializer
578 %v = call <16 x float> @llvm.vp.fdiv.v16f32(<16 x float> %va, <16 x float> %vb, <16 x i1> %m, i32 %evl)
582 define <16 x float> @vfdiv_vf_v16f32_unmasked(<16 x float> %va, float %b, i32 zeroext %evl) {
583 ; CHECK-LABEL: vfdiv_vf_v16f32_unmasked:
585 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
586 ; CHECK-NEXT: vfdiv.vf v8, v8, fa0
588 %elt.head = insertelement <16 x float> poison, float %b, i32 0
589 %vb = shufflevector <16 x float> %elt.head, <16 x float> poison, <16 x i32> zeroinitializer
590 %v = call <16 x float> @llvm.vp.fdiv.v16f32(<16 x float> %va, <16 x float> %vb, <16 x i1> splat (i1 true), i32 %evl)
594 declare <2 x double> @llvm.vp.fdiv.v2f64(<2 x double>, <2 x double>, <2 x i1>, i32)
596 define <2 x double> @vfdiv_vv_v2f64(<2 x double> %va, <2 x double> %b, <2 x i1> %m, i32 zeroext %evl) {
597 ; CHECK-LABEL: vfdiv_vv_v2f64:
599 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
600 ; CHECK-NEXT: vfdiv.vv v8, v8, v9, v0.t
602 %v = call <2 x double> @llvm.vp.fdiv.v2f64(<2 x double> %va, <2 x double> %b, <2 x i1> %m, i32 %evl)
606 define <2 x double> @vfdiv_vv_v2f64_unmasked(<2 x double> %va, <2 x double> %b, i32 zeroext %evl) {
607 ; CHECK-LABEL: vfdiv_vv_v2f64_unmasked:
609 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
610 ; CHECK-NEXT: vfdiv.vv v8, v8, v9
612 %v = call <2 x double> @llvm.vp.fdiv.v2f64(<2 x double> %va, <2 x double> %b, <2 x i1> splat (i1 true), i32 %evl)
616 define <2 x double> @vfdiv_vf_v2f64(<2 x double> %va, double %b, <2 x i1> %m, i32 zeroext %evl) {
617 ; CHECK-LABEL: vfdiv_vf_v2f64:
619 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
620 ; CHECK-NEXT: vfdiv.vf v8, v8, fa0, v0.t
622 %elt.head = insertelement <2 x double> poison, double %b, i32 0
623 %vb = shufflevector <2 x double> %elt.head, <2 x double> poison, <2 x i32> zeroinitializer
624 %v = call <2 x double> @llvm.vp.fdiv.v2f64(<2 x double> %va, <2 x double> %vb, <2 x i1> %m, i32 %evl)
628 define <2 x double> @vfdiv_vf_v2f64_unmasked(<2 x double> %va, double %b, i32 zeroext %evl) {
629 ; CHECK-LABEL: vfdiv_vf_v2f64_unmasked:
631 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
632 ; CHECK-NEXT: vfdiv.vf v8, v8, fa0
634 %elt.head = insertelement <2 x double> poison, double %b, i32 0
635 %vb = shufflevector <2 x double> %elt.head, <2 x double> poison, <2 x i32> zeroinitializer
636 %v = call <2 x double> @llvm.vp.fdiv.v2f64(<2 x double> %va, <2 x double> %vb, <2 x i1> splat (i1 true), i32 %evl)
640 declare <4 x double> @llvm.vp.fdiv.v4f64(<4 x double>, <4 x double>, <4 x i1>, i32)
642 define <4 x double> @vfdiv_vv_v4f64(<4 x double> %va, <4 x double> %b, <4 x i1> %m, i32 zeroext %evl) {
643 ; CHECK-LABEL: vfdiv_vv_v4f64:
645 ; CHECK-NEXT: vsetvli zero, a0, e64, m2, ta, ma
646 ; CHECK-NEXT: vfdiv.vv v8, v8, v10, v0.t
648 %v = call <4 x double> @llvm.vp.fdiv.v4f64(<4 x double> %va, <4 x double> %b, <4 x i1> %m, i32 %evl)
652 define <4 x double> @vfdiv_vv_v4f64_unmasked(<4 x double> %va, <4 x double> %b, i32 zeroext %evl) {
653 ; CHECK-LABEL: vfdiv_vv_v4f64_unmasked:
655 ; CHECK-NEXT: vsetvli zero, a0, e64, m2, ta, ma
656 ; CHECK-NEXT: vfdiv.vv v8, v8, v10
658 %v = call <4 x double> @llvm.vp.fdiv.v4f64(<4 x double> %va, <4 x double> %b, <4 x i1> splat (i1 true), i32 %evl)
662 define <4 x double> @vfdiv_vf_v4f64(<4 x double> %va, double %b, <4 x i1> %m, i32 zeroext %evl) {
663 ; CHECK-LABEL: vfdiv_vf_v4f64:
665 ; CHECK-NEXT: vsetvli zero, a0, e64, m2, ta, ma
666 ; CHECK-NEXT: vfdiv.vf v8, v8, fa0, v0.t
668 %elt.head = insertelement <4 x double> poison, double %b, i32 0
669 %vb = shufflevector <4 x double> %elt.head, <4 x double> poison, <4 x i32> zeroinitializer
670 %v = call <4 x double> @llvm.vp.fdiv.v4f64(<4 x double> %va, <4 x double> %vb, <4 x i1> %m, i32 %evl)
674 define <4 x double> @vfdiv_vf_v4f64_unmasked(<4 x double> %va, double %b, i32 zeroext %evl) {
675 ; CHECK-LABEL: vfdiv_vf_v4f64_unmasked:
677 ; CHECK-NEXT: vsetvli zero, a0, e64, m2, ta, ma
678 ; CHECK-NEXT: vfdiv.vf v8, v8, fa0
680 %elt.head = insertelement <4 x double> poison, double %b, i32 0
681 %vb = shufflevector <4 x double> %elt.head, <4 x double> poison, <4 x i32> zeroinitializer
682 %v = call <4 x double> @llvm.vp.fdiv.v4f64(<4 x double> %va, <4 x double> %vb, <4 x i1> splat (i1 true), i32 %evl)
686 declare <8 x double> @llvm.vp.fdiv.v8f64(<8 x double>, <8 x double>, <8 x i1>, i32)
688 define <8 x double> @vfdiv_vv_v8f64(<8 x double> %va, <8 x double> %b, <8 x i1> %m, i32 zeroext %evl) {
689 ; CHECK-LABEL: vfdiv_vv_v8f64:
691 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
692 ; CHECK-NEXT: vfdiv.vv v8, v8, v12, v0.t
694 %v = call <8 x double> @llvm.vp.fdiv.v8f64(<8 x double> %va, <8 x double> %b, <8 x i1> %m, i32 %evl)
698 define <8 x double> @vfdiv_vv_v8f64_unmasked(<8 x double> %va, <8 x double> %b, i32 zeroext %evl) {
699 ; CHECK-LABEL: vfdiv_vv_v8f64_unmasked:
701 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
702 ; CHECK-NEXT: vfdiv.vv v8, v8, v12
704 %v = call <8 x double> @llvm.vp.fdiv.v8f64(<8 x double> %va, <8 x double> %b, <8 x i1> splat (i1 true), i32 %evl)
708 define <8 x double> @vfdiv_vf_v8f64(<8 x double> %va, double %b, <8 x i1> %m, i32 zeroext %evl) {
709 ; CHECK-LABEL: vfdiv_vf_v8f64:
711 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
712 ; CHECK-NEXT: vfdiv.vf v8, v8, fa0, v0.t
714 %elt.head = insertelement <8 x double> poison, double %b, i32 0
715 %vb = shufflevector <8 x double> %elt.head, <8 x double> poison, <8 x i32> zeroinitializer
716 %v = call <8 x double> @llvm.vp.fdiv.v8f64(<8 x double> %va, <8 x double> %vb, <8 x i1> %m, i32 %evl)
720 define <8 x double> @vfdiv_vf_v8f64_unmasked(<8 x double> %va, double %b, i32 zeroext %evl) {
721 ; CHECK-LABEL: vfdiv_vf_v8f64_unmasked:
723 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
724 ; CHECK-NEXT: vfdiv.vf v8, v8, fa0
726 %elt.head = insertelement <8 x double> poison, double %b, i32 0
727 %vb = shufflevector <8 x double> %elt.head, <8 x double> poison, <8 x i32> zeroinitializer
728 %v = call <8 x double> @llvm.vp.fdiv.v8f64(<8 x double> %va, <8 x double> %vb, <8 x i1> splat (i1 true), i32 %evl)
732 declare <16 x double> @llvm.vp.fdiv.v16f64(<16 x double>, <16 x double>, <16 x i1>, i32)
734 define <16 x double> @vfdiv_vv_v16f64(<16 x double> %va, <16 x double> %b, <16 x i1> %m, i32 zeroext %evl) {
735 ; CHECK-LABEL: vfdiv_vv_v16f64:
737 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
738 ; CHECK-NEXT: vfdiv.vv v8, v8, v16, v0.t
740 %v = call <16 x double> @llvm.vp.fdiv.v16f64(<16 x double> %va, <16 x double> %b, <16 x i1> %m, i32 %evl)
744 define <16 x double> @vfdiv_vv_v16f64_unmasked(<16 x double> %va, <16 x double> %b, i32 zeroext %evl) {
745 ; CHECK-LABEL: vfdiv_vv_v16f64_unmasked:
747 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
748 ; CHECK-NEXT: vfdiv.vv v8, v8, v16
750 %v = call <16 x double> @llvm.vp.fdiv.v16f64(<16 x double> %va, <16 x double> %b, <16 x i1> splat (i1 true), i32 %evl)
754 define <16 x double> @vfdiv_vf_v16f64(<16 x double> %va, double %b, <16 x i1> %m, i32 zeroext %evl) {
755 ; CHECK-LABEL: vfdiv_vf_v16f64:
757 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
758 ; CHECK-NEXT: vfdiv.vf v8, v8, fa0, v0.t
760 %elt.head = insertelement <16 x double> poison, double %b, i32 0
761 %vb = shufflevector <16 x double> %elt.head, <16 x double> poison, <16 x i32> zeroinitializer
762 %v = call <16 x double> @llvm.vp.fdiv.v16f64(<16 x double> %va, <16 x double> %vb, <16 x i1> %m, i32 %evl)
766 define <16 x double> @vfdiv_vf_v16f64_unmasked(<16 x double> %va, double %b, i32 zeroext %evl) {
767 ; CHECK-LABEL: vfdiv_vf_v16f64_unmasked:
769 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
770 ; CHECK-NEXT: vfdiv.vf v8, v8, fa0
772 %elt.head = insertelement <16 x double> poison, double %b, i32 0
773 %vb = shufflevector <16 x double> %elt.head, <16 x double> poison, <16 x i32> zeroinitializer
774 %v = call <16 x double> @llvm.vp.fdiv.v16f64(<16 x double> %va, <16 x double> %vb, <16 x i1> splat (i1 true), i32 %evl)