1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=riscv32 -mattr=+v -verify-machineinstrs < %s \
3 ; RUN: | FileCheck %s --check-prefixes=CHECK,RV32
4 ; RUN: llc -mtriple=riscv64 -mattr=+v -verify-machineinstrs < %s \
5 ; RUN: | FileCheck %s --check-prefixes=CHECK,RV64
7 declare <8 x i7> @llvm.vp.udiv.v8i7(<8 x i7>, <8 x i7>, <8 x i1>, i32)
9 define <8 x i7> @vdivu_vv_v8i7(<8 x i7> %va, <8 x i7> %b, <8 x i1> %m, i32 zeroext %evl) {
10 ; CHECK-LABEL: vdivu_vv_v8i7:
12 ; CHECK-NEXT: li a1, 127
13 ; CHECK-NEXT: vsetivli zero, 8, e8, mf2, ta, ma
14 ; CHECK-NEXT: vand.vx v9, v9, a1
15 ; CHECK-NEXT: vand.vx v8, v8, a1
16 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
17 ; CHECK-NEXT: vdivu.vv v8, v8, v9, v0.t
19 %v = call <8 x i7> @llvm.vp.udiv.v8i7(<8 x i7> %va, <8 x i7> %b, <8 x i1> %m, i32 %evl)
23 declare <2 x i8> @llvm.vp.udiv.v2i8(<2 x i8>, <2 x i8>, <2 x i1>, i32)
25 define <2 x i8> @vdivu_vv_v2i8(<2 x i8> %va, <2 x i8> %b, <2 x i1> %m, i32 zeroext %evl) {
26 ; CHECK-LABEL: vdivu_vv_v2i8:
28 ; CHECK-NEXT: vsetvli zero, a0, e8, mf8, ta, ma
29 ; CHECK-NEXT: vdivu.vv v8, v8, v9, v0.t
31 %v = call <2 x i8> @llvm.vp.udiv.v2i8(<2 x i8> %va, <2 x i8> %b, <2 x i1> %m, i32 %evl)
35 define <2 x i8> @vdivu_vv_v2i8_unmasked(<2 x i8> %va, <2 x i8> %b, i32 zeroext %evl) {
36 ; CHECK-LABEL: vdivu_vv_v2i8_unmasked:
38 ; CHECK-NEXT: vsetvli zero, a0, e8, mf8, ta, ma
39 ; CHECK-NEXT: vdivu.vv v8, v8, v9
41 %head = insertelement <2 x i1> poison, i1 true, i32 0
42 %m = shufflevector <2 x i1> %head, <2 x i1> poison, <2 x i32> zeroinitializer
43 %v = call <2 x i8> @llvm.vp.udiv.v2i8(<2 x i8> %va, <2 x i8> %b, <2 x i1> %m, i32 %evl)
47 define <2 x i8> @vdivu_vx_v2i8(<2 x i8> %va, i8 %b, <2 x i1> %m, i32 zeroext %evl) {
48 ; CHECK-LABEL: vdivu_vx_v2i8:
50 ; CHECK-NEXT: vsetvli zero, a1, e8, mf8, ta, ma
51 ; CHECK-NEXT: vdivu.vx v8, v8, a0, v0.t
53 %elt.head = insertelement <2 x i8> poison, i8 %b, i32 0
54 %vb = shufflevector <2 x i8> %elt.head, <2 x i8> poison, <2 x i32> zeroinitializer
55 %v = call <2 x i8> @llvm.vp.udiv.v2i8(<2 x i8> %va, <2 x i8> %vb, <2 x i1> %m, i32 %evl)
59 define <2 x i8> @vdivu_vx_v2i8_unmasked(<2 x i8> %va, i8 %b, i32 zeroext %evl) {
60 ; CHECK-LABEL: vdivu_vx_v2i8_unmasked:
62 ; CHECK-NEXT: vsetvli zero, a1, e8, mf8, ta, ma
63 ; CHECK-NEXT: vdivu.vx v8, v8, a0
65 %elt.head = insertelement <2 x i8> poison, i8 %b, i32 0
66 %vb = shufflevector <2 x i8> %elt.head, <2 x i8> poison, <2 x i32> zeroinitializer
67 %head = insertelement <2 x i1> poison, i1 true, i32 0
68 %m = shufflevector <2 x i1> %head, <2 x i1> poison, <2 x i32> zeroinitializer
69 %v = call <2 x i8> @llvm.vp.udiv.v2i8(<2 x i8> %va, <2 x i8> %vb, <2 x i1> %m, i32 %evl)
73 declare <4 x i8> @llvm.vp.udiv.v4i8(<4 x i8>, <4 x i8>, <4 x i1>, i32)
75 define <4 x i8> @vdivu_vv_v4i8(<4 x i8> %va, <4 x i8> %b, <4 x i1> %m, i32 zeroext %evl) {
76 ; CHECK-LABEL: vdivu_vv_v4i8:
78 ; CHECK-NEXT: vsetvli zero, a0, e8, mf4, ta, ma
79 ; CHECK-NEXT: vdivu.vv v8, v8, v9, v0.t
81 %v = call <4 x i8> @llvm.vp.udiv.v4i8(<4 x i8> %va, <4 x i8> %b, <4 x i1> %m, i32 %evl)
85 define <4 x i8> @vdivu_vv_v4i8_unmasked(<4 x i8> %va, <4 x i8> %b, i32 zeroext %evl) {
86 ; CHECK-LABEL: vdivu_vv_v4i8_unmasked:
88 ; CHECK-NEXT: vsetvli zero, a0, e8, mf4, ta, ma
89 ; CHECK-NEXT: vdivu.vv v8, v8, v9
91 %head = insertelement <4 x i1> poison, i1 true, i32 0
92 %m = shufflevector <4 x i1> %head, <4 x i1> poison, <4 x i32> zeroinitializer
93 %v = call <4 x i8> @llvm.vp.udiv.v4i8(<4 x i8> %va, <4 x i8> %b, <4 x i1> %m, i32 %evl)
97 define <4 x i8> @vdivu_vx_v4i8(<4 x i8> %va, i8 %b, <4 x i1> %m, i32 zeroext %evl) {
98 ; CHECK-LABEL: vdivu_vx_v4i8:
100 ; CHECK-NEXT: vsetvli zero, a1, e8, mf4, ta, ma
101 ; CHECK-NEXT: vdivu.vx v8, v8, a0, v0.t
103 %elt.head = insertelement <4 x i8> poison, i8 %b, i32 0
104 %vb = shufflevector <4 x i8> %elt.head, <4 x i8> poison, <4 x i32> zeroinitializer
105 %v = call <4 x i8> @llvm.vp.udiv.v4i8(<4 x i8> %va, <4 x i8> %vb, <4 x i1> %m, i32 %evl)
109 define <4 x i8> @vdivu_vx_v4i8_unmasked(<4 x i8> %va, i8 %b, i32 zeroext %evl) {
110 ; CHECK-LABEL: vdivu_vx_v4i8_unmasked:
112 ; CHECK-NEXT: vsetvli zero, a1, e8, mf4, ta, ma
113 ; CHECK-NEXT: vdivu.vx v8, v8, a0
115 %elt.head = insertelement <4 x i8> poison, i8 %b, i32 0
116 %vb = shufflevector <4 x i8> %elt.head, <4 x i8> poison, <4 x i32> zeroinitializer
117 %head = insertelement <4 x i1> poison, i1 true, i32 0
118 %m = shufflevector <4 x i1> %head, <4 x i1> poison, <4 x i32> zeroinitializer
119 %v = call <4 x i8> @llvm.vp.udiv.v4i8(<4 x i8> %va, <4 x i8> %vb, <4 x i1> %m, i32 %evl)
123 declare <6 x i8> @llvm.vp.udiv.v6i8(<6 x i8>, <6 x i8>, <6 x i1>, i32)
125 define <6 x i8> @vdivu_vv_v6i8(<6 x i8> %va, <6 x i8> %b, <6 x i1> %m, i32 zeroext %evl) {
126 ; CHECK-LABEL: vdivu_vv_v6i8:
128 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
129 ; CHECK-NEXT: vdivu.vv v8, v8, v9, v0.t
131 %v = call <6 x i8> @llvm.vp.udiv.v6i8(<6 x i8> %va, <6 x i8> %b, <6 x i1> %m, i32 %evl)
135 declare <8 x i8> @llvm.vp.udiv.v8i8(<8 x i8>, <8 x i8>, <8 x i1>, i32)
137 define <8 x i8> @vdivu_vv_v8i8(<8 x i8> %va, <8 x i8> %b, <8 x i1> %m, i32 zeroext %evl) {
138 ; CHECK-LABEL: vdivu_vv_v8i8:
140 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
141 ; CHECK-NEXT: vdivu.vv v8, v8, v9, v0.t
143 %v = call <8 x i8> @llvm.vp.udiv.v8i8(<8 x i8> %va, <8 x i8> %b, <8 x i1> %m, i32 %evl)
147 define <8 x i8> @vdivu_vv_v8i8_unmasked(<8 x i8> %va, <8 x i8> %b, i32 zeroext %evl) {
148 ; CHECK-LABEL: vdivu_vv_v8i8_unmasked:
150 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
151 ; CHECK-NEXT: vdivu.vv v8, v8, v9
153 %head = insertelement <8 x i1> poison, i1 true, i32 0
154 %m = shufflevector <8 x i1> %head, <8 x i1> poison, <8 x i32> zeroinitializer
155 %v = call <8 x i8> @llvm.vp.udiv.v8i8(<8 x i8> %va, <8 x i8> %b, <8 x i1> %m, i32 %evl)
159 define <8 x i8> @vdivu_vx_v8i8(<8 x i8> %va, i8 %b, <8 x i1> %m, i32 zeroext %evl) {
160 ; CHECK-LABEL: vdivu_vx_v8i8:
162 ; CHECK-NEXT: vsetvli zero, a1, e8, mf2, ta, ma
163 ; CHECK-NEXT: vdivu.vx v8, v8, a0, v0.t
165 %elt.head = insertelement <8 x i8> poison, i8 %b, i32 0
166 %vb = shufflevector <8 x i8> %elt.head, <8 x i8> poison, <8 x i32> zeroinitializer
167 %v = call <8 x i8> @llvm.vp.udiv.v8i8(<8 x i8> %va, <8 x i8> %vb, <8 x i1> %m, i32 %evl)
171 define <8 x i8> @vdivu_vx_v8i8_unmasked(<8 x i8> %va, i8 %b, i32 zeroext %evl) {
172 ; CHECK-LABEL: vdivu_vx_v8i8_unmasked:
174 ; CHECK-NEXT: vsetvli zero, a1, e8, mf2, ta, ma
175 ; CHECK-NEXT: vdivu.vx v8, v8, a0
177 %elt.head = insertelement <8 x i8> poison, i8 %b, i32 0
178 %vb = shufflevector <8 x i8> %elt.head, <8 x i8> poison, <8 x i32> zeroinitializer
179 %head = insertelement <8 x i1> poison, i1 true, i32 0
180 %m = shufflevector <8 x i1> %head, <8 x i1> poison, <8 x i32> zeroinitializer
181 %v = call <8 x i8> @llvm.vp.udiv.v8i8(<8 x i8> %va, <8 x i8> %vb, <8 x i1> %m, i32 %evl)
185 declare <16 x i8> @llvm.vp.udiv.v16i8(<16 x i8>, <16 x i8>, <16 x i1>, i32)
187 define <16 x i8> @vdivu_vv_v16i8(<16 x i8> %va, <16 x i8> %b, <16 x i1> %m, i32 zeroext %evl) {
188 ; CHECK-LABEL: vdivu_vv_v16i8:
190 ; CHECK-NEXT: vsetvli zero, a0, e8, m1, ta, ma
191 ; CHECK-NEXT: vdivu.vv v8, v8, v9, v0.t
193 %v = call <16 x i8> @llvm.vp.udiv.v16i8(<16 x i8> %va, <16 x i8> %b, <16 x i1> %m, i32 %evl)
197 define <16 x i8> @vdivu_vv_v16i8_unmasked(<16 x i8> %va, <16 x i8> %b, i32 zeroext %evl) {
198 ; CHECK-LABEL: vdivu_vv_v16i8_unmasked:
200 ; CHECK-NEXT: vsetvli zero, a0, e8, m1, ta, ma
201 ; CHECK-NEXT: vdivu.vv v8, v8, v9
203 %head = insertelement <16 x i1> poison, i1 true, i32 0
204 %m = shufflevector <16 x i1> %head, <16 x i1> poison, <16 x i32> zeroinitializer
205 %v = call <16 x i8> @llvm.vp.udiv.v16i8(<16 x i8> %va, <16 x i8> %b, <16 x i1> %m, i32 %evl)
209 define <16 x i8> @vdivu_vx_v16i8(<16 x i8> %va, i8 %b, <16 x i1> %m, i32 zeroext %evl) {
210 ; CHECK-LABEL: vdivu_vx_v16i8:
212 ; CHECK-NEXT: vsetvli zero, a1, e8, m1, ta, ma
213 ; CHECK-NEXT: vdivu.vx v8, v8, a0, v0.t
215 %elt.head = insertelement <16 x i8> poison, i8 %b, i32 0
216 %vb = shufflevector <16 x i8> %elt.head, <16 x i8> poison, <16 x i32> zeroinitializer
217 %v = call <16 x i8> @llvm.vp.udiv.v16i8(<16 x i8> %va, <16 x i8> %vb, <16 x i1> %m, i32 %evl)
221 define <16 x i8> @vdivu_vx_v16i8_unmasked(<16 x i8> %va, i8 %b, i32 zeroext %evl) {
222 ; CHECK-LABEL: vdivu_vx_v16i8_unmasked:
224 ; CHECK-NEXT: vsetvli zero, a1, e8, m1, ta, ma
225 ; CHECK-NEXT: vdivu.vx v8, v8, a0
227 %elt.head = insertelement <16 x i8> poison, i8 %b, i32 0
228 %vb = shufflevector <16 x i8> %elt.head, <16 x i8> poison, <16 x i32> zeroinitializer
229 %head = insertelement <16 x i1> poison, i1 true, i32 0
230 %m = shufflevector <16 x i1> %head, <16 x i1> poison, <16 x i32> zeroinitializer
231 %v = call <16 x i8> @llvm.vp.udiv.v16i8(<16 x i8> %va, <16 x i8> %vb, <16 x i1> %m, i32 %evl)
235 declare <2 x i16> @llvm.vp.udiv.v2i16(<2 x i16>, <2 x i16>, <2 x i1>, i32)
237 define <2 x i16> @vdivu_vv_v2i16(<2 x i16> %va, <2 x i16> %b, <2 x i1> %m, i32 zeroext %evl) {
238 ; CHECK-LABEL: vdivu_vv_v2i16:
240 ; CHECK-NEXT: vsetvli zero, a0, e16, mf4, ta, ma
241 ; CHECK-NEXT: vdivu.vv v8, v8, v9, v0.t
243 %v = call <2 x i16> @llvm.vp.udiv.v2i16(<2 x i16> %va, <2 x i16> %b, <2 x i1> %m, i32 %evl)
247 define <2 x i16> @vdivu_vv_v2i16_unmasked(<2 x i16> %va, <2 x i16> %b, i32 zeroext %evl) {
248 ; CHECK-LABEL: vdivu_vv_v2i16_unmasked:
250 ; CHECK-NEXT: vsetvli zero, a0, e16, mf4, ta, ma
251 ; CHECK-NEXT: vdivu.vv v8, v8, v9
253 %head = insertelement <2 x i1> poison, i1 true, i32 0
254 %m = shufflevector <2 x i1> %head, <2 x i1> poison, <2 x i32> zeroinitializer
255 %v = call <2 x i16> @llvm.vp.udiv.v2i16(<2 x i16> %va, <2 x i16> %b, <2 x i1> %m, i32 %evl)
259 define <2 x i16> @vdivu_vx_v2i16(<2 x i16> %va, i16 %b, <2 x i1> %m, i32 zeroext %evl) {
260 ; CHECK-LABEL: vdivu_vx_v2i16:
262 ; CHECK-NEXT: vsetvli zero, a1, e16, mf4, ta, ma
263 ; CHECK-NEXT: vdivu.vx v8, v8, a0, v0.t
265 %elt.head = insertelement <2 x i16> poison, i16 %b, i32 0
266 %vb = shufflevector <2 x i16> %elt.head, <2 x i16> poison, <2 x i32> zeroinitializer
267 %v = call <2 x i16> @llvm.vp.udiv.v2i16(<2 x i16> %va, <2 x i16> %vb, <2 x i1> %m, i32 %evl)
271 define <2 x i16> @vdivu_vx_v2i16_unmasked(<2 x i16> %va, i16 %b, i32 zeroext %evl) {
272 ; CHECK-LABEL: vdivu_vx_v2i16_unmasked:
274 ; CHECK-NEXT: vsetvli zero, a1, e16, mf4, ta, ma
275 ; CHECK-NEXT: vdivu.vx v8, v8, a0
277 %elt.head = insertelement <2 x i16> poison, i16 %b, i32 0
278 %vb = shufflevector <2 x i16> %elt.head, <2 x i16> poison, <2 x i32> zeroinitializer
279 %head = insertelement <2 x i1> poison, i1 true, i32 0
280 %m = shufflevector <2 x i1> %head, <2 x i1> poison, <2 x i32> zeroinitializer
281 %v = call <2 x i16> @llvm.vp.udiv.v2i16(<2 x i16> %va, <2 x i16> %vb, <2 x i1> %m, i32 %evl)
285 declare <4 x i16> @llvm.vp.udiv.v4i16(<4 x i16>, <4 x i16>, <4 x i1>, i32)
287 define <4 x i16> @vdivu_vv_v4i16(<4 x i16> %va, <4 x i16> %b, <4 x i1> %m, i32 zeroext %evl) {
288 ; CHECK-LABEL: vdivu_vv_v4i16:
290 ; CHECK-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
291 ; CHECK-NEXT: vdivu.vv v8, v8, v9, v0.t
293 %v = call <4 x i16> @llvm.vp.udiv.v4i16(<4 x i16> %va, <4 x i16> %b, <4 x i1> %m, i32 %evl)
297 define <4 x i16> @vdivu_vv_v4i16_unmasked(<4 x i16> %va, <4 x i16> %b, i32 zeroext %evl) {
298 ; CHECK-LABEL: vdivu_vv_v4i16_unmasked:
300 ; CHECK-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
301 ; CHECK-NEXT: vdivu.vv v8, v8, v9
303 %head = insertelement <4 x i1> poison, i1 true, i32 0
304 %m = shufflevector <4 x i1> %head, <4 x i1> poison, <4 x i32> zeroinitializer
305 %v = call <4 x i16> @llvm.vp.udiv.v4i16(<4 x i16> %va, <4 x i16> %b, <4 x i1> %m, i32 %evl)
309 define <4 x i16> @vdivu_vx_v4i16(<4 x i16> %va, i16 %b, <4 x i1> %m, i32 zeroext %evl) {
310 ; CHECK-LABEL: vdivu_vx_v4i16:
312 ; CHECK-NEXT: vsetvli zero, a1, e16, mf2, ta, ma
313 ; CHECK-NEXT: vdivu.vx v8, v8, a0, v0.t
315 %elt.head = insertelement <4 x i16> poison, i16 %b, i32 0
316 %vb = shufflevector <4 x i16> %elt.head, <4 x i16> poison, <4 x i32> zeroinitializer
317 %v = call <4 x i16> @llvm.vp.udiv.v4i16(<4 x i16> %va, <4 x i16> %vb, <4 x i1> %m, i32 %evl)
321 define <4 x i16> @vdivu_vx_v4i16_unmasked(<4 x i16> %va, i16 %b, i32 zeroext %evl) {
322 ; CHECK-LABEL: vdivu_vx_v4i16_unmasked:
324 ; CHECK-NEXT: vsetvli zero, a1, e16, mf2, ta, ma
325 ; CHECK-NEXT: vdivu.vx v8, v8, a0
327 %elt.head = insertelement <4 x i16> poison, i16 %b, i32 0
328 %vb = shufflevector <4 x i16> %elt.head, <4 x i16> poison, <4 x i32> zeroinitializer
329 %head = insertelement <4 x i1> poison, i1 true, i32 0
330 %m = shufflevector <4 x i1> %head, <4 x i1> poison, <4 x i32> zeroinitializer
331 %v = call <4 x i16> @llvm.vp.udiv.v4i16(<4 x i16> %va, <4 x i16> %vb, <4 x i1> %m, i32 %evl)
335 declare <8 x i16> @llvm.vp.udiv.v8i16(<8 x i16>, <8 x i16>, <8 x i1>, i32)
337 define <8 x i16> @vdivu_vv_v8i16(<8 x i16> %va, <8 x i16> %b, <8 x i1> %m, i32 zeroext %evl) {
338 ; CHECK-LABEL: vdivu_vv_v8i16:
340 ; CHECK-NEXT: vsetvli zero, a0, e16, m1, ta, ma
341 ; CHECK-NEXT: vdivu.vv v8, v8, v9, v0.t
343 %v = call <8 x i16> @llvm.vp.udiv.v8i16(<8 x i16> %va, <8 x i16> %b, <8 x i1> %m, i32 %evl)
347 define <8 x i16> @vdivu_vv_v8i16_unmasked(<8 x i16> %va, <8 x i16> %b, i32 zeroext %evl) {
348 ; CHECK-LABEL: vdivu_vv_v8i16_unmasked:
350 ; CHECK-NEXT: vsetvli zero, a0, e16, m1, ta, ma
351 ; CHECK-NEXT: vdivu.vv v8, v8, v9
353 %head = insertelement <8 x i1> poison, i1 true, i32 0
354 %m = shufflevector <8 x i1> %head, <8 x i1> poison, <8 x i32> zeroinitializer
355 %v = call <8 x i16> @llvm.vp.udiv.v8i16(<8 x i16> %va, <8 x i16> %b, <8 x i1> %m, i32 %evl)
359 define <8 x i16> @vdivu_vx_v8i16(<8 x i16> %va, i16 %b, <8 x i1> %m, i32 zeroext %evl) {
360 ; CHECK-LABEL: vdivu_vx_v8i16:
362 ; CHECK-NEXT: vsetvli zero, a1, e16, m1, ta, ma
363 ; CHECK-NEXT: vdivu.vx v8, v8, a0, v0.t
365 %elt.head = insertelement <8 x i16> poison, i16 %b, i32 0
366 %vb = shufflevector <8 x i16> %elt.head, <8 x i16> poison, <8 x i32> zeroinitializer
367 %v = call <8 x i16> @llvm.vp.udiv.v8i16(<8 x i16> %va, <8 x i16> %vb, <8 x i1> %m, i32 %evl)
371 define <8 x i16> @vdivu_vx_v8i16_unmasked(<8 x i16> %va, i16 %b, i32 zeroext %evl) {
372 ; CHECK-LABEL: vdivu_vx_v8i16_unmasked:
374 ; CHECK-NEXT: vsetvli zero, a1, e16, m1, ta, ma
375 ; CHECK-NEXT: vdivu.vx v8, v8, a0
377 %elt.head = insertelement <8 x i16> poison, i16 %b, i32 0
378 %vb = shufflevector <8 x i16> %elt.head, <8 x i16> poison, <8 x i32> zeroinitializer
379 %head = insertelement <8 x i1> poison, i1 true, i32 0
380 %m = shufflevector <8 x i1> %head, <8 x i1> poison, <8 x i32> zeroinitializer
381 %v = call <8 x i16> @llvm.vp.udiv.v8i16(<8 x i16> %va, <8 x i16> %vb, <8 x i1> %m, i32 %evl)
385 declare <16 x i16> @llvm.vp.udiv.v16i16(<16 x i16>, <16 x i16>, <16 x i1>, i32)
387 define <16 x i16> @vdivu_vv_v16i16(<16 x i16> %va, <16 x i16> %b, <16 x i1> %m, i32 zeroext %evl) {
388 ; CHECK-LABEL: vdivu_vv_v16i16:
390 ; CHECK-NEXT: vsetvli zero, a0, e16, m2, ta, ma
391 ; CHECK-NEXT: vdivu.vv v8, v8, v10, v0.t
393 %v = call <16 x i16> @llvm.vp.udiv.v16i16(<16 x i16> %va, <16 x i16> %b, <16 x i1> %m, i32 %evl)
397 define <16 x i16> @vdivu_vv_v16i16_unmasked(<16 x i16> %va, <16 x i16> %b, i32 zeroext %evl) {
398 ; CHECK-LABEL: vdivu_vv_v16i16_unmasked:
400 ; CHECK-NEXT: vsetvli zero, a0, e16, m2, ta, ma
401 ; CHECK-NEXT: vdivu.vv v8, v8, v10
403 %head = insertelement <16 x i1> poison, i1 true, i32 0
404 %m = shufflevector <16 x i1> %head, <16 x i1> poison, <16 x i32> zeroinitializer
405 %v = call <16 x i16> @llvm.vp.udiv.v16i16(<16 x i16> %va, <16 x i16> %b, <16 x i1> %m, i32 %evl)
409 define <16 x i16> @vdivu_vx_v16i16(<16 x i16> %va, i16 %b, <16 x i1> %m, i32 zeroext %evl) {
410 ; CHECK-LABEL: vdivu_vx_v16i16:
412 ; CHECK-NEXT: vsetvli zero, a1, e16, m2, ta, ma
413 ; CHECK-NEXT: vdivu.vx v8, v8, a0, v0.t
415 %elt.head = insertelement <16 x i16> poison, i16 %b, i32 0
416 %vb = shufflevector <16 x i16> %elt.head, <16 x i16> poison, <16 x i32> zeroinitializer
417 %v = call <16 x i16> @llvm.vp.udiv.v16i16(<16 x i16> %va, <16 x i16> %vb, <16 x i1> %m, i32 %evl)
421 define <16 x i16> @vdivu_vx_v16i16_unmasked(<16 x i16> %va, i16 %b, i32 zeroext %evl) {
422 ; CHECK-LABEL: vdivu_vx_v16i16_unmasked:
424 ; CHECK-NEXT: vsetvli zero, a1, e16, m2, ta, ma
425 ; CHECK-NEXT: vdivu.vx v8, v8, a0
427 %elt.head = insertelement <16 x i16> poison, i16 %b, i32 0
428 %vb = shufflevector <16 x i16> %elt.head, <16 x i16> poison, <16 x i32> zeroinitializer
429 %head = insertelement <16 x i1> poison, i1 true, i32 0
430 %m = shufflevector <16 x i1> %head, <16 x i1> poison, <16 x i32> zeroinitializer
431 %v = call <16 x i16> @llvm.vp.udiv.v16i16(<16 x i16> %va, <16 x i16> %vb, <16 x i1> %m, i32 %evl)
435 declare <2 x i32> @llvm.vp.udiv.v2i32(<2 x i32>, <2 x i32>, <2 x i1>, i32)
437 define <2 x i32> @vdivu_vv_v2i32(<2 x i32> %va, <2 x i32> %b, <2 x i1> %m, i32 zeroext %evl) {
438 ; CHECK-LABEL: vdivu_vv_v2i32:
440 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
441 ; CHECK-NEXT: vdivu.vv v8, v8, v9, v0.t
443 %v = call <2 x i32> @llvm.vp.udiv.v2i32(<2 x i32> %va, <2 x i32> %b, <2 x i1> %m, i32 %evl)
447 define <2 x i32> @vdivu_vv_v2i32_unmasked(<2 x i32> %va, <2 x i32> %b, i32 zeroext %evl) {
448 ; CHECK-LABEL: vdivu_vv_v2i32_unmasked:
450 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
451 ; CHECK-NEXT: vdivu.vv v8, v8, v9
453 %head = insertelement <2 x i1> poison, i1 true, i32 0
454 %m = shufflevector <2 x i1> %head, <2 x i1> poison, <2 x i32> zeroinitializer
455 %v = call <2 x i32> @llvm.vp.udiv.v2i32(<2 x i32> %va, <2 x i32> %b, <2 x i1> %m, i32 %evl)
459 define <2 x i32> @vdivu_vx_v2i32(<2 x i32> %va, i32 %b, <2 x i1> %m, i32 zeroext %evl) {
460 ; CHECK-LABEL: vdivu_vx_v2i32:
462 ; CHECK-NEXT: vsetvli zero, a1, e32, mf2, ta, ma
463 ; CHECK-NEXT: vdivu.vx v8, v8, a0, v0.t
465 %elt.head = insertelement <2 x i32> poison, i32 %b, i32 0
466 %vb = shufflevector <2 x i32> %elt.head, <2 x i32> poison, <2 x i32> zeroinitializer
467 %v = call <2 x i32> @llvm.vp.udiv.v2i32(<2 x i32> %va, <2 x i32> %vb, <2 x i1> %m, i32 %evl)
471 define <2 x i32> @vdivu_vx_v2i32_unmasked(<2 x i32> %va, i32 %b, i32 zeroext %evl) {
472 ; CHECK-LABEL: vdivu_vx_v2i32_unmasked:
474 ; CHECK-NEXT: vsetvli zero, a1, e32, mf2, ta, ma
475 ; CHECK-NEXT: vdivu.vx v8, v8, a0
477 %elt.head = insertelement <2 x i32> poison, i32 %b, i32 0
478 %vb = shufflevector <2 x i32> %elt.head, <2 x i32> poison, <2 x i32> zeroinitializer
479 %head = insertelement <2 x i1> poison, i1 true, i32 0
480 %m = shufflevector <2 x i1> %head, <2 x i1> poison, <2 x i32> zeroinitializer
481 %v = call <2 x i32> @llvm.vp.udiv.v2i32(<2 x i32> %va, <2 x i32> %vb, <2 x i1> %m, i32 %evl)
485 declare <4 x i32> @llvm.vp.udiv.v4i32(<4 x i32>, <4 x i32>, <4 x i1>, i32)
487 define <4 x i32> @vdivu_vv_v4i32(<4 x i32> %va, <4 x i32> %b, <4 x i1> %m, i32 zeroext %evl) {
488 ; CHECK-LABEL: vdivu_vv_v4i32:
490 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, ma
491 ; CHECK-NEXT: vdivu.vv v8, v8, v9, v0.t
493 %v = call <4 x i32> @llvm.vp.udiv.v4i32(<4 x i32> %va, <4 x i32> %b, <4 x i1> %m, i32 %evl)
497 define <4 x i32> @vdivu_vv_v4i32_unmasked(<4 x i32> %va, <4 x i32> %b, i32 zeroext %evl) {
498 ; CHECK-LABEL: vdivu_vv_v4i32_unmasked:
500 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, ma
501 ; CHECK-NEXT: vdivu.vv v8, v8, v9
503 %head = insertelement <4 x i1> poison, i1 true, i32 0
504 %m = shufflevector <4 x i1> %head, <4 x i1> poison, <4 x i32> zeroinitializer
505 %v = call <4 x i32> @llvm.vp.udiv.v4i32(<4 x i32> %va, <4 x i32> %b, <4 x i1> %m, i32 %evl)
509 define <4 x i32> @vdivu_vx_v4i32(<4 x i32> %va, i32 %b, <4 x i1> %m, i32 zeroext %evl) {
510 ; CHECK-LABEL: vdivu_vx_v4i32:
512 ; CHECK-NEXT: vsetvli zero, a1, e32, m1, ta, ma
513 ; CHECK-NEXT: vdivu.vx v8, v8, a0, v0.t
515 %elt.head = insertelement <4 x i32> poison, i32 %b, i32 0
516 %vb = shufflevector <4 x i32> %elt.head, <4 x i32> poison, <4 x i32> zeroinitializer
517 %v = call <4 x i32> @llvm.vp.udiv.v4i32(<4 x i32> %va, <4 x i32> %vb, <4 x i1> %m, i32 %evl)
521 define <4 x i32> @vdivu_vx_v4i32_unmasked(<4 x i32> %va, i32 %b, i32 zeroext %evl) {
522 ; CHECK-LABEL: vdivu_vx_v4i32_unmasked:
524 ; CHECK-NEXT: vsetvli zero, a1, e32, m1, ta, ma
525 ; CHECK-NEXT: vdivu.vx v8, v8, a0
527 %elt.head = insertelement <4 x i32> poison, i32 %b, i32 0
528 %vb = shufflevector <4 x i32> %elt.head, <4 x i32> poison, <4 x i32> zeroinitializer
529 %head = insertelement <4 x i1> poison, i1 true, i32 0
530 %m = shufflevector <4 x i1> %head, <4 x i1> poison, <4 x i32> zeroinitializer
531 %v = call <4 x i32> @llvm.vp.udiv.v4i32(<4 x i32> %va, <4 x i32> %vb, <4 x i1> %m, i32 %evl)
535 declare <8 x i32> @llvm.vp.udiv.v8i32(<8 x i32>, <8 x i32>, <8 x i1>, i32)
537 define <8 x i32> @vdivu_vv_v8i32(<8 x i32> %va, <8 x i32> %b, <8 x i1> %m, i32 zeroext %evl) {
538 ; CHECK-LABEL: vdivu_vv_v8i32:
540 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
541 ; CHECK-NEXT: vdivu.vv v8, v8, v10, v0.t
543 %v = call <8 x i32> @llvm.vp.udiv.v8i32(<8 x i32> %va, <8 x i32> %b, <8 x i1> %m, i32 %evl)
547 define <8 x i32> @vdivu_vv_v8i32_unmasked(<8 x i32> %va, <8 x i32> %b, i32 zeroext %evl) {
548 ; CHECK-LABEL: vdivu_vv_v8i32_unmasked:
550 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
551 ; CHECK-NEXT: vdivu.vv v8, v8, v10
553 %head = insertelement <8 x i1> poison, i1 true, i32 0
554 %m = shufflevector <8 x i1> %head, <8 x i1> poison, <8 x i32> zeroinitializer
555 %v = call <8 x i32> @llvm.vp.udiv.v8i32(<8 x i32> %va, <8 x i32> %b, <8 x i1> %m, i32 %evl)
559 define <8 x i32> @vdivu_vx_v8i32(<8 x i32> %va, i32 %b, <8 x i1> %m, i32 zeroext %evl) {
560 ; CHECK-LABEL: vdivu_vx_v8i32:
562 ; CHECK-NEXT: vsetvli zero, a1, e32, m2, ta, ma
563 ; CHECK-NEXT: vdivu.vx v8, v8, a0, v0.t
565 %elt.head = insertelement <8 x i32> poison, i32 %b, i32 0
566 %vb = shufflevector <8 x i32> %elt.head, <8 x i32> poison, <8 x i32> zeroinitializer
567 %v = call <8 x i32> @llvm.vp.udiv.v8i32(<8 x i32> %va, <8 x i32> %vb, <8 x i1> %m, i32 %evl)
571 define <8 x i32> @vdivu_vx_v8i32_unmasked(<8 x i32> %va, i32 %b, i32 zeroext %evl) {
572 ; CHECK-LABEL: vdivu_vx_v8i32_unmasked:
574 ; CHECK-NEXT: vsetvli zero, a1, e32, m2, ta, ma
575 ; CHECK-NEXT: vdivu.vx v8, v8, a0
577 %elt.head = insertelement <8 x i32> poison, i32 %b, i32 0
578 %vb = shufflevector <8 x i32> %elt.head, <8 x i32> poison, <8 x i32> zeroinitializer
579 %head = insertelement <8 x i1> poison, i1 true, i32 0
580 %m = shufflevector <8 x i1> %head, <8 x i1> poison, <8 x i32> zeroinitializer
581 %v = call <8 x i32> @llvm.vp.udiv.v8i32(<8 x i32> %va, <8 x i32> %vb, <8 x i1> %m, i32 %evl)
585 declare <16 x i32> @llvm.vp.udiv.v16i32(<16 x i32>, <16 x i32>, <16 x i1>, i32)
587 define <16 x i32> @vdivu_vv_v16i32(<16 x i32> %va, <16 x i32> %b, <16 x i1> %m, i32 zeroext %evl) {
588 ; CHECK-LABEL: vdivu_vv_v16i32:
590 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
591 ; CHECK-NEXT: vdivu.vv v8, v8, v12, v0.t
593 %v = call <16 x i32> @llvm.vp.udiv.v16i32(<16 x i32> %va, <16 x i32> %b, <16 x i1> %m, i32 %evl)
597 define <16 x i32> @vdivu_vv_v16i32_unmasked(<16 x i32> %va, <16 x i32> %b, i32 zeroext %evl) {
598 ; CHECK-LABEL: vdivu_vv_v16i32_unmasked:
600 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
601 ; CHECK-NEXT: vdivu.vv v8, v8, v12
603 %head = insertelement <16 x i1> poison, i1 true, i32 0
604 %m = shufflevector <16 x i1> %head, <16 x i1> poison, <16 x i32> zeroinitializer
605 %v = call <16 x i32> @llvm.vp.udiv.v16i32(<16 x i32> %va, <16 x i32> %b, <16 x i1> %m, i32 %evl)
609 define <16 x i32> @vdivu_vx_v16i32(<16 x i32> %va, i32 %b, <16 x i1> %m, i32 zeroext %evl) {
610 ; CHECK-LABEL: vdivu_vx_v16i32:
612 ; CHECK-NEXT: vsetvli zero, a1, e32, m4, ta, ma
613 ; CHECK-NEXT: vdivu.vx v8, v8, a0, v0.t
615 %elt.head = insertelement <16 x i32> poison, i32 %b, i32 0
616 %vb = shufflevector <16 x i32> %elt.head, <16 x i32> poison, <16 x i32> zeroinitializer
617 %v = call <16 x i32> @llvm.vp.udiv.v16i32(<16 x i32> %va, <16 x i32> %vb, <16 x i1> %m, i32 %evl)
621 define <16 x i32> @vdivu_vx_v16i32_unmasked(<16 x i32> %va, i32 %b, i32 zeroext %evl) {
622 ; CHECK-LABEL: vdivu_vx_v16i32_unmasked:
624 ; CHECK-NEXT: vsetvli zero, a1, e32, m4, ta, ma
625 ; CHECK-NEXT: vdivu.vx v8, v8, a0
627 %elt.head = insertelement <16 x i32> poison, i32 %b, i32 0
628 %vb = shufflevector <16 x i32> %elt.head, <16 x i32> poison, <16 x i32> zeroinitializer
629 %head = insertelement <16 x i1> poison, i1 true, i32 0
630 %m = shufflevector <16 x i1> %head, <16 x i1> poison, <16 x i32> zeroinitializer
631 %v = call <16 x i32> @llvm.vp.udiv.v16i32(<16 x i32> %va, <16 x i32> %vb, <16 x i1> %m, i32 %evl)
635 declare <2 x i64> @llvm.vp.udiv.v2i64(<2 x i64>, <2 x i64>, <2 x i1>, i32)
637 define <2 x i64> @vdivu_vv_v2i64(<2 x i64> %va, <2 x i64> %b, <2 x i1> %m, i32 zeroext %evl) {
638 ; CHECK-LABEL: vdivu_vv_v2i64:
640 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
641 ; CHECK-NEXT: vdivu.vv v8, v8, v9, v0.t
643 %v = call <2 x i64> @llvm.vp.udiv.v2i64(<2 x i64> %va, <2 x i64> %b, <2 x i1> %m, i32 %evl)
647 define <2 x i64> @vdivu_vv_v2i64_unmasked(<2 x i64> %va, <2 x i64> %b, i32 zeroext %evl) {
648 ; CHECK-LABEL: vdivu_vv_v2i64_unmasked:
650 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
651 ; CHECK-NEXT: vdivu.vv v8, v8, v9
653 %head = insertelement <2 x i1> poison, i1 true, i32 0
654 %m = shufflevector <2 x i1> %head, <2 x i1> poison, <2 x i32> zeroinitializer
655 %v = call <2 x i64> @llvm.vp.udiv.v2i64(<2 x i64> %va, <2 x i64> %b, <2 x i1> %m, i32 %evl)
659 define <2 x i64> @vdivu_vx_v2i64(<2 x i64> %va, i64 %b, <2 x i1> %m, i32 zeroext %evl) {
660 ; RV32-LABEL: vdivu_vx_v2i64:
662 ; RV32-NEXT: addi sp, sp, -16
663 ; RV32-NEXT: .cfi_def_cfa_offset 16
664 ; RV32-NEXT: sw a1, 12(sp)
665 ; RV32-NEXT: sw a0, 8(sp)
666 ; RV32-NEXT: addi a0, sp, 8
667 ; RV32-NEXT: vsetivli zero, 2, e64, m1, ta, ma
668 ; RV32-NEXT: vlse64.v v9, (a0), zero
669 ; RV32-NEXT: vsetvli zero, a2, e64, m1, ta, ma
670 ; RV32-NEXT: vdivu.vv v8, v8, v9, v0.t
671 ; RV32-NEXT: addi sp, sp, 16
674 ; RV64-LABEL: vdivu_vx_v2i64:
676 ; RV64-NEXT: vsetvli zero, a1, e64, m1, ta, ma
677 ; RV64-NEXT: vdivu.vx v8, v8, a0, v0.t
679 %elt.head = insertelement <2 x i64> poison, i64 %b, i32 0
680 %vb = shufflevector <2 x i64> %elt.head, <2 x i64> poison, <2 x i32> zeroinitializer
681 %v = call <2 x i64> @llvm.vp.udiv.v2i64(<2 x i64> %va, <2 x i64> %vb, <2 x i1> %m, i32 %evl)
685 define <2 x i64> @vdivu_vx_v2i64_unmasked(<2 x i64> %va, i64 %b, i32 zeroext %evl) {
686 ; RV32-LABEL: vdivu_vx_v2i64_unmasked:
688 ; RV32-NEXT: addi sp, sp, -16
689 ; RV32-NEXT: .cfi_def_cfa_offset 16
690 ; RV32-NEXT: sw a1, 12(sp)
691 ; RV32-NEXT: sw a0, 8(sp)
692 ; RV32-NEXT: addi a0, sp, 8
693 ; RV32-NEXT: vsetivli zero, 2, e64, m1, ta, ma
694 ; RV32-NEXT: vlse64.v v9, (a0), zero
695 ; RV32-NEXT: vsetvli zero, a2, e64, m1, ta, ma
696 ; RV32-NEXT: vdivu.vv v8, v8, v9
697 ; RV32-NEXT: addi sp, sp, 16
700 ; RV64-LABEL: vdivu_vx_v2i64_unmasked:
702 ; RV64-NEXT: vsetvli zero, a1, e64, m1, ta, ma
703 ; RV64-NEXT: vdivu.vx v8, v8, a0
705 %elt.head = insertelement <2 x i64> poison, i64 %b, i32 0
706 %vb = shufflevector <2 x i64> %elt.head, <2 x i64> poison, <2 x i32> zeroinitializer
707 %head = insertelement <2 x i1> poison, i1 true, i32 0
708 %m = shufflevector <2 x i1> %head, <2 x i1> poison, <2 x i32> zeroinitializer
709 %v = call <2 x i64> @llvm.vp.udiv.v2i64(<2 x i64> %va, <2 x i64> %vb, <2 x i1> %m, i32 %evl)
713 declare <4 x i64> @llvm.vp.udiv.v4i64(<4 x i64>, <4 x i64>, <4 x i1>, i32)
715 define <4 x i64> @vdivu_vv_v4i64(<4 x i64> %va, <4 x i64> %b, <4 x i1> %m, i32 zeroext %evl) {
716 ; CHECK-LABEL: vdivu_vv_v4i64:
718 ; CHECK-NEXT: vsetvli zero, a0, e64, m2, ta, ma
719 ; CHECK-NEXT: vdivu.vv v8, v8, v10, v0.t
721 %v = call <4 x i64> @llvm.vp.udiv.v4i64(<4 x i64> %va, <4 x i64> %b, <4 x i1> %m, i32 %evl)
725 define <4 x i64> @vdivu_vv_v4i64_unmasked(<4 x i64> %va, <4 x i64> %b, i32 zeroext %evl) {
726 ; CHECK-LABEL: vdivu_vv_v4i64_unmasked:
728 ; CHECK-NEXT: vsetvli zero, a0, e64, m2, ta, ma
729 ; CHECK-NEXT: vdivu.vv v8, v8, v10
731 %head = insertelement <4 x i1> poison, i1 true, i32 0
732 %m = shufflevector <4 x i1> %head, <4 x i1> poison, <4 x i32> zeroinitializer
733 %v = call <4 x i64> @llvm.vp.udiv.v4i64(<4 x i64> %va, <4 x i64> %b, <4 x i1> %m, i32 %evl)
737 define <4 x i64> @vdivu_vx_v4i64(<4 x i64> %va, i64 %b, <4 x i1> %m, i32 zeroext %evl) {
738 ; RV32-LABEL: vdivu_vx_v4i64:
740 ; RV32-NEXT: addi sp, sp, -16
741 ; RV32-NEXT: .cfi_def_cfa_offset 16
742 ; RV32-NEXT: sw a1, 12(sp)
743 ; RV32-NEXT: sw a0, 8(sp)
744 ; RV32-NEXT: addi a0, sp, 8
745 ; RV32-NEXT: vsetivli zero, 4, e64, m2, ta, ma
746 ; RV32-NEXT: vlse64.v v10, (a0), zero
747 ; RV32-NEXT: vsetvli zero, a2, e64, m2, ta, ma
748 ; RV32-NEXT: vdivu.vv v8, v8, v10, v0.t
749 ; RV32-NEXT: addi sp, sp, 16
752 ; RV64-LABEL: vdivu_vx_v4i64:
754 ; RV64-NEXT: vsetvli zero, a1, e64, m2, ta, ma
755 ; RV64-NEXT: vdivu.vx v8, v8, a0, v0.t
757 %elt.head = insertelement <4 x i64> poison, i64 %b, i32 0
758 %vb = shufflevector <4 x i64> %elt.head, <4 x i64> poison, <4 x i32> zeroinitializer
759 %v = call <4 x i64> @llvm.vp.udiv.v4i64(<4 x i64> %va, <4 x i64> %vb, <4 x i1> %m, i32 %evl)
763 define <4 x i64> @vdivu_vx_v4i64_unmasked(<4 x i64> %va, i64 %b, i32 zeroext %evl) {
764 ; RV32-LABEL: vdivu_vx_v4i64_unmasked:
766 ; RV32-NEXT: addi sp, sp, -16
767 ; RV32-NEXT: .cfi_def_cfa_offset 16
768 ; RV32-NEXT: sw a1, 12(sp)
769 ; RV32-NEXT: sw a0, 8(sp)
770 ; RV32-NEXT: addi a0, sp, 8
771 ; RV32-NEXT: vsetivli zero, 4, e64, m2, ta, ma
772 ; RV32-NEXT: vlse64.v v10, (a0), zero
773 ; RV32-NEXT: vsetvli zero, a2, e64, m2, ta, ma
774 ; RV32-NEXT: vdivu.vv v8, v8, v10
775 ; RV32-NEXT: addi sp, sp, 16
778 ; RV64-LABEL: vdivu_vx_v4i64_unmasked:
780 ; RV64-NEXT: vsetvli zero, a1, e64, m2, ta, ma
781 ; RV64-NEXT: vdivu.vx v8, v8, a0
783 %elt.head = insertelement <4 x i64> poison, i64 %b, i32 0
784 %vb = shufflevector <4 x i64> %elt.head, <4 x i64> poison, <4 x i32> zeroinitializer
785 %head = insertelement <4 x i1> poison, i1 true, i32 0
786 %m = shufflevector <4 x i1> %head, <4 x i1> poison, <4 x i32> zeroinitializer
787 %v = call <4 x i64> @llvm.vp.udiv.v4i64(<4 x i64> %va, <4 x i64> %vb, <4 x i1> %m, i32 %evl)
791 declare <8 x i64> @llvm.vp.udiv.v8i64(<8 x i64>, <8 x i64>, <8 x i1>, i32)
793 define <8 x i64> @vdivu_vv_v8i64(<8 x i64> %va, <8 x i64> %b, <8 x i1> %m, i32 zeroext %evl) {
794 ; CHECK-LABEL: vdivu_vv_v8i64:
796 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
797 ; CHECK-NEXT: vdivu.vv v8, v8, v12, v0.t
799 %v = call <8 x i64> @llvm.vp.udiv.v8i64(<8 x i64> %va, <8 x i64> %b, <8 x i1> %m, i32 %evl)
803 define <8 x i64> @vdivu_vv_v8i64_unmasked(<8 x i64> %va, <8 x i64> %b, i32 zeroext %evl) {
804 ; CHECK-LABEL: vdivu_vv_v8i64_unmasked:
806 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
807 ; CHECK-NEXT: vdivu.vv v8, v8, v12
809 %head = insertelement <8 x i1> poison, i1 true, i32 0
810 %m = shufflevector <8 x i1> %head, <8 x i1> poison, <8 x i32> zeroinitializer
811 %v = call <8 x i64> @llvm.vp.udiv.v8i64(<8 x i64> %va, <8 x i64> %b, <8 x i1> %m, i32 %evl)
815 define <8 x i64> @vdivu_vx_v8i64(<8 x i64> %va, i64 %b, <8 x i1> %m, i32 zeroext %evl) {
816 ; RV32-LABEL: vdivu_vx_v8i64:
818 ; RV32-NEXT: addi sp, sp, -16
819 ; RV32-NEXT: .cfi_def_cfa_offset 16
820 ; RV32-NEXT: sw a1, 12(sp)
821 ; RV32-NEXT: sw a0, 8(sp)
822 ; RV32-NEXT: addi a0, sp, 8
823 ; RV32-NEXT: vsetivli zero, 8, e64, m4, ta, ma
824 ; RV32-NEXT: vlse64.v v12, (a0), zero
825 ; RV32-NEXT: vsetvli zero, a2, e64, m4, ta, ma
826 ; RV32-NEXT: vdivu.vv v8, v8, v12, v0.t
827 ; RV32-NEXT: addi sp, sp, 16
830 ; RV64-LABEL: vdivu_vx_v8i64:
832 ; RV64-NEXT: vsetvli zero, a1, e64, m4, ta, ma
833 ; RV64-NEXT: vdivu.vx v8, v8, a0, v0.t
835 %elt.head = insertelement <8 x i64> poison, i64 %b, i32 0
836 %vb = shufflevector <8 x i64> %elt.head, <8 x i64> poison, <8 x i32> zeroinitializer
837 %v = call <8 x i64> @llvm.vp.udiv.v8i64(<8 x i64> %va, <8 x i64> %vb, <8 x i1> %m, i32 %evl)
841 define <8 x i64> @vdivu_vx_v8i64_unmasked(<8 x i64> %va, i64 %b, i32 zeroext %evl) {
842 ; RV32-LABEL: vdivu_vx_v8i64_unmasked:
844 ; RV32-NEXT: addi sp, sp, -16
845 ; RV32-NEXT: .cfi_def_cfa_offset 16
846 ; RV32-NEXT: sw a1, 12(sp)
847 ; RV32-NEXT: sw a0, 8(sp)
848 ; RV32-NEXT: addi a0, sp, 8
849 ; RV32-NEXT: vsetivli zero, 8, e64, m4, ta, ma
850 ; RV32-NEXT: vlse64.v v12, (a0), zero
851 ; RV32-NEXT: vsetvli zero, a2, e64, m4, ta, ma
852 ; RV32-NEXT: vdivu.vv v8, v8, v12
853 ; RV32-NEXT: addi sp, sp, 16
856 ; RV64-LABEL: vdivu_vx_v8i64_unmasked:
858 ; RV64-NEXT: vsetvli zero, a1, e64, m4, ta, ma
859 ; RV64-NEXT: vdivu.vx v8, v8, a0
861 %elt.head = insertelement <8 x i64> poison, i64 %b, i32 0
862 %vb = shufflevector <8 x i64> %elt.head, <8 x i64> poison, <8 x i32> zeroinitializer
863 %head = insertelement <8 x i1> poison, i1 true, i32 0
864 %m = shufflevector <8 x i1> %head, <8 x i1> poison, <8 x i32> zeroinitializer
865 %v = call <8 x i64> @llvm.vp.udiv.v8i64(<8 x i64> %va, <8 x i64> %vb, <8 x i1> %m, i32 %evl)
869 declare <16 x i64> @llvm.vp.udiv.v16i64(<16 x i64>, <16 x i64>, <16 x i1>, i32)
871 define <16 x i64> @vdivu_vv_v16i64(<16 x i64> %va, <16 x i64> %b, <16 x i1> %m, i32 zeroext %evl) {
872 ; CHECK-LABEL: vdivu_vv_v16i64:
874 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
875 ; CHECK-NEXT: vdivu.vv v8, v8, v16, v0.t
877 %v = call <16 x i64> @llvm.vp.udiv.v16i64(<16 x i64> %va, <16 x i64> %b, <16 x i1> %m, i32 %evl)
881 define <16 x i64> @vdivu_vv_v16i64_unmasked(<16 x i64> %va, <16 x i64> %b, i32 zeroext %evl) {
882 ; CHECK-LABEL: vdivu_vv_v16i64_unmasked:
884 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
885 ; CHECK-NEXT: vdivu.vv v8, v8, v16
887 %head = insertelement <16 x i1> poison, i1 true, i32 0
888 %m = shufflevector <16 x i1> %head, <16 x i1> poison, <16 x i32> zeroinitializer
889 %v = call <16 x i64> @llvm.vp.udiv.v16i64(<16 x i64> %va, <16 x i64> %b, <16 x i1> %m, i32 %evl)
893 define <16 x i64> @vdivu_vx_v16i64(<16 x i64> %va, i64 %b, <16 x i1> %m, i32 zeroext %evl) {
894 ; RV32-LABEL: vdivu_vx_v16i64:
896 ; RV32-NEXT: addi sp, sp, -16
897 ; RV32-NEXT: .cfi_def_cfa_offset 16
898 ; RV32-NEXT: sw a1, 12(sp)
899 ; RV32-NEXT: sw a0, 8(sp)
900 ; RV32-NEXT: addi a0, sp, 8
901 ; RV32-NEXT: vsetivli zero, 16, e64, m8, ta, ma
902 ; RV32-NEXT: vlse64.v v16, (a0), zero
903 ; RV32-NEXT: vsetvli zero, a2, e64, m8, ta, ma
904 ; RV32-NEXT: vdivu.vv v8, v8, v16, v0.t
905 ; RV32-NEXT: addi sp, sp, 16
908 ; RV64-LABEL: vdivu_vx_v16i64:
910 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
911 ; RV64-NEXT: vdivu.vx v8, v8, a0, v0.t
913 %elt.head = insertelement <16 x i64> poison, i64 %b, i32 0
914 %vb = shufflevector <16 x i64> %elt.head, <16 x i64> poison, <16 x i32> zeroinitializer
915 %v = call <16 x i64> @llvm.vp.udiv.v16i64(<16 x i64> %va, <16 x i64> %vb, <16 x i1> %m, i32 %evl)
919 define <16 x i64> @vdivu_vx_v16i64_unmasked(<16 x i64> %va, i64 %b, i32 zeroext %evl) {
920 ; RV32-LABEL: vdivu_vx_v16i64_unmasked:
922 ; RV32-NEXT: addi sp, sp, -16
923 ; RV32-NEXT: .cfi_def_cfa_offset 16
924 ; RV32-NEXT: sw a1, 12(sp)
925 ; RV32-NEXT: sw a0, 8(sp)
926 ; RV32-NEXT: addi a0, sp, 8
927 ; RV32-NEXT: vsetivli zero, 16, e64, m8, ta, ma
928 ; RV32-NEXT: vlse64.v v16, (a0), zero
929 ; RV32-NEXT: vsetvli zero, a2, e64, m8, ta, ma
930 ; RV32-NEXT: vdivu.vv v8, v8, v16
931 ; RV32-NEXT: addi sp, sp, 16
934 ; RV64-LABEL: vdivu_vx_v16i64_unmasked:
936 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
937 ; RV64-NEXT: vdivu.vx v8, v8, a0
939 %elt.head = insertelement <16 x i64> poison, i64 %b, i32 0
940 %vb = shufflevector <16 x i64> %elt.head, <16 x i64> poison, <16 x i32> zeroinitializer
941 %head = insertelement <16 x i1> poison, i1 true, i32 0
942 %m = shufflevector <16 x i1> %head, <16 x i1> poison, <16 x i32> zeroinitializer
943 %v = call <16 x i64> @llvm.vp.udiv.v16i64(<16 x i64> %va, <16 x i64> %vb, <16 x i1> %m, i32 %evl)