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,+zfhmin,+zvfhmin,+v -target-abi=ilp32d \
7 ; RUN: -verify-machineinstrs < %s | FileCheck %s --check-prefixes=CHECK,ZVFHMIN
8 ; RUN: llc -mtriple=riscv64 -mattr=+d,+zfhmin,+zvfhmin,+v -target-abi=lp64d \
9 ; RUN: -verify-machineinstrs < %s | FileCheck %s --check-prefixes=CHECK,ZVFHMIN
11 declare <vscale x 1 x half> @llvm.vp.fsub.nxv1f16(<vscale x 1 x half>, <vscale x 1 x half>, <vscale x 1 x i1>, i32)
13 define <vscale x 1 x half> @vfsub_vv_nxv1f16(<vscale x 1 x half> %va, <vscale x 1 x half> %b, <vscale x 1 x i1> %m, i32 zeroext %evl) {
14 ; ZVFH-LABEL: vfsub_vv_nxv1f16:
16 ; ZVFH-NEXT: vsetvli zero, a0, e16, mf4, ta, ma
17 ; ZVFH-NEXT: vfsub.vv v8, v8, v9, v0.t
20 ; ZVFHMIN-LABEL: vfsub_vv_nxv1f16:
22 ; ZVFHMIN-NEXT: vsetvli a1, zero, 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: vfsub.vv v9, v9, v10, v0.t
27 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
28 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v9
30 %v = call <vscale x 1 x half> @llvm.vp.fsub.nxv1f16(<vscale x 1 x half> %va, <vscale x 1 x half> %b, <vscale x 1 x i1> %m, i32 %evl)
31 ret <vscale x 1 x half> %v
34 define <vscale x 1 x half> @vfsub_vv_nxv1f16_unmasked(<vscale x 1 x half> %va, <vscale x 1 x half> %b, i32 zeroext %evl) {
35 ; ZVFH-LABEL: vfsub_vv_nxv1f16_unmasked:
37 ; ZVFH-NEXT: vsetvli zero, a0, e16, mf4, ta, ma
38 ; ZVFH-NEXT: vfsub.vv v8, v8, v9
41 ; ZVFHMIN-LABEL: vfsub_vv_nxv1f16_unmasked:
43 ; ZVFHMIN-NEXT: vsetvli a1, zero, 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: vfsub.vv v9, v9, v10
48 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
49 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v9
51 %v = call <vscale x 1 x half> @llvm.vp.fsub.nxv1f16(<vscale x 1 x half> %va, <vscale x 1 x half> %b, <vscale x 1 x i1> splat (i1 true), i32 %evl)
52 ret <vscale x 1 x half> %v
55 define <vscale x 1 x half> @vfsub_vf_nxv1f16(<vscale x 1 x half> %va, half %b, <vscale x 1 x i1> %m, i32 zeroext %evl) {
56 ; ZVFH-LABEL: vfsub_vf_nxv1f16:
58 ; ZVFH-NEXT: vsetvli zero, a0, e16, mf4, ta, ma
59 ; ZVFH-NEXT: vfsub.vf v8, v8, fa0, v0.t
62 ; ZVFHMIN-LABEL: vfsub_vf_nxv1f16:
64 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
65 ; ZVFHMIN-NEXT: vsetvli a1, zero, e32, mf2, ta, ma
66 ; ZVFHMIN-NEXT: vfmv.v.f v9, fa5
67 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, mf4, ta, ma
68 ; ZVFHMIN-NEXT: vfncvt.f.f.w v10, v9
69 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v9, v8
70 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v8, v10
71 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
72 ; ZVFHMIN-NEXT: vfsub.vv v9, v9, v8, v0.t
73 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
74 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v9
76 %elt.head = insertelement <vscale x 1 x half> poison, half %b, i32 0
77 %vb = shufflevector <vscale x 1 x half> %elt.head, <vscale x 1 x half> poison, <vscale x 1 x i32> zeroinitializer
78 %v = call <vscale x 1 x half> @llvm.vp.fsub.nxv1f16(<vscale x 1 x half> %va, <vscale x 1 x half> %vb, <vscale x 1 x i1> %m, i32 %evl)
79 ret <vscale x 1 x half> %v
82 define <vscale x 1 x half> @vfsub_vf_nxv1f16_unmasked(<vscale x 1 x half> %va, half %b, i32 zeroext %evl) {
83 ; ZVFH-LABEL: vfsub_vf_nxv1f16_unmasked:
85 ; ZVFH-NEXT: vsetvli zero, a0, e16, mf4, ta, ma
86 ; ZVFH-NEXT: vfsub.vf v8, v8, fa0
89 ; ZVFHMIN-LABEL: vfsub_vf_nxv1f16_unmasked:
91 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
92 ; ZVFHMIN-NEXT: vsetvli a1, zero, e32, mf2, ta, ma
93 ; ZVFHMIN-NEXT: vfmv.v.f v9, fa5
94 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, mf4, ta, ma
95 ; ZVFHMIN-NEXT: vfncvt.f.f.w v10, v9
96 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v9, v8
97 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v8, v10
98 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
99 ; ZVFHMIN-NEXT: vfsub.vv v9, v9, v8
100 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
101 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v9
103 %elt.head = insertelement <vscale x 1 x half> poison, half %b, i32 0
104 %vb = shufflevector <vscale x 1 x half> %elt.head, <vscale x 1 x half> poison, <vscale x 1 x i32> zeroinitializer
105 %v = call <vscale x 1 x half> @llvm.vp.fsub.nxv1f16(<vscale x 1 x half> %va, <vscale x 1 x half> %vb, <vscale x 1 x i1> splat (i1 true), i32 %evl)
106 ret <vscale x 1 x half> %v
109 declare <vscale x 2 x half> @llvm.vp.fsub.nxv2f16(<vscale x 2 x half>, <vscale x 2 x half>, <vscale x 2 x i1>, i32)
111 define <vscale x 2 x half> @vfsub_vv_nxv2f16(<vscale x 2 x half> %va, <vscale x 2 x half> %b, <vscale x 2 x i1> %m, i32 zeroext %evl) {
112 ; ZVFH-LABEL: vfsub_vv_nxv2f16:
114 ; ZVFH-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
115 ; ZVFH-NEXT: vfsub.vv v8, v8, v9, v0.t
118 ; ZVFHMIN-LABEL: vfsub_vv_nxv2f16:
120 ; ZVFHMIN-NEXT: vsetvli a1, zero, e16, mf2, ta, ma
121 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v9
122 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v9, v8
123 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m1, ta, ma
124 ; ZVFHMIN-NEXT: vfsub.vv v9, v9, v10, v0.t
125 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, mf2, ta, ma
126 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v9
128 %v = call <vscale x 2 x half> @llvm.vp.fsub.nxv2f16(<vscale x 2 x half> %va, <vscale x 2 x half> %b, <vscale x 2 x i1> %m, i32 %evl)
129 ret <vscale x 2 x half> %v
132 define <vscale x 2 x half> @vfsub_vv_nxv2f16_unmasked(<vscale x 2 x half> %va, <vscale x 2 x half> %b, i32 zeroext %evl) {
133 ; ZVFH-LABEL: vfsub_vv_nxv2f16_unmasked:
135 ; ZVFH-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
136 ; ZVFH-NEXT: vfsub.vv v8, v8, v9
139 ; ZVFHMIN-LABEL: vfsub_vv_nxv2f16_unmasked:
141 ; ZVFHMIN-NEXT: vsetvli a1, zero, e16, mf2, ta, ma
142 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v9
143 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v9, v8
144 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m1, ta, ma
145 ; ZVFHMIN-NEXT: vfsub.vv v9, v9, v10
146 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, mf2, ta, ma
147 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v9
149 %v = call <vscale x 2 x half> @llvm.vp.fsub.nxv2f16(<vscale x 2 x half> %va, <vscale x 2 x half> %b, <vscale x 2 x i1> splat (i1 true), i32 %evl)
150 ret <vscale x 2 x half> %v
153 define <vscale x 2 x half> @vfsub_vf_nxv2f16(<vscale x 2 x half> %va, half %b, <vscale x 2 x i1> %m, i32 zeroext %evl) {
154 ; ZVFH-LABEL: vfsub_vf_nxv2f16:
156 ; ZVFH-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
157 ; ZVFH-NEXT: vfsub.vf v8, v8, fa0, v0.t
160 ; ZVFHMIN-LABEL: vfsub_vf_nxv2f16:
162 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
163 ; ZVFHMIN-NEXT: vsetvli a1, zero, e32, m1, ta, ma
164 ; ZVFHMIN-NEXT: vfmv.v.f v9, fa5
165 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, mf2, ta, ma
166 ; ZVFHMIN-NEXT: vfncvt.f.f.w v10, v9
167 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v9, v8
168 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v8, v10
169 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m1, ta, ma
170 ; ZVFHMIN-NEXT: vfsub.vv v9, v9, v8, v0.t
171 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, mf2, ta, ma
172 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v9
174 %elt.head = insertelement <vscale x 2 x half> poison, half %b, i32 0
175 %vb = shufflevector <vscale x 2 x half> %elt.head, <vscale x 2 x half> poison, <vscale x 2 x i32> zeroinitializer
176 %v = call <vscale x 2 x half> @llvm.vp.fsub.nxv2f16(<vscale x 2 x half> %va, <vscale x 2 x half> %vb, <vscale x 2 x i1> %m, i32 %evl)
177 ret <vscale x 2 x half> %v
180 define <vscale x 2 x half> @vfsub_vf_nxv2f16_unmasked(<vscale x 2 x half> %va, half %b, i32 zeroext %evl) {
181 ; ZVFH-LABEL: vfsub_vf_nxv2f16_unmasked:
183 ; ZVFH-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
184 ; ZVFH-NEXT: vfsub.vf v8, v8, fa0
187 ; ZVFHMIN-LABEL: vfsub_vf_nxv2f16_unmasked:
189 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
190 ; ZVFHMIN-NEXT: vsetvli a1, zero, e32, m1, ta, ma
191 ; ZVFHMIN-NEXT: vfmv.v.f v9, fa5
192 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, mf2, ta, ma
193 ; ZVFHMIN-NEXT: vfncvt.f.f.w v10, v9
194 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v9, v8
195 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v8, v10
196 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m1, ta, ma
197 ; ZVFHMIN-NEXT: vfsub.vv v9, v9, v8
198 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, mf2, ta, ma
199 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v9
201 %elt.head = insertelement <vscale x 2 x half> poison, half %b, i32 0
202 %vb = shufflevector <vscale x 2 x half> %elt.head, <vscale x 2 x half> poison, <vscale x 2 x i32> zeroinitializer
203 %v = call <vscale x 2 x half> @llvm.vp.fsub.nxv2f16(<vscale x 2 x half> %va, <vscale x 2 x half> %vb, <vscale x 2 x i1> splat (i1 true), i32 %evl)
204 ret <vscale x 2 x half> %v
207 declare <vscale x 4 x half> @llvm.vp.fsub.nxv4f16(<vscale x 4 x half>, <vscale x 4 x half>, <vscale x 4 x i1>, i32)
209 define <vscale x 4 x half> @vfsub_vv_nxv4f16(<vscale x 4 x half> %va, <vscale x 4 x half> %b, <vscale x 4 x i1> %m, i32 zeroext %evl) {
210 ; ZVFH-LABEL: vfsub_vv_nxv4f16:
212 ; ZVFH-NEXT: vsetvli zero, a0, e16, m1, ta, ma
213 ; ZVFH-NEXT: vfsub.vv v8, v8, v9, v0.t
216 ; ZVFHMIN-LABEL: vfsub_vv_nxv4f16:
218 ; ZVFHMIN-NEXT: vsetvli a1, zero, e16, m1, ta, ma
219 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v9
220 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v8
221 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m2, ta, ma
222 ; ZVFHMIN-NEXT: vfsub.vv v10, v12, v10, v0.t
223 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m1, ta, ma
224 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v10
226 %v = call <vscale x 4 x half> @llvm.vp.fsub.nxv4f16(<vscale x 4 x half> %va, <vscale x 4 x half> %b, <vscale x 4 x i1> %m, i32 %evl)
227 ret <vscale x 4 x half> %v
230 define <vscale x 4 x half> @vfsub_vv_nxv4f16_unmasked(<vscale x 4 x half> %va, <vscale x 4 x half> %b, i32 zeroext %evl) {
231 ; ZVFH-LABEL: vfsub_vv_nxv4f16_unmasked:
233 ; ZVFH-NEXT: vsetvli zero, a0, e16, m1, ta, ma
234 ; ZVFH-NEXT: vfsub.vv v8, v8, v9
237 ; ZVFHMIN-LABEL: vfsub_vv_nxv4f16_unmasked:
239 ; ZVFHMIN-NEXT: vsetvli a1, zero, e16, m1, ta, ma
240 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v9
241 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v8
242 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m2, ta, ma
243 ; ZVFHMIN-NEXT: vfsub.vv v10, v12, v10
244 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m1, ta, ma
245 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v10
247 %v = call <vscale x 4 x half> @llvm.vp.fsub.nxv4f16(<vscale x 4 x half> %va, <vscale x 4 x half> %b, <vscale x 4 x i1> splat (i1 true), i32 %evl)
248 ret <vscale x 4 x half> %v
251 define <vscale x 4 x half> @vfsub_vf_nxv4f16(<vscale x 4 x half> %va, half %b, <vscale x 4 x i1> %m, i32 zeroext %evl) {
252 ; ZVFH-LABEL: vfsub_vf_nxv4f16:
254 ; ZVFH-NEXT: vsetvli zero, a0, e16, m1, ta, ma
255 ; ZVFH-NEXT: vfsub.vf v8, v8, fa0, v0.t
258 ; ZVFHMIN-LABEL: vfsub_vf_nxv4f16:
260 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
261 ; ZVFHMIN-NEXT: vsetvli a1, zero, e32, m2, ta, ma
262 ; ZVFHMIN-NEXT: vfmv.v.f v10, fa5
263 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m1, ta, ma
264 ; ZVFHMIN-NEXT: vfncvt.f.f.w v9, v10
265 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v8
266 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v9
267 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m2, ta, ma
268 ; ZVFHMIN-NEXT: vfsub.vv v10, v10, v12, v0.t
269 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m1, ta, ma
270 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v10
272 %elt.head = insertelement <vscale x 4 x half> poison, half %b, i32 0
273 %vb = shufflevector <vscale x 4 x half> %elt.head, <vscale x 4 x half> poison, <vscale x 4 x i32> zeroinitializer
274 %v = call <vscale x 4 x half> @llvm.vp.fsub.nxv4f16(<vscale x 4 x half> %va, <vscale x 4 x half> %vb, <vscale x 4 x i1> %m, i32 %evl)
275 ret <vscale x 4 x half> %v
278 define <vscale x 4 x half> @vfsub_vf_nxv4f16_unmasked(<vscale x 4 x half> %va, half %b, i32 zeroext %evl) {
279 ; ZVFH-LABEL: vfsub_vf_nxv4f16_unmasked:
281 ; ZVFH-NEXT: vsetvli zero, a0, e16, m1, ta, ma
282 ; ZVFH-NEXT: vfsub.vf v8, v8, fa0
285 ; ZVFHMIN-LABEL: vfsub_vf_nxv4f16_unmasked:
287 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
288 ; ZVFHMIN-NEXT: vsetvli a1, zero, e32, m2, ta, ma
289 ; ZVFHMIN-NEXT: vfmv.v.f v10, fa5
290 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m1, ta, ma
291 ; ZVFHMIN-NEXT: vfncvt.f.f.w v9, v10
292 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v8
293 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v9
294 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m2, ta, ma
295 ; ZVFHMIN-NEXT: vfsub.vv v10, v10, v12
296 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m1, ta, ma
297 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v10
299 %elt.head = insertelement <vscale x 4 x half> poison, half %b, i32 0
300 %vb = shufflevector <vscale x 4 x half> %elt.head, <vscale x 4 x half> poison, <vscale x 4 x i32> zeroinitializer
301 %v = call <vscale x 4 x half> @llvm.vp.fsub.nxv4f16(<vscale x 4 x half> %va, <vscale x 4 x half> %vb, <vscale x 4 x i1> splat (i1 true), i32 %evl)
302 ret <vscale x 4 x half> %v
305 declare <vscale x 8 x half> @llvm.vp.fsub.nxv8f16(<vscale x 8 x half>, <vscale x 8 x half>, <vscale x 8 x i1>, i32)
307 define <vscale x 8 x half> @vfsub_vv_nxv8f16(<vscale x 8 x half> %va, <vscale x 8 x half> %b, <vscale x 8 x i1> %m, i32 zeroext %evl) {
308 ; ZVFH-LABEL: vfsub_vv_nxv8f16:
310 ; ZVFH-NEXT: vsetvli zero, a0, e16, m2, ta, ma
311 ; ZVFH-NEXT: vfsub.vv v8, v8, v10, v0.t
314 ; ZVFHMIN-LABEL: vfsub_vv_nxv8f16:
316 ; ZVFHMIN-NEXT: vsetvli a1, zero, e16, m2, ta, ma
317 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v10
318 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v8
319 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m4, ta, ma
320 ; ZVFHMIN-NEXT: vfsub.vv v12, v16, v12, v0.t
321 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m2, ta, ma
322 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v12
324 %v = call <vscale x 8 x half> @llvm.vp.fsub.nxv8f16(<vscale x 8 x half> %va, <vscale x 8 x half> %b, <vscale x 8 x i1> %m, i32 %evl)
325 ret <vscale x 8 x half> %v
328 define <vscale x 8 x half> @vfsub_vv_nxv8f16_unmasked(<vscale x 8 x half> %va, <vscale x 8 x half> %b, i32 zeroext %evl) {
329 ; ZVFH-LABEL: vfsub_vv_nxv8f16_unmasked:
331 ; ZVFH-NEXT: vsetvli zero, a0, e16, m2, ta, ma
332 ; ZVFH-NEXT: vfsub.vv v8, v8, v10
335 ; ZVFHMIN-LABEL: vfsub_vv_nxv8f16_unmasked:
337 ; ZVFHMIN-NEXT: vsetvli a1, zero, e16, m2, ta, ma
338 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v10
339 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v8
340 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m4, ta, ma
341 ; ZVFHMIN-NEXT: vfsub.vv v12, v16, v12
342 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m2, ta, ma
343 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v12
345 %v = call <vscale x 8 x half> @llvm.vp.fsub.nxv8f16(<vscale x 8 x half> %va, <vscale x 8 x half> %b, <vscale x 8 x i1> splat (i1 true), i32 %evl)
346 ret <vscale x 8 x half> %v
349 define <vscale x 8 x half> @vfsub_vf_nxv8f16(<vscale x 8 x half> %va, half %b, <vscale x 8 x i1> %m, i32 zeroext %evl) {
350 ; ZVFH-LABEL: vfsub_vf_nxv8f16:
352 ; ZVFH-NEXT: vsetvli zero, a0, e16, m2, ta, ma
353 ; ZVFH-NEXT: vfsub.vf v8, v8, fa0, v0.t
356 ; ZVFHMIN-LABEL: vfsub_vf_nxv8f16:
358 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
359 ; ZVFHMIN-NEXT: vsetvli a1, zero, e32, m4, ta, ma
360 ; ZVFHMIN-NEXT: vfmv.v.f v12, fa5
361 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m2, ta, ma
362 ; ZVFHMIN-NEXT: vfncvt.f.f.w v10, v12
363 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v8
364 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v10
365 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m4, ta, ma
366 ; ZVFHMIN-NEXT: vfsub.vv v12, v12, v16, v0.t
367 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m2, ta, ma
368 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v12
370 %elt.head = insertelement <vscale x 8 x half> poison, half %b, i32 0
371 %vb = shufflevector <vscale x 8 x half> %elt.head, <vscale x 8 x half> poison, <vscale x 8 x i32> zeroinitializer
372 %v = call <vscale x 8 x half> @llvm.vp.fsub.nxv8f16(<vscale x 8 x half> %va, <vscale x 8 x half> %vb, <vscale x 8 x i1> %m, i32 %evl)
373 ret <vscale x 8 x half> %v
376 define <vscale x 8 x half> @vfsub_vf_nxv8f16_unmasked(<vscale x 8 x half> %va, half %b, i32 zeroext %evl) {
377 ; ZVFH-LABEL: vfsub_vf_nxv8f16_unmasked:
379 ; ZVFH-NEXT: vsetvli zero, a0, e16, m2, ta, ma
380 ; ZVFH-NEXT: vfsub.vf v8, v8, fa0
383 ; ZVFHMIN-LABEL: vfsub_vf_nxv8f16_unmasked:
385 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
386 ; ZVFHMIN-NEXT: vsetvli a1, zero, e32, m4, ta, ma
387 ; ZVFHMIN-NEXT: vfmv.v.f v12, fa5
388 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m2, ta, ma
389 ; ZVFHMIN-NEXT: vfncvt.f.f.w v10, v12
390 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v8
391 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v10
392 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m4, ta, ma
393 ; ZVFHMIN-NEXT: vfsub.vv v12, v12, v16
394 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m2, ta, ma
395 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v12
397 %elt.head = insertelement <vscale x 8 x half> poison, half %b, i32 0
398 %vb = shufflevector <vscale x 8 x half> %elt.head, <vscale x 8 x half> poison, <vscale x 8 x i32> zeroinitializer
399 %v = call <vscale x 8 x half> @llvm.vp.fsub.nxv8f16(<vscale x 8 x half> %va, <vscale x 8 x half> %vb, <vscale x 8 x i1> splat (i1 true), i32 %evl)
400 ret <vscale x 8 x half> %v
403 declare <vscale x 16 x half> @llvm.vp.fsub.nxv16f16(<vscale x 16 x half>, <vscale x 16 x half>, <vscale x 16 x i1>, i32)
405 define <vscale x 16 x half> @vfsub_vv_nxv16f16(<vscale x 16 x half> %va, <vscale x 16 x half> %b, <vscale x 16 x i1> %m, i32 zeroext %evl) {
406 ; ZVFH-LABEL: vfsub_vv_nxv16f16:
408 ; ZVFH-NEXT: vsetvli zero, a0, e16, m4, ta, ma
409 ; ZVFH-NEXT: vfsub.vv v8, v8, v12, v0.t
412 ; ZVFHMIN-LABEL: vfsub_vv_nxv16f16:
414 ; ZVFHMIN-NEXT: vsetvli a1, zero, e16, m4, ta, ma
415 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v12
416 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v24, v8
417 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m8, ta, ma
418 ; ZVFHMIN-NEXT: vfsub.vv v16, v24, v16, v0.t
419 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m4, ta, ma
420 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v16
422 %v = call <vscale x 16 x half> @llvm.vp.fsub.nxv16f16(<vscale x 16 x half> %va, <vscale x 16 x half> %b, <vscale x 16 x i1> %m, i32 %evl)
423 ret <vscale x 16 x half> %v
426 define <vscale x 16 x half> @vfsub_vv_nxv16f16_unmasked(<vscale x 16 x half> %va, <vscale x 16 x half> %b, i32 zeroext %evl) {
427 ; ZVFH-LABEL: vfsub_vv_nxv16f16_unmasked:
429 ; ZVFH-NEXT: vsetvli zero, a0, e16, m4, ta, ma
430 ; ZVFH-NEXT: vfsub.vv v8, v8, v12
433 ; ZVFHMIN-LABEL: vfsub_vv_nxv16f16_unmasked:
435 ; ZVFHMIN-NEXT: vsetvli a1, zero, e16, m4, ta, ma
436 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v12
437 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v24, v8
438 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m8, ta, ma
439 ; ZVFHMIN-NEXT: vfsub.vv v16, v24, v16
440 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m4, ta, ma
441 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v16
443 %v = call <vscale x 16 x half> @llvm.vp.fsub.nxv16f16(<vscale x 16 x half> %va, <vscale x 16 x half> %b, <vscale x 16 x i1> splat (i1 true), i32 %evl)
444 ret <vscale x 16 x half> %v
447 define <vscale x 16 x half> @vfsub_vf_nxv16f16(<vscale x 16 x half> %va, half %b, <vscale x 16 x i1> %m, i32 zeroext %evl) {
448 ; ZVFH-LABEL: vfsub_vf_nxv16f16:
450 ; ZVFH-NEXT: vsetvli zero, a0, e16, m4, ta, ma
451 ; ZVFH-NEXT: vfsub.vf v8, v8, fa0, v0.t
454 ; ZVFHMIN-LABEL: vfsub_vf_nxv16f16:
456 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
457 ; ZVFHMIN-NEXT: vsetvli a1, zero, e32, m8, ta, ma
458 ; ZVFHMIN-NEXT: vfmv.v.f v16, fa5
459 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m4, ta, ma
460 ; ZVFHMIN-NEXT: vfncvt.f.f.w v12, v16
461 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v8
462 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v24, v12
463 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m8, ta, ma
464 ; ZVFHMIN-NEXT: vfsub.vv v16, v16, v24, v0.t
465 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m4, ta, ma
466 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v16
468 %elt.head = insertelement <vscale x 16 x half> poison, half %b, i32 0
469 %vb = shufflevector <vscale x 16 x half> %elt.head, <vscale x 16 x half> poison, <vscale x 16 x i32> zeroinitializer
470 %v = call <vscale x 16 x half> @llvm.vp.fsub.nxv16f16(<vscale x 16 x half> %va, <vscale x 16 x half> %vb, <vscale x 16 x i1> %m, i32 %evl)
471 ret <vscale x 16 x half> %v
474 define <vscale x 16 x half> @vfsub_vf_nxv16f16_unmasked(<vscale x 16 x half> %va, half %b, i32 zeroext %evl) {
475 ; ZVFH-LABEL: vfsub_vf_nxv16f16_unmasked:
477 ; ZVFH-NEXT: vsetvli zero, a0, e16, m4, ta, ma
478 ; ZVFH-NEXT: vfsub.vf v8, v8, fa0
481 ; ZVFHMIN-LABEL: vfsub_vf_nxv16f16_unmasked:
483 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
484 ; ZVFHMIN-NEXT: vsetvli a1, zero, e32, m8, ta, ma
485 ; ZVFHMIN-NEXT: vfmv.v.f v16, fa5
486 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m4, ta, ma
487 ; ZVFHMIN-NEXT: vfncvt.f.f.w v12, v16
488 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v8
489 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v24, v12
490 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m8, ta, ma
491 ; ZVFHMIN-NEXT: vfsub.vv v16, v16, v24
492 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m4, ta, ma
493 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v16
495 %elt.head = insertelement <vscale x 16 x half> poison, half %b, i32 0
496 %vb = shufflevector <vscale x 16 x half> %elt.head, <vscale x 16 x half> poison, <vscale x 16 x i32> zeroinitializer
497 %v = call <vscale x 16 x half> @llvm.vp.fsub.nxv16f16(<vscale x 16 x half> %va, <vscale x 16 x half> %vb, <vscale x 16 x i1> splat (i1 true), i32 %evl)
498 ret <vscale x 16 x half> %v
501 declare <vscale x 32 x half> @llvm.vp.fsub.nxv32f16(<vscale x 32 x half>, <vscale x 32 x half>, <vscale x 32 x i1>, i32)
503 define <vscale x 32 x half> @vfsub_vv_nxv32f16(<vscale x 32 x half> %va, <vscale x 32 x half> %b, <vscale x 32 x i1> %m, i32 zeroext %evl) {
504 ; ZVFH-LABEL: vfsub_vv_nxv32f16:
506 ; ZVFH-NEXT: vsetvli zero, a0, e16, m8, ta, ma
507 ; ZVFH-NEXT: vfsub.vv v8, v8, v16, v0.t
510 ; ZVFHMIN-LABEL: vfsub_vv_nxv32f16:
512 ; ZVFHMIN-NEXT: addi sp, sp, -16
513 ; ZVFHMIN-NEXT: .cfi_def_cfa_offset 16
514 ; ZVFHMIN-NEXT: csrr a1, vlenb
515 ; ZVFHMIN-NEXT: slli a1, a1, 3
516 ; ZVFHMIN-NEXT: sub sp, sp, a1
517 ; ZVFHMIN-NEXT: .cfi_escape 0x0f, 0x0d, 0x72, 0x00, 0x11, 0x10, 0x22, 0x11, 0x08, 0x92, 0xa2, 0x38, 0x00, 0x1e, 0x22 # sp + 16 + 8 * vlenb
518 ; ZVFHMIN-NEXT: vmv1r.v v7, v0
519 ; ZVFHMIN-NEXT: csrr a2, vlenb
520 ; ZVFHMIN-NEXT: slli a1, a2, 1
521 ; ZVFHMIN-NEXT: sub a3, a0, a1
522 ; ZVFHMIN-NEXT: sltu a4, a0, a3
523 ; ZVFHMIN-NEXT: addi a4, a4, -1
524 ; ZVFHMIN-NEXT: and a3, a4, a3
525 ; ZVFHMIN-NEXT: srli a2, a2, 2
526 ; ZVFHMIN-NEXT: vsetvli a4, zero, e8, mf2, ta, ma
527 ; ZVFHMIN-NEXT: vslidedown.vx v0, v0, a2
528 ; ZVFHMIN-NEXT: addi a2, sp, 16
529 ; ZVFHMIN-NEXT: vs8r.v v16, (a2) # Unknown-size Folded Spill
530 ; ZVFHMIN-NEXT: vsetvli a2, zero, e16, m4, ta, ma
531 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v24, v20
532 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v12
533 ; ZVFHMIN-NEXT: vsetvli zero, a3, e32, m8, ta, ma
534 ; ZVFHMIN-NEXT: vfsub.vv v16, v16, v24, v0.t
535 ; ZVFHMIN-NEXT: vsetvli a2, zero, e16, m4, ta, ma
536 ; ZVFHMIN-NEXT: vfncvt.f.f.w v12, v16
537 ; ZVFHMIN-NEXT: bltu a0, a1, .LBB20_2
538 ; ZVFHMIN-NEXT: # %bb.1:
539 ; ZVFHMIN-NEXT: mv a0, a1
540 ; ZVFHMIN-NEXT: .LBB20_2:
541 ; ZVFHMIN-NEXT: addi a1, sp, 16
542 ; ZVFHMIN-NEXT: vl8r.v v24, (a1) # Unknown-size Folded Reload
543 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v24
544 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v24, v8
545 ; ZVFHMIN-NEXT: vmv1r.v v0, v7
546 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m8, ta, ma
547 ; ZVFHMIN-NEXT: vfsub.vv v16, v24, v16, v0.t
548 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m4, ta, ma
549 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v16
550 ; ZVFHMIN-NEXT: csrr a0, vlenb
551 ; ZVFHMIN-NEXT: slli a0, a0, 3
552 ; ZVFHMIN-NEXT: add sp, sp, a0
553 ; ZVFHMIN-NEXT: addi sp, sp, 16
555 %v = call <vscale x 32 x half> @llvm.vp.fsub.nxv32f16(<vscale x 32 x half> %va, <vscale x 32 x half> %b, <vscale x 32 x i1> %m, i32 %evl)
556 ret <vscale x 32 x half> %v
559 define <vscale x 32 x half> @vfsub_vv_nxv32f16_unmasked(<vscale x 32 x half> %va, <vscale x 32 x half> %b, i32 zeroext %evl) {
560 ; ZVFH-LABEL: vfsub_vv_nxv32f16_unmasked:
562 ; ZVFH-NEXT: vsetvli zero, a0, e16, m8, ta, ma
563 ; ZVFH-NEXT: vfsub.vv v8, v8, v16
566 ; ZVFHMIN-LABEL: vfsub_vv_nxv32f16_unmasked:
568 ; ZVFHMIN-NEXT: addi sp, sp, -16
569 ; ZVFHMIN-NEXT: .cfi_def_cfa_offset 16
570 ; ZVFHMIN-NEXT: csrr a1, vlenb
571 ; ZVFHMIN-NEXT: slli a1, a1, 3
572 ; ZVFHMIN-NEXT: sub sp, sp, a1
573 ; ZVFHMIN-NEXT: .cfi_escape 0x0f, 0x0d, 0x72, 0x00, 0x11, 0x10, 0x22, 0x11, 0x08, 0x92, 0xa2, 0x38, 0x00, 0x1e, 0x22 # sp + 16 + 8 * vlenb
574 ; ZVFHMIN-NEXT: csrr a2, vlenb
575 ; ZVFHMIN-NEXT: slli a1, a2, 1
576 ; ZVFHMIN-NEXT: sub a3, a0, a1
577 ; ZVFHMIN-NEXT: sltu a4, a0, a3
578 ; ZVFHMIN-NEXT: addi a4, a4, -1
579 ; ZVFHMIN-NEXT: and a3, a4, a3
580 ; ZVFHMIN-NEXT: srli a2, a2, 2
581 ; ZVFHMIN-NEXT: vsetvli a4, zero, e8, m4, ta, ma
582 ; ZVFHMIN-NEXT: vmset.m v24
583 ; ZVFHMIN-NEXT: vsetvli a4, zero, e8, mf2, ta, ma
584 ; ZVFHMIN-NEXT: vslidedown.vx v0, v24, a2
585 ; ZVFHMIN-NEXT: addi a2, sp, 16
586 ; ZVFHMIN-NEXT: vs8r.v v16, (a2) # Unknown-size Folded Spill
587 ; ZVFHMIN-NEXT: vsetvli a2, zero, e16, m4, ta, ma
588 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v24, v20
589 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v12
590 ; ZVFHMIN-NEXT: vsetvli zero, a3, e32, m8, ta, ma
591 ; ZVFHMIN-NEXT: vfsub.vv v16, v16, v24, v0.t
592 ; ZVFHMIN-NEXT: vsetvli a2, zero, e16, m4, ta, ma
593 ; ZVFHMIN-NEXT: vfncvt.f.f.w v12, v16
594 ; ZVFHMIN-NEXT: bltu a0, a1, .LBB21_2
595 ; ZVFHMIN-NEXT: # %bb.1:
596 ; ZVFHMIN-NEXT: mv a0, a1
597 ; ZVFHMIN-NEXT: .LBB21_2:
598 ; ZVFHMIN-NEXT: addi a1, sp, 16
599 ; ZVFHMIN-NEXT: vl8r.v v24, (a1) # Unknown-size Folded Reload
600 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v24
601 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v24, v8
602 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m8, ta, ma
603 ; ZVFHMIN-NEXT: vfsub.vv v16, v24, v16
604 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m4, ta, ma
605 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v16
606 ; ZVFHMIN-NEXT: csrr a0, vlenb
607 ; ZVFHMIN-NEXT: slli a0, a0, 3
608 ; ZVFHMIN-NEXT: add sp, sp, a0
609 ; ZVFHMIN-NEXT: addi sp, sp, 16
611 %v = call <vscale x 32 x half> @llvm.vp.fsub.nxv32f16(<vscale x 32 x half> %va, <vscale x 32 x half> %b, <vscale x 32 x i1> splat (i1 true), i32 %evl)
612 ret <vscale x 32 x half> %v
615 define <vscale x 32 x half> @vfsub_vf_nxv32f16(<vscale x 32 x half> %va, half %b, <vscale x 32 x i1> %m, i32 zeroext %evl) {
616 ; ZVFH-LABEL: vfsub_vf_nxv32f16:
618 ; ZVFH-NEXT: vsetvli zero, a0, e16, m8, ta, ma
619 ; ZVFH-NEXT: vfsub.vf v8, v8, fa0, v0.t
622 ; ZVFHMIN-LABEL: vfsub_vf_nxv32f16:
624 ; ZVFHMIN-NEXT: addi sp, sp, -16
625 ; ZVFHMIN-NEXT: .cfi_def_cfa_offset 16
626 ; ZVFHMIN-NEXT: csrr a1, vlenb
627 ; ZVFHMIN-NEXT: slli a1, a1, 2
628 ; ZVFHMIN-NEXT: sub sp, sp, a1
629 ; ZVFHMIN-NEXT: .cfi_escape 0x0f, 0x0d, 0x72, 0x00, 0x11, 0x10, 0x22, 0x11, 0x04, 0x92, 0xa2, 0x38, 0x00, 0x1e, 0x22 # sp + 16 + 4 * vlenb
630 ; ZVFHMIN-NEXT: vmv1r.v v7, v0
631 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
632 ; ZVFHMIN-NEXT: vsetvli a1, zero, e32, m8, ta, ma
633 ; ZVFHMIN-NEXT: vfmv.v.f v24, fa5
634 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m4, ta, ma
635 ; ZVFHMIN-NEXT: vfncvt.f.f.w v16, v24
636 ; ZVFHMIN-NEXT: addi a1, sp, 16
637 ; ZVFHMIN-NEXT: vs4r.v v16, (a1) # Unknown-size Folded Spill
638 ; ZVFHMIN-NEXT: csrr a2, vlenb
639 ; ZVFHMIN-NEXT: slli a1, a2, 1
640 ; ZVFHMIN-NEXT: sub a3, a0, a1
641 ; ZVFHMIN-NEXT: sltu a4, a0, a3
642 ; ZVFHMIN-NEXT: addi a4, a4, -1
643 ; ZVFHMIN-NEXT: and a3, a4, a3
644 ; ZVFHMIN-NEXT: srli a2, a2, 2
645 ; ZVFHMIN-NEXT: vsetvli a4, zero, e8, mf2, ta, ma
646 ; ZVFHMIN-NEXT: vslidedown.vx v0, v0, a2
647 ; ZVFHMIN-NEXT: vsetvli a2, zero, e16, m4, ta, ma
648 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v12
649 ; ZVFHMIN-NEXT: addi a2, sp, 16
650 ; ZVFHMIN-NEXT: vl4r.v v12, (a2) # Unknown-size Folded Reload
651 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v24, v12
652 ; ZVFHMIN-NEXT: vsetvli zero, a3, e32, m8, ta, ma
653 ; ZVFHMIN-NEXT: vfsub.vv v16, v16, v24, v0.t
654 ; ZVFHMIN-NEXT: vsetvli a2, zero, e16, m4, ta, ma
655 ; ZVFHMIN-NEXT: vfncvt.f.f.w v12, v16
656 ; ZVFHMIN-NEXT: bltu a0, a1, .LBB22_2
657 ; ZVFHMIN-NEXT: # %bb.1:
658 ; ZVFHMIN-NEXT: mv a0, a1
659 ; ZVFHMIN-NEXT: .LBB22_2:
660 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v8
661 ; ZVFHMIN-NEXT: vmv1r.v v0, v7
662 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m8, ta, ma
663 ; ZVFHMIN-NEXT: vfsub.vv v16, v16, v24, v0.t
664 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m4, ta, ma
665 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v16
666 ; ZVFHMIN-NEXT: csrr a0, vlenb
667 ; ZVFHMIN-NEXT: slli a0, a0, 2
668 ; ZVFHMIN-NEXT: add sp, sp, a0
669 ; ZVFHMIN-NEXT: addi sp, sp, 16
671 %elt.head = insertelement <vscale x 32 x half> poison, half %b, i32 0
672 %vb = shufflevector <vscale x 32 x half> %elt.head, <vscale x 32 x half> poison, <vscale x 32 x i32> zeroinitializer
673 %v = call <vscale x 32 x half> @llvm.vp.fsub.nxv32f16(<vscale x 32 x half> %va, <vscale x 32 x half> %vb, <vscale x 32 x i1> %m, i32 %evl)
674 ret <vscale x 32 x half> %v
677 define <vscale x 32 x half> @vfsub_vf_nxv32f16_unmasked(<vscale x 32 x half> %va, half %b, i32 zeroext %evl) {
678 ; ZVFH-LABEL: vfsub_vf_nxv32f16_unmasked:
680 ; ZVFH-NEXT: vsetvli zero, a0, e16, m8, ta, ma
681 ; ZVFH-NEXT: vfsub.vf v8, v8, fa0
684 ; ZVFHMIN-LABEL: vfsub_vf_nxv32f16_unmasked:
686 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
687 ; ZVFHMIN-NEXT: vsetvli a1, zero, e32, m8, ta, ma
688 ; ZVFHMIN-NEXT: vfmv.v.f v16, fa5
689 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m4, ta, ma
690 ; ZVFHMIN-NEXT: vfncvt.f.f.w v4, v16
691 ; ZVFHMIN-NEXT: csrr a2, vlenb
692 ; ZVFHMIN-NEXT: slli a1, a2, 1
693 ; ZVFHMIN-NEXT: sub a3, a0, a1
694 ; ZVFHMIN-NEXT: sltu a4, a0, a3
695 ; ZVFHMIN-NEXT: addi a4, a4, -1
696 ; ZVFHMIN-NEXT: and a3, a4, a3
697 ; ZVFHMIN-NEXT: srli a2, a2, 2
698 ; ZVFHMIN-NEXT: vsetvli a4, zero, e8, m4, ta, ma
699 ; ZVFHMIN-NEXT: vmset.m v16
700 ; ZVFHMIN-NEXT: vsetvli a4, zero, e8, mf2, ta, ma
701 ; ZVFHMIN-NEXT: vslidedown.vx v0, v16, a2
702 ; ZVFHMIN-NEXT: vsetvli a2, zero, e16, m4, ta, ma
703 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v24, v12
704 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v4
705 ; ZVFHMIN-NEXT: vsetvli zero, a3, e32, m8, ta, ma
706 ; ZVFHMIN-NEXT: vfsub.vv v24, v24, v16, v0.t
707 ; ZVFHMIN-NEXT: vsetvli a2, zero, e16, m4, ta, ma
708 ; ZVFHMIN-NEXT: vfncvt.f.f.w v12, v24
709 ; ZVFHMIN-NEXT: bltu a0, a1, .LBB23_2
710 ; ZVFHMIN-NEXT: # %bb.1:
711 ; ZVFHMIN-NEXT: mv a0, a1
712 ; ZVFHMIN-NEXT: .LBB23_2:
713 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v24, v8
714 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m8, ta, ma
715 ; ZVFHMIN-NEXT: vfsub.vv v16, v24, v16
716 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m4, ta, ma
717 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v16
719 %elt.head = insertelement <vscale x 32 x half> poison, half %b, i32 0
720 %vb = shufflevector <vscale x 32 x half> %elt.head, <vscale x 32 x half> poison, <vscale x 32 x i32> zeroinitializer
721 %v = call <vscale x 32 x half> @llvm.vp.fsub.nxv32f16(<vscale x 32 x half> %va, <vscale x 32 x half> %vb, <vscale x 32 x i1> splat (i1 true), i32 %evl)
722 ret <vscale x 32 x half> %v
725 declare <vscale x 1 x float> @llvm.vp.fsub.nxv1f32(<vscale x 1 x float>, <vscale x 1 x float>, <vscale x 1 x i1>, i32)
727 define <vscale x 1 x float> @vfsub_vv_nxv1f32(<vscale x 1 x float> %va, <vscale x 1 x float> %b, <vscale x 1 x i1> %m, i32 zeroext %evl) {
728 ; CHECK-LABEL: vfsub_vv_nxv1f32:
730 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
731 ; CHECK-NEXT: vfsub.vv v8, v8, v9, v0.t
733 %v = call <vscale x 1 x float> @llvm.vp.fsub.nxv1f32(<vscale x 1 x float> %va, <vscale x 1 x float> %b, <vscale x 1 x i1> %m, i32 %evl)
734 ret <vscale x 1 x float> %v
737 define <vscale x 1 x float> @vfsub_vv_nxv1f32_unmasked(<vscale x 1 x float> %va, <vscale x 1 x float> %b, i32 zeroext %evl) {
738 ; CHECK-LABEL: vfsub_vv_nxv1f32_unmasked:
740 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
741 ; CHECK-NEXT: vfsub.vv v8, v8, v9
743 %v = call <vscale x 1 x float> @llvm.vp.fsub.nxv1f32(<vscale x 1 x float> %va, <vscale x 1 x float> %b, <vscale x 1 x i1> splat (i1 true), i32 %evl)
744 ret <vscale x 1 x float> %v
747 define <vscale x 1 x float> @vfsub_vf_nxv1f32(<vscale x 1 x float> %va, float %b, <vscale x 1 x i1> %m, i32 zeroext %evl) {
748 ; CHECK-LABEL: vfsub_vf_nxv1f32:
750 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
751 ; CHECK-NEXT: vfsub.vf v8, v8, fa0, v0.t
753 %elt.head = insertelement <vscale x 1 x float> poison, float %b, i32 0
754 %vb = shufflevector <vscale x 1 x float> %elt.head, <vscale x 1 x float> poison, <vscale x 1 x i32> zeroinitializer
755 %v = call <vscale x 1 x float> @llvm.vp.fsub.nxv1f32(<vscale x 1 x float> %va, <vscale x 1 x float> %vb, <vscale x 1 x i1> %m, i32 %evl)
756 ret <vscale x 1 x float> %v
759 define <vscale x 1 x float> @vfsub_vf_nxv1f32_unmasked(<vscale x 1 x float> %va, float %b, i32 zeroext %evl) {
760 ; CHECK-LABEL: vfsub_vf_nxv1f32_unmasked:
762 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
763 ; CHECK-NEXT: vfsub.vf v8, v8, fa0
765 %elt.head = insertelement <vscale x 1 x float> poison, float %b, i32 0
766 %vb = shufflevector <vscale x 1 x float> %elt.head, <vscale x 1 x float> poison, <vscale x 1 x i32> zeroinitializer
767 %v = call <vscale x 1 x float> @llvm.vp.fsub.nxv1f32(<vscale x 1 x float> %va, <vscale x 1 x float> %vb, <vscale x 1 x i1> splat (i1 true), i32 %evl)
768 ret <vscale x 1 x float> %v
771 declare <vscale x 2 x float> @llvm.vp.fsub.nxv2f32(<vscale x 2 x float>, <vscale x 2 x float>, <vscale x 2 x i1>, i32)
773 define <vscale x 2 x float> @vfsub_vv_nxv2f32(<vscale x 2 x float> %va, <vscale x 2 x float> %b, <vscale x 2 x i1> %m, i32 zeroext %evl) {
774 ; CHECK-LABEL: vfsub_vv_nxv2f32:
776 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, ma
777 ; CHECK-NEXT: vfsub.vv v8, v8, v9, v0.t
779 %v = call <vscale x 2 x float> @llvm.vp.fsub.nxv2f32(<vscale x 2 x float> %va, <vscale x 2 x float> %b, <vscale x 2 x i1> %m, i32 %evl)
780 ret <vscale x 2 x float> %v
783 define <vscale x 2 x float> @vfsub_vv_nxv2f32_unmasked(<vscale x 2 x float> %va, <vscale x 2 x float> %b, i32 zeroext %evl) {
784 ; CHECK-LABEL: vfsub_vv_nxv2f32_unmasked:
786 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, ma
787 ; CHECK-NEXT: vfsub.vv v8, v8, v9
789 %v = call <vscale x 2 x float> @llvm.vp.fsub.nxv2f32(<vscale x 2 x float> %va, <vscale x 2 x float> %b, <vscale x 2 x i1> splat (i1 true), i32 %evl)
790 ret <vscale x 2 x float> %v
793 define <vscale x 2 x float> @vfsub_vf_nxv2f32(<vscale x 2 x float> %va, float %b, <vscale x 2 x i1> %m, i32 zeroext %evl) {
794 ; CHECK-LABEL: vfsub_vf_nxv2f32:
796 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, ma
797 ; CHECK-NEXT: vfsub.vf v8, v8, fa0, v0.t
799 %elt.head = insertelement <vscale x 2 x float> poison, float %b, i32 0
800 %vb = shufflevector <vscale x 2 x float> %elt.head, <vscale x 2 x float> poison, <vscale x 2 x i32> zeroinitializer
801 %v = call <vscale x 2 x float> @llvm.vp.fsub.nxv2f32(<vscale x 2 x float> %va, <vscale x 2 x float> %vb, <vscale x 2 x i1> %m, i32 %evl)
802 ret <vscale x 2 x float> %v
805 define <vscale x 2 x float> @vfsub_vf_nxv2f32_unmasked(<vscale x 2 x float> %va, float %b, i32 zeroext %evl) {
806 ; CHECK-LABEL: vfsub_vf_nxv2f32_unmasked:
808 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, ma
809 ; CHECK-NEXT: vfsub.vf v8, v8, fa0
811 %elt.head = insertelement <vscale x 2 x float> poison, float %b, i32 0
812 %vb = shufflevector <vscale x 2 x float> %elt.head, <vscale x 2 x float> poison, <vscale x 2 x i32> zeroinitializer
813 %v = call <vscale x 2 x float> @llvm.vp.fsub.nxv2f32(<vscale x 2 x float> %va, <vscale x 2 x float> %vb, <vscale x 2 x i1> splat (i1 true), i32 %evl)
814 ret <vscale x 2 x float> %v
817 declare <vscale x 4 x float> @llvm.vp.fsub.nxv4f32(<vscale x 4 x float>, <vscale x 4 x float>, <vscale x 4 x i1>, i32)
819 define <vscale x 4 x float> @vfsub_vv_nxv4f32(<vscale x 4 x float> %va, <vscale x 4 x float> %b, <vscale x 4 x i1> %m, i32 zeroext %evl) {
820 ; CHECK-LABEL: vfsub_vv_nxv4f32:
822 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
823 ; CHECK-NEXT: vfsub.vv v8, v8, v10, v0.t
825 %v = call <vscale x 4 x float> @llvm.vp.fsub.nxv4f32(<vscale x 4 x float> %va, <vscale x 4 x float> %b, <vscale x 4 x i1> %m, i32 %evl)
826 ret <vscale x 4 x float> %v
829 define <vscale x 4 x float> @vfsub_vv_nxv4f32_unmasked(<vscale x 4 x float> %va, <vscale x 4 x float> %b, i32 zeroext %evl) {
830 ; CHECK-LABEL: vfsub_vv_nxv4f32_unmasked:
832 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
833 ; CHECK-NEXT: vfsub.vv v8, v8, v10
835 %v = call <vscale x 4 x float> @llvm.vp.fsub.nxv4f32(<vscale x 4 x float> %va, <vscale x 4 x float> %b, <vscale x 4 x i1> splat (i1 true), i32 %evl)
836 ret <vscale x 4 x float> %v
839 define <vscale x 4 x float> @vfsub_vf_nxv4f32(<vscale x 4 x float> %va, float %b, <vscale x 4 x i1> %m, i32 zeroext %evl) {
840 ; CHECK-LABEL: vfsub_vf_nxv4f32:
842 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
843 ; CHECK-NEXT: vfsub.vf v8, v8, fa0, v0.t
845 %elt.head = insertelement <vscale x 4 x float> poison, float %b, i32 0
846 %vb = shufflevector <vscale x 4 x float> %elt.head, <vscale x 4 x float> poison, <vscale x 4 x i32> zeroinitializer
847 %v = call <vscale x 4 x float> @llvm.vp.fsub.nxv4f32(<vscale x 4 x float> %va, <vscale x 4 x float> %vb, <vscale x 4 x i1> %m, i32 %evl)
848 ret <vscale x 4 x float> %v
851 define <vscale x 4 x float> @vfsub_vf_nxv4f32_unmasked(<vscale x 4 x float> %va, float %b, i32 zeroext %evl) {
852 ; CHECK-LABEL: vfsub_vf_nxv4f32_unmasked:
854 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
855 ; CHECK-NEXT: vfsub.vf v8, v8, fa0
857 %elt.head = insertelement <vscale x 4 x float> poison, float %b, i32 0
858 %vb = shufflevector <vscale x 4 x float> %elt.head, <vscale x 4 x float> poison, <vscale x 4 x i32> zeroinitializer
859 %v = call <vscale x 4 x float> @llvm.vp.fsub.nxv4f32(<vscale x 4 x float> %va, <vscale x 4 x float> %vb, <vscale x 4 x i1> splat (i1 true), i32 %evl)
860 ret <vscale x 4 x float> %v
863 declare <vscale x 8 x float> @llvm.vp.fsub.nxv8f32(<vscale x 8 x float>, <vscale x 8 x float>, <vscale x 8 x i1>, i32)
865 define <vscale x 8 x float> @vfsub_vv_nxv8f32(<vscale x 8 x float> %va, <vscale x 8 x float> %b, <vscale x 8 x i1> %m, i32 zeroext %evl) {
866 ; CHECK-LABEL: vfsub_vv_nxv8f32:
868 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
869 ; CHECK-NEXT: vfsub.vv v8, v8, v12, v0.t
871 %v = call <vscale x 8 x float> @llvm.vp.fsub.nxv8f32(<vscale x 8 x float> %va, <vscale x 8 x float> %b, <vscale x 8 x i1> %m, i32 %evl)
872 ret <vscale x 8 x float> %v
875 define <vscale x 8 x float> @vfsub_vv_nxv8f32_unmasked(<vscale x 8 x float> %va, <vscale x 8 x float> %b, i32 zeroext %evl) {
876 ; CHECK-LABEL: vfsub_vv_nxv8f32_unmasked:
878 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
879 ; CHECK-NEXT: vfsub.vv v8, v8, v12
881 %v = call <vscale x 8 x float> @llvm.vp.fsub.nxv8f32(<vscale x 8 x float> %va, <vscale x 8 x float> %b, <vscale x 8 x i1> splat (i1 true), i32 %evl)
882 ret <vscale x 8 x float> %v
885 define <vscale x 8 x float> @vfsub_vf_nxv8f32(<vscale x 8 x float> %va, float %b, <vscale x 8 x i1> %m, i32 zeroext %evl) {
886 ; CHECK-LABEL: vfsub_vf_nxv8f32:
888 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
889 ; CHECK-NEXT: vfsub.vf v8, v8, fa0, v0.t
891 %elt.head = insertelement <vscale x 8 x float> poison, float %b, i32 0
892 %vb = shufflevector <vscale x 8 x float> %elt.head, <vscale x 8 x float> poison, <vscale x 8 x i32> zeroinitializer
893 %v = call <vscale x 8 x float> @llvm.vp.fsub.nxv8f32(<vscale x 8 x float> %va, <vscale x 8 x float> %vb, <vscale x 8 x i1> %m, i32 %evl)
894 ret <vscale x 8 x float> %v
897 define <vscale x 8 x float> @vfsub_vf_nxv8f32_unmasked(<vscale x 8 x float> %va, float %b, i32 zeroext %evl) {
898 ; CHECK-LABEL: vfsub_vf_nxv8f32_unmasked:
900 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
901 ; CHECK-NEXT: vfsub.vf v8, v8, fa0
903 %elt.head = insertelement <vscale x 8 x float> poison, float %b, i32 0
904 %vb = shufflevector <vscale x 8 x float> %elt.head, <vscale x 8 x float> poison, <vscale x 8 x i32> zeroinitializer
905 %v = call <vscale x 8 x float> @llvm.vp.fsub.nxv8f32(<vscale x 8 x float> %va, <vscale x 8 x float> %vb, <vscale x 8 x i1> splat (i1 true), i32 %evl)
906 ret <vscale x 8 x float> %v
909 declare <vscale x 16 x float> @llvm.vp.fsub.nxv16f32(<vscale x 16 x float>, <vscale x 16 x float>, <vscale x 16 x i1>, i32)
911 define <vscale x 16 x float> @vfsub_vv_nxv16f32(<vscale x 16 x float> %va, <vscale x 16 x float> %b, <vscale x 16 x i1> %m, i32 zeroext %evl) {
912 ; CHECK-LABEL: vfsub_vv_nxv16f32:
914 ; CHECK-NEXT: vsetvli zero, a0, e32, m8, ta, ma
915 ; CHECK-NEXT: vfsub.vv v8, v8, v16, v0.t
917 %v = call <vscale x 16 x float> @llvm.vp.fsub.nxv16f32(<vscale x 16 x float> %va, <vscale x 16 x float> %b, <vscale x 16 x i1> %m, i32 %evl)
918 ret <vscale x 16 x float> %v
921 define <vscale x 16 x float> @vfsub_vv_nxv16f32_unmasked(<vscale x 16 x float> %va, <vscale x 16 x float> %b, i32 zeroext %evl) {
922 ; CHECK-LABEL: vfsub_vv_nxv16f32_unmasked:
924 ; CHECK-NEXT: vsetvli zero, a0, e32, m8, ta, ma
925 ; CHECK-NEXT: vfsub.vv v8, v8, v16
927 %v = call <vscale x 16 x float> @llvm.vp.fsub.nxv16f32(<vscale x 16 x float> %va, <vscale x 16 x float> %b, <vscale x 16 x i1> splat (i1 true), i32 %evl)
928 ret <vscale x 16 x float> %v
931 define <vscale x 16 x float> @vfsub_vf_nxv16f32(<vscale x 16 x float> %va, float %b, <vscale x 16 x i1> %m, i32 zeroext %evl) {
932 ; CHECK-LABEL: vfsub_vf_nxv16f32:
934 ; CHECK-NEXT: vsetvli zero, a0, e32, m8, ta, ma
935 ; CHECK-NEXT: vfsub.vf v8, v8, fa0, v0.t
937 %elt.head = insertelement <vscale x 16 x float> poison, float %b, i32 0
938 %vb = shufflevector <vscale x 16 x float> %elt.head, <vscale x 16 x float> poison, <vscale x 16 x i32> zeroinitializer
939 %v = call <vscale x 16 x float> @llvm.vp.fsub.nxv16f32(<vscale x 16 x float> %va, <vscale x 16 x float> %vb, <vscale x 16 x i1> %m, i32 %evl)
940 ret <vscale x 16 x float> %v
943 define <vscale x 16 x float> @vfsub_vf_nxv16f32_unmasked(<vscale x 16 x float> %va, float %b, i32 zeroext %evl) {
944 ; CHECK-LABEL: vfsub_vf_nxv16f32_unmasked:
946 ; CHECK-NEXT: vsetvli zero, a0, e32, m8, ta, ma
947 ; CHECK-NEXT: vfsub.vf v8, v8, fa0
949 %elt.head = insertelement <vscale x 16 x float> poison, float %b, i32 0
950 %vb = shufflevector <vscale x 16 x float> %elt.head, <vscale x 16 x float> poison, <vscale x 16 x i32> zeroinitializer
951 %v = call <vscale x 16 x float> @llvm.vp.fsub.nxv16f32(<vscale x 16 x float> %va, <vscale x 16 x float> %vb, <vscale x 16 x i1> splat (i1 true), i32 %evl)
952 ret <vscale x 16 x float> %v
955 declare <vscale x 1 x double> @llvm.vp.fsub.nxv1f64(<vscale x 1 x double>, <vscale x 1 x double>, <vscale x 1 x i1>, i32)
957 define <vscale x 1 x double> @vfsub_vv_nxv1f64(<vscale x 1 x double> %va, <vscale x 1 x double> %b, <vscale x 1 x i1> %m, i32 zeroext %evl) {
958 ; CHECK-LABEL: vfsub_vv_nxv1f64:
960 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
961 ; CHECK-NEXT: vfsub.vv v8, v8, v9, v0.t
963 %v = call <vscale x 1 x double> @llvm.vp.fsub.nxv1f64(<vscale x 1 x double> %va, <vscale x 1 x double> %b, <vscale x 1 x i1> %m, i32 %evl)
964 ret <vscale x 1 x double> %v
967 define <vscale x 1 x double> @vfsub_vv_nxv1f64_unmasked(<vscale x 1 x double> %va, <vscale x 1 x double> %b, i32 zeroext %evl) {
968 ; CHECK-LABEL: vfsub_vv_nxv1f64_unmasked:
970 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
971 ; CHECK-NEXT: vfsub.vv v8, v8, v9
973 %v = call <vscale x 1 x double> @llvm.vp.fsub.nxv1f64(<vscale x 1 x double> %va, <vscale x 1 x double> %b, <vscale x 1 x i1> splat (i1 true), i32 %evl)
974 ret <vscale x 1 x double> %v
977 define <vscale x 1 x double> @vfsub_vf_nxv1f64(<vscale x 1 x double> %va, double %b, <vscale x 1 x i1> %m, i32 zeroext %evl) {
978 ; CHECK-LABEL: vfsub_vf_nxv1f64:
980 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
981 ; CHECK-NEXT: vfsub.vf v8, v8, fa0, v0.t
983 %elt.head = insertelement <vscale x 1 x double> poison, double %b, i32 0
984 %vb = shufflevector <vscale x 1 x double> %elt.head, <vscale x 1 x double> poison, <vscale x 1 x i32> zeroinitializer
985 %v = call <vscale x 1 x double> @llvm.vp.fsub.nxv1f64(<vscale x 1 x double> %va, <vscale x 1 x double> %vb, <vscale x 1 x i1> %m, i32 %evl)
986 ret <vscale x 1 x double> %v
989 define <vscale x 1 x double> @vfsub_vf_nxv1f64_unmasked(<vscale x 1 x double> %va, double %b, i32 zeroext %evl) {
990 ; CHECK-LABEL: vfsub_vf_nxv1f64_unmasked:
992 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
993 ; CHECK-NEXT: vfsub.vf v8, v8, fa0
995 %elt.head = insertelement <vscale x 1 x double> poison, double %b, i32 0
996 %vb = shufflevector <vscale x 1 x double> %elt.head, <vscale x 1 x double> poison, <vscale x 1 x i32> zeroinitializer
997 %v = call <vscale x 1 x double> @llvm.vp.fsub.nxv1f64(<vscale x 1 x double> %va, <vscale x 1 x double> %vb, <vscale x 1 x i1> splat (i1 true), i32 %evl)
998 ret <vscale x 1 x double> %v
1001 declare <vscale x 2 x double> @llvm.vp.fsub.nxv2f64(<vscale x 2 x double>, <vscale x 2 x double>, <vscale x 2 x i1>, i32)
1003 define <vscale x 2 x double> @vfsub_vv_nxv2f64(<vscale x 2 x double> %va, <vscale x 2 x double> %b, <vscale x 2 x i1> %m, i32 zeroext %evl) {
1004 ; CHECK-LABEL: vfsub_vv_nxv2f64:
1006 ; CHECK-NEXT: vsetvli zero, a0, e64, m2, ta, ma
1007 ; CHECK-NEXT: vfsub.vv v8, v8, v10, v0.t
1009 %v = call <vscale x 2 x double> @llvm.vp.fsub.nxv2f64(<vscale x 2 x double> %va, <vscale x 2 x double> %b, <vscale x 2 x i1> %m, i32 %evl)
1010 ret <vscale x 2 x double> %v
1013 define <vscale x 2 x double> @vfsub_vv_nxv2f64_unmasked(<vscale x 2 x double> %va, <vscale x 2 x double> %b, i32 zeroext %evl) {
1014 ; CHECK-LABEL: vfsub_vv_nxv2f64_unmasked:
1016 ; CHECK-NEXT: vsetvli zero, a0, e64, m2, ta, ma
1017 ; CHECK-NEXT: vfsub.vv v8, v8, v10
1019 %v = call <vscale x 2 x double> @llvm.vp.fsub.nxv2f64(<vscale x 2 x double> %va, <vscale x 2 x double> %b, <vscale x 2 x i1> splat (i1 true), i32 %evl)
1020 ret <vscale x 2 x double> %v
1023 define <vscale x 2 x double> @vfsub_vf_nxv2f64(<vscale x 2 x double> %va, double %b, <vscale x 2 x i1> %m, i32 zeroext %evl) {
1024 ; CHECK-LABEL: vfsub_vf_nxv2f64:
1026 ; CHECK-NEXT: vsetvli zero, a0, e64, m2, ta, ma
1027 ; CHECK-NEXT: vfsub.vf v8, v8, fa0, v0.t
1029 %elt.head = insertelement <vscale x 2 x double> poison, double %b, i32 0
1030 %vb = shufflevector <vscale x 2 x double> %elt.head, <vscale x 2 x double> poison, <vscale x 2 x i32> zeroinitializer
1031 %v = call <vscale x 2 x double> @llvm.vp.fsub.nxv2f64(<vscale x 2 x double> %va, <vscale x 2 x double> %vb, <vscale x 2 x i1> %m, i32 %evl)
1032 ret <vscale x 2 x double> %v
1035 define <vscale x 2 x double> @vfsub_vf_nxv2f64_unmasked(<vscale x 2 x double> %va, double %b, i32 zeroext %evl) {
1036 ; CHECK-LABEL: vfsub_vf_nxv2f64_unmasked:
1038 ; CHECK-NEXT: vsetvli zero, a0, e64, m2, ta, ma
1039 ; CHECK-NEXT: vfsub.vf v8, v8, fa0
1041 %elt.head = insertelement <vscale x 2 x double> poison, double %b, i32 0
1042 %vb = shufflevector <vscale x 2 x double> %elt.head, <vscale x 2 x double> poison, <vscale x 2 x i32> zeroinitializer
1043 %v = call <vscale x 2 x double> @llvm.vp.fsub.nxv2f64(<vscale x 2 x double> %va, <vscale x 2 x double> %vb, <vscale x 2 x i1> splat (i1 true), i32 %evl)
1044 ret <vscale x 2 x double> %v
1047 declare <vscale x 4 x double> @llvm.vp.fsub.nxv4f64(<vscale x 4 x double>, <vscale x 4 x double>, <vscale x 4 x i1>, i32)
1049 define <vscale x 4 x double> @vfsub_vv_nxv4f64(<vscale x 4 x double> %va, <vscale x 4 x double> %b, <vscale x 4 x i1> %m, i32 zeroext %evl) {
1050 ; CHECK-LABEL: vfsub_vv_nxv4f64:
1052 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1053 ; CHECK-NEXT: vfsub.vv v8, v8, v12, v0.t
1055 %v = call <vscale x 4 x double> @llvm.vp.fsub.nxv4f64(<vscale x 4 x double> %va, <vscale x 4 x double> %b, <vscale x 4 x i1> %m, i32 %evl)
1056 ret <vscale x 4 x double> %v
1059 define <vscale x 4 x double> @vfsub_vv_nxv4f64_unmasked(<vscale x 4 x double> %va, <vscale x 4 x double> %b, i32 zeroext %evl) {
1060 ; CHECK-LABEL: vfsub_vv_nxv4f64_unmasked:
1062 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1063 ; CHECK-NEXT: vfsub.vv v8, v8, v12
1065 %v = call <vscale x 4 x double> @llvm.vp.fsub.nxv4f64(<vscale x 4 x double> %va, <vscale x 4 x double> %b, <vscale x 4 x i1> splat (i1 true), i32 %evl)
1066 ret <vscale x 4 x double> %v
1069 define <vscale x 4 x double> @vfsub_vf_nxv4f64(<vscale x 4 x double> %va, double %b, <vscale x 4 x i1> %m, i32 zeroext %evl) {
1070 ; CHECK-LABEL: vfsub_vf_nxv4f64:
1072 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1073 ; CHECK-NEXT: vfsub.vf v8, v8, fa0, v0.t
1075 %elt.head = insertelement <vscale x 4 x double> poison, double %b, i32 0
1076 %vb = shufflevector <vscale x 4 x double> %elt.head, <vscale x 4 x double> poison, <vscale x 4 x i32> zeroinitializer
1077 %v = call <vscale x 4 x double> @llvm.vp.fsub.nxv4f64(<vscale x 4 x double> %va, <vscale x 4 x double> %vb, <vscale x 4 x i1> %m, i32 %evl)
1078 ret <vscale x 4 x double> %v
1081 define <vscale x 4 x double> @vfsub_vf_nxv4f64_unmasked(<vscale x 4 x double> %va, double %b, i32 zeroext %evl) {
1082 ; CHECK-LABEL: vfsub_vf_nxv4f64_unmasked:
1084 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1085 ; CHECK-NEXT: vfsub.vf v8, v8, fa0
1087 %elt.head = insertelement <vscale x 4 x double> poison, double %b, i32 0
1088 %vb = shufflevector <vscale x 4 x double> %elt.head, <vscale x 4 x double> poison, <vscale x 4 x i32> zeroinitializer
1089 %v = call <vscale x 4 x double> @llvm.vp.fsub.nxv4f64(<vscale x 4 x double> %va, <vscale x 4 x double> %vb, <vscale x 4 x i1> splat (i1 true), i32 %evl)
1090 ret <vscale x 4 x double> %v
1093 declare <vscale x 7 x double> @llvm.vp.fsub.nxv7f64(<vscale x 7 x double>, <vscale x 7 x double>, <vscale x 7 x i1>, i32)
1095 define <vscale x 7 x double> @vfsub_vv_nxv7f64(<vscale x 7 x double> %va, <vscale x 7 x double> %b, <vscale x 7 x i1> %m, i32 zeroext %evl) {
1096 ; CHECK-LABEL: vfsub_vv_nxv7f64:
1098 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
1099 ; CHECK-NEXT: vfsub.vv v8, v8, v16, v0.t
1101 %v = call <vscale x 7 x double> @llvm.vp.fsub.nxv7f64(<vscale x 7 x double> %va, <vscale x 7 x double> %b, <vscale x 7 x i1> %m, i32 %evl)
1102 ret <vscale x 7 x double> %v
1105 declare <vscale x 8 x double> @llvm.vp.fsub.nxv8f64(<vscale x 8 x double>, <vscale x 8 x double>, <vscale x 8 x i1>, i32)
1107 define <vscale x 8 x double> @vfsub_vv_nxv8f64(<vscale x 8 x double> %va, <vscale x 8 x double> %b, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1108 ; CHECK-LABEL: vfsub_vv_nxv8f64:
1110 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
1111 ; CHECK-NEXT: vfsub.vv v8, v8, v16, v0.t
1113 %v = call <vscale x 8 x double> @llvm.vp.fsub.nxv8f64(<vscale x 8 x double> %va, <vscale x 8 x double> %b, <vscale x 8 x i1> %m, i32 %evl)
1114 ret <vscale x 8 x double> %v
1117 define <vscale x 8 x double> @vfsub_vv_nxv8f64_unmasked(<vscale x 8 x double> %va, <vscale x 8 x double> %b, i32 zeroext %evl) {
1118 ; CHECK-LABEL: vfsub_vv_nxv8f64_unmasked:
1120 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
1121 ; CHECK-NEXT: vfsub.vv v8, v8, v16
1123 %v = call <vscale x 8 x double> @llvm.vp.fsub.nxv8f64(<vscale x 8 x double> %va, <vscale x 8 x double> %b, <vscale x 8 x i1> splat (i1 true), i32 %evl)
1124 ret <vscale x 8 x double> %v
1127 define <vscale x 8 x double> @vfsub_vf_nxv8f64(<vscale x 8 x double> %va, double %b, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1128 ; CHECK-LABEL: vfsub_vf_nxv8f64:
1130 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
1131 ; CHECK-NEXT: vfsub.vf v8, v8, fa0, v0.t
1133 %elt.head = insertelement <vscale x 8 x double> poison, double %b, i32 0
1134 %vb = shufflevector <vscale x 8 x double> %elt.head, <vscale x 8 x double> poison, <vscale x 8 x i32> zeroinitializer
1135 %v = call <vscale x 8 x double> @llvm.vp.fsub.nxv8f64(<vscale x 8 x double> %va, <vscale x 8 x double> %vb, <vscale x 8 x i1> %m, i32 %evl)
1136 ret <vscale x 8 x double> %v
1139 define <vscale x 8 x double> @vfsub_vf_nxv8f64_unmasked(<vscale x 8 x double> %va, double %b, i32 zeroext %evl) {
1140 ; CHECK-LABEL: vfsub_vf_nxv8f64_unmasked:
1142 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
1143 ; CHECK-NEXT: vfsub.vf v8, v8, fa0
1145 %elt.head = insertelement <vscale x 8 x double> poison, double %b, i32 0
1146 %vb = shufflevector <vscale x 8 x double> %elt.head, <vscale x 8 x double> poison, <vscale x 8 x i32> zeroinitializer
1147 %v = call <vscale x 8 x double> @llvm.vp.fsub.nxv8f64(<vscale x 8 x double> %va, <vscale x 8 x double> %vb, <vscale x 8 x i1> splat (i1 true), i32 %evl)
1148 ret <vscale x 8 x double> %v