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 <vscale x 8 x i7> @llvm.vp.sub.nxv8i7(<vscale x 8 x i7>, <vscale x 8 x i7>, <vscale x 8 x i1>, i32)
9 define <vscale x 8 x i7> @vsub_vx_nxv8i7(<vscale x 8 x i7> %a, i7 signext %b, <vscale x 8 x i1> %mask, i32 zeroext %evl) {
10 ; CHECK-LABEL: vsub_vx_nxv8i7:
12 ; CHECK-NEXT: vsetvli zero, a1, e8, m1, ta, ma
13 ; CHECK-NEXT: vsub.vx v8, v8, a0, v0.t
15 %elt.head = insertelement <vscale x 8 x i7> poison, i7 %b, i32 0
16 %vb = shufflevector <vscale x 8 x i7> %elt.head, <vscale x 8 x i7> poison, <vscale x 8 x i32> zeroinitializer
17 %v = call <vscale x 8 x i7> @llvm.vp.sub.nxv8i7(<vscale x 8 x i7> %a, <vscale x 8 x i7> %vb, <vscale x 8 x i1> %mask, i32 %evl)
18 ret <vscale x 8 x i7> %v
21 declare <vscale x 1 x i8> @llvm.vp.sub.nxv1i8(<vscale x 1 x i8>, <vscale x 1 x i8>, <vscale x 1 x i1>, i32)
23 define <vscale x 1 x i8> @vsub_vv_nxv1i8(<vscale x 1 x i8> %va, <vscale x 1 x i8> %b, <vscale x 1 x i1> %m, i32 zeroext %evl) {
24 ; CHECK-LABEL: vsub_vv_nxv1i8:
26 ; CHECK-NEXT: vsetvli zero, a0, e8, mf8, ta, ma
27 ; CHECK-NEXT: vsub.vv v8, v8, v9, v0.t
29 %v = call <vscale x 1 x i8> @llvm.vp.sub.nxv1i8(<vscale x 1 x i8> %va, <vscale x 1 x i8> %b, <vscale x 1 x i1> %m, i32 %evl)
30 ret <vscale x 1 x i8> %v
33 define <vscale x 1 x i8> @vsub_vv_nxv1i8_unmasked(<vscale x 1 x i8> %va, <vscale x 1 x i8> %b, i32 zeroext %evl) {
34 ; CHECK-LABEL: vsub_vv_nxv1i8_unmasked:
36 ; CHECK-NEXT: vsetvli zero, a0, e8, mf8, ta, ma
37 ; CHECK-NEXT: vsub.vv v8, v8, v9
39 %head = insertelement <vscale x 1 x i1> poison, i1 true, i32 0
40 %m = shufflevector <vscale x 1 x i1> %head, <vscale x 1 x i1> poison, <vscale x 1 x i32> zeroinitializer
41 %v = call <vscale x 1 x i8> @llvm.vp.sub.nxv1i8(<vscale x 1 x i8> %va, <vscale x 1 x i8> %b, <vscale x 1 x i1> %m, i32 %evl)
42 ret <vscale x 1 x i8> %v
45 define <vscale x 1 x i8> @vsub_vx_nxv1i8(<vscale x 1 x i8> %va, i8 %b, <vscale x 1 x i1> %m, i32 zeroext %evl) {
46 ; CHECK-LABEL: vsub_vx_nxv1i8:
48 ; CHECK-NEXT: vsetvli zero, a1, e8, mf8, ta, ma
49 ; CHECK-NEXT: vsub.vx v8, v8, a0, v0.t
51 %elt.head = insertelement <vscale x 1 x i8> poison, i8 %b, i32 0
52 %vb = shufflevector <vscale x 1 x i8> %elt.head, <vscale x 1 x i8> poison, <vscale x 1 x i32> zeroinitializer
53 %v = call <vscale x 1 x i8> @llvm.vp.sub.nxv1i8(<vscale x 1 x i8> %va, <vscale x 1 x i8> %vb, <vscale x 1 x i1> %m, i32 %evl)
54 ret <vscale x 1 x i8> %v
57 define <vscale x 1 x i8> @vsub_vx_nxv1i8_unmasked(<vscale x 1 x i8> %va, i8 %b, i32 zeroext %evl) {
58 ; CHECK-LABEL: vsub_vx_nxv1i8_unmasked:
60 ; CHECK-NEXT: vsetvli zero, a1, e8, mf8, ta, ma
61 ; CHECK-NEXT: vsub.vx v8, v8, a0
63 %elt.head = insertelement <vscale x 1 x i8> poison, i8 %b, i32 0
64 %vb = shufflevector <vscale x 1 x i8> %elt.head, <vscale x 1 x i8> poison, <vscale x 1 x i32> zeroinitializer
65 %head = insertelement <vscale x 1 x i1> poison, i1 true, i32 0
66 %m = shufflevector <vscale x 1 x i1> %head, <vscale x 1 x i1> poison, <vscale x 1 x i32> zeroinitializer
67 %v = call <vscale x 1 x i8> @llvm.vp.sub.nxv1i8(<vscale x 1 x i8> %va, <vscale x 1 x i8> %vb, <vscale x 1 x i1> %m, i32 %evl)
68 ret <vscale x 1 x i8> %v
71 declare <vscale x 2 x i8> @llvm.vp.sub.nxv2i8(<vscale x 2 x i8>, <vscale x 2 x i8>, <vscale x 2 x i1>, i32)
73 define <vscale x 2 x i8> @vsub_vv_nxv2i8(<vscale x 2 x i8> %va, <vscale x 2 x i8> %b, <vscale x 2 x i1> %m, i32 zeroext %evl) {
74 ; CHECK-LABEL: vsub_vv_nxv2i8:
76 ; CHECK-NEXT: vsetvli zero, a0, e8, mf4, ta, ma
77 ; CHECK-NEXT: vsub.vv v8, v8, v9, v0.t
79 %v = call <vscale x 2 x i8> @llvm.vp.sub.nxv2i8(<vscale x 2 x i8> %va, <vscale x 2 x i8> %b, <vscale x 2 x i1> %m, i32 %evl)
80 ret <vscale x 2 x i8> %v
83 define <vscale x 2 x i8> @vsub_vv_nxv2i8_unmasked(<vscale x 2 x i8> %va, <vscale x 2 x i8> %b, i32 zeroext %evl) {
84 ; CHECK-LABEL: vsub_vv_nxv2i8_unmasked:
86 ; CHECK-NEXT: vsetvli zero, a0, e8, mf4, ta, ma
87 ; CHECK-NEXT: vsub.vv v8, v8, v9
89 %head = insertelement <vscale x 2 x i1> poison, i1 true, i32 0
90 %m = shufflevector <vscale x 2 x i1> %head, <vscale x 2 x i1> poison, <vscale x 2 x i32> zeroinitializer
91 %v = call <vscale x 2 x i8> @llvm.vp.sub.nxv2i8(<vscale x 2 x i8> %va, <vscale x 2 x i8> %b, <vscale x 2 x i1> %m, i32 %evl)
92 ret <vscale x 2 x i8> %v
95 define <vscale x 2 x i8> @vsub_vx_nxv2i8(<vscale x 2 x i8> %va, i8 %b, <vscale x 2 x i1> %m, i32 zeroext %evl) {
96 ; CHECK-LABEL: vsub_vx_nxv2i8:
98 ; CHECK-NEXT: vsetvli zero, a1, e8, mf4, ta, ma
99 ; CHECK-NEXT: vsub.vx v8, v8, a0, v0.t
101 %elt.head = insertelement <vscale x 2 x i8> poison, i8 %b, i32 0
102 %vb = shufflevector <vscale x 2 x i8> %elt.head, <vscale x 2 x i8> poison, <vscale x 2 x i32> zeroinitializer
103 %v = call <vscale x 2 x i8> @llvm.vp.sub.nxv2i8(<vscale x 2 x i8> %va, <vscale x 2 x i8> %vb, <vscale x 2 x i1> %m, i32 %evl)
104 ret <vscale x 2 x i8> %v
107 define <vscale x 2 x i8> @vsub_vx_nxv2i8_unmasked(<vscale x 2 x i8> %va, i8 %b, i32 zeroext %evl) {
108 ; CHECK-LABEL: vsub_vx_nxv2i8_unmasked:
110 ; CHECK-NEXT: vsetvli zero, a1, e8, mf4, ta, ma
111 ; CHECK-NEXT: vsub.vx v8, v8, a0
113 %elt.head = insertelement <vscale x 2 x i8> poison, i8 %b, i32 0
114 %vb = shufflevector <vscale x 2 x i8> %elt.head, <vscale x 2 x i8> poison, <vscale x 2 x i32> zeroinitializer
115 %head = insertelement <vscale x 2 x i1> poison, i1 true, i32 0
116 %m = shufflevector <vscale x 2 x i1> %head, <vscale x 2 x i1> poison, <vscale x 2 x i32> zeroinitializer
117 %v = call <vscale x 2 x i8> @llvm.vp.sub.nxv2i8(<vscale x 2 x i8> %va, <vscale x 2 x i8> %vb, <vscale x 2 x i1> %m, i32 %evl)
118 ret <vscale x 2 x i8> %v
121 declare <vscale x 4 x i8> @llvm.vp.sub.nxv4i8(<vscale x 4 x i8>, <vscale x 4 x i8>, <vscale x 4 x i1>, i32)
123 define <vscale x 4 x i8> @vsub_vv_nxv4i8(<vscale x 4 x i8> %va, <vscale x 4 x i8> %b, <vscale x 4 x i1> %m, i32 zeroext %evl) {
124 ; CHECK-LABEL: vsub_vv_nxv4i8:
126 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
127 ; CHECK-NEXT: vsub.vv v8, v8, v9, v0.t
129 %v = call <vscale x 4 x i8> @llvm.vp.sub.nxv4i8(<vscale x 4 x i8> %va, <vscale x 4 x i8> %b, <vscale x 4 x i1> %m, i32 %evl)
130 ret <vscale x 4 x i8> %v
133 define <vscale x 4 x i8> @vsub_vv_nxv4i8_unmasked(<vscale x 4 x i8> %va, <vscale x 4 x i8> %b, i32 zeroext %evl) {
134 ; CHECK-LABEL: vsub_vv_nxv4i8_unmasked:
136 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
137 ; CHECK-NEXT: vsub.vv v8, v8, v9
139 %head = insertelement <vscale x 4 x i1> poison, i1 true, i32 0
140 %m = shufflevector <vscale x 4 x i1> %head, <vscale x 4 x i1> poison, <vscale x 4 x i32> zeroinitializer
141 %v = call <vscale x 4 x i8> @llvm.vp.sub.nxv4i8(<vscale x 4 x i8> %va, <vscale x 4 x i8> %b, <vscale x 4 x i1> %m, i32 %evl)
142 ret <vscale x 4 x i8> %v
145 define <vscale x 4 x i8> @vsub_vx_nxv4i8(<vscale x 4 x i8> %va, i8 %b, <vscale x 4 x i1> %m, i32 zeroext %evl) {
146 ; CHECK-LABEL: vsub_vx_nxv4i8:
148 ; CHECK-NEXT: vsetvli zero, a1, e8, mf2, ta, ma
149 ; CHECK-NEXT: vsub.vx v8, v8, a0, v0.t
151 %elt.head = insertelement <vscale x 4 x i8> poison, i8 %b, i32 0
152 %vb = shufflevector <vscale x 4 x i8> %elt.head, <vscale x 4 x i8> poison, <vscale x 4 x i32> zeroinitializer
153 %v = call <vscale x 4 x i8> @llvm.vp.sub.nxv4i8(<vscale x 4 x i8> %va, <vscale x 4 x i8> %vb, <vscale x 4 x i1> %m, i32 %evl)
154 ret <vscale x 4 x i8> %v
157 define <vscale x 4 x i8> @vsub_vx_nxv4i8_unmasked(<vscale x 4 x i8> %va, i8 %b, i32 zeroext %evl) {
158 ; CHECK-LABEL: vsub_vx_nxv4i8_unmasked:
160 ; CHECK-NEXT: vsetvli zero, a1, e8, mf2, ta, ma
161 ; CHECK-NEXT: vsub.vx v8, v8, a0
163 %elt.head = insertelement <vscale x 4 x i8> poison, i8 %b, i32 0
164 %vb = shufflevector <vscale x 4 x i8> %elt.head, <vscale x 4 x i8> poison, <vscale x 4 x i32> zeroinitializer
165 %head = insertelement <vscale x 4 x i1> poison, i1 true, i32 0
166 %m = shufflevector <vscale x 4 x i1> %head, <vscale x 4 x i1> poison, <vscale x 4 x i32> zeroinitializer
167 %v = call <vscale x 4 x i8> @llvm.vp.sub.nxv4i8(<vscale x 4 x i8> %va, <vscale x 4 x i8> %vb, <vscale x 4 x i1> %m, i32 %evl)
168 ret <vscale x 4 x i8> %v
171 declare <vscale x 5 x i8> @llvm.vp.sub.nxv5i8(<vscale x 5 x i8>, <vscale x 5 x i8>, <vscale x 5 x i1>, i32)
173 define <vscale x 5 x i8> @vsub_vv_nxv5i8(<vscale x 5 x i8> %va, <vscale x 5 x i8> %b, <vscale x 5 x i1> %m, i32 zeroext %evl) {
174 ; CHECK-LABEL: vsub_vv_nxv5i8:
176 ; CHECK-NEXT: vsetvli zero, a0, e8, m1, ta, ma
177 ; CHECK-NEXT: vsub.vv v8, v8, v9, v0.t
179 %v = call <vscale x 5 x i8> @llvm.vp.sub.nxv5i8(<vscale x 5 x i8> %va, <vscale x 5 x i8> %b, <vscale x 5 x i1> %m, i32 %evl)
180 ret <vscale x 5 x i8> %v
183 define <vscale x 5 x i8> @vsub_vv_nxv5i8_unmasked(<vscale x 5 x i8> %va, <vscale x 5 x i8> %b, i32 zeroext %evl) {
184 ; CHECK-LABEL: vsub_vv_nxv5i8_unmasked:
186 ; CHECK-NEXT: vsetvli zero, a0, e8, m1, ta, ma
187 ; CHECK-NEXT: vsub.vv v8, v8, v9
189 %head = insertelement <vscale x 5 x i1> poison, i1 true, i32 0
190 %m = shufflevector <vscale x 5 x i1> %head, <vscale x 5 x i1> poison, <vscale x 5 x i32> zeroinitializer
191 %v = call <vscale x 5 x i8> @llvm.vp.sub.nxv5i8(<vscale x 5 x i8> %va, <vscale x 5 x i8> %b, <vscale x 5 x i1> %m, i32 %evl)
192 ret <vscale x 5 x i8> %v
195 define <vscale x 5 x i8> @vsub_vx_nxv5i8(<vscale x 5 x i8> %va, i8 %b, <vscale x 5 x i1> %m, i32 zeroext %evl) {
196 ; CHECK-LABEL: vsub_vx_nxv5i8:
198 ; CHECK-NEXT: vsetvli zero, a1, e8, m1, ta, ma
199 ; CHECK-NEXT: vsub.vx v8, v8, a0, v0.t
201 %elt.head = insertelement <vscale x 5 x i8> poison, i8 %b, i32 0
202 %vb = shufflevector <vscale x 5 x i8> %elt.head, <vscale x 5 x i8> poison, <vscale x 5 x i32> zeroinitializer
203 %v = call <vscale x 5 x i8> @llvm.vp.sub.nxv5i8(<vscale x 5 x i8> %va, <vscale x 5 x i8> %vb, <vscale x 5 x i1> %m, i32 %evl)
204 ret <vscale x 5 x i8> %v
207 define <vscale x 5 x i8> @vsub_vx_nxv5i8_unmasked(<vscale x 5 x i8> %va, i8 %b, i32 zeroext %evl) {
208 ; CHECK-LABEL: vsub_vx_nxv5i8_unmasked:
210 ; CHECK-NEXT: vsetvli zero, a1, e8, m1, ta, ma
211 ; CHECK-NEXT: vsub.vx v8, v8, a0
213 %elt.head = insertelement <vscale x 5 x i8> poison, i8 %b, i32 0
214 %vb = shufflevector <vscale x 5 x i8> %elt.head, <vscale x 5 x i8> poison, <vscale x 5 x i32> zeroinitializer
215 %head = insertelement <vscale x 5 x i1> poison, i1 true, i32 0
216 %m = shufflevector <vscale x 5 x i1> %head, <vscale x 5 x i1> poison, <vscale x 5 x i32> zeroinitializer
217 %v = call <vscale x 5 x i8> @llvm.vp.sub.nxv5i8(<vscale x 5 x i8> %va, <vscale x 5 x i8> %vb, <vscale x 5 x i1> %m, i32 %evl)
218 ret <vscale x 5 x i8> %v
221 declare <vscale x 8 x i8> @llvm.vp.sub.nxv8i8(<vscale x 8 x i8>, <vscale x 8 x i8>, <vscale x 8 x i1>, i32)
223 define <vscale x 8 x i8> @vsub_vv_nxv8i8(<vscale x 8 x i8> %va, <vscale x 8 x i8> %b, <vscale x 8 x i1> %m, i32 zeroext %evl) {
224 ; CHECK-LABEL: vsub_vv_nxv8i8:
226 ; CHECK-NEXT: vsetvli zero, a0, e8, m1, ta, ma
227 ; CHECK-NEXT: vsub.vv v8, v8, v9, v0.t
229 %v = call <vscale x 8 x i8> @llvm.vp.sub.nxv8i8(<vscale x 8 x i8> %va, <vscale x 8 x i8> %b, <vscale x 8 x i1> %m, i32 %evl)
230 ret <vscale x 8 x i8> %v
233 define <vscale x 8 x i8> @vsub_vv_nxv8i8_unmasked(<vscale x 8 x i8> %va, <vscale x 8 x i8> %b, i32 zeroext %evl) {
234 ; CHECK-LABEL: vsub_vv_nxv8i8_unmasked:
236 ; CHECK-NEXT: vsetvli zero, a0, e8, m1, ta, ma
237 ; CHECK-NEXT: vsub.vv v8, v8, v9
239 %head = insertelement <vscale x 8 x i1> poison, i1 true, i32 0
240 %m = shufflevector <vscale x 8 x i1> %head, <vscale x 8 x i1> poison, <vscale x 8 x i32> zeroinitializer
241 %v = call <vscale x 8 x i8> @llvm.vp.sub.nxv8i8(<vscale x 8 x i8> %va, <vscale x 8 x i8> %b, <vscale x 8 x i1> %m, i32 %evl)
242 ret <vscale x 8 x i8> %v
245 define <vscale x 8 x i8> @vsub_vx_nxv8i8(<vscale x 8 x i8> %va, i8 %b, <vscale x 8 x i1> %m, i32 zeroext %evl) {
246 ; CHECK-LABEL: vsub_vx_nxv8i8:
248 ; CHECK-NEXT: vsetvli zero, a1, e8, m1, ta, ma
249 ; CHECK-NEXT: vsub.vx v8, v8, a0, v0.t
251 %elt.head = insertelement <vscale x 8 x i8> poison, i8 %b, i32 0
252 %vb = shufflevector <vscale x 8 x i8> %elt.head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
253 %v = call <vscale x 8 x i8> @llvm.vp.sub.nxv8i8(<vscale x 8 x i8> %va, <vscale x 8 x i8> %vb, <vscale x 8 x i1> %m, i32 %evl)
254 ret <vscale x 8 x i8> %v
257 define <vscale x 8 x i8> @vsub_vx_nxv8i8_unmasked(<vscale x 8 x i8> %va, i8 %b, i32 zeroext %evl) {
258 ; CHECK-LABEL: vsub_vx_nxv8i8_unmasked:
260 ; CHECK-NEXT: vsetvli zero, a1, e8, m1, ta, ma
261 ; CHECK-NEXT: vsub.vx v8, v8, a0
263 %elt.head = insertelement <vscale x 8 x i8> poison, i8 %b, i32 0
264 %vb = shufflevector <vscale x 8 x i8> %elt.head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
265 %head = insertelement <vscale x 8 x i1> poison, i1 true, i32 0
266 %m = shufflevector <vscale x 8 x i1> %head, <vscale x 8 x i1> poison, <vscale x 8 x i32> zeroinitializer
267 %v = call <vscale x 8 x i8> @llvm.vp.sub.nxv8i8(<vscale x 8 x i8> %va, <vscale x 8 x i8> %vb, <vscale x 8 x i1> %m, i32 %evl)
268 ret <vscale x 8 x i8> %v
271 declare <vscale x 16 x i8> @llvm.vp.sub.nxv16i8(<vscale x 16 x i8>, <vscale x 16 x i8>, <vscale x 16 x i1>, i32)
273 define <vscale x 16 x i8> @vsub_vv_nxv16i8(<vscale x 16 x i8> %va, <vscale x 16 x i8> %b, <vscale x 16 x i1> %m, i32 zeroext %evl) {
274 ; CHECK-LABEL: vsub_vv_nxv16i8:
276 ; CHECK-NEXT: vsetvli zero, a0, e8, m2, ta, ma
277 ; CHECK-NEXT: vsub.vv v8, v8, v10, v0.t
279 %v = call <vscale x 16 x i8> @llvm.vp.sub.nxv16i8(<vscale x 16 x i8> %va, <vscale x 16 x i8> %b, <vscale x 16 x i1> %m, i32 %evl)
280 ret <vscale x 16 x i8> %v
283 define <vscale x 16 x i8> @vsub_vv_nxv16i8_unmasked(<vscale x 16 x i8> %va, <vscale x 16 x i8> %b, i32 zeroext %evl) {
284 ; CHECK-LABEL: vsub_vv_nxv16i8_unmasked:
286 ; CHECK-NEXT: vsetvli zero, a0, e8, m2, ta, ma
287 ; CHECK-NEXT: vsub.vv v8, v8, v10
289 %head = insertelement <vscale x 16 x i1> poison, i1 true, i32 0
290 %m = shufflevector <vscale x 16 x i1> %head, <vscale x 16 x i1> poison, <vscale x 16 x i32> zeroinitializer
291 %v = call <vscale x 16 x i8> @llvm.vp.sub.nxv16i8(<vscale x 16 x i8> %va, <vscale x 16 x i8> %b, <vscale x 16 x i1> %m, i32 %evl)
292 ret <vscale x 16 x i8> %v
295 define <vscale x 16 x i8> @vsub_vx_nxv16i8(<vscale x 16 x i8> %va, i8 %b, <vscale x 16 x i1> %m, i32 zeroext %evl) {
296 ; CHECK-LABEL: vsub_vx_nxv16i8:
298 ; CHECK-NEXT: vsetvli zero, a1, e8, m2, ta, ma
299 ; CHECK-NEXT: vsub.vx v8, v8, a0, v0.t
301 %elt.head = insertelement <vscale x 16 x i8> poison, i8 %b, i32 0
302 %vb = shufflevector <vscale x 16 x i8> %elt.head, <vscale x 16 x i8> poison, <vscale x 16 x i32> zeroinitializer
303 %v = call <vscale x 16 x i8> @llvm.vp.sub.nxv16i8(<vscale x 16 x i8> %va, <vscale x 16 x i8> %vb, <vscale x 16 x i1> %m, i32 %evl)
304 ret <vscale x 16 x i8> %v
307 define <vscale x 16 x i8> @vsub_vx_nxv16i8_unmasked(<vscale x 16 x i8> %va, i8 %b, i32 zeroext %evl) {
308 ; CHECK-LABEL: vsub_vx_nxv16i8_unmasked:
310 ; CHECK-NEXT: vsetvli zero, a1, e8, m2, ta, ma
311 ; CHECK-NEXT: vsub.vx v8, v8, a0
313 %elt.head = insertelement <vscale x 16 x i8> poison, i8 %b, i32 0
314 %vb = shufflevector <vscale x 16 x i8> %elt.head, <vscale x 16 x i8> poison, <vscale x 16 x i32> zeroinitializer
315 %head = insertelement <vscale x 16 x i1> poison, i1 true, i32 0
316 %m = shufflevector <vscale x 16 x i1> %head, <vscale x 16 x i1> poison, <vscale x 16 x i32> zeroinitializer
317 %v = call <vscale x 16 x i8> @llvm.vp.sub.nxv16i8(<vscale x 16 x i8> %va, <vscale x 16 x i8> %vb, <vscale x 16 x i1> %m, i32 %evl)
318 ret <vscale x 16 x i8> %v
321 declare <vscale x 32 x i8> @llvm.vp.sub.nxv32i8(<vscale x 32 x i8>, <vscale x 32 x i8>, <vscale x 32 x i1>, i32)
323 define <vscale x 32 x i8> @vsub_vv_nxv32i8(<vscale x 32 x i8> %va, <vscale x 32 x i8> %b, <vscale x 32 x i1> %m, i32 zeroext %evl) {
324 ; CHECK-LABEL: vsub_vv_nxv32i8:
326 ; CHECK-NEXT: vsetvli zero, a0, e8, m4, ta, ma
327 ; CHECK-NEXT: vsub.vv v8, v8, v12, v0.t
329 %v = call <vscale x 32 x i8> @llvm.vp.sub.nxv32i8(<vscale x 32 x i8> %va, <vscale x 32 x i8> %b, <vscale x 32 x i1> %m, i32 %evl)
330 ret <vscale x 32 x i8> %v
333 define <vscale x 32 x i8> @vsub_vv_nxv32i8_unmasked(<vscale x 32 x i8> %va, <vscale x 32 x i8> %b, i32 zeroext %evl) {
334 ; CHECK-LABEL: vsub_vv_nxv32i8_unmasked:
336 ; CHECK-NEXT: vsetvli zero, a0, e8, m4, ta, ma
337 ; CHECK-NEXT: vsub.vv v8, v8, v12
339 %head = insertelement <vscale x 32 x i1> poison, i1 true, i32 0
340 %m = shufflevector <vscale x 32 x i1> %head, <vscale x 32 x i1> poison, <vscale x 32 x i32> zeroinitializer
341 %v = call <vscale x 32 x i8> @llvm.vp.sub.nxv32i8(<vscale x 32 x i8> %va, <vscale x 32 x i8> %b, <vscale x 32 x i1> %m, i32 %evl)
342 ret <vscale x 32 x i8> %v
345 define <vscale x 32 x i8> @vsub_vx_nxv32i8(<vscale x 32 x i8> %va, i8 %b, <vscale x 32 x i1> %m, i32 zeroext %evl) {
346 ; CHECK-LABEL: vsub_vx_nxv32i8:
348 ; CHECK-NEXT: vsetvli zero, a1, e8, m4, ta, ma
349 ; CHECK-NEXT: vsub.vx v8, v8, a0, v0.t
351 %elt.head = insertelement <vscale x 32 x i8> poison, i8 %b, i32 0
352 %vb = shufflevector <vscale x 32 x i8> %elt.head, <vscale x 32 x i8> poison, <vscale x 32 x i32> zeroinitializer
353 %v = call <vscale x 32 x i8> @llvm.vp.sub.nxv32i8(<vscale x 32 x i8> %va, <vscale x 32 x i8> %vb, <vscale x 32 x i1> %m, i32 %evl)
354 ret <vscale x 32 x i8> %v
357 define <vscale x 32 x i8> @vsub_vx_nxv32i8_unmasked(<vscale x 32 x i8> %va, i8 %b, i32 zeroext %evl) {
358 ; CHECK-LABEL: vsub_vx_nxv32i8_unmasked:
360 ; CHECK-NEXT: vsetvli zero, a1, e8, m4, ta, ma
361 ; CHECK-NEXT: vsub.vx v8, v8, a0
363 %elt.head = insertelement <vscale x 32 x i8> poison, i8 %b, i32 0
364 %vb = shufflevector <vscale x 32 x i8> %elt.head, <vscale x 32 x i8> poison, <vscale x 32 x i32> zeroinitializer
365 %head = insertelement <vscale x 32 x i1> poison, i1 true, i32 0
366 %m = shufflevector <vscale x 32 x i1> %head, <vscale x 32 x i1> poison, <vscale x 32 x i32> zeroinitializer
367 %v = call <vscale x 32 x i8> @llvm.vp.sub.nxv32i8(<vscale x 32 x i8> %va, <vscale x 32 x i8> %vb, <vscale x 32 x i1> %m, i32 %evl)
368 ret <vscale x 32 x i8> %v
371 declare <vscale x 64 x i8> @llvm.vp.sub.nxv64i8(<vscale x 64 x i8>, <vscale x 64 x i8>, <vscale x 64 x i1>, i32)
373 define <vscale x 64 x i8> @vsub_vv_nxv64i8(<vscale x 64 x i8> %va, <vscale x 64 x i8> %b, <vscale x 64 x i1> %m, i32 zeroext %evl) {
374 ; CHECK-LABEL: vsub_vv_nxv64i8:
376 ; CHECK-NEXT: vsetvli zero, a0, e8, m8, ta, ma
377 ; CHECK-NEXT: vsub.vv v8, v8, v16, v0.t
379 %v = call <vscale x 64 x i8> @llvm.vp.sub.nxv64i8(<vscale x 64 x i8> %va, <vscale x 64 x i8> %b, <vscale x 64 x i1> %m, i32 %evl)
380 ret <vscale x 64 x i8> %v
383 define <vscale x 64 x i8> @vsub_vv_nxv64i8_unmasked(<vscale x 64 x i8> %va, <vscale x 64 x i8> %b, i32 zeroext %evl) {
384 ; CHECK-LABEL: vsub_vv_nxv64i8_unmasked:
386 ; CHECK-NEXT: vsetvli zero, a0, e8, m8, ta, ma
387 ; CHECK-NEXT: vsub.vv v8, v8, v16
389 %head = insertelement <vscale x 64 x i1> poison, i1 true, i32 0
390 %m = shufflevector <vscale x 64 x i1> %head, <vscale x 64 x i1> poison, <vscale x 64 x i32> zeroinitializer
391 %v = call <vscale x 64 x i8> @llvm.vp.sub.nxv64i8(<vscale x 64 x i8> %va, <vscale x 64 x i8> %b, <vscale x 64 x i1> %m, i32 %evl)
392 ret <vscale x 64 x i8> %v
395 define <vscale x 64 x i8> @vsub_vx_nxv64i8(<vscale x 64 x i8> %va, i8 %b, <vscale x 64 x i1> %m, i32 zeroext %evl) {
396 ; CHECK-LABEL: vsub_vx_nxv64i8:
398 ; CHECK-NEXT: vsetvli zero, a1, e8, m8, ta, ma
399 ; CHECK-NEXT: vsub.vx v8, v8, a0, v0.t
401 %elt.head = insertelement <vscale x 64 x i8> poison, i8 %b, i32 0
402 %vb = shufflevector <vscale x 64 x i8> %elt.head, <vscale x 64 x i8> poison, <vscale x 64 x i32> zeroinitializer
403 %v = call <vscale x 64 x i8> @llvm.vp.sub.nxv64i8(<vscale x 64 x i8> %va, <vscale x 64 x i8> %vb, <vscale x 64 x i1> %m, i32 %evl)
404 ret <vscale x 64 x i8> %v
407 define <vscale x 64 x i8> @vsub_vx_nxv64i8_unmasked(<vscale x 64 x i8> %va, i8 %b, i32 zeroext %evl) {
408 ; CHECK-LABEL: vsub_vx_nxv64i8_unmasked:
410 ; CHECK-NEXT: vsetvli zero, a1, e8, m8, ta, ma
411 ; CHECK-NEXT: vsub.vx v8, v8, a0
413 %elt.head = insertelement <vscale x 64 x i8> poison, i8 %b, i32 0
414 %vb = shufflevector <vscale x 64 x i8> %elt.head, <vscale x 64 x i8> poison, <vscale x 64 x i32> zeroinitializer
415 %head = insertelement <vscale x 64 x i1> poison, i1 true, i32 0
416 %m = shufflevector <vscale x 64 x i1> %head, <vscale x 64 x i1> poison, <vscale x 64 x i32> zeroinitializer
417 %v = call <vscale x 64 x i8> @llvm.vp.sub.nxv64i8(<vscale x 64 x i8> %va, <vscale x 64 x i8> %vb, <vscale x 64 x i1> %m, i32 %evl)
418 ret <vscale x 64 x i8> %v
421 declare <vscale x 1 x i16> @llvm.vp.sub.nxv1i16(<vscale x 1 x i16>, <vscale x 1 x i16>, <vscale x 1 x i1>, i32)
423 define <vscale x 1 x i16> @vsub_vv_nxv1i16(<vscale x 1 x i16> %va, <vscale x 1 x i16> %b, <vscale x 1 x i1> %m, i32 zeroext %evl) {
424 ; CHECK-LABEL: vsub_vv_nxv1i16:
426 ; CHECK-NEXT: vsetvli zero, a0, e16, mf4, ta, ma
427 ; CHECK-NEXT: vsub.vv v8, v8, v9, v0.t
429 %v = call <vscale x 1 x i16> @llvm.vp.sub.nxv1i16(<vscale x 1 x i16> %va, <vscale x 1 x i16> %b, <vscale x 1 x i1> %m, i32 %evl)
430 ret <vscale x 1 x i16> %v
433 define <vscale x 1 x i16> @vsub_vv_nxv1i16_unmasked(<vscale x 1 x i16> %va, <vscale x 1 x i16> %b, i32 zeroext %evl) {
434 ; CHECK-LABEL: vsub_vv_nxv1i16_unmasked:
436 ; CHECK-NEXT: vsetvli zero, a0, e16, mf4, ta, ma
437 ; CHECK-NEXT: vsub.vv v8, v8, v9
439 %head = insertelement <vscale x 1 x i1> poison, i1 true, i32 0
440 %m = shufflevector <vscale x 1 x i1> %head, <vscale x 1 x i1> poison, <vscale x 1 x i32> zeroinitializer
441 %v = call <vscale x 1 x i16> @llvm.vp.sub.nxv1i16(<vscale x 1 x i16> %va, <vscale x 1 x i16> %b, <vscale x 1 x i1> %m, i32 %evl)
442 ret <vscale x 1 x i16> %v
445 define <vscale x 1 x i16> @vsub_vx_nxv1i16(<vscale x 1 x i16> %va, i16 %b, <vscale x 1 x i1> %m, i32 zeroext %evl) {
446 ; CHECK-LABEL: vsub_vx_nxv1i16:
448 ; CHECK-NEXT: vsetvli zero, a1, e16, mf4, ta, ma
449 ; CHECK-NEXT: vsub.vx v8, v8, a0, v0.t
451 %elt.head = insertelement <vscale x 1 x i16> poison, i16 %b, i32 0
452 %vb = shufflevector <vscale x 1 x i16> %elt.head, <vscale x 1 x i16> poison, <vscale x 1 x i32> zeroinitializer
453 %v = call <vscale x 1 x i16> @llvm.vp.sub.nxv1i16(<vscale x 1 x i16> %va, <vscale x 1 x i16> %vb, <vscale x 1 x i1> %m, i32 %evl)
454 ret <vscale x 1 x i16> %v
457 define <vscale x 1 x i16> @vsub_vx_nxv1i16_unmasked(<vscale x 1 x i16> %va, i16 %b, i32 zeroext %evl) {
458 ; CHECK-LABEL: vsub_vx_nxv1i16_unmasked:
460 ; CHECK-NEXT: vsetvli zero, a1, e16, mf4, ta, ma
461 ; CHECK-NEXT: vsub.vx v8, v8, a0
463 %elt.head = insertelement <vscale x 1 x i16> poison, i16 %b, i32 0
464 %vb = shufflevector <vscale x 1 x i16> %elt.head, <vscale x 1 x i16> poison, <vscale x 1 x i32> zeroinitializer
465 %head = insertelement <vscale x 1 x i1> poison, i1 true, i32 0
466 %m = shufflevector <vscale x 1 x i1> %head, <vscale x 1 x i1> poison, <vscale x 1 x i32> zeroinitializer
467 %v = call <vscale x 1 x i16> @llvm.vp.sub.nxv1i16(<vscale x 1 x i16> %va, <vscale x 1 x i16> %vb, <vscale x 1 x i1> %m, i32 %evl)
468 ret <vscale x 1 x i16> %v
471 declare <vscale x 2 x i16> @llvm.vp.sub.nxv2i16(<vscale x 2 x i16>, <vscale x 2 x i16>, <vscale x 2 x i1>, i32)
473 define <vscale x 2 x i16> @vsub_vv_nxv2i16(<vscale x 2 x i16> %va, <vscale x 2 x i16> %b, <vscale x 2 x i1> %m, i32 zeroext %evl) {
474 ; CHECK-LABEL: vsub_vv_nxv2i16:
476 ; CHECK-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
477 ; CHECK-NEXT: vsub.vv v8, v8, v9, v0.t
479 %v = call <vscale x 2 x i16> @llvm.vp.sub.nxv2i16(<vscale x 2 x i16> %va, <vscale x 2 x i16> %b, <vscale x 2 x i1> %m, i32 %evl)
480 ret <vscale x 2 x i16> %v
483 define <vscale x 2 x i16> @vsub_vv_nxv2i16_unmasked(<vscale x 2 x i16> %va, <vscale x 2 x i16> %b, i32 zeroext %evl) {
484 ; CHECK-LABEL: vsub_vv_nxv2i16_unmasked:
486 ; CHECK-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
487 ; CHECK-NEXT: vsub.vv v8, v8, v9
489 %head = insertelement <vscale x 2 x i1> poison, i1 true, i32 0
490 %m = shufflevector <vscale x 2 x i1> %head, <vscale x 2 x i1> poison, <vscale x 2 x i32> zeroinitializer
491 %v = call <vscale x 2 x i16> @llvm.vp.sub.nxv2i16(<vscale x 2 x i16> %va, <vscale x 2 x i16> %b, <vscale x 2 x i1> %m, i32 %evl)
492 ret <vscale x 2 x i16> %v
495 define <vscale x 2 x i16> @vsub_vx_nxv2i16(<vscale x 2 x i16> %va, i16 %b, <vscale x 2 x i1> %m, i32 zeroext %evl) {
496 ; CHECK-LABEL: vsub_vx_nxv2i16:
498 ; CHECK-NEXT: vsetvli zero, a1, e16, mf2, ta, ma
499 ; CHECK-NEXT: vsub.vx v8, v8, a0, v0.t
501 %elt.head = insertelement <vscale x 2 x i16> poison, i16 %b, i32 0
502 %vb = shufflevector <vscale x 2 x i16> %elt.head, <vscale x 2 x i16> poison, <vscale x 2 x i32> zeroinitializer
503 %v = call <vscale x 2 x i16> @llvm.vp.sub.nxv2i16(<vscale x 2 x i16> %va, <vscale x 2 x i16> %vb, <vscale x 2 x i1> %m, i32 %evl)
504 ret <vscale x 2 x i16> %v
507 define <vscale x 2 x i16> @vsub_vx_nxv2i16_unmasked(<vscale x 2 x i16> %va, i16 %b, i32 zeroext %evl) {
508 ; CHECK-LABEL: vsub_vx_nxv2i16_unmasked:
510 ; CHECK-NEXT: vsetvli zero, a1, e16, mf2, ta, ma
511 ; CHECK-NEXT: vsub.vx v8, v8, a0
513 %elt.head = insertelement <vscale x 2 x i16> poison, i16 %b, i32 0
514 %vb = shufflevector <vscale x 2 x i16> %elt.head, <vscale x 2 x i16> poison, <vscale x 2 x i32> zeroinitializer
515 %head = insertelement <vscale x 2 x i1> poison, i1 true, i32 0
516 %m = shufflevector <vscale x 2 x i1> %head, <vscale x 2 x i1> poison, <vscale x 2 x i32> zeroinitializer
517 %v = call <vscale x 2 x i16> @llvm.vp.sub.nxv2i16(<vscale x 2 x i16> %va, <vscale x 2 x i16> %vb, <vscale x 2 x i1> %m, i32 %evl)
518 ret <vscale x 2 x i16> %v
521 declare <vscale x 4 x i16> @llvm.vp.sub.nxv4i16(<vscale x 4 x i16>, <vscale x 4 x i16>, <vscale x 4 x i1>, i32)
523 define <vscale x 4 x i16> @vsub_vv_nxv4i16(<vscale x 4 x i16> %va, <vscale x 4 x i16> %b, <vscale x 4 x i1> %m, i32 zeroext %evl) {
524 ; CHECK-LABEL: vsub_vv_nxv4i16:
526 ; CHECK-NEXT: vsetvli zero, a0, e16, m1, ta, ma
527 ; CHECK-NEXT: vsub.vv v8, v8, v9, v0.t
529 %v = call <vscale x 4 x i16> @llvm.vp.sub.nxv4i16(<vscale x 4 x i16> %va, <vscale x 4 x i16> %b, <vscale x 4 x i1> %m, i32 %evl)
530 ret <vscale x 4 x i16> %v
533 define <vscale x 4 x i16> @vsub_vv_nxv4i16_unmasked(<vscale x 4 x i16> %va, <vscale x 4 x i16> %b, i32 zeroext %evl) {
534 ; CHECK-LABEL: vsub_vv_nxv4i16_unmasked:
536 ; CHECK-NEXT: vsetvli zero, a0, e16, m1, ta, ma
537 ; CHECK-NEXT: vsub.vv v8, v8, v9
539 %head = insertelement <vscale x 4 x i1> poison, i1 true, i32 0
540 %m = shufflevector <vscale x 4 x i1> %head, <vscale x 4 x i1> poison, <vscale x 4 x i32> zeroinitializer
541 %v = call <vscale x 4 x i16> @llvm.vp.sub.nxv4i16(<vscale x 4 x i16> %va, <vscale x 4 x i16> %b, <vscale x 4 x i1> %m, i32 %evl)
542 ret <vscale x 4 x i16> %v
545 define <vscale x 4 x i16> @vsub_vx_nxv4i16(<vscale x 4 x i16> %va, i16 %b, <vscale x 4 x i1> %m, i32 zeroext %evl) {
546 ; CHECK-LABEL: vsub_vx_nxv4i16:
548 ; CHECK-NEXT: vsetvli zero, a1, e16, m1, ta, ma
549 ; CHECK-NEXT: vsub.vx v8, v8, a0, v0.t
551 %elt.head = insertelement <vscale x 4 x i16> poison, i16 %b, i32 0
552 %vb = shufflevector <vscale x 4 x i16> %elt.head, <vscale x 4 x i16> poison, <vscale x 4 x i32> zeroinitializer
553 %v = call <vscale x 4 x i16> @llvm.vp.sub.nxv4i16(<vscale x 4 x i16> %va, <vscale x 4 x i16> %vb, <vscale x 4 x i1> %m, i32 %evl)
554 ret <vscale x 4 x i16> %v
557 define <vscale x 4 x i16> @vsub_vx_nxv4i16_unmasked(<vscale x 4 x i16> %va, i16 %b, i32 zeroext %evl) {
558 ; CHECK-LABEL: vsub_vx_nxv4i16_unmasked:
560 ; CHECK-NEXT: vsetvli zero, a1, e16, m1, ta, ma
561 ; CHECK-NEXT: vsub.vx v8, v8, a0
563 %elt.head = insertelement <vscale x 4 x i16> poison, i16 %b, i32 0
564 %vb = shufflevector <vscale x 4 x i16> %elt.head, <vscale x 4 x i16> poison, <vscale x 4 x i32> zeroinitializer
565 %head = insertelement <vscale x 4 x i1> poison, i1 true, i32 0
566 %m = shufflevector <vscale x 4 x i1> %head, <vscale x 4 x i1> poison, <vscale x 4 x i32> zeroinitializer
567 %v = call <vscale x 4 x i16> @llvm.vp.sub.nxv4i16(<vscale x 4 x i16> %va, <vscale x 4 x i16> %vb, <vscale x 4 x i1> %m, i32 %evl)
568 ret <vscale x 4 x i16> %v
571 declare <vscale x 8 x i16> @llvm.vp.sub.nxv8i16(<vscale x 8 x i16>, <vscale x 8 x i16>, <vscale x 8 x i1>, i32)
573 define <vscale x 8 x i16> @vsub_vv_nxv8i16(<vscale x 8 x i16> %va, <vscale x 8 x i16> %b, <vscale x 8 x i1> %m, i32 zeroext %evl) {
574 ; CHECK-LABEL: vsub_vv_nxv8i16:
576 ; CHECK-NEXT: vsetvli zero, a0, e16, m2, ta, ma
577 ; CHECK-NEXT: vsub.vv v8, v8, v10, v0.t
579 %v = call <vscale x 8 x i16> @llvm.vp.sub.nxv8i16(<vscale x 8 x i16> %va, <vscale x 8 x i16> %b, <vscale x 8 x i1> %m, i32 %evl)
580 ret <vscale x 8 x i16> %v
583 define <vscale x 8 x i16> @vsub_vv_nxv8i16_unmasked(<vscale x 8 x i16> %va, <vscale x 8 x i16> %b, i32 zeroext %evl) {
584 ; CHECK-LABEL: vsub_vv_nxv8i16_unmasked:
586 ; CHECK-NEXT: vsetvli zero, a0, e16, m2, ta, ma
587 ; CHECK-NEXT: vsub.vv v8, v8, v10
589 %head = insertelement <vscale x 8 x i1> poison, i1 true, i32 0
590 %m = shufflevector <vscale x 8 x i1> %head, <vscale x 8 x i1> poison, <vscale x 8 x i32> zeroinitializer
591 %v = call <vscale x 8 x i16> @llvm.vp.sub.nxv8i16(<vscale x 8 x i16> %va, <vscale x 8 x i16> %b, <vscale x 8 x i1> %m, i32 %evl)
592 ret <vscale x 8 x i16> %v
595 define <vscale x 8 x i16> @vsub_vx_nxv8i16(<vscale x 8 x i16> %va, i16 %b, <vscale x 8 x i1> %m, i32 zeroext %evl) {
596 ; CHECK-LABEL: vsub_vx_nxv8i16:
598 ; CHECK-NEXT: vsetvli zero, a1, e16, m2, ta, ma
599 ; CHECK-NEXT: vsub.vx v8, v8, a0, v0.t
601 %elt.head = insertelement <vscale x 8 x i16> poison, i16 %b, i32 0
602 %vb = shufflevector <vscale x 8 x i16> %elt.head, <vscale x 8 x i16> poison, <vscale x 8 x i32> zeroinitializer
603 %v = call <vscale x 8 x i16> @llvm.vp.sub.nxv8i16(<vscale x 8 x i16> %va, <vscale x 8 x i16> %vb, <vscale x 8 x i1> %m, i32 %evl)
604 ret <vscale x 8 x i16> %v
607 define <vscale x 8 x i16> @vsub_vx_nxv8i16_unmasked(<vscale x 8 x i16> %va, i16 %b, i32 zeroext %evl) {
608 ; CHECK-LABEL: vsub_vx_nxv8i16_unmasked:
610 ; CHECK-NEXT: vsetvli zero, a1, e16, m2, ta, ma
611 ; CHECK-NEXT: vsub.vx v8, v8, a0
613 %elt.head = insertelement <vscale x 8 x i16> poison, i16 %b, i32 0
614 %vb = shufflevector <vscale x 8 x i16> %elt.head, <vscale x 8 x i16> poison, <vscale x 8 x i32> zeroinitializer
615 %head = insertelement <vscale x 8 x i1> poison, i1 true, i32 0
616 %m = shufflevector <vscale x 8 x i1> %head, <vscale x 8 x i1> poison, <vscale x 8 x i32> zeroinitializer
617 %v = call <vscale x 8 x i16> @llvm.vp.sub.nxv8i16(<vscale x 8 x i16> %va, <vscale x 8 x i16> %vb, <vscale x 8 x i1> %m, i32 %evl)
618 ret <vscale x 8 x i16> %v
621 declare <vscale x 16 x i16> @llvm.vp.sub.nxv16i16(<vscale x 16 x i16>, <vscale x 16 x i16>, <vscale x 16 x i1>, i32)
623 define <vscale x 16 x i16> @vsub_vv_nxv16i16(<vscale x 16 x i16> %va, <vscale x 16 x i16> %b, <vscale x 16 x i1> %m, i32 zeroext %evl) {
624 ; CHECK-LABEL: vsub_vv_nxv16i16:
626 ; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, ma
627 ; CHECK-NEXT: vsub.vv v8, v8, v12, v0.t
629 %v = call <vscale x 16 x i16> @llvm.vp.sub.nxv16i16(<vscale x 16 x i16> %va, <vscale x 16 x i16> %b, <vscale x 16 x i1> %m, i32 %evl)
630 ret <vscale x 16 x i16> %v
633 define <vscale x 16 x i16> @vsub_vv_nxv16i16_unmasked(<vscale x 16 x i16> %va, <vscale x 16 x i16> %b, i32 zeroext %evl) {
634 ; CHECK-LABEL: vsub_vv_nxv16i16_unmasked:
636 ; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, ma
637 ; CHECK-NEXT: vsub.vv v8, v8, v12
639 %head = insertelement <vscale x 16 x i1> poison, i1 true, i32 0
640 %m = shufflevector <vscale x 16 x i1> %head, <vscale x 16 x i1> poison, <vscale x 16 x i32> zeroinitializer
641 %v = call <vscale x 16 x i16> @llvm.vp.sub.nxv16i16(<vscale x 16 x i16> %va, <vscale x 16 x i16> %b, <vscale x 16 x i1> %m, i32 %evl)
642 ret <vscale x 16 x i16> %v
645 define <vscale x 16 x i16> @vsub_vx_nxv16i16(<vscale x 16 x i16> %va, i16 %b, <vscale x 16 x i1> %m, i32 zeroext %evl) {
646 ; CHECK-LABEL: vsub_vx_nxv16i16:
648 ; CHECK-NEXT: vsetvli zero, a1, e16, m4, ta, ma
649 ; CHECK-NEXT: vsub.vx v8, v8, a0, v0.t
651 %elt.head = insertelement <vscale x 16 x i16> poison, i16 %b, i32 0
652 %vb = shufflevector <vscale x 16 x i16> %elt.head, <vscale x 16 x i16> poison, <vscale x 16 x i32> zeroinitializer
653 %v = call <vscale x 16 x i16> @llvm.vp.sub.nxv16i16(<vscale x 16 x i16> %va, <vscale x 16 x i16> %vb, <vscale x 16 x i1> %m, i32 %evl)
654 ret <vscale x 16 x i16> %v
657 define <vscale x 16 x i16> @vsub_vx_nxv16i16_unmasked(<vscale x 16 x i16> %va, i16 %b, i32 zeroext %evl) {
658 ; CHECK-LABEL: vsub_vx_nxv16i16_unmasked:
660 ; CHECK-NEXT: vsetvli zero, a1, e16, m4, ta, ma
661 ; CHECK-NEXT: vsub.vx v8, v8, a0
663 %elt.head = insertelement <vscale x 16 x i16> poison, i16 %b, i32 0
664 %vb = shufflevector <vscale x 16 x i16> %elt.head, <vscale x 16 x i16> poison, <vscale x 16 x i32> zeroinitializer
665 %head = insertelement <vscale x 16 x i1> poison, i1 true, i32 0
666 %m = shufflevector <vscale x 16 x i1> %head, <vscale x 16 x i1> poison, <vscale x 16 x i32> zeroinitializer
667 %v = call <vscale x 16 x i16> @llvm.vp.sub.nxv16i16(<vscale x 16 x i16> %va, <vscale x 16 x i16> %vb, <vscale x 16 x i1> %m, i32 %evl)
668 ret <vscale x 16 x i16> %v
671 declare <vscale x 32 x i16> @llvm.vp.sub.nxv32i16(<vscale x 32 x i16>, <vscale x 32 x i16>, <vscale x 32 x i1>, i32)
673 define <vscale x 32 x i16> @vsub_vv_nxv32i16(<vscale x 32 x i16> %va, <vscale x 32 x i16> %b, <vscale x 32 x i1> %m, i32 zeroext %evl) {
674 ; CHECK-LABEL: vsub_vv_nxv32i16:
676 ; CHECK-NEXT: vsetvli zero, a0, e16, m8, ta, ma
677 ; CHECK-NEXT: vsub.vv v8, v8, v16, v0.t
679 %v = call <vscale x 32 x i16> @llvm.vp.sub.nxv32i16(<vscale x 32 x i16> %va, <vscale x 32 x i16> %b, <vscale x 32 x i1> %m, i32 %evl)
680 ret <vscale x 32 x i16> %v
683 define <vscale x 32 x i16> @vsub_vv_nxv32i16_unmasked(<vscale x 32 x i16> %va, <vscale x 32 x i16> %b, i32 zeroext %evl) {
684 ; CHECK-LABEL: vsub_vv_nxv32i16_unmasked:
686 ; CHECK-NEXT: vsetvli zero, a0, e16, m8, ta, ma
687 ; CHECK-NEXT: vsub.vv v8, v8, v16
689 %head = insertelement <vscale x 32 x i1> poison, i1 true, i32 0
690 %m = shufflevector <vscale x 32 x i1> %head, <vscale x 32 x i1> poison, <vscale x 32 x i32> zeroinitializer
691 %v = call <vscale x 32 x i16> @llvm.vp.sub.nxv32i16(<vscale x 32 x i16> %va, <vscale x 32 x i16> %b, <vscale x 32 x i1> %m, i32 %evl)
692 ret <vscale x 32 x i16> %v
695 define <vscale x 32 x i16> @vsub_vx_nxv32i16(<vscale x 32 x i16> %va, i16 %b, <vscale x 32 x i1> %m, i32 zeroext %evl) {
696 ; CHECK-LABEL: vsub_vx_nxv32i16:
698 ; CHECK-NEXT: vsetvli zero, a1, e16, m8, ta, ma
699 ; CHECK-NEXT: vsub.vx v8, v8, a0, v0.t
701 %elt.head = insertelement <vscale x 32 x i16> poison, i16 %b, i32 0
702 %vb = shufflevector <vscale x 32 x i16> %elt.head, <vscale x 32 x i16> poison, <vscale x 32 x i32> zeroinitializer
703 %v = call <vscale x 32 x i16> @llvm.vp.sub.nxv32i16(<vscale x 32 x i16> %va, <vscale x 32 x i16> %vb, <vscale x 32 x i1> %m, i32 %evl)
704 ret <vscale x 32 x i16> %v
707 define <vscale x 32 x i16> @vsub_vx_nxv32i16_unmasked(<vscale x 32 x i16> %va, i16 %b, i32 zeroext %evl) {
708 ; CHECK-LABEL: vsub_vx_nxv32i16_unmasked:
710 ; CHECK-NEXT: vsetvli zero, a1, e16, m8, ta, ma
711 ; CHECK-NEXT: vsub.vx v8, v8, a0
713 %elt.head = insertelement <vscale x 32 x i16> poison, i16 %b, i32 0
714 %vb = shufflevector <vscale x 32 x i16> %elt.head, <vscale x 32 x i16> poison, <vscale x 32 x i32> zeroinitializer
715 %head = insertelement <vscale x 32 x i1> poison, i1 true, i32 0
716 %m = shufflevector <vscale x 32 x i1> %head, <vscale x 32 x i1> poison, <vscale x 32 x i32> zeroinitializer
717 %v = call <vscale x 32 x i16> @llvm.vp.sub.nxv32i16(<vscale x 32 x i16> %va, <vscale x 32 x i16> %vb, <vscale x 32 x i1> %m, i32 %evl)
718 ret <vscale x 32 x i16> %v
721 declare <vscale x 1 x i32> @llvm.vp.sub.nxv1i32(<vscale x 1 x i32>, <vscale x 1 x i32>, <vscale x 1 x i1>, i32)
723 define <vscale x 1 x i32> @vsub_vv_nxv1i32(<vscale x 1 x i32> %va, <vscale x 1 x i32> %b, <vscale x 1 x i1> %m, i32 zeroext %evl) {
724 ; CHECK-LABEL: vsub_vv_nxv1i32:
726 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
727 ; CHECK-NEXT: vsub.vv v8, v8, v9, v0.t
729 %v = call <vscale x 1 x i32> @llvm.vp.sub.nxv1i32(<vscale x 1 x i32> %va, <vscale x 1 x i32> %b, <vscale x 1 x i1> %m, i32 %evl)
730 ret <vscale x 1 x i32> %v
733 define <vscale x 1 x i32> @vsub_vv_nxv1i32_unmasked(<vscale x 1 x i32> %va, <vscale x 1 x i32> %b, i32 zeroext %evl) {
734 ; CHECK-LABEL: vsub_vv_nxv1i32_unmasked:
736 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
737 ; CHECK-NEXT: vsub.vv v8, v8, v9
739 %head = insertelement <vscale x 1 x i1> poison, i1 true, i32 0
740 %m = shufflevector <vscale x 1 x i1> %head, <vscale x 1 x i1> poison, <vscale x 1 x i32> zeroinitializer
741 %v = call <vscale x 1 x i32> @llvm.vp.sub.nxv1i32(<vscale x 1 x i32> %va, <vscale x 1 x i32> %b, <vscale x 1 x i1> %m, i32 %evl)
742 ret <vscale x 1 x i32> %v
745 define <vscale x 1 x i32> @vsub_vx_nxv1i32(<vscale x 1 x i32> %va, i32 %b, <vscale x 1 x i1> %m, i32 zeroext %evl) {
746 ; CHECK-LABEL: vsub_vx_nxv1i32:
748 ; CHECK-NEXT: vsetvli zero, a1, e32, mf2, ta, ma
749 ; CHECK-NEXT: vsub.vx v8, v8, a0, v0.t
751 %elt.head = insertelement <vscale x 1 x i32> poison, i32 %b, i32 0
752 %vb = shufflevector <vscale x 1 x i32> %elt.head, <vscale x 1 x i32> poison, <vscale x 1 x i32> zeroinitializer
753 %v = call <vscale x 1 x i32> @llvm.vp.sub.nxv1i32(<vscale x 1 x i32> %va, <vscale x 1 x i32> %vb, <vscale x 1 x i1> %m, i32 %evl)
754 ret <vscale x 1 x i32> %v
757 define <vscale x 1 x i32> @vsub_vx_nxv1i32_unmasked(<vscale x 1 x i32> %va, i32 %b, i32 zeroext %evl) {
758 ; CHECK-LABEL: vsub_vx_nxv1i32_unmasked:
760 ; CHECK-NEXT: vsetvli zero, a1, e32, mf2, ta, ma
761 ; CHECK-NEXT: vsub.vx v8, v8, a0
763 %elt.head = insertelement <vscale x 1 x i32> poison, i32 %b, i32 0
764 %vb = shufflevector <vscale x 1 x i32> %elt.head, <vscale x 1 x i32> poison, <vscale x 1 x i32> zeroinitializer
765 %head = insertelement <vscale x 1 x i1> poison, i1 true, i32 0
766 %m = shufflevector <vscale x 1 x i1> %head, <vscale x 1 x i1> poison, <vscale x 1 x i32> zeroinitializer
767 %v = call <vscale x 1 x i32> @llvm.vp.sub.nxv1i32(<vscale x 1 x i32> %va, <vscale x 1 x i32> %vb, <vscale x 1 x i1> %m, i32 %evl)
768 ret <vscale x 1 x i32> %v
771 declare <vscale x 2 x i32> @llvm.vp.sub.nxv2i32(<vscale x 2 x i32>, <vscale x 2 x i32>, <vscale x 2 x i1>, i32)
773 define <vscale x 2 x i32> @vsub_vv_nxv2i32(<vscale x 2 x i32> %va, <vscale x 2 x i32> %b, <vscale x 2 x i1> %m, i32 zeroext %evl) {
774 ; CHECK-LABEL: vsub_vv_nxv2i32:
776 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, ma
777 ; CHECK-NEXT: vsub.vv v8, v8, v9, v0.t
779 %v = call <vscale x 2 x i32> @llvm.vp.sub.nxv2i32(<vscale x 2 x i32> %va, <vscale x 2 x i32> %b, <vscale x 2 x i1> %m, i32 %evl)
780 ret <vscale x 2 x i32> %v
783 define <vscale x 2 x i32> @vsub_vv_nxv2i32_unmasked(<vscale x 2 x i32> %va, <vscale x 2 x i32> %b, i32 zeroext %evl) {
784 ; CHECK-LABEL: vsub_vv_nxv2i32_unmasked:
786 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, ma
787 ; CHECK-NEXT: vsub.vv v8, v8, v9
789 %head = insertelement <vscale x 2 x i1> poison, i1 true, i32 0
790 %m = shufflevector <vscale x 2 x i1> %head, <vscale x 2 x i1> poison, <vscale x 2 x i32> zeroinitializer
791 %v = call <vscale x 2 x i32> @llvm.vp.sub.nxv2i32(<vscale x 2 x i32> %va, <vscale x 2 x i32> %b, <vscale x 2 x i1> %m, i32 %evl)
792 ret <vscale x 2 x i32> %v
795 define <vscale x 2 x i32> @vsub_vx_nxv2i32(<vscale x 2 x i32> %va, i32 %b, <vscale x 2 x i1> %m, i32 zeroext %evl) {
796 ; CHECK-LABEL: vsub_vx_nxv2i32:
798 ; CHECK-NEXT: vsetvli zero, a1, e32, m1, ta, ma
799 ; CHECK-NEXT: vsub.vx v8, v8, a0, v0.t
801 %elt.head = insertelement <vscale x 2 x i32> poison, i32 %b, i32 0
802 %vb = shufflevector <vscale x 2 x i32> %elt.head, <vscale x 2 x i32> poison, <vscale x 2 x i32> zeroinitializer
803 %v = call <vscale x 2 x i32> @llvm.vp.sub.nxv2i32(<vscale x 2 x i32> %va, <vscale x 2 x i32> %vb, <vscale x 2 x i1> %m, i32 %evl)
804 ret <vscale x 2 x i32> %v
807 define <vscale x 2 x i32> @vsub_vx_nxv2i32_unmasked(<vscale x 2 x i32> %va, i32 %b, i32 zeroext %evl) {
808 ; CHECK-LABEL: vsub_vx_nxv2i32_unmasked:
810 ; CHECK-NEXT: vsetvli zero, a1, e32, m1, ta, ma
811 ; CHECK-NEXT: vsub.vx v8, v8, a0
813 %elt.head = insertelement <vscale x 2 x i32> poison, i32 %b, i32 0
814 %vb = shufflevector <vscale x 2 x i32> %elt.head, <vscale x 2 x i32> poison, <vscale x 2 x i32> zeroinitializer
815 %head = insertelement <vscale x 2 x i1> poison, i1 true, i32 0
816 %m = shufflevector <vscale x 2 x i1> %head, <vscale x 2 x i1> poison, <vscale x 2 x i32> zeroinitializer
817 %v = call <vscale x 2 x i32> @llvm.vp.sub.nxv2i32(<vscale x 2 x i32> %va, <vscale x 2 x i32> %vb, <vscale x 2 x i1> %m, i32 %evl)
818 ret <vscale x 2 x i32> %v
821 declare <vscale x 4 x i32> @llvm.vp.sub.nxv4i32(<vscale x 4 x i32>, <vscale x 4 x i32>, <vscale x 4 x i1>, i32)
823 define <vscale x 4 x i32> @vsub_vv_nxv4i32(<vscale x 4 x i32> %va, <vscale x 4 x i32> %b, <vscale x 4 x i1> %m, i32 zeroext %evl) {
824 ; CHECK-LABEL: vsub_vv_nxv4i32:
826 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
827 ; CHECK-NEXT: vsub.vv v8, v8, v10, v0.t
829 %v = call <vscale x 4 x i32> @llvm.vp.sub.nxv4i32(<vscale x 4 x i32> %va, <vscale x 4 x i32> %b, <vscale x 4 x i1> %m, i32 %evl)
830 ret <vscale x 4 x i32> %v
833 define <vscale x 4 x i32> @vsub_vv_nxv4i32_unmasked(<vscale x 4 x i32> %va, <vscale x 4 x i32> %b, i32 zeroext %evl) {
834 ; CHECK-LABEL: vsub_vv_nxv4i32_unmasked:
836 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
837 ; CHECK-NEXT: vsub.vv v8, v8, v10
839 %head = insertelement <vscale x 4 x i1> poison, i1 true, i32 0
840 %m = shufflevector <vscale x 4 x i1> %head, <vscale x 4 x i1> poison, <vscale x 4 x i32> zeroinitializer
841 %v = call <vscale x 4 x i32> @llvm.vp.sub.nxv4i32(<vscale x 4 x i32> %va, <vscale x 4 x i32> %b, <vscale x 4 x i1> %m, i32 %evl)
842 ret <vscale x 4 x i32> %v
845 define <vscale x 4 x i32> @vsub_vx_nxv4i32(<vscale x 4 x i32> %va, i32 %b, <vscale x 4 x i1> %m, i32 zeroext %evl) {
846 ; CHECK-LABEL: vsub_vx_nxv4i32:
848 ; CHECK-NEXT: vsetvli zero, a1, e32, m2, ta, ma
849 ; CHECK-NEXT: vsub.vx v8, v8, a0, v0.t
851 %elt.head = insertelement <vscale x 4 x i32> poison, i32 %b, i32 0
852 %vb = shufflevector <vscale x 4 x i32> %elt.head, <vscale x 4 x i32> poison, <vscale x 4 x i32> zeroinitializer
853 %v = call <vscale x 4 x i32> @llvm.vp.sub.nxv4i32(<vscale x 4 x i32> %va, <vscale x 4 x i32> %vb, <vscale x 4 x i1> %m, i32 %evl)
854 ret <vscale x 4 x i32> %v
857 define <vscale x 4 x i32> @vsub_vx_nxv4i32_unmasked(<vscale x 4 x i32> %va, i32 %b, i32 zeroext %evl) {
858 ; CHECK-LABEL: vsub_vx_nxv4i32_unmasked:
860 ; CHECK-NEXT: vsetvli zero, a1, e32, m2, ta, ma
861 ; CHECK-NEXT: vsub.vx v8, v8, a0
863 %elt.head = insertelement <vscale x 4 x i32> poison, i32 %b, i32 0
864 %vb = shufflevector <vscale x 4 x i32> %elt.head, <vscale x 4 x i32> poison, <vscale x 4 x i32> zeroinitializer
865 %head = insertelement <vscale x 4 x i1> poison, i1 true, i32 0
866 %m = shufflevector <vscale x 4 x i1> %head, <vscale x 4 x i1> poison, <vscale x 4 x i32> zeroinitializer
867 %v = call <vscale x 4 x i32> @llvm.vp.sub.nxv4i32(<vscale x 4 x i32> %va, <vscale x 4 x i32> %vb, <vscale x 4 x i1> %m, i32 %evl)
868 ret <vscale x 4 x i32> %v
871 declare <vscale x 8 x i32> @llvm.vp.sub.nxv8i32(<vscale x 8 x i32>, <vscale x 8 x i32>, <vscale x 8 x i1>, i32)
873 define <vscale x 8 x i32> @vsub_vv_nxv8i32(<vscale x 8 x i32> %va, <vscale x 8 x i32> %b, <vscale x 8 x i1> %m, i32 zeroext %evl) {
874 ; CHECK-LABEL: vsub_vv_nxv8i32:
876 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
877 ; CHECK-NEXT: vsub.vv v8, v8, v12, v0.t
879 %v = call <vscale x 8 x i32> @llvm.vp.sub.nxv8i32(<vscale x 8 x i32> %va, <vscale x 8 x i32> %b, <vscale x 8 x i1> %m, i32 %evl)
880 ret <vscale x 8 x i32> %v
883 define <vscale x 8 x i32> @vsub_vv_nxv8i32_unmasked(<vscale x 8 x i32> %va, <vscale x 8 x i32> %b, i32 zeroext %evl) {
884 ; CHECK-LABEL: vsub_vv_nxv8i32_unmasked:
886 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
887 ; CHECK-NEXT: vsub.vv v8, v8, v12
889 %head = insertelement <vscale x 8 x i1> poison, i1 true, i32 0
890 %m = shufflevector <vscale x 8 x i1> %head, <vscale x 8 x i1> poison, <vscale x 8 x i32> zeroinitializer
891 %v = call <vscale x 8 x i32> @llvm.vp.sub.nxv8i32(<vscale x 8 x i32> %va, <vscale x 8 x i32> %b, <vscale x 8 x i1> %m, i32 %evl)
892 ret <vscale x 8 x i32> %v
895 define <vscale x 8 x i32> @vsub_vx_nxv8i32(<vscale x 8 x i32> %va, i32 %b, <vscale x 8 x i1> %m, i32 zeroext %evl) {
896 ; CHECK-LABEL: vsub_vx_nxv8i32:
898 ; CHECK-NEXT: vsetvli zero, a1, e32, m4, ta, ma
899 ; CHECK-NEXT: vsub.vx v8, v8, a0, v0.t
901 %elt.head = insertelement <vscale x 8 x i32> poison, i32 %b, i32 0
902 %vb = shufflevector <vscale x 8 x i32> %elt.head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
903 %v = call <vscale x 8 x i32> @llvm.vp.sub.nxv8i32(<vscale x 8 x i32> %va, <vscale x 8 x i32> %vb, <vscale x 8 x i1> %m, i32 %evl)
904 ret <vscale x 8 x i32> %v
907 define <vscale x 8 x i32> @vsub_vx_nxv8i32_unmasked(<vscale x 8 x i32> %va, i32 %b, i32 zeroext %evl) {
908 ; CHECK-LABEL: vsub_vx_nxv8i32_unmasked:
910 ; CHECK-NEXT: vsetvli zero, a1, e32, m4, ta, ma
911 ; CHECK-NEXT: vsub.vx v8, v8, a0
913 %elt.head = insertelement <vscale x 8 x i32> poison, i32 %b, i32 0
914 %vb = shufflevector <vscale x 8 x i32> %elt.head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
915 %head = insertelement <vscale x 8 x i1> poison, i1 true, i32 0
916 %m = shufflevector <vscale x 8 x i1> %head, <vscale x 8 x i1> poison, <vscale x 8 x i32> zeroinitializer
917 %v = call <vscale x 8 x i32> @llvm.vp.sub.nxv8i32(<vscale x 8 x i32> %va, <vscale x 8 x i32> %vb, <vscale x 8 x i1> %m, i32 %evl)
918 ret <vscale x 8 x i32> %v
921 declare <vscale x 16 x i32> @llvm.vp.sub.nxv16i32(<vscale x 16 x i32>, <vscale x 16 x i32>, <vscale x 16 x i1>, i32)
923 define <vscale x 16 x i32> @vsub_vv_nxv16i32(<vscale x 16 x i32> %va, <vscale x 16 x i32> %b, <vscale x 16 x i1> %m, i32 zeroext %evl) {
924 ; CHECK-LABEL: vsub_vv_nxv16i32:
926 ; CHECK-NEXT: vsetvli zero, a0, e32, m8, ta, ma
927 ; CHECK-NEXT: vsub.vv v8, v8, v16, v0.t
929 %v = call <vscale x 16 x i32> @llvm.vp.sub.nxv16i32(<vscale x 16 x i32> %va, <vscale x 16 x i32> %b, <vscale x 16 x i1> %m, i32 %evl)
930 ret <vscale x 16 x i32> %v
933 define <vscale x 16 x i32> @vsub_vv_nxv16i32_unmasked(<vscale x 16 x i32> %va, <vscale x 16 x i32> %b, i32 zeroext %evl) {
934 ; CHECK-LABEL: vsub_vv_nxv16i32_unmasked:
936 ; CHECK-NEXT: vsetvli zero, a0, e32, m8, ta, ma
937 ; CHECK-NEXT: vsub.vv v8, v8, v16
939 %head = insertelement <vscale x 16 x i1> poison, i1 true, i32 0
940 %m = shufflevector <vscale x 16 x i1> %head, <vscale x 16 x i1> poison, <vscale x 16 x i32> zeroinitializer
941 %v = call <vscale x 16 x i32> @llvm.vp.sub.nxv16i32(<vscale x 16 x i32> %va, <vscale x 16 x i32> %b, <vscale x 16 x i1> %m, i32 %evl)
942 ret <vscale x 16 x i32> %v
945 define <vscale x 16 x i32> @vsub_vx_nxv16i32(<vscale x 16 x i32> %va, i32 %b, <vscale x 16 x i1> %m, i32 zeroext %evl) {
946 ; CHECK-LABEL: vsub_vx_nxv16i32:
948 ; CHECK-NEXT: vsetvli zero, a1, e32, m8, ta, ma
949 ; CHECK-NEXT: vsub.vx v8, v8, a0, v0.t
951 %elt.head = insertelement <vscale x 16 x i32> poison, i32 %b, i32 0
952 %vb = shufflevector <vscale x 16 x i32> %elt.head, <vscale x 16 x i32> poison, <vscale x 16 x i32> zeroinitializer
953 %v = call <vscale x 16 x i32> @llvm.vp.sub.nxv16i32(<vscale x 16 x i32> %va, <vscale x 16 x i32> %vb, <vscale x 16 x i1> %m, i32 %evl)
954 ret <vscale x 16 x i32> %v
957 define <vscale x 16 x i32> @vsub_vx_nxv16i32_unmasked(<vscale x 16 x i32> %va, i32 %b, i32 zeroext %evl) {
958 ; CHECK-LABEL: vsub_vx_nxv16i32_unmasked:
960 ; CHECK-NEXT: vsetvli zero, a1, e32, m8, ta, ma
961 ; CHECK-NEXT: vsub.vx v8, v8, a0
963 %elt.head = insertelement <vscale x 16 x i32> poison, i32 %b, i32 0
964 %vb = shufflevector <vscale x 16 x i32> %elt.head, <vscale x 16 x i32> poison, <vscale x 16 x i32> zeroinitializer
965 %head = insertelement <vscale x 16 x i1> poison, i1 true, i32 0
966 %m = shufflevector <vscale x 16 x i1> %head, <vscale x 16 x i1> poison, <vscale x 16 x i32> zeroinitializer
967 %v = call <vscale x 16 x i32> @llvm.vp.sub.nxv16i32(<vscale x 16 x i32> %va, <vscale x 16 x i32> %vb, <vscale x 16 x i1> %m, i32 %evl)
968 ret <vscale x 16 x i32> %v
971 declare <vscale x 1 x i64> @llvm.vp.sub.nxv1i64(<vscale x 1 x i64>, <vscale x 1 x i64>, <vscale x 1 x i1>, i32)
973 define <vscale x 1 x i64> @vsub_vv_nxv1i64(<vscale x 1 x i64> %va, <vscale x 1 x i64> %b, <vscale x 1 x i1> %m, i32 zeroext %evl) {
974 ; CHECK-LABEL: vsub_vv_nxv1i64:
976 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
977 ; CHECK-NEXT: vsub.vv v8, v8, v9, v0.t
979 %v = call <vscale x 1 x i64> @llvm.vp.sub.nxv1i64(<vscale x 1 x i64> %va, <vscale x 1 x i64> %b, <vscale x 1 x i1> %m, i32 %evl)
980 ret <vscale x 1 x i64> %v
983 define <vscale x 1 x i64> @vsub_vv_nxv1i64_unmasked(<vscale x 1 x i64> %va, <vscale x 1 x i64> %b, i32 zeroext %evl) {
984 ; CHECK-LABEL: vsub_vv_nxv1i64_unmasked:
986 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
987 ; CHECK-NEXT: vsub.vv v8, v8, v9
989 %head = insertelement <vscale x 1 x i1> poison, i1 true, i32 0
990 %m = shufflevector <vscale x 1 x i1> %head, <vscale x 1 x i1> poison, <vscale x 1 x i32> zeroinitializer
991 %v = call <vscale x 1 x i64> @llvm.vp.sub.nxv1i64(<vscale x 1 x i64> %va, <vscale x 1 x i64> %b, <vscale x 1 x i1> %m, i32 %evl)
992 ret <vscale x 1 x i64> %v
995 define <vscale x 1 x i64> @vsub_vx_nxv1i64(<vscale x 1 x i64> %va, i64 %b, <vscale x 1 x i1> %m, i32 zeroext %evl) {
996 ; RV32-LABEL: vsub_vx_nxv1i64:
998 ; RV32-NEXT: addi sp, sp, -16
999 ; RV32-NEXT: .cfi_def_cfa_offset 16
1000 ; RV32-NEXT: sw a1, 12(sp)
1001 ; RV32-NEXT: sw a0, 8(sp)
1002 ; RV32-NEXT: addi a0, sp, 8
1003 ; RV32-NEXT: vsetvli a1, zero, e64, m1, ta, ma
1004 ; RV32-NEXT: vlse64.v v9, (a0), zero
1005 ; RV32-NEXT: vsetvli zero, a2, e64, m1, ta, ma
1006 ; RV32-NEXT: vsub.vv v8, v8, v9, v0.t
1007 ; RV32-NEXT: addi sp, sp, 16
1010 ; RV64-LABEL: vsub_vx_nxv1i64:
1012 ; RV64-NEXT: vsetvli zero, a1, e64, m1, ta, ma
1013 ; RV64-NEXT: vsub.vx v8, v8, a0, v0.t
1015 %elt.head = insertelement <vscale x 1 x i64> poison, i64 %b, i32 0
1016 %vb = shufflevector <vscale x 1 x i64> %elt.head, <vscale x 1 x i64> poison, <vscale x 1 x i32> zeroinitializer
1017 %v = call <vscale x 1 x i64> @llvm.vp.sub.nxv1i64(<vscale x 1 x i64> %va, <vscale x 1 x i64> %vb, <vscale x 1 x i1> %m, i32 %evl)
1018 ret <vscale x 1 x i64> %v
1021 define <vscale x 1 x i64> @vsub_vx_nxv1i64_unmasked(<vscale x 1 x i64> %va, i64 %b, i32 zeroext %evl) {
1022 ; RV32-LABEL: vsub_vx_nxv1i64_unmasked:
1024 ; RV32-NEXT: addi sp, sp, -16
1025 ; RV32-NEXT: .cfi_def_cfa_offset 16
1026 ; RV32-NEXT: sw a1, 12(sp)
1027 ; RV32-NEXT: sw a0, 8(sp)
1028 ; RV32-NEXT: addi a0, sp, 8
1029 ; RV32-NEXT: vsetvli a1, zero, e64, m1, ta, ma
1030 ; RV32-NEXT: vlse64.v v9, (a0), zero
1031 ; RV32-NEXT: vsetvli zero, a2, e64, m1, ta, ma
1032 ; RV32-NEXT: vsub.vv v8, v8, v9
1033 ; RV32-NEXT: addi sp, sp, 16
1036 ; RV64-LABEL: vsub_vx_nxv1i64_unmasked:
1038 ; RV64-NEXT: vsetvli zero, a1, e64, m1, ta, ma
1039 ; RV64-NEXT: vsub.vx v8, v8, a0
1041 %elt.head = insertelement <vscale x 1 x i64> poison, i64 %b, i32 0
1042 %vb = shufflevector <vscale x 1 x i64> %elt.head, <vscale x 1 x i64> poison, <vscale x 1 x i32> zeroinitializer
1043 %head = insertelement <vscale x 1 x i1> poison, i1 true, i32 0
1044 %m = shufflevector <vscale x 1 x i1> %head, <vscale x 1 x i1> poison, <vscale x 1 x i32> zeroinitializer
1045 %v = call <vscale x 1 x i64> @llvm.vp.sub.nxv1i64(<vscale x 1 x i64> %va, <vscale x 1 x i64> %vb, <vscale x 1 x i1> %m, i32 %evl)
1046 ret <vscale x 1 x i64> %v
1049 declare <vscale x 2 x i64> @llvm.vp.sub.nxv2i64(<vscale x 2 x i64>, <vscale x 2 x i64>, <vscale x 2 x i1>, i32)
1051 define <vscale x 2 x i64> @vsub_vv_nxv2i64(<vscale x 2 x i64> %va, <vscale x 2 x i64> %b, <vscale x 2 x i1> %m, i32 zeroext %evl) {
1052 ; CHECK-LABEL: vsub_vv_nxv2i64:
1054 ; CHECK-NEXT: vsetvli zero, a0, e64, m2, ta, ma
1055 ; CHECK-NEXT: vsub.vv v8, v8, v10, v0.t
1057 %v = call <vscale x 2 x i64> @llvm.vp.sub.nxv2i64(<vscale x 2 x i64> %va, <vscale x 2 x i64> %b, <vscale x 2 x i1> %m, i32 %evl)
1058 ret <vscale x 2 x i64> %v
1061 define <vscale x 2 x i64> @vsub_vv_nxv2i64_unmasked(<vscale x 2 x i64> %va, <vscale x 2 x i64> %b, i32 zeroext %evl) {
1062 ; CHECK-LABEL: vsub_vv_nxv2i64_unmasked:
1064 ; CHECK-NEXT: vsetvli zero, a0, e64, m2, ta, ma
1065 ; CHECK-NEXT: vsub.vv v8, v8, v10
1067 %head = insertelement <vscale x 2 x i1> poison, i1 true, i32 0
1068 %m = shufflevector <vscale x 2 x i1> %head, <vscale x 2 x i1> poison, <vscale x 2 x i32> zeroinitializer
1069 %v = call <vscale x 2 x i64> @llvm.vp.sub.nxv2i64(<vscale x 2 x i64> %va, <vscale x 2 x i64> %b, <vscale x 2 x i1> %m, i32 %evl)
1070 ret <vscale x 2 x i64> %v
1073 define <vscale x 2 x i64> @vsub_vx_nxv2i64(<vscale x 2 x i64> %va, i64 %b, <vscale x 2 x i1> %m, i32 zeroext %evl) {
1074 ; RV32-LABEL: vsub_vx_nxv2i64:
1076 ; RV32-NEXT: addi sp, sp, -16
1077 ; RV32-NEXT: .cfi_def_cfa_offset 16
1078 ; RV32-NEXT: sw a1, 12(sp)
1079 ; RV32-NEXT: sw a0, 8(sp)
1080 ; RV32-NEXT: addi a0, sp, 8
1081 ; RV32-NEXT: vsetvli a1, zero, e64, m2, ta, ma
1082 ; RV32-NEXT: vlse64.v v10, (a0), zero
1083 ; RV32-NEXT: vsetvli zero, a2, e64, m2, ta, ma
1084 ; RV32-NEXT: vsub.vv v8, v8, v10, v0.t
1085 ; RV32-NEXT: addi sp, sp, 16
1088 ; RV64-LABEL: vsub_vx_nxv2i64:
1090 ; RV64-NEXT: vsetvli zero, a1, e64, m2, ta, ma
1091 ; RV64-NEXT: vsub.vx v8, v8, a0, v0.t
1093 %elt.head = insertelement <vscale x 2 x i64> poison, i64 %b, i32 0
1094 %vb = shufflevector <vscale x 2 x i64> %elt.head, <vscale x 2 x i64> poison, <vscale x 2 x i32> zeroinitializer
1095 %v = call <vscale x 2 x i64> @llvm.vp.sub.nxv2i64(<vscale x 2 x i64> %va, <vscale x 2 x i64> %vb, <vscale x 2 x i1> %m, i32 %evl)
1096 ret <vscale x 2 x i64> %v
1099 define <vscale x 2 x i64> @vsub_vx_nxv2i64_unmasked(<vscale x 2 x i64> %va, i64 %b, i32 zeroext %evl) {
1100 ; RV32-LABEL: vsub_vx_nxv2i64_unmasked:
1102 ; RV32-NEXT: addi sp, sp, -16
1103 ; RV32-NEXT: .cfi_def_cfa_offset 16
1104 ; RV32-NEXT: sw a1, 12(sp)
1105 ; RV32-NEXT: sw a0, 8(sp)
1106 ; RV32-NEXT: addi a0, sp, 8
1107 ; RV32-NEXT: vsetvli a1, zero, e64, m2, ta, ma
1108 ; RV32-NEXT: vlse64.v v10, (a0), zero
1109 ; RV32-NEXT: vsetvli zero, a2, e64, m2, ta, ma
1110 ; RV32-NEXT: vsub.vv v8, v8, v10
1111 ; RV32-NEXT: addi sp, sp, 16
1114 ; RV64-LABEL: vsub_vx_nxv2i64_unmasked:
1116 ; RV64-NEXT: vsetvli zero, a1, e64, m2, ta, ma
1117 ; RV64-NEXT: vsub.vx v8, v8, a0
1119 %elt.head = insertelement <vscale x 2 x i64> poison, i64 %b, i32 0
1120 %vb = shufflevector <vscale x 2 x i64> %elt.head, <vscale x 2 x i64> poison, <vscale x 2 x i32> zeroinitializer
1121 %head = insertelement <vscale x 2 x i1> poison, i1 true, i32 0
1122 %m = shufflevector <vscale x 2 x i1> %head, <vscale x 2 x i1> poison, <vscale x 2 x i32> zeroinitializer
1123 %v = call <vscale x 2 x i64> @llvm.vp.sub.nxv2i64(<vscale x 2 x i64> %va, <vscale x 2 x i64> %vb, <vscale x 2 x i1> %m, i32 %evl)
1124 ret <vscale x 2 x i64> %v
1127 declare <vscale x 4 x i64> @llvm.vp.sub.nxv4i64(<vscale x 4 x i64>, <vscale x 4 x i64>, <vscale x 4 x i1>, i32)
1129 define <vscale x 4 x i64> @vsub_vv_nxv4i64(<vscale x 4 x i64> %va, <vscale x 4 x i64> %b, <vscale x 4 x i1> %m, i32 zeroext %evl) {
1130 ; CHECK-LABEL: vsub_vv_nxv4i64:
1132 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1133 ; CHECK-NEXT: vsub.vv v8, v8, v12, v0.t
1135 %v = call <vscale x 4 x i64> @llvm.vp.sub.nxv4i64(<vscale x 4 x i64> %va, <vscale x 4 x i64> %b, <vscale x 4 x i1> %m, i32 %evl)
1136 ret <vscale x 4 x i64> %v
1139 define <vscale x 4 x i64> @vsub_vv_nxv4i64_unmasked(<vscale x 4 x i64> %va, <vscale x 4 x i64> %b, i32 zeroext %evl) {
1140 ; CHECK-LABEL: vsub_vv_nxv4i64_unmasked:
1142 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1143 ; CHECK-NEXT: vsub.vv v8, v8, v12
1145 %head = insertelement <vscale x 4 x i1> poison, i1 true, i32 0
1146 %m = shufflevector <vscale x 4 x i1> %head, <vscale x 4 x i1> poison, <vscale x 4 x i32> zeroinitializer
1147 %v = call <vscale x 4 x i64> @llvm.vp.sub.nxv4i64(<vscale x 4 x i64> %va, <vscale x 4 x i64> %b, <vscale x 4 x i1> %m, i32 %evl)
1148 ret <vscale x 4 x i64> %v
1151 define <vscale x 4 x i64> @vsub_vx_nxv4i64(<vscale x 4 x i64> %va, i64 %b, <vscale x 4 x i1> %m, i32 zeroext %evl) {
1152 ; RV32-LABEL: vsub_vx_nxv4i64:
1154 ; RV32-NEXT: addi sp, sp, -16
1155 ; RV32-NEXT: .cfi_def_cfa_offset 16
1156 ; RV32-NEXT: sw a1, 12(sp)
1157 ; RV32-NEXT: sw a0, 8(sp)
1158 ; RV32-NEXT: addi a0, sp, 8
1159 ; RV32-NEXT: vsetvli a1, zero, e64, m4, ta, ma
1160 ; RV32-NEXT: vlse64.v v12, (a0), zero
1161 ; RV32-NEXT: vsetvli zero, a2, e64, m4, ta, ma
1162 ; RV32-NEXT: vsub.vv v8, v8, v12, v0.t
1163 ; RV32-NEXT: addi sp, sp, 16
1166 ; RV64-LABEL: vsub_vx_nxv4i64:
1168 ; RV64-NEXT: vsetvli zero, a1, e64, m4, ta, ma
1169 ; RV64-NEXT: vsub.vx v8, v8, a0, v0.t
1171 %elt.head = insertelement <vscale x 4 x i64> poison, i64 %b, i32 0
1172 %vb = shufflevector <vscale x 4 x i64> %elt.head, <vscale x 4 x i64> poison, <vscale x 4 x i32> zeroinitializer
1173 %v = call <vscale x 4 x i64> @llvm.vp.sub.nxv4i64(<vscale x 4 x i64> %va, <vscale x 4 x i64> %vb, <vscale x 4 x i1> %m, i32 %evl)
1174 ret <vscale x 4 x i64> %v
1177 define <vscale x 4 x i64> @vsub_vx_nxv4i64_unmasked(<vscale x 4 x i64> %va, i64 %b, i32 zeroext %evl) {
1178 ; RV32-LABEL: vsub_vx_nxv4i64_unmasked:
1180 ; RV32-NEXT: addi sp, sp, -16
1181 ; RV32-NEXT: .cfi_def_cfa_offset 16
1182 ; RV32-NEXT: sw a1, 12(sp)
1183 ; RV32-NEXT: sw a0, 8(sp)
1184 ; RV32-NEXT: addi a0, sp, 8
1185 ; RV32-NEXT: vsetvli a1, zero, e64, m4, ta, ma
1186 ; RV32-NEXT: vlse64.v v12, (a0), zero
1187 ; RV32-NEXT: vsetvli zero, a2, e64, m4, ta, ma
1188 ; RV32-NEXT: vsub.vv v8, v8, v12
1189 ; RV32-NEXT: addi sp, sp, 16
1192 ; RV64-LABEL: vsub_vx_nxv4i64_unmasked:
1194 ; RV64-NEXT: vsetvli zero, a1, e64, m4, ta, ma
1195 ; RV64-NEXT: vsub.vx v8, v8, a0
1197 %elt.head = insertelement <vscale x 4 x i64> poison, i64 %b, i32 0
1198 %vb = shufflevector <vscale x 4 x i64> %elt.head, <vscale x 4 x i64> poison, <vscale x 4 x i32> zeroinitializer
1199 %head = insertelement <vscale x 4 x i1> poison, i1 true, i32 0
1200 %m = shufflevector <vscale x 4 x i1> %head, <vscale x 4 x i1> poison, <vscale x 4 x i32> zeroinitializer
1201 %v = call <vscale x 4 x i64> @llvm.vp.sub.nxv4i64(<vscale x 4 x i64> %va, <vscale x 4 x i64> %vb, <vscale x 4 x i1> %m, i32 %evl)
1202 ret <vscale x 4 x i64> %v
1205 declare <vscale x 8 x i64> @llvm.vp.sub.nxv8i64(<vscale x 8 x i64>, <vscale x 8 x i64>, <vscale x 8 x i1>, i32)
1207 define <vscale x 8 x i64> @vsub_vv_nxv8i64(<vscale x 8 x i64> %va, <vscale x 8 x i64> %b, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1208 ; CHECK-LABEL: vsub_vv_nxv8i64:
1210 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
1211 ; CHECK-NEXT: vsub.vv v8, v8, v16, v0.t
1213 %v = call <vscale x 8 x i64> @llvm.vp.sub.nxv8i64(<vscale x 8 x i64> %va, <vscale x 8 x i64> %b, <vscale x 8 x i1> %m, i32 %evl)
1214 ret <vscale x 8 x i64> %v
1217 define <vscale x 8 x i64> @vsub_vv_nxv8i64_unmasked(<vscale x 8 x i64> %va, <vscale x 8 x i64> %b, i32 zeroext %evl) {
1218 ; CHECK-LABEL: vsub_vv_nxv8i64_unmasked:
1220 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
1221 ; CHECK-NEXT: vsub.vv v8, v8, v16
1223 %head = insertelement <vscale x 8 x i1> poison, i1 true, i32 0
1224 %m = shufflevector <vscale x 8 x i1> %head, <vscale x 8 x i1> poison, <vscale x 8 x i32> zeroinitializer
1225 %v = call <vscale x 8 x i64> @llvm.vp.sub.nxv8i64(<vscale x 8 x i64> %va, <vscale x 8 x i64> %b, <vscale x 8 x i1> %m, i32 %evl)
1226 ret <vscale x 8 x i64> %v
1229 define <vscale x 8 x i64> @vsub_vx_nxv8i64(<vscale x 8 x i64> %va, i64 %b, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1230 ; RV32-LABEL: vsub_vx_nxv8i64:
1232 ; RV32-NEXT: addi sp, sp, -16
1233 ; RV32-NEXT: .cfi_def_cfa_offset 16
1234 ; RV32-NEXT: sw a1, 12(sp)
1235 ; RV32-NEXT: sw a0, 8(sp)
1236 ; RV32-NEXT: addi a0, sp, 8
1237 ; RV32-NEXT: vsetvli a1, zero, e64, m8, ta, ma
1238 ; RV32-NEXT: vlse64.v v16, (a0), zero
1239 ; RV32-NEXT: vsetvli zero, a2, e64, m8, ta, ma
1240 ; RV32-NEXT: vsub.vv v8, v8, v16, v0.t
1241 ; RV32-NEXT: addi sp, sp, 16
1244 ; RV64-LABEL: vsub_vx_nxv8i64:
1246 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
1247 ; RV64-NEXT: vsub.vx v8, v8, a0, v0.t
1249 %elt.head = insertelement <vscale x 8 x i64> poison, i64 %b, i32 0
1250 %vb = shufflevector <vscale x 8 x i64> %elt.head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
1251 %v = call <vscale x 8 x i64> @llvm.vp.sub.nxv8i64(<vscale x 8 x i64> %va, <vscale x 8 x i64> %vb, <vscale x 8 x i1> %m, i32 %evl)
1252 ret <vscale x 8 x i64> %v
1255 define <vscale x 8 x i64> @vsub_vx_nxv8i64_unmasked(<vscale x 8 x i64> %va, i64 %b, i32 zeroext %evl) {
1256 ; RV32-LABEL: vsub_vx_nxv8i64_unmasked:
1258 ; RV32-NEXT: addi sp, sp, -16
1259 ; RV32-NEXT: .cfi_def_cfa_offset 16
1260 ; RV32-NEXT: sw a1, 12(sp)
1261 ; RV32-NEXT: sw a0, 8(sp)
1262 ; RV32-NEXT: addi a0, sp, 8
1263 ; RV32-NEXT: vsetvli a1, zero, e64, m8, ta, ma
1264 ; RV32-NEXT: vlse64.v v16, (a0), zero
1265 ; RV32-NEXT: vsetvli zero, a2, e64, m8, ta, ma
1266 ; RV32-NEXT: vsub.vv v8, v8, v16
1267 ; RV32-NEXT: addi sp, sp, 16
1270 ; RV64-LABEL: vsub_vx_nxv8i64_unmasked:
1272 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
1273 ; RV64-NEXT: vsub.vx v8, v8, a0
1275 %elt.head = insertelement <vscale x 8 x i64> poison, i64 %b, i32 0
1276 %vb = shufflevector <vscale x 8 x i64> %elt.head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
1277 %head = insertelement <vscale x 8 x i1> poison, i1 true, i32 0
1278 %m = shufflevector <vscale x 8 x i1> %head, <vscale x 8 x i1> poison, <vscale x 8 x i32> zeroinitializer
1279 %v = call <vscale x 8 x i64> @llvm.vp.sub.nxv8i64(<vscale x 8 x i64> %va, <vscale x 8 x i64> %vb, <vscale x 8 x i1> %m, i32 %evl)
1280 ret <vscale x 8 x i64> %v