1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=riscv32 -mattr=+v -verify-machineinstrs < %s \
3 ; RUN: | FileCheck %s --check-prefixes=CHECK,RV32
4 ; RUN: llc -mtriple=riscv64 -mattr=+v -verify-machineinstrs < %s \
5 ; RUN: | FileCheck %s --check-prefixes=CHECK,RV64
7 declare <8 x i7> @llvm.vp.sub.v8i7(<8 x i7>, <8 x i7>, <8 x i1>, i32)
9 define <8 x i7> @vsub_vv_v8i7(<8 x i7> %va, <8 x i7> %b, <8 x i1> %m, i32 zeroext %evl) {
10 ; CHECK-LABEL: vsub_vv_v8i7:
12 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
13 ; CHECK-NEXT: vsub.vv v8, v8, v9, v0.t
15 %v = call <8 x i7> @llvm.vp.sub.v8i7(<8 x i7> %va, <8 x i7> %b, <8 x i1> %m, i32 %evl)
19 declare <2 x i8> @llvm.vp.sub.v2i8(<2 x i8>, <2 x i8>, <2 x i1>, i32)
21 define <2 x i8> @vsub_vv_v2i8(<2 x i8> %va, <2 x i8> %b, <2 x i1> %m, i32 zeroext %evl) {
22 ; CHECK-LABEL: vsub_vv_v2i8:
24 ; CHECK-NEXT: vsetvli zero, a0, e8, mf8, ta, ma
25 ; CHECK-NEXT: vsub.vv v8, v8, v9, v0.t
27 %v = call <2 x i8> @llvm.vp.sub.v2i8(<2 x i8> %va, <2 x i8> %b, <2 x i1> %m, i32 %evl)
31 define <2 x i8> @vsub_vv_v2i8_unmasked(<2 x i8> %va, <2 x i8> %b, i32 zeroext %evl) {
32 ; CHECK-LABEL: vsub_vv_v2i8_unmasked:
34 ; CHECK-NEXT: vsetvli zero, a0, e8, mf8, ta, ma
35 ; CHECK-NEXT: vsub.vv v8, v8, v9
37 %head = insertelement <2 x i1> poison, i1 true, i32 0
38 %m = shufflevector <2 x i1> %head, <2 x i1> poison, <2 x i32> zeroinitializer
39 %v = call <2 x i8> @llvm.vp.sub.v2i8(<2 x i8> %va, <2 x i8> %b, <2 x i1> %m, i32 %evl)
43 define <2 x i8> @vsub_vx_v2i8(<2 x i8> %va, i8 %b, <2 x i1> %m, i32 zeroext %evl) {
44 ; CHECK-LABEL: vsub_vx_v2i8:
46 ; CHECK-NEXT: vsetvli zero, a1, e8, mf8, ta, ma
47 ; CHECK-NEXT: vsub.vx v8, v8, a0, v0.t
49 %elt.head = insertelement <2 x i8> poison, i8 %b, i32 0
50 %vb = shufflevector <2 x i8> %elt.head, <2 x i8> poison, <2 x i32> zeroinitializer
51 %v = call <2 x i8> @llvm.vp.sub.v2i8(<2 x i8> %va, <2 x i8> %vb, <2 x i1> %m, i32 %evl)
55 define <2 x i8> @vsub_vx_v2i8_unmasked(<2 x i8> %va, i8 %b, i32 zeroext %evl) {
56 ; CHECK-LABEL: vsub_vx_v2i8_unmasked:
58 ; CHECK-NEXT: vsetvli zero, a1, e8, mf8, ta, ma
59 ; CHECK-NEXT: vsub.vx v8, v8, a0
61 %elt.head = insertelement <2 x i8> poison, i8 %b, i32 0
62 %vb = shufflevector <2 x i8> %elt.head, <2 x i8> poison, <2 x i32> zeroinitializer
63 %head = insertelement <2 x i1> poison, i1 true, i32 0
64 %m = shufflevector <2 x i1> %head, <2 x i1> poison, <2 x i32> zeroinitializer
65 %v = call <2 x i8> @llvm.vp.sub.v2i8(<2 x i8> %va, <2 x i8> %vb, <2 x i1> %m, i32 %evl)
69 declare <3 x i8> @llvm.vp.sub.v3i8(<3 x i8>, <3 x i8>, <3 x i1>, i32)
71 define <3 x i8> @vsub_vv_v3i8(<3 x i8> %va, <3 x i8> %b, <3 x i1> %m, i32 zeroext %evl) {
72 ; CHECK-LABEL: vsub_vv_v3i8:
74 ; CHECK-NEXT: vsetvli zero, a0, e8, mf4, ta, ma
75 ; CHECK-NEXT: vsub.vv v8, v8, v9, v0.t
77 %v = call <3 x i8> @llvm.vp.sub.v3i8(<3 x i8> %va, <3 x i8> %b, <3 x i1> %m, i32 %evl)
81 define <3 x i8> @vsub_vv_v3i8_unmasked(<3 x i8> %va, <3 x i8> %b, i32 zeroext %evl) {
82 ; CHECK-LABEL: vsub_vv_v3i8_unmasked:
84 ; CHECK-NEXT: vsetvli zero, a0, e8, mf4, ta, ma
85 ; CHECK-NEXT: vsub.vv v8, v8, v9
87 %head = insertelement <3 x i1> poison, i1 true, i32 0
88 %m = shufflevector <3 x i1> %head, <3 x i1> poison, <3 x i32> zeroinitializer
89 %v = call <3 x i8> @llvm.vp.sub.v3i8(<3 x i8> %va, <3 x i8> %b, <3 x i1> %m, i32 %evl)
93 define <3 x i8> @vsub_vx_v3i8(<3 x i8> %va, i8 %b, <3 x i1> %m, i32 zeroext %evl) {
94 ; CHECK-LABEL: vsub_vx_v3i8:
96 ; CHECK-NEXT: vsetvli zero, a1, e8, mf4, ta, ma
97 ; CHECK-NEXT: vsub.vx v8, v8, a0, v0.t
99 %elt.head = insertelement <3 x i8> poison, i8 %b, i32 0
100 %vb = shufflevector <3 x i8> %elt.head, <3 x i8> poison, <3 x i32> zeroinitializer
101 %v = call <3 x i8> @llvm.vp.sub.v3i8(<3 x i8> %va, <3 x i8> %vb, <3 x i1> %m, i32 %evl)
105 define <3 x i8> @vsub_vx_v3i8_unmasked(<3 x i8> %va, i8 %b, i32 zeroext %evl) {
106 ; CHECK-LABEL: vsub_vx_v3i8_unmasked:
108 ; CHECK-NEXT: vsetvli zero, a1, e8, mf4, ta, ma
109 ; CHECK-NEXT: vsub.vx v8, v8, a0
111 %elt.head = insertelement <3 x i8> poison, i8 %b, i32 0
112 %vb = shufflevector <3 x i8> %elt.head, <3 x i8> poison, <3 x i32> zeroinitializer
113 %head = insertelement <3 x i1> poison, i1 true, i32 0
114 %m = shufflevector <3 x i1> %head, <3 x i1> poison, <3 x i32> zeroinitializer
115 %v = call <3 x i8> @llvm.vp.sub.v3i8(<3 x i8> %va, <3 x i8> %vb, <3 x i1> %m, i32 %evl)
119 declare <4 x i8> @llvm.vp.sub.v4i8(<4 x i8>, <4 x i8>, <4 x i1>, i32)
121 define <4 x i8> @vsub_vv_v4i8(<4 x i8> %va, <4 x i8> %b, <4 x i1> %m, i32 zeroext %evl) {
122 ; CHECK-LABEL: vsub_vv_v4i8:
124 ; CHECK-NEXT: vsetvli zero, a0, e8, mf4, ta, ma
125 ; CHECK-NEXT: vsub.vv v8, v8, v9, v0.t
127 %v = call <4 x i8> @llvm.vp.sub.v4i8(<4 x i8> %va, <4 x i8> %b, <4 x i1> %m, i32 %evl)
131 define <4 x i8> @vsub_vv_v4i8_unmasked(<4 x i8> %va, <4 x i8> %b, i32 zeroext %evl) {
132 ; CHECK-LABEL: vsub_vv_v4i8_unmasked:
134 ; CHECK-NEXT: vsetvli zero, a0, e8, mf4, ta, ma
135 ; CHECK-NEXT: vsub.vv v8, v8, v9
137 %head = insertelement <4 x i1> poison, i1 true, i32 0
138 %m = shufflevector <4 x i1> %head, <4 x i1> poison, <4 x i32> zeroinitializer
139 %v = call <4 x i8> @llvm.vp.sub.v4i8(<4 x i8> %va, <4 x i8> %b, <4 x i1> %m, i32 %evl)
143 define <4 x i8> @vsub_vx_v4i8(<4 x i8> %va, i8 %b, <4 x i1> %m, i32 zeroext %evl) {
144 ; CHECK-LABEL: vsub_vx_v4i8:
146 ; CHECK-NEXT: vsetvli zero, a1, e8, mf4, ta, ma
147 ; CHECK-NEXT: vsub.vx v8, v8, a0, v0.t
149 %elt.head = insertelement <4 x i8> poison, i8 %b, i32 0
150 %vb = shufflevector <4 x i8> %elt.head, <4 x i8> poison, <4 x i32> zeroinitializer
151 %v = call <4 x i8> @llvm.vp.sub.v4i8(<4 x i8> %va, <4 x i8> %vb, <4 x i1> %m, i32 %evl)
155 define <4 x i8> @vsub_vx_v4i8_unmasked(<4 x i8> %va, i8 %b, i32 zeroext %evl) {
156 ; CHECK-LABEL: vsub_vx_v4i8_unmasked:
158 ; CHECK-NEXT: vsetvli zero, a1, e8, mf4, ta, ma
159 ; CHECK-NEXT: vsub.vx v8, v8, a0
161 %elt.head = insertelement <4 x i8> poison, i8 %b, i32 0
162 %vb = shufflevector <4 x i8> %elt.head, <4 x i8> poison, <4 x i32> zeroinitializer
163 %head = insertelement <4 x i1> poison, i1 true, i32 0
164 %m = shufflevector <4 x i1> %head, <4 x i1> poison, <4 x i32> zeroinitializer
165 %v = call <4 x i8> @llvm.vp.sub.v4i8(<4 x i8> %va, <4 x i8> %vb, <4 x i1> %m, i32 %evl)
169 declare <8 x i8> @llvm.vp.sub.v8i8(<8 x i8>, <8 x i8>, <8 x i1>, i32)
171 define <8 x i8> @vsub_vv_v8i8(<8 x i8> %va, <8 x i8> %b, <8 x i1> %m, i32 zeroext %evl) {
172 ; CHECK-LABEL: vsub_vv_v8i8:
174 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
175 ; CHECK-NEXT: vsub.vv v8, v8, v9, v0.t
177 %v = call <8 x i8> @llvm.vp.sub.v8i8(<8 x i8> %va, <8 x i8> %b, <8 x i1> %m, i32 %evl)
181 define <8 x i8> @vsub_vv_v8i8_unmasked(<8 x i8> %va, <8 x i8> %b, i32 zeroext %evl) {
182 ; CHECK-LABEL: vsub_vv_v8i8_unmasked:
184 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
185 ; CHECK-NEXT: vsub.vv v8, v8, v9
187 %head = insertelement <8 x i1> poison, i1 true, i32 0
188 %m = shufflevector <8 x i1> %head, <8 x i1> poison, <8 x i32> zeroinitializer
189 %v = call <8 x i8> @llvm.vp.sub.v8i8(<8 x i8> %va, <8 x i8> %b, <8 x i1> %m, i32 %evl)
193 define <8 x i8> @vsub_vx_v8i8(<8 x i8> %va, i8 %b, <8 x i1> %m, i32 zeroext %evl) {
194 ; CHECK-LABEL: vsub_vx_v8i8:
196 ; CHECK-NEXT: vsetvli zero, a1, e8, mf2, ta, ma
197 ; CHECK-NEXT: vsub.vx v8, v8, a0, v0.t
199 %elt.head = insertelement <8 x i8> poison, i8 %b, i32 0
200 %vb = shufflevector <8 x i8> %elt.head, <8 x i8> poison, <8 x i32> zeroinitializer
201 %v = call <8 x i8> @llvm.vp.sub.v8i8(<8 x i8> %va, <8 x i8> %vb, <8 x i1> %m, i32 %evl)
205 define <8 x i8> @vsub_vx_v8i8_unmasked(<8 x i8> %va, i8 %b, i32 zeroext %evl) {
206 ; CHECK-LABEL: vsub_vx_v8i8_unmasked:
208 ; CHECK-NEXT: vsetvli zero, a1, e8, mf2, ta, ma
209 ; CHECK-NEXT: vsub.vx v8, v8, a0
211 %elt.head = insertelement <8 x i8> poison, i8 %b, i32 0
212 %vb = shufflevector <8 x i8> %elt.head, <8 x i8> poison, <8 x i32> zeroinitializer
213 %head = insertelement <8 x i1> poison, i1 true, i32 0
214 %m = shufflevector <8 x i1> %head, <8 x i1> poison, <8 x i32> zeroinitializer
215 %v = call <8 x i8> @llvm.vp.sub.v8i8(<8 x i8> %va, <8 x i8> %vb, <8 x i1> %m, i32 %evl)
219 declare <16 x i8> @llvm.vp.sub.v16i8(<16 x i8>, <16 x i8>, <16 x i1>, i32)
221 define <16 x i8> @vsub_vv_v16i8(<16 x i8> %va, <16 x i8> %b, <16 x i1> %m, i32 zeroext %evl) {
222 ; CHECK-LABEL: vsub_vv_v16i8:
224 ; CHECK-NEXT: vsetvli zero, a0, e8, m1, ta, ma
225 ; CHECK-NEXT: vsub.vv v8, v8, v9, v0.t
227 %v = call <16 x i8> @llvm.vp.sub.v16i8(<16 x i8> %va, <16 x i8> %b, <16 x i1> %m, i32 %evl)
231 define <16 x i8> @vsub_vv_v16i8_unmasked(<16 x i8> %va, <16 x i8> %b, i32 zeroext %evl) {
232 ; CHECK-LABEL: vsub_vv_v16i8_unmasked:
234 ; CHECK-NEXT: vsetvli zero, a0, e8, m1, ta, ma
235 ; CHECK-NEXT: vsub.vv v8, v8, v9
237 %head = insertelement <16 x i1> poison, i1 true, i32 0
238 %m = shufflevector <16 x i1> %head, <16 x i1> poison, <16 x i32> zeroinitializer
239 %v = call <16 x i8> @llvm.vp.sub.v16i8(<16 x i8> %va, <16 x i8> %b, <16 x i1> %m, i32 %evl)
243 define <16 x i8> @vsub_vx_v16i8(<16 x i8> %va, i8 %b, <16 x i1> %m, i32 zeroext %evl) {
244 ; CHECK-LABEL: vsub_vx_v16i8:
246 ; CHECK-NEXT: vsetvli zero, a1, e8, m1, ta, ma
247 ; CHECK-NEXT: vsub.vx v8, v8, a0, v0.t
249 %elt.head = insertelement <16 x i8> poison, i8 %b, i32 0
250 %vb = shufflevector <16 x i8> %elt.head, <16 x i8> poison, <16 x i32> zeroinitializer
251 %v = call <16 x i8> @llvm.vp.sub.v16i8(<16 x i8> %va, <16 x i8> %vb, <16 x i1> %m, i32 %evl)
255 define <16 x i8> @vsub_vx_v16i8_unmasked(<16 x i8> %va, i8 %b, i32 zeroext %evl) {
256 ; CHECK-LABEL: vsub_vx_v16i8_unmasked:
258 ; CHECK-NEXT: vsetvli zero, a1, e8, m1, ta, ma
259 ; CHECK-NEXT: vsub.vx v8, v8, a0
261 %elt.head = insertelement <16 x i8> poison, i8 %b, i32 0
262 %vb = shufflevector <16 x i8> %elt.head, <16 x i8> poison, <16 x i32> zeroinitializer
263 %head = insertelement <16 x i1> poison, i1 true, i32 0
264 %m = shufflevector <16 x i1> %head, <16 x i1> poison, <16 x i32> zeroinitializer
265 %v = call <16 x i8> @llvm.vp.sub.v16i8(<16 x i8> %va, <16 x i8> %vb, <16 x i1> %m, i32 %evl)
269 declare <2 x i16> @llvm.vp.sub.v2i16(<2 x i16>, <2 x i16>, <2 x i1>, i32)
271 define <2 x i16> @vsub_vv_v2i16(<2 x i16> %va, <2 x i16> %b, <2 x i1> %m, i32 zeroext %evl) {
272 ; CHECK-LABEL: vsub_vv_v2i16:
274 ; CHECK-NEXT: vsetvli zero, a0, e16, mf4, ta, ma
275 ; CHECK-NEXT: vsub.vv v8, v8, v9, v0.t
277 %v = call <2 x i16> @llvm.vp.sub.v2i16(<2 x i16> %va, <2 x i16> %b, <2 x i1> %m, i32 %evl)
281 define <2 x i16> @vsub_vv_v2i16_unmasked(<2 x i16> %va, <2 x i16> %b, i32 zeroext %evl) {
282 ; CHECK-LABEL: vsub_vv_v2i16_unmasked:
284 ; CHECK-NEXT: vsetvli zero, a0, e16, mf4, ta, ma
285 ; CHECK-NEXT: vsub.vv v8, v8, v9
287 %head = insertelement <2 x i1> poison, i1 true, i32 0
288 %m = shufflevector <2 x i1> %head, <2 x i1> poison, <2 x i32> zeroinitializer
289 %v = call <2 x i16> @llvm.vp.sub.v2i16(<2 x i16> %va, <2 x i16> %b, <2 x i1> %m, i32 %evl)
293 define <2 x i16> @vsub_vx_v2i16(<2 x i16> %va, i16 %b, <2 x i1> %m, i32 zeroext %evl) {
294 ; CHECK-LABEL: vsub_vx_v2i16:
296 ; CHECK-NEXT: vsetvli zero, a1, e16, mf4, ta, ma
297 ; CHECK-NEXT: vsub.vx v8, v8, a0, v0.t
299 %elt.head = insertelement <2 x i16> poison, i16 %b, i32 0
300 %vb = shufflevector <2 x i16> %elt.head, <2 x i16> poison, <2 x i32> zeroinitializer
301 %v = call <2 x i16> @llvm.vp.sub.v2i16(<2 x i16> %va, <2 x i16> %vb, <2 x i1> %m, i32 %evl)
305 define <2 x i16> @vsub_vx_v2i16_unmasked(<2 x i16> %va, i16 %b, i32 zeroext %evl) {
306 ; CHECK-LABEL: vsub_vx_v2i16_unmasked:
308 ; CHECK-NEXT: vsetvli zero, a1, e16, mf4, ta, ma
309 ; CHECK-NEXT: vsub.vx v8, v8, a0
311 %elt.head = insertelement <2 x i16> poison, i16 %b, i32 0
312 %vb = shufflevector <2 x i16> %elt.head, <2 x i16> poison, <2 x i32> zeroinitializer
313 %head = insertelement <2 x i1> poison, i1 true, i32 0
314 %m = shufflevector <2 x i1> %head, <2 x i1> poison, <2 x i32> zeroinitializer
315 %v = call <2 x i16> @llvm.vp.sub.v2i16(<2 x i16> %va, <2 x i16> %vb, <2 x i1> %m, i32 %evl)
319 declare <4 x i16> @llvm.vp.sub.v4i16(<4 x i16>, <4 x i16>, <4 x i1>, i32)
321 define <4 x i16> @vsub_vv_v4i16(<4 x i16> %va, <4 x i16> %b, <4 x i1> %m, i32 zeroext %evl) {
322 ; CHECK-LABEL: vsub_vv_v4i16:
324 ; CHECK-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
325 ; CHECK-NEXT: vsub.vv v8, v8, v9, v0.t
327 %v = call <4 x i16> @llvm.vp.sub.v4i16(<4 x i16> %va, <4 x i16> %b, <4 x i1> %m, i32 %evl)
331 define <4 x i16> @vsub_vv_v4i16_unmasked(<4 x i16> %va, <4 x i16> %b, i32 zeroext %evl) {
332 ; CHECK-LABEL: vsub_vv_v4i16_unmasked:
334 ; CHECK-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
335 ; CHECK-NEXT: vsub.vv v8, v8, v9
337 %head = insertelement <4 x i1> poison, i1 true, i32 0
338 %m = shufflevector <4 x i1> %head, <4 x i1> poison, <4 x i32> zeroinitializer
339 %v = call <4 x i16> @llvm.vp.sub.v4i16(<4 x i16> %va, <4 x i16> %b, <4 x i1> %m, i32 %evl)
343 define <4 x i16> @vsub_vx_v4i16(<4 x i16> %va, i16 %b, <4 x i1> %m, i32 zeroext %evl) {
344 ; CHECK-LABEL: vsub_vx_v4i16:
346 ; CHECK-NEXT: vsetvli zero, a1, e16, mf2, ta, ma
347 ; CHECK-NEXT: vsub.vx v8, v8, a0, v0.t
349 %elt.head = insertelement <4 x i16> poison, i16 %b, i32 0
350 %vb = shufflevector <4 x i16> %elt.head, <4 x i16> poison, <4 x i32> zeroinitializer
351 %v = call <4 x i16> @llvm.vp.sub.v4i16(<4 x i16> %va, <4 x i16> %vb, <4 x i1> %m, i32 %evl)
355 define <4 x i16> @vsub_vx_v4i16_unmasked(<4 x i16> %va, i16 %b, i32 zeroext %evl) {
356 ; CHECK-LABEL: vsub_vx_v4i16_unmasked:
358 ; CHECK-NEXT: vsetvli zero, a1, e16, mf2, ta, ma
359 ; CHECK-NEXT: vsub.vx v8, v8, a0
361 %elt.head = insertelement <4 x i16> poison, i16 %b, i32 0
362 %vb = shufflevector <4 x i16> %elt.head, <4 x i16> poison, <4 x i32> zeroinitializer
363 %head = insertelement <4 x i1> poison, i1 true, i32 0
364 %m = shufflevector <4 x i1> %head, <4 x i1> poison, <4 x i32> zeroinitializer
365 %v = call <4 x i16> @llvm.vp.sub.v4i16(<4 x i16> %va, <4 x i16> %vb, <4 x i1> %m, i32 %evl)
369 declare <8 x i16> @llvm.vp.sub.v8i16(<8 x i16>, <8 x i16>, <8 x i1>, i32)
371 define <8 x i16> @vsub_vv_v8i16(<8 x i16> %va, <8 x i16> %b, <8 x i1> %m, i32 zeroext %evl) {
372 ; CHECK-LABEL: vsub_vv_v8i16:
374 ; CHECK-NEXT: vsetvli zero, a0, e16, m1, ta, ma
375 ; CHECK-NEXT: vsub.vv v8, v8, v9, v0.t
377 %v = call <8 x i16> @llvm.vp.sub.v8i16(<8 x i16> %va, <8 x i16> %b, <8 x i1> %m, i32 %evl)
381 define <8 x i16> @vsub_vv_v8i16_unmasked(<8 x i16> %va, <8 x i16> %b, i32 zeroext %evl) {
382 ; CHECK-LABEL: vsub_vv_v8i16_unmasked:
384 ; CHECK-NEXT: vsetvli zero, a0, e16, m1, ta, ma
385 ; CHECK-NEXT: vsub.vv v8, v8, v9
387 %head = insertelement <8 x i1> poison, i1 true, i32 0
388 %m = shufflevector <8 x i1> %head, <8 x i1> poison, <8 x i32> zeroinitializer
389 %v = call <8 x i16> @llvm.vp.sub.v8i16(<8 x i16> %va, <8 x i16> %b, <8 x i1> %m, i32 %evl)
393 define <8 x i16> @vsub_vx_v8i16(<8 x i16> %va, i16 %b, <8 x i1> %m, i32 zeroext %evl) {
394 ; CHECK-LABEL: vsub_vx_v8i16:
396 ; CHECK-NEXT: vsetvli zero, a1, e16, m1, ta, ma
397 ; CHECK-NEXT: vsub.vx v8, v8, a0, v0.t
399 %elt.head = insertelement <8 x i16> poison, i16 %b, i32 0
400 %vb = shufflevector <8 x i16> %elt.head, <8 x i16> poison, <8 x i32> zeroinitializer
401 %v = call <8 x i16> @llvm.vp.sub.v8i16(<8 x i16> %va, <8 x i16> %vb, <8 x i1> %m, i32 %evl)
405 define <8 x i16> @vsub_vx_v8i16_unmasked(<8 x i16> %va, i16 %b, i32 zeroext %evl) {
406 ; CHECK-LABEL: vsub_vx_v8i16_unmasked:
408 ; CHECK-NEXT: vsetvli zero, a1, e16, m1, ta, ma
409 ; CHECK-NEXT: vsub.vx v8, v8, a0
411 %elt.head = insertelement <8 x i16> poison, i16 %b, i32 0
412 %vb = shufflevector <8 x i16> %elt.head, <8 x i16> poison, <8 x i32> zeroinitializer
413 %head = insertelement <8 x i1> poison, i1 true, i32 0
414 %m = shufflevector <8 x i1> %head, <8 x i1> poison, <8 x i32> zeroinitializer
415 %v = call <8 x i16> @llvm.vp.sub.v8i16(<8 x i16> %va, <8 x i16> %vb, <8 x i1> %m, i32 %evl)
419 declare <16 x i16> @llvm.vp.sub.v16i16(<16 x i16>, <16 x i16>, <16 x i1>, i32)
421 define <16 x i16> @vsub_vv_v16i16(<16 x i16> %va, <16 x i16> %b, <16 x i1> %m, i32 zeroext %evl) {
422 ; CHECK-LABEL: vsub_vv_v16i16:
424 ; CHECK-NEXT: vsetvli zero, a0, e16, m2, ta, ma
425 ; CHECK-NEXT: vsub.vv v8, v8, v10, v0.t
427 %v = call <16 x i16> @llvm.vp.sub.v16i16(<16 x i16> %va, <16 x i16> %b, <16 x i1> %m, i32 %evl)
431 define <16 x i16> @vsub_vv_v16i16_unmasked(<16 x i16> %va, <16 x i16> %b, i32 zeroext %evl) {
432 ; CHECK-LABEL: vsub_vv_v16i16_unmasked:
434 ; CHECK-NEXT: vsetvli zero, a0, e16, m2, ta, ma
435 ; CHECK-NEXT: vsub.vv v8, v8, v10
437 %head = insertelement <16 x i1> poison, i1 true, i32 0
438 %m = shufflevector <16 x i1> %head, <16 x i1> poison, <16 x i32> zeroinitializer
439 %v = call <16 x i16> @llvm.vp.sub.v16i16(<16 x i16> %va, <16 x i16> %b, <16 x i1> %m, i32 %evl)
443 define <16 x i16> @vsub_vx_v16i16(<16 x i16> %va, i16 %b, <16 x i1> %m, i32 zeroext %evl) {
444 ; CHECK-LABEL: vsub_vx_v16i16:
446 ; CHECK-NEXT: vsetvli zero, a1, e16, m2, ta, ma
447 ; CHECK-NEXT: vsub.vx v8, v8, a0, v0.t
449 %elt.head = insertelement <16 x i16> poison, i16 %b, i32 0
450 %vb = shufflevector <16 x i16> %elt.head, <16 x i16> poison, <16 x i32> zeroinitializer
451 %v = call <16 x i16> @llvm.vp.sub.v16i16(<16 x i16> %va, <16 x i16> %vb, <16 x i1> %m, i32 %evl)
455 define <16 x i16> @vsub_vx_v16i16_unmasked(<16 x i16> %va, i16 %b, i32 zeroext %evl) {
456 ; CHECK-LABEL: vsub_vx_v16i16_unmasked:
458 ; CHECK-NEXT: vsetvli zero, a1, e16, m2, ta, ma
459 ; CHECK-NEXT: vsub.vx v8, v8, a0
461 %elt.head = insertelement <16 x i16> poison, i16 %b, i32 0
462 %vb = shufflevector <16 x i16> %elt.head, <16 x i16> poison, <16 x i32> zeroinitializer
463 %head = insertelement <16 x i1> poison, i1 true, i32 0
464 %m = shufflevector <16 x i1> %head, <16 x i1> poison, <16 x i32> zeroinitializer
465 %v = call <16 x i16> @llvm.vp.sub.v16i16(<16 x i16> %va, <16 x i16> %vb, <16 x i1> %m, i32 %evl)
469 declare <2 x i32> @llvm.vp.sub.v2i32(<2 x i32>, <2 x i32>, <2 x i1>, i32)
471 define <2 x i32> @vsub_vv_v2i32(<2 x i32> %va, <2 x i32> %b, <2 x i1> %m, i32 zeroext %evl) {
472 ; CHECK-LABEL: vsub_vv_v2i32:
474 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
475 ; CHECK-NEXT: vsub.vv v8, v8, v9, v0.t
477 %v = call <2 x i32> @llvm.vp.sub.v2i32(<2 x i32> %va, <2 x i32> %b, <2 x i1> %m, i32 %evl)
481 define <2 x i32> @vsub_vv_v2i32_unmasked(<2 x i32> %va, <2 x i32> %b, i32 zeroext %evl) {
482 ; CHECK-LABEL: vsub_vv_v2i32_unmasked:
484 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
485 ; CHECK-NEXT: vsub.vv v8, v8, v9
487 %head = insertelement <2 x i1> poison, i1 true, i32 0
488 %m = shufflevector <2 x i1> %head, <2 x i1> poison, <2 x i32> zeroinitializer
489 %v = call <2 x i32> @llvm.vp.sub.v2i32(<2 x i32> %va, <2 x i32> %b, <2 x i1> %m, i32 %evl)
493 define <2 x i32> @vsub_vx_v2i32(<2 x i32> %va, i32 %b, <2 x i1> %m, i32 zeroext %evl) {
494 ; CHECK-LABEL: vsub_vx_v2i32:
496 ; CHECK-NEXT: vsetvli zero, a1, e32, mf2, ta, ma
497 ; CHECK-NEXT: vsub.vx v8, v8, a0, v0.t
499 %elt.head = insertelement <2 x i32> poison, i32 %b, i32 0
500 %vb = shufflevector <2 x i32> %elt.head, <2 x i32> poison, <2 x i32> zeroinitializer
501 %v = call <2 x i32> @llvm.vp.sub.v2i32(<2 x i32> %va, <2 x i32> %vb, <2 x i1> %m, i32 %evl)
505 define <2 x i32> @vsub_vx_v2i32_unmasked(<2 x i32> %va, i32 %b, i32 zeroext %evl) {
506 ; CHECK-LABEL: vsub_vx_v2i32_unmasked:
508 ; CHECK-NEXT: vsetvli zero, a1, e32, mf2, ta, ma
509 ; CHECK-NEXT: vsub.vx v8, v8, a0
511 %elt.head = insertelement <2 x i32> poison, i32 %b, i32 0
512 %vb = shufflevector <2 x i32> %elt.head, <2 x i32> poison, <2 x i32> zeroinitializer
513 %head = insertelement <2 x i1> poison, i1 true, i32 0
514 %m = shufflevector <2 x i1> %head, <2 x i1> poison, <2 x i32> zeroinitializer
515 %v = call <2 x i32> @llvm.vp.sub.v2i32(<2 x i32> %va, <2 x i32> %vb, <2 x i1> %m, i32 %evl)
519 declare <4 x i32> @llvm.vp.sub.v4i32(<4 x i32>, <4 x i32>, <4 x i1>, i32)
521 define <4 x i32> @vsub_vv_v4i32(<4 x i32> %va, <4 x i32> %b, <4 x i1> %m, i32 zeroext %evl) {
522 ; CHECK-LABEL: vsub_vv_v4i32:
524 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, ma
525 ; CHECK-NEXT: vsub.vv v8, v8, v9, v0.t
527 %v = call <4 x i32> @llvm.vp.sub.v4i32(<4 x i32> %va, <4 x i32> %b, <4 x i1> %m, i32 %evl)
531 define <4 x i32> @vsub_vv_v4i32_unmasked(<4 x i32> %va, <4 x i32> %b, i32 zeroext %evl) {
532 ; CHECK-LABEL: vsub_vv_v4i32_unmasked:
534 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, ma
535 ; CHECK-NEXT: vsub.vv v8, v8, v9
537 %head = insertelement <4 x i1> poison, i1 true, i32 0
538 %m = shufflevector <4 x i1> %head, <4 x i1> poison, <4 x i32> zeroinitializer
539 %v = call <4 x i32> @llvm.vp.sub.v4i32(<4 x i32> %va, <4 x i32> %b, <4 x i1> %m, i32 %evl)
543 define <4 x i32> @vsub_vx_v4i32(<4 x i32> %va, i32 %b, <4 x i1> %m, i32 zeroext %evl) {
544 ; CHECK-LABEL: vsub_vx_v4i32:
546 ; CHECK-NEXT: vsetvli zero, a1, e32, m1, ta, ma
547 ; CHECK-NEXT: vsub.vx v8, v8, a0, v0.t
549 %elt.head = insertelement <4 x i32> poison, i32 %b, i32 0
550 %vb = shufflevector <4 x i32> %elt.head, <4 x i32> poison, <4 x i32> zeroinitializer
551 %v = call <4 x i32> @llvm.vp.sub.v4i32(<4 x i32> %va, <4 x i32> %vb, <4 x i1> %m, i32 %evl)
555 define <4 x i32> @vsub_vx_v4i32_unmasked(<4 x i32> %va, i32 %b, i32 zeroext %evl) {
556 ; CHECK-LABEL: vsub_vx_v4i32_unmasked:
558 ; CHECK-NEXT: vsetvli zero, a1, e32, m1, ta, ma
559 ; CHECK-NEXT: vsub.vx v8, v8, a0
561 %elt.head = insertelement <4 x i32> poison, i32 %b, i32 0
562 %vb = shufflevector <4 x i32> %elt.head, <4 x i32> poison, <4 x i32> zeroinitializer
563 %head = insertelement <4 x i1> poison, i1 true, i32 0
564 %m = shufflevector <4 x i1> %head, <4 x i1> poison, <4 x i32> zeroinitializer
565 %v = call <4 x i32> @llvm.vp.sub.v4i32(<4 x i32> %va, <4 x i32> %vb, <4 x i1> %m, i32 %evl)
569 declare <8 x i32> @llvm.vp.sub.v8i32(<8 x i32>, <8 x i32>, <8 x i1>, i32)
571 define <8 x i32> @vsub_vv_v8i32(<8 x i32> %va, <8 x i32> %b, <8 x i1> %m, i32 zeroext %evl) {
572 ; CHECK-LABEL: vsub_vv_v8i32:
574 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
575 ; CHECK-NEXT: vsub.vv v8, v8, v10, v0.t
577 %v = call <8 x i32> @llvm.vp.sub.v8i32(<8 x i32> %va, <8 x i32> %b, <8 x i1> %m, i32 %evl)
581 define <8 x i32> @vsub_vv_v8i32_unmasked(<8 x i32> %va, <8 x i32> %b, i32 zeroext %evl) {
582 ; CHECK-LABEL: vsub_vv_v8i32_unmasked:
584 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
585 ; CHECK-NEXT: vsub.vv v8, v8, v10
587 %head = insertelement <8 x i1> poison, i1 true, i32 0
588 %m = shufflevector <8 x i1> %head, <8 x i1> poison, <8 x i32> zeroinitializer
589 %v = call <8 x i32> @llvm.vp.sub.v8i32(<8 x i32> %va, <8 x i32> %b, <8 x i1> %m, i32 %evl)
593 define <8 x i32> @vsub_vx_v8i32(<8 x i32> %va, i32 %b, <8 x i1> %m, i32 zeroext %evl) {
594 ; CHECK-LABEL: vsub_vx_v8i32:
596 ; CHECK-NEXT: vsetvli zero, a1, e32, m2, ta, ma
597 ; CHECK-NEXT: vsub.vx v8, v8, a0, v0.t
599 %elt.head = insertelement <8 x i32> poison, i32 %b, i32 0
600 %vb = shufflevector <8 x i32> %elt.head, <8 x i32> poison, <8 x i32> zeroinitializer
601 %v = call <8 x i32> @llvm.vp.sub.v8i32(<8 x i32> %va, <8 x i32> %vb, <8 x i1> %m, i32 %evl)
605 define <8 x i32> @vsub_vx_v8i32_unmasked(<8 x i32> %va, i32 %b, i32 zeroext %evl) {
606 ; CHECK-LABEL: vsub_vx_v8i32_unmasked:
608 ; CHECK-NEXT: vsetvli zero, a1, e32, m2, ta, ma
609 ; CHECK-NEXT: vsub.vx v8, v8, a0
611 %elt.head = insertelement <8 x i32> poison, i32 %b, i32 0
612 %vb = shufflevector <8 x i32> %elt.head, <8 x i32> poison, <8 x i32> zeroinitializer
613 %head = insertelement <8 x i1> poison, i1 true, i32 0
614 %m = shufflevector <8 x i1> %head, <8 x i1> poison, <8 x i32> zeroinitializer
615 %v = call <8 x i32> @llvm.vp.sub.v8i32(<8 x i32> %va, <8 x i32> %vb, <8 x i1> %m, i32 %evl)
619 declare <16 x i32> @llvm.vp.sub.v16i32(<16 x i32>, <16 x i32>, <16 x i1>, i32)
621 define <16 x i32> @vsub_vv_v16i32(<16 x i32> %va, <16 x i32> %b, <16 x i1> %m, i32 zeroext %evl) {
622 ; CHECK-LABEL: vsub_vv_v16i32:
624 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
625 ; CHECK-NEXT: vsub.vv v8, v8, v12, v0.t
627 %v = call <16 x i32> @llvm.vp.sub.v16i32(<16 x i32> %va, <16 x i32> %b, <16 x i1> %m, i32 %evl)
631 define <16 x i32> @vsub_vv_v16i32_unmasked(<16 x i32> %va, <16 x i32> %b, i32 zeroext %evl) {
632 ; CHECK-LABEL: vsub_vv_v16i32_unmasked:
634 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
635 ; CHECK-NEXT: vsub.vv v8, v8, v12
637 %head = insertelement <16 x i1> poison, i1 true, i32 0
638 %m = shufflevector <16 x i1> %head, <16 x i1> poison, <16 x i32> zeroinitializer
639 %v = call <16 x i32> @llvm.vp.sub.v16i32(<16 x i32> %va, <16 x i32> %b, <16 x i1> %m, i32 %evl)
643 define <16 x i32> @vsub_vx_v16i32(<16 x i32> %va, i32 %b, <16 x i1> %m, i32 zeroext %evl) {
644 ; CHECK-LABEL: vsub_vx_v16i32:
646 ; CHECK-NEXT: vsetvli zero, a1, e32, m4, ta, ma
647 ; CHECK-NEXT: vsub.vx v8, v8, a0, v0.t
649 %elt.head = insertelement <16 x i32> poison, i32 %b, i32 0
650 %vb = shufflevector <16 x i32> %elt.head, <16 x i32> poison, <16 x i32> zeroinitializer
651 %v = call <16 x i32> @llvm.vp.sub.v16i32(<16 x i32> %va, <16 x i32> %vb, <16 x i1> %m, i32 %evl)
655 define <16 x i32> @vsub_vx_v16i32_unmasked(<16 x i32> %va, i32 %b, i32 zeroext %evl) {
656 ; CHECK-LABEL: vsub_vx_v16i32_unmasked:
658 ; CHECK-NEXT: vsetvli zero, a1, e32, m4, ta, ma
659 ; CHECK-NEXT: vsub.vx v8, v8, a0
661 %elt.head = insertelement <16 x i32> poison, i32 %b, i32 0
662 %vb = shufflevector <16 x i32> %elt.head, <16 x i32> poison, <16 x i32> zeroinitializer
663 %head = insertelement <16 x i1> poison, i1 true, i32 0
664 %m = shufflevector <16 x i1> %head, <16 x i1> poison, <16 x i32> zeroinitializer
665 %v = call <16 x i32> @llvm.vp.sub.v16i32(<16 x i32> %va, <16 x i32> %vb, <16 x i1> %m, i32 %evl)
669 declare <2 x i64> @llvm.vp.sub.v2i64(<2 x i64>, <2 x i64>, <2 x i1>, i32)
671 define <2 x i64> @vsub_vv_v2i64(<2 x i64> %va, <2 x i64> %b, <2 x i1> %m, i32 zeroext %evl) {
672 ; CHECK-LABEL: vsub_vv_v2i64:
674 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
675 ; CHECK-NEXT: vsub.vv v8, v8, v9, v0.t
677 %v = call <2 x i64> @llvm.vp.sub.v2i64(<2 x i64> %va, <2 x i64> %b, <2 x i1> %m, i32 %evl)
681 define <2 x i64> @vsub_vv_v2i64_unmasked(<2 x i64> %va, <2 x i64> %b, i32 zeroext %evl) {
682 ; CHECK-LABEL: vsub_vv_v2i64_unmasked:
684 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
685 ; CHECK-NEXT: vsub.vv v8, v8, v9
687 %head = insertelement <2 x i1> poison, i1 true, i32 0
688 %m = shufflevector <2 x i1> %head, <2 x i1> poison, <2 x i32> zeroinitializer
689 %v = call <2 x i64> @llvm.vp.sub.v2i64(<2 x i64> %va, <2 x i64> %b, <2 x i1> %m, i32 %evl)
693 define <2 x i64> @vsub_vx_v2i64(<2 x i64> %va, i64 %b, <2 x i1> %m, i32 zeroext %evl) {
694 ; RV32-LABEL: vsub_vx_v2i64:
696 ; RV32-NEXT: addi sp, sp, -16
697 ; RV32-NEXT: .cfi_def_cfa_offset 16
698 ; RV32-NEXT: sw a1, 12(sp)
699 ; RV32-NEXT: sw a0, 8(sp)
700 ; RV32-NEXT: addi a0, sp, 8
701 ; RV32-NEXT: vsetivli zero, 2, e64, m1, ta, ma
702 ; RV32-NEXT: vlse64.v v9, (a0), zero
703 ; RV32-NEXT: vsetvli zero, a2, e64, m1, ta, ma
704 ; RV32-NEXT: vsub.vv v8, v8, v9, v0.t
705 ; RV32-NEXT: addi sp, sp, 16
708 ; RV64-LABEL: vsub_vx_v2i64:
710 ; RV64-NEXT: vsetvli zero, a1, e64, m1, ta, ma
711 ; RV64-NEXT: vsub.vx v8, v8, a0, v0.t
713 %elt.head = insertelement <2 x i64> poison, i64 %b, i32 0
714 %vb = shufflevector <2 x i64> %elt.head, <2 x i64> poison, <2 x i32> zeroinitializer
715 %v = call <2 x i64> @llvm.vp.sub.v2i64(<2 x i64> %va, <2 x i64> %vb, <2 x i1> %m, i32 %evl)
719 define <2 x i64> @vsub_vx_v2i64_unmasked(<2 x i64> %va, i64 %b, i32 zeroext %evl) {
720 ; RV32-LABEL: vsub_vx_v2i64_unmasked:
722 ; RV32-NEXT: addi sp, sp, -16
723 ; RV32-NEXT: .cfi_def_cfa_offset 16
724 ; RV32-NEXT: sw a1, 12(sp)
725 ; RV32-NEXT: sw a0, 8(sp)
726 ; RV32-NEXT: addi a0, sp, 8
727 ; RV32-NEXT: vsetivli zero, 2, e64, m1, ta, ma
728 ; RV32-NEXT: vlse64.v v9, (a0), zero
729 ; RV32-NEXT: vsetvli zero, a2, e64, m1, ta, ma
730 ; RV32-NEXT: vsub.vv v8, v8, v9
731 ; RV32-NEXT: addi sp, sp, 16
734 ; RV64-LABEL: vsub_vx_v2i64_unmasked:
736 ; RV64-NEXT: vsetvli zero, a1, e64, m1, ta, ma
737 ; RV64-NEXT: vsub.vx v8, v8, a0
739 %elt.head = insertelement <2 x i64> poison, i64 %b, i32 0
740 %vb = shufflevector <2 x i64> %elt.head, <2 x i64> poison, <2 x i32> zeroinitializer
741 %head = insertelement <2 x i1> poison, i1 true, i32 0
742 %m = shufflevector <2 x i1> %head, <2 x i1> poison, <2 x i32> zeroinitializer
743 %v = call <2 x i64> @llvm.vp.sub.v2i64(<2 x i64> %va, <2 x i64> %vb, <2 x i1> %m, i32 %evl)
747 declare <4 x i64> @llvm.vp.sub.v4i64(<4 x i64>, <4 x i64>, <4 x i1>, i32)
749 define <4 x i64> @vsub_vv_v4i64(<4 x i64> %va, <4 x i64> %b, <4 x i1> %m, i32 zeroext %evl) {
750 ; CHECK-LABEL: vsub_vv_v4i64:
752 ; CHECK-NEXT: vsetvli zero, a0, e64, m2, ta, ma
753 ; CHECK-NEXT: vsub.vv v8, v8, v10, v0.t
755 %v = call <4 x i64> @llvm.vp.sub.v4i64(<4 x i64> %va, <4 x i64> %b, <4 x i1> %m, i32 %evl)
759 define <4 x i64> @vsub_vv_v4i64_unmasked(<4 x i64> %va, <4 x i64> %b, i32 zeroext %evl) {
760 ; CHECK-LABEL: vsub_vv_v4i64_unmasked:
762 ; CHECK-NEXT: vsetvli zero, a0, e64, m2, ta, ma
763 ; CHECK-NEXT: vsub.vv v8, v8, v10
765 %head = insertelement <4 x i1> poison, i1 true, i32 0
766 %m = shufflevector <4 x i1> %head, <4 x i1> poison, <4 x i32> zeroinitializer
767 %v = call <4 x i64> @llvm.vp.sub.v4i64(<4 x i64> %va, <4 x i64> %b, <4 x i1> %m, i32 %evl)
771 define <4 x i64> @vsub_vx_v4i64(<4 x i64> %va, i64 %b, <4 x i1> %m, i32 zeroext %evl) {
772 ; RV32-LABEL: vsub_vx_v4i64:
774 ; RV32-NEXT: addi sp, sp, -16
775 ; RV32-NEXT: .cfi_def_cfa_offset 16
776 ; RV32-NEXT: sw a1, 12(sp)
777 ; RV32-NEXT: sw a0, 8(sp)
778 ; RV32-NEXT: addi a0, sp, 8
779 ; RV32-NEXT: vsetivli zero, 4, e64, m2, ta, ma
780 ; RV32-NEXT: vlse64.v v10, (a0), zero
781 ; RV32-NEXT: vsetvli zero, a2, e64, m2, ta, ma
782 ; RV32-NEXT: vsub.vv v8, v8, v10, v0.t
783 ; RV32-NEXT: addi sp, sp, 16
786 ; RV64-LABEL: vsub_vx_v4i64:
788 ; RV64-NEXT: vsetvli zero, a1, e64, m2, ta, ma
789 ; RV64-NEXT: vsub.vx v8, v8, a0, v0.t
791 %elt.head = insertelement <4 x i64> poison, i64 %b, i32 0
792 %vb = shufflevector <4 x i64> %elt.head, <4 x i64> poison, <4 x i32> zeroinitializer
793 %v = call <4 x i64> @llvm.vp.sub.v4i64(<4 x i64> %va, <4 x i64> %vb, <4 x i1> %m, i32 %evl)
797 define <4 x i64> @vsub_vx_v4i64_unmasked(<4 x i64> %va, i64 %b, i32 zeroext %evl) {
798 ; RV32-LABEL: vsub_vx_v4i64_unmasked:
800 ; RV32-NEXT: addi sp, sp, -16
801 ; RV32-NEXT: .cfi_def_cfa_offset 16
802 ; RV32-NEXT: sw a1, 12(sp)
803 ; RV32-NEXT: sw a0, 8(sp)
804 ; RV32-NEXT: addi a0, sp, 8
805 ; RV32-NEXT: vsetivli zero, 4, e64, m2, ta, ma
806 ; RV32-NEXT: vlse64.v v10, (a0), zero
807 ; RV32-NEXT: vsetvli zero, a2, e64, m2, ta, ma
808 ; RV32-NEXT: vsub.vv v8, v8, v10
809 ; RV32-NEXT: addi sp, sp, 16
812 ; RV64-LABEL: vsub_vx_v4i64_unmasked:
814 ; RV64-NEXT: vsetvli zero, a1, e64, m2, ta, ma
815 ; RV64-NEXT: vsub.vx v8, v8, a0
817 %elt.head = insertelement <4 x i64> poison, i64 %b, i32 0
818 %vb = shufflevector <4 x i64> %elt.head, <4 x i64> poison, <4 x i32> zeroinitializer
819 %head = insertelement <4 x i1> poison, i1 true, i32 0
820 %m = shufflevector <4 x i1> %head, <4 x i1> poison, <4 x i32> zeroinitializer
821 %v = call <4 x i64> @llvm.vp.sub.v4i64(<4 x i64> %va, <4 x i64> %vb, <4 x i1> %m, i32 %evl)
825 declare <8 x i64> @llvm.vp.sub.v8i64(<8 x i64>, <8 x i64>, <8 x i1>, i32)
827 define <8 x i64> @vsub_vv_v8i64(<8 x i64> %va, <8 x i64> %b, <8 x i1> %m, i32 zeroext %evl) {
828 ; CHECK-LABEL: vsub_vv_v8i64:
830 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
831 ; CHECK-NEXT: vsub.vv v8, v8, v12, v0.t
833 %v = call <8 x i64> @llvm.vp.sub.v8i64(<8 x i64> %va, <8 x i64> %b, <8 x i1> %m, i32 %evl)
837 define <8 x i64> @vsub_vv_v8i64_unmasked(<8 x i64> %va, <8 x i64> %b, i32 zeroext %evl) {
838 ; CHECK-LABEL: vsub_vv_v8i64_unmasked:
840 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
841 ; CHECK-NEXT: vsub.vv v8, v8, v12
843 %head = insertelement <8 x i1> poison, i1 true, i32 0
844 %m = shufflevector <8 x i1> %head, <8 x i1> poison, <8 x i32> zeroinitializer
845 %v = call <8 x i64> @llvm.vp.sub.v8i64(<8 x i64> %va, <8 x i64> %b, <8 x i1> %m, i32 %evl)
849 define <8 x i64> @vsub_vx_v8i64(<8 x i64> %va, i64 %b, <8 x i1> %m, i32 zeroext %evl) {
850 ; RV32-LABEL: vsub_vx_v8i64:
852 ; RV32-NEXT: addi sp, sp, -16
853 ; RV32-NEXT: .cfi_def_cfa_offset 16
854 ; RV32-NEXT: sw a1, 12(sp)
855 ; RV32-NEXT: sw a0, 8(sp)
856 ; RV32-NEXT: addi a0, sp, 8
857 ; RV32-NEXT: vsetivli zero, 8, e64, m4, ta, ma
858 ; RV32-NEXT: vlse64.v v12, (a0), zero
859 ; RV32-NEXT: vsetvli zero, a2, e64, m4, ta, ma
860 ; RV32-NEXT: vsub.vv v8, v8, v12, v0.t
861 ; RV32-NEXT: addi sp, sp, 16
864 ; RV64-LABEL: vsub_vx_v8i64:
866 ; RV64-NEXT: vsetvli zero, a1, e64, m4, ta, ma
867 ; RV64-NEXT: vsub.vx v8, v8, a0, v0.t
869 %elt.head = insertelement <8 x i64> poison, i64 %b, i32 0
870 %vb = shufflevector <8 x i64> %elt.head, <8 x i64> poison, <8 x i32> zeroinitializer
871 %v = call <8 x i64> @llvm.vp.sub.v8i64(<8 x i64> %va, <8 x i64> %vb, <8 x i1> %m, i32 %evl)
875 define <8 x i64> @vsub_vx_v8i64_unmasked(<8 x i64> %va, i64 %b, i32 zeroext %evl) {
876 ; RV32-LABEL: vsub_vx_v8i64_unmasked:
878 ; RV32-NEXT: addi sp, sp, -16
879 ; RV32-NEXT: .cfi_def_cfa_offset 16
880 ; RV32-NEXT: sw a1, 12(sp)
881 ; RV32-NEXT: sw a0, 8(sp)
882 ; RV32-NEXT: addi a0, sp, 8
883 ; RV32-NEXT: vsetivli zero, 8, e64, m4, ta, ma
884 ; RV32-NEXT: vlse64.v v12, (a0), zero
885 ; RV32-NEXT: vsetvli zero, a2, e64, m4, ta, ma
886 ; RV32-NEXT: vsub.vv v8, v8, v12
887 ; RV32-NEXT: addi sp, sp, 16
890 ; RV64-LABEL: vsub_vx_v8i64_unmasked:
892 ; RV64-NEXT: vsetvli zero, a1, e64, m4, ta, ma
893 ; RV64-NEXT: vsub.vx v8, v8, a0
895 %elt.head = insertelement <8 x i64> poison, i64 %b, i32 0
896 %vb = shufflevector <8 x i64> %elt.head, <8 x i64> poison, <8 x i32> zeroinitializer
897 %head = insertelement <8 x i1> poison, i1 true, i32 0
898 %m = shufflevector <8 x i1> %head, <8 x i1> poison, <8 x i32> zeroinitializer
899 %v = call <8 x i64> @llvm.vp.sub.v8i64(<8 x i64> %va, <8 x i64> %vb, <8 x i1> %m, i32 %evl)
903 declare <16 x i64> @llvm.vp.sub.v16i64(<16 x i64>, <16 x i64>, <16 x i1>, i32)
905 define <16 x i64> @vsub_vv_v16i64(<16 x i64> %va, <16 x i64> %b, <16 x i1> %m, i32 zeroext %evl) {
906 ; CHECK-LABEL: vsub_vv_v16i64:
908 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
909 ; CHECK-NEXT: vsub.vv v8, v8, v16, v0.t
911 %v = call <16 x i64> @llvm.vp.sub.v16i64(<16 x i64> %va, <16 x i64> %b, <16 x i1> %m, i32 %evl)
915 define <16 x i64> @vsub_vv_v16i64_unmasked(<16 x i64> %va, <16 x i64> %b, i32 zeroext %evl) {
916 ; CHECK-LABEL: vsub_vv_v16i64_unmasked:
918 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
919 ; CHECK-NEXT: vsub.vv v8, v8, v16
921 %head = insertelement <16 x i1> poison, i1 true, i32 0
922 %m = shufflevector <16 x i1> %head, <16 x i1> poison, <16 x i32> zeroinitializer
923 %v = call <16 x i64> @llvm.vp.sub.v16i64(<16 x i64> %va, <16 x i64> %b, <16 x i1> %m, i32 %evl)
927 define <16 x i64> @vsub_vx_v16i64(<16 x i64> %va, i64 %b, <16 x i1> %m, i32 zeroext %evl) {
928 ; RV32-LABEL: vsub_vx_v16i64:
930 ; RV32-NEXT: addi sp, sp, -16
931 ; RV32-NEXT: .cfi_def_cfa_offset 16
932 ; RV32-NEXT: sw a1, 12(sp)
933 ; RV32-NEXT: sw a0, 8(sp)
934 ; RV32-NEXT: addi a0, sp, 8
935 ; RV32-NEXT: vsetivli zero, 16, e64, m8, ta, ma
936 ; RV32-NEXT: vlse64.v v16, (a0), zero
937 ; RV32-NEXT: vsetvli zero, a2, e64, m8, ta, ma
938 ; RV32-NEXT: vsub.vv v8, v8, v16, v0.t
939 ; RV32-NEXT: addi sp, sp, 16
942 ; RV64-LABEL: vsub_vx_v16i64:
944 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
945 ; RV64-NEXT: vsub.vx v8, v8, a0, v0.t
947 %elt.head = insertelement <16 x i64> poison, i64 %b, i32 0
948 %vb = shufflevector <16 x i64> %elt.head, <16 x i64> poison, <16 x i32> zeroinitializer
949 %v = call <16 x i64> @llvm.vp.sub.v16i64(<16 x i64> %va, <16 x i64> %vb, <16 x i1> %m, i32 %evl)
953 define <16 x i64> @vsub_vx_v16i64_unmasked(<16 x i64> %va, i64 %b, i32 zeroext %evl) {
954 ; RV32-LABEL: vsub_vx_v16i64_unmasked:
956 ; RV32-NEXT: addi sp, sp, -16
957 ; RV32-NEXT: .cfi_def_cfa_offset 16
958 ; RV32-NEXT: sw a1, 12(sp)
959 ; RV32-NEXT: sw a0, 8(sp)
960 ; RV32-NEXT: addi a0, sp, 8
961 ; RV32-NEXT: vsetivli zero, 16, e64, m8, ta, ma
962 ; RV32-NEXT: vlse64.v v16, (a0), zero
963 ; RV32-NEXT: vsetvli zero, a2, e64, m8, ta, ma
964 ; RV32-NEXT: vsub.vv v8, v8, v16
965 ; RV32-NEXT: addi sp, sp, 16
968 ; RV64-LABEL: vsub_vx_v16i64_unmasked:
970 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
971 ; RV64-NEXT: vsub.vx v8, v8, a0
973 %elt.head = insertelement <16 x i64> poison, i64 %b, i32 0
974 %vb = shufflevector <16 x i64> %elt.head, <16 x i64> poison, <16 x i32> zeroinitializer
975 %head = insertelement <16 x i1> poison, i1 true, i32 0
976 %m = shufflevector <16 x i1> %head, <16 x i1> poison, <16 x i32> zeroinitializer
977 %v = call <16 x i64> @llvm.vp.sub.v16i64(<16 x i64> %va, <16 x i64> %vb, <16 x i1> %m, i32 %evl)