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 1 x i8> @llvm.usub.sat.nxv1i8(<vscale x 1 x i8>, <vscale x 1 x i8>)
9 define <vscale x 1 x i8> @usub_nxv1i8_vv(<vscale x 1 x i8> %va, <vscale x 1 x i8> %b) {
10 ; CHECK-LABEL: usub_nxv1i8_vv:
12 ; CHECK-NEXT: vsetvli a0, zero, e8, mf8, ta, ma
13 ; CHECK-NEXT: vssubu.vv v8, v8, v9
15 %v = call <vscale x 1 x i8> @llvm.usub.sat.nxv1i8(<vscale x 1 x i8> %va, <vscale x 1 x i8> %b)
16 ret <vscale x 1 x i8> %v
19 define <vscale x 1 x i8> @usub_nxv1i8_vx(<vscale x 1 x i8> %va, i8 %b) {
20 ; CHECK-LABEL: usub_nxv1i8_vx:
22 ; CHECK-NEXT: vsetvli a1, zero, e8, mf8, ta, ma
23 ; CHECK-NEXT: vssubu.vx v8, v8, a0
25 %elt.head = insertelement <vscale x 1 x i8> poison, i8 %b, i32 0
26 %vb = shufflevector <vscale x 1 x i8> %elt.head, <vscale x 1 x i8> poison, <vscale x 1 x i32> zeroinitializer
27 %v = call <vscale x 1 x i8> @llvm.usub.sat.nxv1i8(<vscale x 1 x i8> %va, <vscale x 1 x i8> %vb)
28 ret <vscale x 1 x i8> %v
31 define <vscale x 1 x i8> @usub_nxv1i8_vi(<vscale x 1 x i8> %va) {
32 ; CHECK-LABEL: usub_nxv1i8_vi:
34 ; CHECK-NEXT: li a0, 2
35 ; CHECK-NEXT: vsetvli a1, zero, e8, mf8, ta, ma
36 ; CHECK-NEXT: vssubu.vx v8, v8, a0
38 %v = call <vscale x 1 x i8> @llvm.usub.sat.nxv1i8(<vscale x 1 x i8> %va, <vscale x 1 x i8> splat (i8 2))
39 ret <vscale x 1 x i8> %v
42 declare <vscale x 2 x i8> @llvm.usub.sat.nxv2i8(<vscale x 2 x i8>, <vscale x 2 x i8>)
44 define <vscale x 2 x i8> @usub_nxv2i8_vv(<vscale x 2 x i8> %va, <vscale x 2 x i8> %b) {
45 ; CHECK-LABEL: usub_nxv2i8_vv:
47 ; CHECK-NEXT: vsetvli a0, zero, e8, mf4, ta, ma
48 ; CHECK-NEXT: vssubu.vv v8, v8, v9
50 %v = call <vscale x 2 x i8> @llvm.usub.sat.nxv2i8(<vscale x 2 x i8> %va, <vscale x 2 x i8> %b)
51 ret <vscale x 2 x i8> %v
54 define <vscale x 2 x i8> @usub_nxv2i8_vx(<vscale x 2 x i8> %va, i8 %b) {
55 ; CHECK-LABEL: usub_nxv2i8_vx:
57 ; CHECK-NEXT: vsetvli a1, zero, e8, mf4, ta, ma
58 ; CHECK-NEXT: vssubu.vx v8, v8, a0
60 %elt.head = insertelement <vscale x 2 x i8> poison, i8 %b, i32 0
61 %vb = shufflevector <vscale x 2 x i8> %elt.head, <vscale x 2 x i8> poison, <vscale x 2 x i32> zeroinitializer
62 %v = call <vscale x 2 x i8> @llvm.usub.sat.nxv2i8(<vscale x 2 x i8> %va, <vscale x 2 x i8> %vb)
63 ret <vscale x 2 x i8> %v
66 define <vscale x 2 x i8> @usub_nxv2i8_vi(<vscale x 2 x i8> %va) {
67 ; CHECK-LABEL: usub_nxv2i8_vi:
69 ; CHECK-NEXT: li a0, 2
70 ; CHECK-NEXT: vsetvli a1, zero, e8, mf4, ta, ma
71 ; CHECK-NEXT: vssubu.vx v8, v8, a0
73 %v = call <vscale x 2 x i8> @llvm.usub.sat.nxv2i8(<vscale x 2 x i8> %va, <vscale x 2 x i8> splat (i8 2))
74 ret <vscale x 2 x i8> %v
77 declare <vscale x 4 x i8> @llvm.usub.sat.nxv4i8(<vscale x 4 x i8>, <vscale x 4 x i8>)
79 define <vscale x 4 x i8> @usub_nxv4i8_vv(<vscale x 4 x i8> %va, <vscale x 4 x i8> %b) {
80 ; CHECK-LABEL: usub_nxv4i8_vv:
82 ; CHECK-NEXT: vsetvli a0, zero, e8, mf2, ta, ma
83 ; CHECK-NEXT: vssubu.vv v8, v8, v9
85 %v = call <vscale x 4 x i8> @llvm.usub.sat.nxv4i8(<vscale x 4 x i8> %va, <vscale x 4 x i8> %b)
86 ret <vscale x 4 x i8> %v
89 define <vscale x 4 x i8> @usub_nxv4i8_vx(<vscale x 4 x i8> %va, i8 %b) {
90 ; CHECK-LABEL: usub_nxv4i8_vx:
92 ; CHECK-NEXT: vsetvli a1, zero, e8, mf2, ta, ma
93 ; CHECK-NEXT: vssubu.vx v8, v8, a0
95 %elt.head = insertelement <vscale x 4 x i8> poison, i8 %b, i32 0
96 %vb = shufflevector <vscale x 4 x i8> %elt.head, <vscale x 4 x i8> poison, <vscale x 4 x i32> zeroinitializer
97 %v = call <vscale x 4 x i8> @llvm.usub.sat.nxv4i8(<vscale x 4 x i8> %va, <vscale x 4 x i8> %vb)
98 ret <vscale x 4 x i8> %v
101 define <vscale x 4 x i8> @usub_nxv4i8_vi(<vscale x 4 x i8> %va) {
102 ; CHECK-LABEL: usub_nxv4i8_vi:
104 ; CHECK-NEXT: li a0, 2
105 ; CHECK-NEXT: vsetvli a1, zero, e8, mf2, ta, ma
106 ; CHECK-NEXT: vssubu.vx v8, v8, a0
108 %v = call <vscale x 4 x i8> @llvm.usub.sat.nxv4i8(<vscale x 4 x i8> %va, <vscale x 4 x i8> splat (i8 2))
109 ret <vscale x 4 x i8> %v
112 declare <vscale x 8 x i8> @llvm.usub.sat.nxv8i8(<vscale x 8 x i8>, <vscale x 8 x i8>)
114 define <vscale x 8 x i8> @usub_nxv8i8_vv(<vscale x 8 x i8> %va, <vscale x 8 x i8> %b) {
115 ; CHECK-LABEL: usub_nxv8i8_vv:
117 ; CHECK-NEXT: vsetvli a0, zero, e8, m1, ta, ma
118 ; CHECK-NEXT: vssubu.vv v8, v8, v9
120 %v = call <vscale x 8 x i8> @llvm.usub.sat.nxv8i8(<vscale x 8 x i8> %va, <vscale x 8 x i8> %b)
121 ret <vscale x 8 x i8> %v
124 define <vscale x 8 x i8> @usub_nxv8i8_vx(<vscale x 8 x i8> %va, i8 %b) {
125 ; CHECK-LABEL: usub_nxv8i8_vx:
127 ; CHECK-NEXT: vsetvli a1, zero, e8, m1, ta, ma
128 ; CHECK-NEXT: vssubu.vx v8, v8, a0
130 %elt.head = insertelement <vscale x 8 x i8> poison, i8 %b, i32 0
131 %vb = shufflevector <vscale x 8 x i8> %elt.head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
132 %v = call <vscale x 8 x i8> @llvm.usub.sat.nxv8i8(<vscale x 8 x i8> %va, <vscale x 8 x i8> %vb)
133 ret <vscale x 8 x i8> %v
136 define <vscale x 8 x i8> @usub_nxv8i8_vi(<vscale x 8 x i8> %va) {
137 ; CHECK-LABEL: usub_nxv8i8_vi:
139 ; CHECK-NEXT: li a0, 2
140 ; CHECK-NEXT: vsetvli a1, zero, e8, m1, ta, ma
141 ; CHECK-NEXT: vssubu.vx v8, v8, a0
143 %v = call <vscale x 8 x i8> @llvm.usub.sat.nxv8i8(<vscale x 8 x i8> %va, <vscale x 8 x i8> splat (i8 2))
144 ret <vscale x 8 x i8> %v
147 declare <vscale x 16 x i8> @llvm.usub.sat.nxv16i8(<vscale x 16 x i8>, <vscale x 16 x i8>)
149 define <vscale x 16 x i8> @usub_nxv16i8_vv(<vscale x 16 x i8> %va, <vscale x 16 x i8> %b) {
150 ; CHECK-LABEL: usub_nxv16i8_vv:
152 ; CHECK-NEXT: vsetvli a0, zero, e8, m2, ta, ma
153 ; CHECK-NEXT: vssubu.vv v8, v8, v10
155 %v = call <vscale x 16 x i8> @llvm.usub.sat.nxv16i8(<vscale x 16 x i8> %va, <vscale x 16 x i8> %b)
156 ret <vscale x 16 x i8> %v
159 define <vscale x 16 x i8> @usub_nxv16i8_vx(<vscale x 16 x i8> %va, i8 %b) {
160 ; CHECK-LABEL: usub_nxv16i8_vx:
162 ; CHECK-NEXT: vsetvli a1, zero, e8, m2, ta, ma
163 ; CHECK-NEXT: vssubu.vx v8, v8, a0
165 %elt.head = insertelement <vscale x 16 x i8> poison, i8 %b, i32 0
166 %vb = shufflevector <vscale x 16 x i8> %elt.head, <vscale x 16 x i8> poison, <vscale x 16 x i32> zeroinitializer
167 %v = call <vscale x 16 x i8> @llvm.usub.sat.nxv16i8(<vscale x 16 x i8> %va, <vscale x 16 x i8> %vb)
168 ret <vscale x 16 x i8> %v
171 define <vscale x 16 x i8> @usub_nxv16i8_vi(<vscale x 16 x i8> %va) {
172 ; CHECK-LABEL: usub_nxv16i8_vi:
174 ; CHECK-NEXT: li a0, 2
175 ; CHECK-NEXT: vsetvli a1, zero, e8, m2, ta, ma
176 ; CHECK-NEXT: vssubu.vx v8, v8, a0
178 %v = call <vscale x 16 x i8> @llvm.usub.sat.nxv16i8(<vscale x 16 x i8> %va, <vscale x 16 x i8> splat (i8 2))
179 ret <vscale x 16 x i8> %v
182 declare <vscale x 32 x i8> @llvm.usub.sat.nxv32i8(<vscale x 32 x i8>, <vscale x 32 x i8>)
184 define <vscale x 32 x i8> @usub_nxv32i8_vv(<vscale x 32 x i8> %va, <vscale x 32 x i8> %b) {
185 ; CHECK-LABEL: usub_nxv32i8_vv:
187 ; CHECK-NEXT: vsetvli a0, zero, e8, m4, ta, ma
188 ; CHECK-NEXT: vssubu.vv v8, v8, v12
190 %v = call <vscale x 32 x i8> @llvm.usub.sat.nxv32i8(<vscale x 32 x i8> %va, <vscale x 32 x i8> %b)
191 ret <vscale x 32 x i8> %v
194 define <vscale x 32 x i8> @usub_nxv32i8_vx(<vscale x 32 x i8> %va, i8 %b) {
195 ; CHECK-LABEL: usub_nxv32i8_vx:
197 ; CHECK-NEXT: vsetvli a1, zero, e8, m4, ta, ma
198 ; CHECK-NEXT: vssubu.vx v8, v8, a0
200 %elt.head = insertelement <vscale x 32 x i8> poison, i8 %b, i32 0
201 %vb = shufflevector <vscale x 32 x i8> %elt.head, <vscale x 32 x i8> poison, <vscale x 32 x i32> zeroinitializer
202 %v = call <vscale x 32 x i8> @llvm.usub.sat.nxv32i8(<vscale x 32 x i8> %va, <vscale x 32 x i8> %vb)
203 ret <vscale x 32 x i8> %v
206 define <vscale x 32 x i8> @usub_nxv32i8_vi(<vscale x 32 x i8> %va) {
207 ; CHECK-LABEL: usub_nxv32i8_vi:
209 ; CHECK-NEXT: li a0, 2
210 ; CHECK-NEXT: vsetvli a1, zero, e8, m4, ta, ma
211 ; CHECK-NEXT: vssubu.vx v8, v8, a0
213 %v = call <vscale x 32 x i8> @llvm.usub.sat.nxv32i8(<vscale x 32 x i8> %va, <vscale x 32 x i8> splat (i8 2))
214 ret <vscale x 32 x i8> %v
217 declare <vscale x 64 x i8> @llvm.usub.sat.nxv64i8(<vscale x 64 x i8>, <vscale x 64 x i8>)
219 define <vscale x 64 x i8> @usub_nxv64i8_vv(<vscale x 64 x i8> %va, <vscale x 64 x i8> %b) {
220 ; CHECK-LABEL: usub_nxv64i8_vv:
222 ; CHECK-NEXT: vsetvli a0, zero, e8, m8, ta, ma
223 ; CHECK-NEXT: vssubu.vv v8, v8, v16
225 %v = call <vscale x 64 x i8> @llvm.usub.sat.nxv64i8(<vscale x 64 x i8> %va, <vscale x 64 x i8> %b)
226 ret <vscale x 64 x i8> %v
229 define <vscale x 64 x i8> @usub_nxv64i8_vx(<vscale x 64 x i8> %va, i8 %b) {
230 ; CHECK-LABEL: usub_nxv64i8_vx:
232 ; CHECK-NEXT: vsetvli a1, zero, e8, m8, ta, ma
233 ; CHECK-NEXT: vssubu.vx v8, v8, a0
235 %elt.head = insertelement <vscale x 64 x i8> poison, i8 %b, i32 0
236 %vb = shufflevector <vscale x 64 x i8> %elt.head, <vscale x 64 x i8> poison, <vscale x 64 x i32> zeroinitializer
237 %v = call <vscale x 64 x i8> @llvm.usub.sat.nxv64i8(<vscale x 64 x i8> %va, <vscale x 64 x i8> %vb)
238 ret <vscale x 64 x i8> %v
241 define <vscale x 64 x i8> @usub_nxv64i8_vi(<vscale x 64 x i8> %va) {
242 ; CHECK-LABEL: usub_nxv64i8_vi:
244 ; CHECK-NEXT: li a0, 2
245 ; CHECK-NEXT: vsetvli a1, zero, e8, m8, ta, ma
246 ; CHECK-NEXT: vssubu.vx v8, v8, a0
248 %v = call <vscale x 64 x i8> @llvm.usub.sat.nxv64i8(<vscale x 64 x i8> %va, <vscale x 64 x i8> splat (i8 2))
249 ret <vscale x 64 x i8> %v
252 declare <vscale x 1 x i16> @llvm.usub.sat.nxv1i16(<vscale x 1 x i16>, <vscale x 1 x i16>)
254 define <vscale x 1 x i16> @usub_nxv1i16_vv(<vscale x 1 x i16> %va, <vscale x 1 x i16> %b) {
255 ; CHECK-LABEL: usub_nxv1i16_vv:
257 ; CHECK-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
258 ; CHECK-NEXT: vssubu.vv v8, v8, v9
260 %v = call <vscale x 1 x i16> @llvm.usub.sat.nxv1i16(<vscale x 1 x i16> %va, <vscale x 1 x i16> %b)
261 ret <vscale x 1 x i16> %v
264 define <vscale x 1 x i16> @usub_nxv1i16_vx(<vscale x 1 x i16> %va, i16 %b) {
265 ; CHECK-LABEL: usub_nxv1i16_vx:
267 ; CHECK-NEXT: vsetvli a1, zero, e16, mf4, ta, ma
268 ; CHECK-NEXT: vssubu.vx v8, v8, a0
270 %elt.head = insertelement <vscale x 1 x i16> poison, i16 %b, i32 0
271 %vb = shufflevector <vscale x 1 x i16> %elt.head, <vscale x 1 x i16> poison, <vscale x 1 x i32> zeroinitializer
272 %v = call <vscale x 1 x i16> @llvm.usub.sat.nxv1i16(<vscale x 1 x i16> %va, <vscale x 1 x i16> %vb)
273 ret <vscale x 1 x i16> %v
276 define <vscale x 1 x i16> @usub_nxv1i16_vi(<vscale x 1 x i16> %va) {
277 ; CHECK-LABEL: usub_nxv1i16_vi:
279 ; CHECK-NEXT: li a0, 2
280 ; CHECK-NEXT: vsetvli a1, zero, e16, mf4, ta, ma
281 ; CHECK-NEXT: vssubu.vx v8, v8, a0
283 %v = call <vscale x 1 x i16> @llvm.usub.sat.nxv1i16(<vscale x 1 x i16> %va, <vscale x 1 x i16> splat (i16 2))
284 ret <vscale x 1 x i16> %v
287 declare <vscale x 2 x i16> @llvm.usub.sat.nxv2i16(<vscale x 2 x i16>, <vscale x 2 x i16>)
289 define <vscale x 2 x i16> @usub_nxv2i16_vv(<vscale x 2 x i16> %va, <vscale x 2 x i16> %b) {
290 ; CHECK-LABEL: usub_nxv2i16_vv:
292 ; CHECK-NEXT: vsetvli a0, zero, e16, mf2, ta, ma
293 ; CHECK-NEXT: vssubu.vv v8, v8, v9
295 %v = call <vscale x 2 x i16> @llvm.usub.sat.nxv2i16(<vscale x 2 x i16> %va, <vscale x 2 x i16> %b)
296 ret <vscale x 2 x i16> %v
299 define <vscale x 2 x i16> @usub_nxv2i16_vx(<vscale x 2 x i16> %va, i16 %b) {
300 ; CHECK-LABEL: usub_nxv2i16_vx:
302 ; CHECK-NEXT: vsetvli a1, zero, e16, mf2, ta, ma
303 ; CHECK-NEXT: vssubu.vx v8, v8, a0
305 %elt.head = insertelement <vscale x 2 x i16> poison, i16 %b, i32 0
306 %vb = shufflevector <vscale x 2 x i16> %elt.head, <vscale x 2 x i16> poison, <vscale x 2 x i32> zeroinitializer
307 %v = call <vscale x 2 x i16> @llvm.usub.sat.nxv2i16(<vscale x 2 x i16> %va, <vscale x 2 x i16> %vb)
308 ret <vscale x 2 x i16> %v
311 define <vscale x 2 x i16> @usub_nxv2i16_vi(<vscale x 2 x i16> %va) {
312 ; CHECK-LABEL: usub_nxv2i16_vi:
314 ; CHECK-NEXT: li a0, 2
315 ; CHECK-NEXT: vsetvli a1, zero, e16, mf2, ta, ma
316 ; CHECK-NEXT: vssubu.vx v8, v8, a0
318 %v = call <vscale x 2 x i16> @llvm.usub.sat.nxv2i16(<vscale x 2 x i16> %va, <vscale x 2 x i16> splat (i16 2))
319 ret <vscale x 2 x i16> %v
322 declare <vscale x 4 x i16> @llvm.usub.sat.nxv4i16(<vscale x 4 x i16>, <vscale x 4 x i16>)
324 define <vscale x 4 x i16> @usub_nxv4i16_vv(<vscale x 4 x i16> %va, <vscale x 4 x i16> %b) {
325 ; CHECK-LABEL: usub_nxv4i16_vv:
327 ; CHECK-NEXT: vsetvli a0, zero, e16, m1, ta, ma
328 ; CHECK-NEXT: vssubu.vv v8, v8, v9
330 %v = call <vscale x 4 x i16> @llvm.usub.sat.nxv4i16(<vscale x 4 x i16> %va, <vscale x 4 x i16> %b)
331 ret <vscale x 4 x i16> %v
334 define <vscale x 4 x i16> @usub_nxv4i16_vx(<vscale x 4 x i16> %va, i16 %b) {
335 ; CHECK-LABEL: usub_nxv4i16_vx:
337 ; CHECK-NEXT: vsetvli a1, zero, e16, m1, ta, ma
338 ; CHECK-NEXT: vssubu.vx v8, v8, a0
340 %elt.head = insertelement <vscale x 4 x i16> poison, i16 %b, i32 0
341 %vb = shufflevector <vscale x 4 x i16> %elt.head, <vscale x 4 x i16> poison, <vscale x 4 x i32> zeroinitializer
342 %v = call <vscale x 4 x i16> @llvm.usub.sat.nxv4i16(<vscale x 4 x i16> %va, <vscale x 4 x i16> %vb)
343 ret <vscale x 4 x i16> %v
346 define <vscale x 4 x i16> @usub_nxv4i16_vi(<vscale x 4 x i16> %va) {
347 ; CHECK-LABEL: usub_nxv4i16_vi:
349 ; CHECK-NEXT: li a0, 2
350 ; CHECK-NEXT: vsetvli a1, zero, e16, m1, ta, ma
351 ; CHECK-NEXT: vssubu.vx v8, v8, a0
353 %v = call <vscale x 4 x i16> @llvm.usub.sat.nxv4i16(<vscale x 4 x i16> %va, <vscale x 4 x i16> splat (i16 2))
354 ret <vscale x 4 x i16> %v
357 declare <vscale x 8 x i16> @llvm.usub.sat.nxv8i16(<vscale x 8 x i16>, <vscale x 8 x i16>)
359 define <vscale x 8 x i16> @usub_nxv8i16_vv(<vscale x 8 x i16> %va, <vscale x 8 x i16> %b) {
360 ; CHECK-LABEL: usub_nxv8i16_vv:
362 ; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma
363 ; CHECK-NEXT: vssubu.vv v8, v8, v10
365 %v = call <vscale x 8 x i16> @llvm.usub.sat.nxv8i16(<vscale x 8 x i16> %va, <vscale x 8 x i16> %b)
366 ret <vscale x 8 x i16> %v
369 define <vscale x 8 x i16> @usub_nxv8i16_vx(<vscale x 8 x i16> %va, i16 %b) {
370 ; CHECK-LABEL: usub_nxv8i16_vx:
372 ; CHECK-NEXT: vsetvli a1, zero, e16, m2, ta, ma
373 ; CHECK-NEXT: vssubu.vx v8, v8, a0
375 %elt.head = insertelement <vscale x 8 x i16> poison, i16 %b, i32 0
376 %vb = shufflevector <vscale x 8 x i16> %elt.head, <vscale x 8 x i16> poison, <vscale x 8 x i32> zeroinitializer
377 %v = call <vscale x 8 x i16> @llvm.usub.sat.nxv8i16(<vscale x 8 x i16> %va, <vscale x 8 x i16> %vb)
378 ret <vscale x 8 x i16> %v
381 define <vscale x 8 x i16> @usub_nxv8i16_vi(<vscale x 8 x i16> %va) {
382 ; CHECK-LABEL: usub_nxv8i16_vi:
384 ; CHECK-NEXT: li a0, 2
385 ; CHECK-NEXT: vsetvli a1, zero, e16, m2, ta, ma
386 ; CHECK-NEXT: vssubu.vx v8, v8, a0
388 %v = call <vscale x 8 x i16> @llvm.usub.sat.nxv8i16(<vscale x 8 x i16> %va, <vscale x 8 x i16> splat (i16 2))
389 ret <vscale x 8 x i16> %v
392 declare <vscale x 16 x i16> @llvm.usub.sat.nxv16i16(<vscale x 16 x i16>, <vscale x 16 x i16>)
394 define <vscale x 16 x i16> @usub_nxv16i16_vv(<vscale x 16 x i16> %va, <vscale x 16 x i16> %b) {
395 ; CHECK-LABEL: usub_nxv16i16_vv:
397 ; CHECK-NEXT: vsetvli a0, zero, e16, m4, ta, ma
398 ; CHECK-NEXT: vssubu.vv v8, v8, v12
400 %v = call <vscale x 16 x i16> @llvm.usub.sat.nxv16i16(<vscale x 16 x i16> %va, <vscale x 16 x i16> %b)
401 ret <vscale x 16 x i16> %v
404 define <vscale x 16 x i16> @usub_nxv16i16_vx(<vscale x 16 x i16> %va, i16 %b) {
405 ; CHECK-LABEL: usub_nxv16i16_vx:
407 ; CHECK-NEXT: vsetvli a1, zero, e16, m4, ta, ma
408 ; CHECK-NEXT: vssubu.vx v8, v8, a0
410 %elt.head = insertelement <vscale x 16 x i16> poison, i16 %b, i32 0
411 %vb = shufflevector <vscale x 16 x i16> %elt.head, <vscale x 16 x i16> poison, <vscale x 16 x i32> zeroinitializer
412 %v = call <vscale x 16 x i16> @llvm.usub.sat.nxv16i16(<vscale x 16 x i16> %va, <vscale x 16 x i16> %vb)
413 ret <vscale x 16 x i16> %v
416 define <vscale x 16 x i16> @usub_nxv16i16_vi(<vscale x 16 x i16> %va) {
417 ; CHECK-LABEL: usub_nxv16i16_vi:
419 ; CHECK-NEXT: li a0, 2
420 ; CHECK-NEXT: vsetvli a1, zero, e16, m4, ta, ma
421 ; CHECK-NEXT: vssubu.vx v8, v8, a0
423 %v = call <vscale x 16 x i16> @llvm.usub.sat.nxv16i16(<vscale x 16 x i16> %va, <vscale x 16 x i16> splat (i16 2))
424 ret <vscale x 16 x i16> %v
427 declare <vscale x 32 x i16> @llvm.usub.sat.nxv32i16(<vscale x 32 x i16>, <vscale x 32 x i16>)
429 define <vscale x 32 x i16> @usub_nxv32i16_vv(<vscale x 32 x i16> %va, <vscale x 32 x i16> %b) {
430 ; CHECK-LABEL: usub_nxv32i16_vv:
432 ; CHECK-NEXT: vsetvli a0, zero, e16, m8, ta, ma
433 ; CHECK-NEXT: vssubu.vv v8, v8, v16
435 %v = call <vscale x 32 x i16> @llvm.usub.sat.nxv32i16(<vscale x 32 x i16> %va, <vscale x 32 x i16> %b)
436 ret <vscale x 32 x i16> %v
439 define <vscale x 32 x i16> @usub_nxv32i16_vx(<vscale x 32 x i16> %va, i16 %b) {
440 ; CHECK-LABEL: usub_nxv32i16_vx:
442 ; CHECK-NEXT: vsetvli a1, zero, e16, m8, ta, ma
443 ; CHECK-NEXT: vssubu.vx v8, v8, a0
445 %elt.head = insertelement <vscale x 32 x i16> poison, i16 %b, i32 0
446 %vb = shufflevector <vscale x 32 x i16> %elt.head, <vscale x 32 x i16> poison, <vscale x 32 x i32> zeroinitializer
447 %v = call <vscale x 32 x i16> @llvm.usub.sat.nxv32i16(<vscale x 32 x i16> %va, <vscale x 32 x i16> %vb)
448 ret <vscale x 32 x i16> %v
451 define <vscale x 32 x i16> @usub_nxv32i16_vi(<vscale x 32 x i16> %va) {
452 ; CHECK-LABEL: usub_nxv32i16_vi:
454 ; CHECK-NEXT: li a0, 2
455 ; CHECK-NEXT: vsetvli a1, zero, e16, m8, ta, ma
456 ; CHECK-NEXT: vssubu.vx v8, v8, a0
458 %v = call <vscale x 32 x i16> @llvm.usub.sat.nxv32i16(<vscale x 32 x i16> %va, <vscale x 32 x i16> splat (i16 2))
459 ret <vscale x 32 x i16> %v
462 declare <vscale x 1 x i32> @llvm.usub.sat.nxv1i32(<vscale x 1 x i32>, <vscale x 1 x i32>)
464 define <vscale x 1 x i32> @usub_nxv1i32_vv(<vscale x 1 x i32> %va, <vscale x 1 x i32> %b) {
465 ; CHECK-LABEL: usub_nxv1i32_vv:
467 ; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma
468 ; CHECK-NEXT: vssubu.vv v8, v8, v9
470 %v = call <vscale x 1 x i32> @llvm.usub.sat.nxv1i32(<vscale x 1 x i32> %va, <vscale x 1 x i32> %b)
471 ret <vscale x 1 x i32> %v
474 define <vscale x 1 x i32> @usub_nxv1i32_vx(<vscale x 1 x i32> %va, i32 %b) {
475 ; CHECK-LABEL: usub_nxv1i32_vx:
477 ; CHECK-NEXT: vsetvli a1, zero, e32, mf2, ta, ma
478 ; CHECK-NEXT: vssubu.vx v8, v8, a0
480 %elt.head = insertelement <vscale x 1 x i32> poison, i32 %b, i32 0
481 %vb = shufflevector <vscale x 1 x i32> %elt.head, <vscale x 1 x i32> poison, <vscale x 1 x i32> zeroinitializer
482 %v = call <vscale x 1 x i32> @llvm.usub.sat.nxv1i32(<vscale x 1 x i32> %va, <vscale x 1 x i32> %vb)
483 ret <vscale x 1 x i32> %v
486 define <vscale x 1 x i32> @usub_nxv1i32_vi(<vscale x 1 x i32> %va) {
487 ; CHECK-LABEL: usub_nxv1i32_vi:
489 ; CHECK-NEXT: li a0, 2
490 ; CHECK-NEXT: vsetvli a1, zero, e32, mf2, ta, ma
491 ; CHECK-NEXT: vssubu.vx v8, v8, a0
493 %v = call <vscale x 1 x i32> @llvm.usub.sat.nxv1i32(<vscale x 1 x i32> %va, <vscale x 1 x i32> splat (i32 2))
494 ret <vscale x 1 x i32> %v
497 declare <vscale x 2 x i32> @llvm.usub.sat.nxv2i32(<vscale x 2 x i32>, <vscale x 2 x i32>)
499 define <vscale x 2 x i32> @usub_nxv2i32_vv(<vscale x 2 x i32> %va, <vscale x 2 x i32> %b) {
500 ; CHECK-LABEL: usub_nxv2i32_vv:
502 ; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma
503 ; CHECK-NEXT: vssubu.vv v8, v8, v9
505 %v = call <vscale x 2 x i32> @llvm.usub.sat.nxv2i32(<vscale x 2 x i32> %va, <vscale x 2 x i32> %b)
506 ret <vscale x 2 x i32> %v
509 define <vscale x 2 x i32> @usub_nxv2i32_vx(<vscale x 2 x i32> %va, i32 %b) {
510 ; CHECK-LABEL: usub_nxv2i32_vx:
512 ; CHECK-NEXT: vsetvli a1, zero, e32, m1, ta, ma
513 ; CHECK-NEXT: vssubu.vx v8, v8, a0
515 %elt.head = insertelement <vscale x 2 x i32> poison, i32 %b, i32 0
516 %vb = shufflevector <vscale x 2 x i32> %elt.head, <vscale x 2 x i32> poison, <vscale x 2 x i32> zeroinitializer
517 %v = call <vscale x 2 x i32> @llvm.usub.sat.nxv2i32(<vscale x 2 x i32> %va, <vscale x 2 x i32> %vb)
518 ret <vscale x 2 x i32> %v
521 define <vscale x 2 x i32> @usub_nxv2i32_vi(<vscale x 2 x i32> %va) {
522 ; CHECK-LABEL: usub_nxv2i32_vi:
524 ; CHECK-NEXT: li a0, 2
525 ; CHECK-NEXT: vsetvli a1, zero, e32, m1, ta, ma
526 ; CHECK-NEXT: vssubu.vx v8, v8, a0
528 %v = call <vscale x 2 x i32> @llvm.usub.sat.nxv2i32(<vscale x 2 x i32> %va, <vscale x 2 x i32> splat (i32 2))
529 ret <vscale x 2 x i32> %v
532 declare <vscale x 4 x i32> @llvm.usub.sat.nxv4i32(<vscale x 4 x i32>, <vscale x 4 x i32>)
534 define <vscale x 4 x i32> @usub_nxv4i32_vv(<vscale x 4 x i32> %va, <vscale x 4 x i32> %b) {
535 ; CHECK-LABEL: usub_nxv4i32_vv:
537 ; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma
538 ; CHECK-NEXT: vssubu.vv v8, v8, v10
540 %v = call <vscale x 4 x i32> @llvm.usub.sat.nxv4i32(<vscale x 4 x i32> %va, <vscale x 4 x i32> %b)
541 ret <vscale x 4 x i32> %v
544 define <vscale x 4 x i32> @usub_nxv4i32_vx(<vscale x 4 x i32> %va, i32 %b) {
545 ; CHECK-LABEL: usub_nxv4i32_vx:
547 ; CHECK-NEXT: vsetvli a1, zero, e32, m2, ta, ma
548 ; CHECK-NEXT: vssubu.vx v8, v8, a0
550 %elt.head = insertelement <vscale x 4 x i32> poison, i32 %b, i32 0
551 %vb = shufflevector <vscale x 4 x i32> %elt.head, <vscale x 4 x i32> poison, <vscale x 4 x i32> zeroinitializer
552 %v = call <vscale x 4 x i32> @llvm.usub.sat.nxv4i32(<vscale x 4 x i32> %va, <vscale x 4 x i32> %vb)
553 ret <vscale x 4 x i32> %v
556 define <vscale x 4 x i32> @usub_nxv4i32_vi(<vscale x 4 x i32> %va) {
557 ; CHECK-LABEL: usub_nxv4i32_vi:
559 ; CHECK-NEXT: li a0, 2
560 ; CHECK-NEXT: vsetvli a1, zero, e32, m2, ta, ma
561 ; CHECK-NEXT: vssubu.vx v8, v8, a0
563 %v = call <vscale x 4 x i32> @llvm.usub.sat.nxv4i32(<vscale x 4 x i32> %va, <vscale x 4 x i32> splat (i32 2))
564 ret <vscale x 4 x i32> %v
567 declare <vscale x 8 x i32> @llvm.usub.sat.nxv8i32(<vscale x 8 x i32>, <vscale x 8 x i32>)
569 define <vscale x 8 x i32> @usub_nxv8i32_vv(<vscale x 8 x i32> %va, <vscale x 8 x i32> %b) {
570 ; CHECK-LABEL: usub_nxv8i32_vv:
572 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
573 ; CHECK-NEXT: vssubu.vv v8, v8, v12
575 %v = call <vscale x 8 x i32> @llvm.usub.sat.nxv8i32(<vscale x 8 x i32> %va, <vscale x 8 x i32> %b)
576 ret <vscale x 8 x i32> %v
579 define <vscale x 8 x i32> @usub_nxv8i32_vx(<vscale x 8 x i32> %va, i32 %b) {
580 ; CHECK-LABEL: usub_nxv8i32_vx:
582 ; CHECK-NEXT: vsetvli a1, zero, e32, m4, ta, ma
583 ; CHECK-NEXT: vssubu.vx v8, v8, a0
585 %elt.head = insertelement <vscale x 8 x i32> poison, i32 %b, i32 0
586 %vb = shufflevector <vscale x 8 x i32> %elt.head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
587 %v = call <vscale x 8 x i32> @llvm.usub.sat.nxv8i32(<vscale x 8 x i32> %va, <vscale x 8 x i32> %vb)
588 ret <vscale x 8 x i32> %v
591 define <vscale x 8 x i32> @usub_nxv8i32_vi(<vscale x 8 x i32> %va) {
592 ; CHECK-LABEL: usub_nxv8i32_vi:
594 ; CHECK-NEXT: li a0, 2
595 ; CHECK-NEXT: vsetvli a1, zero, e32, m4, ta, ma
596 ; CHECK-NEXT: vssubu.vx v8, v8, a0
598 %v = call <vscale x 8 x i32> @llvm.usub.sat.nxv8i32(<vscale x 8 x i32> %va, <vscale x 8 x i32> splat (i32 2))
599 ret <vscale x 8 x i32> %v
602 declare <vscale x 16 x i32> @llvm.usub.sat.nxv16i32(<vscale x 16 x i32>, <vscale x 16 x i32>)
604 define <vscale x 16 x i32> @usub_nxv16i32_vv(<vscale x 16 x i32> %va, <vscale x 16 x i32> %b) {
605 ; CHECK-LABEL: usub_nxv16i32_vv:
607 ; CHECK-NEXT: vsetvli a0, zero, e32, m8, ta, ma
608 ; CHECK-NEXT: vssubu.vv v8, v8, v16
610 %v = call <vscale x 16 x i32> @llvm.usub.sat.nxv16i32(<vscale x 16 x i32> %va, <vscale x 16 x i32> %b)
611 ret <vscale x 16 x i32> %v
614 define <vscale x 16 x i32> @usub_nxv16i32_vx(<vscale x 16 x i32> %va, i32 %b) {
615 ; CHECK-LABEL: usub_nxv16i32_vx:
617 ; CHECK-NEXT: vsetvli a1, zero, e32, m8, ta, ma
618 ; CHECK-NEXT: vssubu.vx v8, v8, a0
620 %elt.head = insertelement <vscale x 16 x i32> poison, i32 %b, i32 0
621 %vb = shufflevector <vscale x 16 x i32> %elt.head, <vscale x 16 x i32> poison, <vscale x 16 x i32> zeroinitializer
622 %v = call <vscale x 16 x i32> @llvm.usub.sat.nxv16i32(<vscale x 16 x i32> %va, <vscale x 16 x i32> %vb)
623 ret <vscale x 16 x i32> %v
626 define <vscale x 16 x i32> @usub_nxv16i32_vi(<vscale x 16 x i32> %va) {
627 ; CHECK-LABEL: usub_nxv16i32_vi:
629 ; CHECK-NEXT: li a0, 2
630 ; CHECK-NEXT: vsetvli a1, zero, e32, m8, ta, ma
631 ; CHECK-NEXT: vssubu.vx v8, v8, a0
633 %v = call <vscale x 16 x i32> @llvm.usub.sat.nxv16i32(<vscale x 16 x i32> %va, <vscale x 16 x i32> splat (i32 2))
634 ret <vscale x 16 x i32> %v
637 declare <vscale x 1 x i64> @llvm.usub.sat.nxv1i64(<vscale x 1 x i64>, <vscale x 1 x i64>)
639 define <vscale x 1 x i64> @usub_nxv1i64_vv(<vscale x 1 x i64> %va, <vscale x 1 x i64> %b) {
640 ; CHECK-LABEL: usub_nxv1i64_vv:
642 ; CHECK-NEXT: vsetvli a0, zero, e64, m1, ta, ma
643 ; CHECK-NEXT: vssubu.vv v8, v8, v9
645 %v = call <vscale x 1 x i64> @llvm.usub.sat.nxv1i64(<vscale x 1 x i64> %va, <vscale x 1 x i64> %b)
646 ret <vscale x 1 x i64> %v
649 define <vscale x 1 x i64> @usub_nxv1i64_vx(<vscale x 1 x i64> %va, i64 %b) {
650 ; RV32-LABEL: usub_nxv1i64_vx:
652 ; RV32-NEXT: addi sp, sp, -16
653 ; RV32-NEXT: .cfi_def_cfa_offset 16
654 ; RV32-NEXT: sw a0, 8(sp)
655 ; RV32-NEXT: sw a1, 12(sp)
656 ; RV32-NEXT: addi a0, sp, 8
657 ; RV32-NEXT: vsetvli a1, zero, e64, m1, ta, ma
658 ; RV32-NEXT: vlse64.v v9, (a0), zero
659 ; RV32-NEXT: vssubu.vv v8, v8, v9
660 ; RV32-NEXT: addi sp, sp, 16
661 ; RV32-NEXT: .cfi_def_cfa_offset 0
664 ; RV64-LABEL: usub_nxv1i64_vx:
666 ; RV64-NEXT: vsetvli a1, zero, e64, m1, ta, ma
667 ; RV64-NEXT: vssubu.vx v8, v8, a0
669 %elt.head = insertelement <vscale x 1 x i64> poison, i64 %b, i32 0
670 %vb = shufflevector <vscale x 1 x i64> %elt.head, <vscale x 1 x i64> poison, <vscale x 1 x i32> zeroinitializer
671 %v = call <vscale x 1 x i64> @llvm.usub.sat.nxv1i64(<vscale x 1 x i64> %va, <vscale x 1 x i64> %vb)
672 ret <vscale x 1 x i64> %v
675 define <vscale x 1 x i64> @usub_nxv1i64_vi(<vscale x 1 x i64> %va) {
676 ; CHECK-LABEL: usub_nxv1i64_vi:
678 ; CHECK-NEXT: li a0, 2
679 ; CHECK-NEXT: vsetvli a1, zero, e64, m1, ta, ma
680 ; CHECK-NEXT: vssubu.vx v8, v8, a0
682 %v = call <vscale x 1 x i64> @llvm.usub.sat.nxv1i64(<vscale x 1 x i64> %va, <vscale x 1 x i64> splat (i64 2))
683 ret <vscale x 1 x i64> %v
686 declare <vscale x 2 x i64> @llvm.usub.sat.nxv2i64(<vscale x 2 x i64>, <vscale x 2 x i64>)
688 define <vscale x 2 x i64> @usub_nxv2i64_vv(<vscale x 2 x i64> %va, <vscale x 2 x i64> %b) {
689 ; CHECK-LABEL: usub_nxv2i64_vv:
691 ; CHECK-NEXT: vsetvli a0, zero, e64, m2, ta, ma
692 ; CHECK-NEXT: vssubu.vv v8, v8, v10
694 %v = call <vscale x 2 x i64> @llvm.usub.sat.nxv2i64(<vscale x 2 x i64> %va, <vscale x 2 x i64> %b)
695 ret <vscale x 2 x i64> %v
698 define <vscale x 2 x i64> @usub_nxv2i64_vx(<vscale x 2 x i64> %va, i64 %b) {
699 ; RV32-LABEL: usub_nxv2i64_vx:
701 ; RV32-NEXT: addi sp, sp, -16
702 ; RV32-NEXT: .cfi_def_cfa_offset 16
703 ; RV32-NEXT: sw a0, 8(sp)
704 ; RV32-NEXT: sw a1, 12(sp)
705 ; RV32-NEXT: addi a0, sp, 8
706 ; RV32-NEXT: vsetvli a1, zero, e64, m2, ta, ma
707 ; RV32-NEXT: vlse64.v v10, (a0), zero
708 ; RV32-NEXT: vssubu.vv v8, v8, v10
709 ; RV32-NEXT: addi sp, sp, 16
710 ; RV32-NEXT: .cfi_def_cfa_offset 0
713 ; RV64-LABEL: usub_nxv2i64_vx:
715 ; RV64-NEXT: vsetvli a1, zero, e64, m2, ta, ma
716 ; RV64-NEXT: vssubu.vx v8, v8, a0
718 %elt.head = insertelement <vscale x 2 x i64> poison, i64 %b, i32 0
719 %vb = shufflevector <vscale x 2 x i64> %elt.head, <vscale x 2 x i64> poison, <vscale x 2 x i32> zeroinitializer
720 %v = call <vscale x 2 x i64> @llvm.usub.sat.nxv2i64(<vscale x 2 x i64> %va, <vscale x 2 x i64> %vb)
721 ret <vscale x 2 x i64> %v
724 define <vscale x 2 x i64> @usub_nxv2i64_vi(<vscale x 2 x i64> %va) {
725 ; CHECK-LABEL: usub_nxv2i64_vi:
727 ; CHECK-NEXT: li a0, 2
728 ; CHECK-NEXT: vsetvli a1, zero, e64, m2, ta, ma
729 ; CHECK-NEXT: vssubu.vx v8, v8, a0
731 %v = call <vscale x 2 x i64> @llvm.usub.sat.nxv2i64(<vscale x 2 x i64> %va, <vscale x 2 x i64> splat (i64 2))
732 ret <vscale x 2 x i64> %v
735 declare <vscale x 4 x i64> @llvm.usub.sat.nxv4i64(<vscale x 4 x i64>, <vscale x 4 x i64>)
737 define <vscale x 4 x i64> @usub_nxv4i64_vv(<vscale x 4 x i64> %va, <vscale x 4 x i64> %b) {
738 ; CHECK-LABEL: usub_nxv4i64_vv:
740 ; CHECK-NEXT: vsetvli a0, zero, e64, m4, ta, ma
741 ; CHECK-NEXT: vssubu.vv v8, v8, v12
743 %v = call <vscale x 4 x i64> @llvm.usub.sat.nxv4i64(<vscale x 4 x i64> %va, <vscale x 4 x i64> %b)
744 ret <vscale x 4 x i64> %v
747 define <vscale x 4 x i64> @usub_nxv4i64_vx(<vscale x 4 x i64> %va, i64 %b) {
748 ; RV32-LABEL: usub_nxv4i64_vx:
750 ; RV32-NEXT: addi sp, sp, -16
751 ; RV32-NEXT: .cfi_def_cfa_offset 16
752 ; RV32-NEXT: sw a0, 8(sp)
753 ; RV32-NEXT: sw a1, 12(sp)
754 ; RV32-NEXT: addi a0, sp, 8
755 ; RV32-NEXT: vsetvli a1, zero, e64, m4, ta, ma
756 ; RV32-NEXT: vlse64.v v12, (a0), zero
757 ; RV32-NEXT: vssubu.vv v8, v8, v12
758 ; RV32-NEXT: addi sp, sp, 16
759 ; RV32-NEXT: .cfi_def_cfa_offset 0
762 ; RV64-LABEL: usub_nxv4i64_vx:
764 ; RV64-NEXT: vsetvli a1, zero, e64, m4, ta, ma
765 ; RV64-NEXT: vssubu.vx v8, v8, a0
767 %elt.head = insertelement <vscale x 4 x i64> poison, i64 %b, i32 0
768 %vb = shufflevector <vscale x 4 x i64> %elt.head, <vscale x 4 x i64> poison, <vscale x 4 x i32> zeroinitializer
769 %v = call <vscale x 4 x i64> @llvm.usub.sat.nxv4i64(<vscale x 4 x i64> %va, <vscale x 4 x i64> %vb)
770 ret <vscale x 4 x i64> %v
773 define <vscale x 4 x i64> @usub_nxv4i64_vi(<vscale x 4 x i64> %va) {
774 ; CHECK-LABEL: usub_nxv4i64_vi:
776 ; CHECK-NEXT: li a0, 2
777 ; CHECK-NEXT: vsetvli a1, zero, e64, m4, ta, ma
778 ; CHECK-NEXT: vssubu.vx v8, v8, a0
780 %v = call <vscale x 4 x i64> @llvm.usub.sat.nxv4i64(<vscale x 4 x i64> %va, <vscale x 4 x i64> splat (i64 2))
781 ret <vscale x 4 x i64> %v
784 declare <vscale x 8 x i64> @llvm.usub.sat.nxv8i64(<vscale x 8 x i64>, <vscale x 8 x i64>)
786 define <vscale x 8 x i64> @usub_nxv8i64_vv(<vscale x 8 x i64> %va, <vscale x 8 x i64> %b) {
787 ; CHECK-LABEL: usub_nxv8i64_vv:
789 ; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma
790 ; CHECK-NEXT: vssubu.vv v8, v8, v16
792 %v = call <vscale x 8 x i64> @llvm.usub.sat.nxv8i64(<vscale x 8 x i64> %va, <vscale x 8 x i64> %b)
793 ret <vscale x 8 x i64> %v
796 define <vscale x 8 x i64> @usub_nxv8i64_vx(<vscale x 8 x i64> %va, i64 %b) {
797 ; RV32-LABEL: usub_nxv8i64_vx:
799 ; RV32-NEXT: addi sp, sp, -16
800 ; RV32-NEXT: .cfi_def_cfa_offset 16
801 ; RV32-NEXT: sw a0, 8(sp)
802 ; RV32-NEXT: sw a1, 12(sp)
803 ; RV32-NEXT: addi a0, sp, 8
804 ; RV32-NEXT: vsetvli a1, zero, e64, m8, ta, ma
805 ; RV32-NEXT: vlse64.v v16, (a0), zero
806 ; RV32-NEXT: vssubu.vv v8, v8, v16
807 ; RV32-NEXT: addi sp, sp, 16
808 ; RV32-NEXT: .cfi_def_cfa_offset 0
811 ; RV64-LABEL: usub_nxv8i64_vx:
813 ; RV64-NEXT: vsetvli a1, zero, e64, m8, ta, ma
814 ; RV64-NEXT: vssubu.vx v8, v8, a0
816 %elt.head = insertelement <vscale x 8 x i64> poison, i64 %b, i32 0
817 %vb = shufflevector <vscale x 8 x i64> %elt.head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
818 %v = call <vscale x 8 x i64> @llvm.usub.sat.nxv8i64(<vscale x 8 x i64> %va, <vscale x 8 x i64> %vb)
819 ret <vscale x 8 x i64> %v
822 define <vscale x 8 x i64> @usub_nxv8i64_vi(<vscale x 8 x i64> %va) {
823 ; CHECK-LABEL: usub_nxv8i64_vi:
825 ; CHECK-NEXT: li a0, 2
826 ; CHECK-NEXT: vsetvli a1, zero, e64, m8, ta, ma
827 ; CHECK-NEXT: vssubu.vx v8, v8, a0
829 %v = call <vscale x 8 x i64> @llvm.usub.sat.nxv8i64(<vscale x 8 x i64> %va, <vscale x 8 x i64> splat (i64 2))
830 ret <vscale x 8 x i64> %v