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.sdiv.v8i7(<8 x i7>, <8 x i7>, <8 x i1>, i32)
9 define <8 x i7> @vdiv_vv_v8i7(<8 x i7> %va, <8 x i7> %b, <8 x i1> %m, i32 zeroext %evl) {
10 ; CHECK-LABEL: vdiv_vv_v8i7:
12 ; CHECK-NEXT: vsetivli zero, 8, e8, mf2, ta, ma
13 ; CHECK-NEXT: vadd.vv v9, v9, v9
14 ; CHECK-NEXT: vsra.vi v9, v9, 1
15 ; CHECK-NEXT: vadd.vv v8, v8, v8
16 ; CHECK-NEXT: vsra.vi v8, v8, 1
17 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
18 ; CHECK-NEXT: vdiv.vv v8, v8, v9, v0.t
20 %v = call <8 x i7> @llvm.vp.sdiv.v8i7(<8 x i7> %va, <8 x i7> %b, <8 x i1> %m, i32 %evl)
24 declare <2 x i8> @llvm.vp.sdiv.v2i8(<2 x i8>, <2 x i8>, <2 x i1>, i32)
26 define <2 x i8> @vdiv_vv_v2i8(<2 x i8> %va, <2 x i8> %b, <2 x i1> %m, i32 zeroext %evl) {
27 ; CHECK-LABEL: vdiv_vv_v2i8:
29 ; CHECK-NEXT: vsetvli zero, a0, e8, mf8, ta, ma
30 ; CHECK-NEXT: vdiv.vv v8, v8, v9, v0.t
32 %v = call <2 x i8> @llvm.vp.sdiv.v2i8(<2 x i8> %va, <2 x i8> %b, <2 x i1> %m, i32 %evl)
36 define <2 x i8> @vdiv_vv_v2i8_unmasked(<2 x i8> %va, <2 x i8> %b, i32 zeroext %evl) {
37 ; CHECK-LABEL: vdiv_vv_v2i8_unmasked:
39 ; CHECK-NEXT: vsetvli zero, a0, e8, mf8, ta, ma
40 ; CHECK-NEXT: vdiv.vv v8, v8, v9
42 %head = insertelement <2 x i1> poison, i1 true, i32 0
43 %m = shufflevector <2 x i1> %head, <2 x i1> poison, <2 x i32> zeroinitializer
44 %v = call <2 x i8> @llvm.vp.sdiv.v2i8(<2 x i8> %va, <2 x i8> %b, <2 x i1> %m, i32 %evl)
48 define <2 x i8> @vdiv_vx_v2i8(<2 x i8> %va, i8 %b, <2 x i1> %m, i32 zeroext %evl) {
49 ; CHECK-LABEL: vdiv_vx_v2i8:
51 ; CHECK-NEXT: vsetvli zero, a1, e8, mf8, ta, ma
52 ; CHECK-NEXT: vdiv.vx v8, v8, a0, v0.t
54 %elt.head = insertelement <2 x i8> poison, i8 %b, i32 0
55 %vb = shufflevector <2 x i8> %elt.head, <2 x i8> poison, <2 x i32> zeroinitializer
56 %v = call <2 x i8> @llvm.vp.sdiv.v2i8(<2 x i8> %va, <2 x i8> %vb, <2 x i1> %m, i32 %evl)
60 define <2 x i8> @vdiv_vx_v2i8_unmasked(<2 x i8> %va, i8 %b, i32 zeroext %evl) {
61 ; CHECK-LABEL: vdiv_vx_v2i8_unmasked:
63 ; CHECK-NEXT: vsetvli zero, a1, e8, mf8, ta, ma
64 ; CHECK-NEXT: vdiv.vx v8, v8, a0
66 %elt.head = insertelement <2 x i8> poison, i8 %b, i32 0
67 %vb = shufflevector <2 x i8> %elt.head, <2 x i8> poison, <2 x i32> zeroinitializer
68 %head = insertelement <2 x i1> poison, i1 true, i32 0
69 %m = shufflevector <2 x i1> %head, <2 x i1> poison, <2 x i32> zeroinitializer
70 %v = call <2 x i8> @llvm.vp.sdiv.v2i8(<2 x i8> %va, <2 x i8> %vb, <2 x i1> %m, i32 %evl)
74 declare <4 x i8> @llvm.vp.sdiv.v4i8(<4 x i8>, <4 x i8>, <4 x i1>, i32)
76 define <4 x i8> @vdiv_vv_v4i8(<4 x i8> %va, <4 x i8> %b, <4 x i1> %m, i32 zeroext %evl) {
77 ; CHECK-LABEL: vdiv_vv_v4i8:
79 ; CHECK-NEXT: vsetvli zero, a0, e8, mf4, ta, ma
80 ; CHECK-NEXT: vdiv.vv v8, v8, v9, v0.t
82 %v = call <4 x i8> @llvm.vp.sdiv.v4i8(<4 x i8> %va, <4 x i8> %b, <4 x i1> %m, i32 %evl)
86 define <4 x i8> @vdiv_vv_v4i8_unmasked(<4 x i8> %va, <4 x i8> %b, i32 zeroext %evl) {
87 ; CHECK-LABEL: vdiv_vv_v4i8_unmasked:
89 ; CHECK-NEXT: vsetvli zero, a0, e8, mf4, ta, ma
90 ; CHECK-NEXT: vdiv.vv v8, v8, v9
92 %head = insertelement <4 x i1> poison, i1 true, i32 0
93 %m = shufflevector <4 x i1> %head, <4 x i1> poison, <4 x i32> zeroinitializer
94 %v = call <4 x i8> @llvm.vp.sdiv.v4i8(<4 x i8> %va, <4 x i8> %b, <4 x i1> %m, i32 %evl)
98 define <4 x i8> @vdiv_vx_v4i8(<4 x i8> %va, i8 %b, <4 x i1> %m, i32 zeroext %evl) {
99 ; CHECK-LABEL: vdiv_vx_v4i8:
101 ; CHECK-NEXT: vsetvli zero, a1, e8, mf4, ta, ma
102 ; CHECK-NEXT: vdiv.vx v8, v8, a0, v0.t
104 %elt.head = insertelement <4 x i8> poison, i8 %b, i32 0
105 %vb = shufflevector <4 x i8> %elt.head, <4 x i8> poison, <4 x i32> zeroinitializer
106 %v = call <4 x i8> @llvm.vp.sdiv.v4i8(<4 x i8> %va, <4 x i8> %vb, <4 x i1> %m, i32 %evl)
110 define <4 x i8> @vdiv_vx_v4i8_unmasked(<4 x i8> %va, i8 %b, i32 zeroext %evl) {
111 ; CHECK-LABEL: vdiv_vx_v4i8_unmasked:
113 ; CHECK-NEXT: vsetvli zero, a1, e8, mf4, ta, ma
114 ; CHECK-NEXT: vdiv.vx v8, v8, a0
116 %elt.head = insertelement <4 x i8> poison, i8 %b, i32 0
117 %vb = shufflevector <4 x i8> %elt.head, <4 x i8> poison, <4 x i32> zeroinitializer
118 %head = insertelement <4 x i1> poison, i1 true, i32 0
119 %m = shufflevector <4 x i1> %head, <4 x i1> poison, <4 x i32> zeroinitializer
120 %v = call <4 x i8> @llvm.vp.sdiv.v4i8(<4 x i8> %va, <4 x i8> %vb, <4 x i1> %m, i32 %evl)
124 declare <6 x i8> @llvm.vp.sdiv.v6i8(<6 x i8>, <6 x i8>, <6 x i1>, i32)
126 define <6 x i8> @vdiv_vv_v6i8(<6 x i8> %va, <6 x i8> %b, <6 x i1> %m, i32 zeroext %evl) {
127 ; CHECK-LABEL: vdiv_vv_v6i8:
129 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
130 ; CHECK-NEXT: vdiv.vv v8, v8, v9, v0.t
132 %v = call <6 x i8> @llvm.vp.sdiv.v6i8(<6 x i8> %va, <6 x i8> %b, <6 x i1> %m, i32 %evl)
136 declare <8 x i8> @llvm.vp.sdiv.v8i8(<8 x i8>, <8 x i8>, <8 x i1>, i32)
138 define <8 x i8> @vdiv_vv_v8i8(<8 x i8> %va, <8 x i8> %b, <8 x i1> %m, i32 zeroext %evl) {
139 ; CHECK-LABEL: vdiv_vv_v8i8:
141 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
142 ; CHECK-NEXT: vdiv.vv v8, v8, v9, v0.t
144 %v = call <8 x i8> @llvm.vp.sdiv.v8i8(<8 x i8> %va, <8 x i8> %b, <8 x i1> %m, i32 %evl)
148 define <8 x i8> @vdiv_vv_v8i8_unmasked(<8 x i8> %va, <8 x i8> %b, i32 zeroext %evl) {
149 ; CHECK-LABEL: vdiv_vv_v8i8_unmasked:
151 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
152 ; CHECK-NEXT: vdiv.vv v8, v8, v9
154 %head = insertelement <8 x i1> poison, i1 true, i32 0
155 %m = shufflevector <8 x i1> %head, <8 x i1> poison, <8 x i32> zeroinitializer
156 %v = call <8 x i8> @llvm.vp.sdiv.v8i8(<8 x i8> %va, <8 x i8> %b, <8 x i1> %m, i32 %evl)
160 define <8 x i8> @vdiv_vx_v8i8(<8 x i8> %va, i8 %b, <8 x i1> %m, i32 zeroext %evl) {
161 ; CHECK-LABEL: vdiv_vx_v8i8:
163 ; CHECK-NEXT: vsetvli zero, a1, e8, mf2, ta, ma
164 ; CHECK-NEXT: vdiv.vx v8, v8, a0, v0.t
166 %elt.head = insertelement <8 x i8> poison, i8 %b, i32 0
167 %vb = shufflevector <8 x i8> %elt.head, <8 x i8> poison, <8 x i32> zeroinitializer
168 %v = call <8 x i8> @llvm.vp.sdiv.v8i8(<8 x i8> %va, <8 x i8> %vb, <8 x i1> %m, i32 %evl)
172 define <8 x i8> @vdiv_vx_v8i8_unmasked(<8 x i8> %va, i8 %b, i32 zeroext %evl) {
173 ; CHECK-LABEL: vdiv_vx_v8i8_unmasked:
175 ; CHECK-NEXT: vsetvli zero, a1, e8, mf2, ta, ma
176 ; CHECK-NEXT: vdiv.vx v8, v8, a0
178 %elt.head = insertelement <8 x i8> poison, i8 %b, i32 0
179 %vb = shufflevector <8 x i8> %elt.head, <8 x i8> poison, <8 x i32> zeroinitializer
180 %head = insertelement <8 x i1> poison, i1 true, i32 0
181 %m = shufflevector <8 x i1> %head, <8 x i1> poison, <8 x i32> zeroinitializer
182 %v = call <8 x i8> @llvm.vp.sdiv.v8i8(<8 x i8> %va, <8 x i8> %vb, <8 x i1> %m, i32 %evl)
186 declare <16 x i8> @llvm.vp.sdiv.v16i8(<16 x i8>, <16 x i8>, <16 x i1>, i32)
188 define <16 x i8> @vdiv_vv_v16i8(<16 x i8> %va, <16 x i8> %b, <16 x i1> %m, i32 zeroext %evl) {
189 ; CHECK-LABEL: vdiv_vv_v16i8:
191 ; CHECK-NEXT: vsetvli zero, a0, e8, m1, ta, ma
192 ; CHECK-NEXT: vdiv.vv v8, v8, v9, v0.t
194 %v = call <16 x i8> @llvm.vp.sdiv.v16i8(<16 x i8> %va, <16 x i8> %b, <16 x i1> %m, i32 %evl)
198 define <16 x i8> @vdiv_vv_v16i8_unmasked(<16 x i8> %va, <16 x i8> %b, i32 zeroext %evl) {
199 ; CHECK-LABEL: vdiv_vv_v16i8_unmasked:
201 ; CHECK-NEXT: vsetvli zero, a0, e8, m1, ta, ma
202 ; CHECK-NEXT: vdiv.vv v8, v8, v9
204 %head = insertelement <16 x i1> poison, i1 true, i32 0
205 %m = shufflevector <16 x i1> %head, <16 x i1> poison, <16 x i32> zeroinitializer
206 %v = call <16 x i8> @llvm.vp.sdiv.v16i8(<16 x i8> %va, <16 x i8> %b, <16 x i1> %m, i32 %evl)
210 define <16 x i8> @vdiv_vx_v16i8(<16 x i8> %va, i8 %b, <16 x i1> %m, i32 zeroext %evl) {
211 ; CHECK-LABEL: vdiv_vx_v16i8:
213 ; CHECK-NEXT: vsetvli zero, a1, e8, m1, ta, ma
214 ; CHECK-NEXT: vdiv.vx v8, v8, a0, v0.t
216 %elt.head = insertelement <16 x i8> poison, i8 %b, i32 0
217 %vb = shufflevector <16 x i8> %elt.head, <16 x i8> poison, <16 x i32> zeroinitializer
218 %v = call <16 x i8> @llvm.vp.sdiv.v16i8(<16 x i8> %va, <16 x i8> %vb, <16 x i1> %m, i32 %evl)
222 define <16 x i8> @vdiv_vx_v16i8_unmasked(<16 x i8> %va, i8 %b, i32 zeroext %evl) {
223 ; CHECK-LABEL: vdiv_vx_v16i8_unmasked:
225 ; CHECK-NEXT: vsetvli zero, a1, e8, m1, ta, ma
226 ; CHECK-NEXT: vdiv.vx v8, v8, a0
228 %elt.head = insertelement <16 x i8> poison, i8 %b, i32 0
229 %vb = shufflevector <16 x i8> %elt.head, <16 x i8> poison, <16 x i32> zeroinitializer
230 %head = insertelement <16 x i1> poison, i1 true, i32 0
231 %m = shufflevector <16 x i1> %head, <16 x i1> poison, <16 x i32> zeroinitializer
232 %v = call <16 x i8> @llvm.vp.sdiv.v16i8(<16 x i8> %va, <16 x i8> %vb, <16 x i1> %m, i32 %evl)
236 declare <2 x i16> @llvm.vp.sdiv.v2i16(<2 x i16>, <2 x i16>, <2 x i1>, i32)
238 define <2 x i16> @vdiv_vv_v2i16(<2 x i16> %va, <2 x i16> %b, <2 x i1> %m, i32 zeroext %evl) {
239 ; CHECK-LABEL: vdiv_vv_v2i16:
241 ; CHECK-NEXT: vsetvli zero, a0, e16, mf4, ta, ma
242 ; CHECK-NEXT: vdiv.vv v8, v8, v9, v0.t
244 %v = call <2 x i16> @llvm.vp.sdiv.v2i16(<2 x i16> %va, <2 x i16> %b, <2 x i1> %m, i32 %evl)
248 define <2 x i16> @vdiv_vv_v2i16_unmasked(<2 x i16> %va, <2 x i16> %b, i32 zeroext %evl) {
249 ; CHECK-LABEL: vdiv_vv_v2i16_unmasked:
251 ; CHECK-NEXT: vsetvli zero, a0, e16, mf4, ta, ma
252 ; CHECK-NEXT: vdiv.vv v8, v8, v9
254 %head = insertelement <2 x i1> poison, i1 true, i32 0
255 %m = shufflevector <2 x i1> %head, <2 x i1> poison, <2 x i32> zeroinitializer
256 %v = call <2 x i16> @llvm.vp.sdiv.v2i16(<2 x i16> %va, <2 x i16> %b, <2 x i1> %m, i32 %evl)
260 define <2 x i16> @vdiv_vx_v2i16(<2 x i16> %va, i16 %b, <2 x i1> %m, i32 zeroext %evl) {
261 ; CHECK-LABEL: vdiv_vx_v2i16:
263 ; CHECK-NEXT: vsetvli zero, a1, e16, mf4, ta, ma
264 ; CHECK-NEXT: vdiv.vx v8, v8, a0, v0.t
266 %elt.head = insertelement <2 x i16> poison, i16 %b, i32 0
267 %vb = shufflevector <2 x i16> %elt.head, <2 x i16> poison, <2 x i32> zeroinitializer
268 %v = call <2 x i16> @llvm.vp.sdiv.v2i16(<2 x i16> %va, <2 x i16> %vb, <2 x i1> %m, i32 %evl)
272 define <2 x i16> @vdiv_vx_v2i16_unmasked(<2 x i16> %va, i16 %b, i32 zeroext %evl) {
273 ; CHECK-LABEL: vdiv_vx_v2i16_unmasked:
275 ; CHECK-NEXT: vsetvli zero, a1, e16, mf4, ta, ma
276 ; CHECK-NEXT: vdiv.vx v8, v8, a0
278 %elt.head = insertelement <2 x i16> poison, i16 %b, i32 0
279 %vb = shufflevector <2 x i16> %elt.head, <2 x i16> poison, <2 x i32> zeroinitializer
280 %head = insertelement <2 x i1> poison, i1 true, i32 0
281 %m = shufflevector <2 x i1> %head, <2 x i1> poison, <2 x i32> zeroinitializer
282 %v = call <2 x i16> @llvm.vp.sdiv.v2i16(<2 x i16> %va, <2 x i16> %vb, <2 x i1> %m, i32 %evl)
286 declare <4 x i16> @llvm.vp.sdiv.v4i16(<4 x i16>, <4 x i16>, <4 x i1>, i32)
288 define <4 x i16> @vdiv_vv_v4i16(<4 x i16> %va, <4 x i16> %b, <4 x i1> %m, i32 zeroext %evl) {
289 ; CHECK-LABEL: vdiv_vv_v4i16:
291 ; CHECK-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
292 ; CHECK-NEXT: vdiv.vv v8, v8, v9, v0.t
294 %v = call <4 x i16> @llvm.vp.sdiv.v4i16(<4 x i16> %va, <4 x i16> %b, <4 x i1> %m, i32 %evl)
298 define <4 x i16> @vdiv_vv_v4i16_unmasked(<4 x i16> %va, <4 x i16> %b, i32 zeroext %evl) {
299 ; CHECK-LABEL: vdiv_vv_v4i16_unmasked:
301 ; CHECK-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
302 ; CHECK-NEXT: vdiv.vv v8, v8, v9
304 %head = insertelement <4 x i1> poison, i1 true, i32 0
305 %m = shufflevector <4 x i1> %head, <4 x i1> poison, <4 x i32> zeroinitializer
306 %v = call <4 x i16> @llvm.vp.sdiv.v4i16(<4 x i16> %va, <4 x i16> %b, <4 x i1> %m, i32 %evl)
310 define <4 x i16> @vdiv_vx_v4i16(<4 x i16> %va, i16 %b, <4 x i1> %m, i32 zeroext %evl) {
311 ; CHECK-LABEL: vdiv_vx_v4i16:
313 ; CHECK-NEXT: vsetvli zero, a1, e16, mf2, ta, ma
314 ; CHECK-NEXT: vdiv.vx v8, v8, a0, v0.t
316 %elt.head = insertelement <4 x i16> poison, i16 %b, i32 0
317 %vb = shufflevector <4 x i16> %elt.head, <4 x i16> poison, <4 x i32> zeroinitializer
318 %v = call <4 x i16> @llvm.vp.sdiv.v4i16(<4 x i16> %va, <4 x i16> %vb, <4 x i1> %m, i32 %evl)
322 define <4 x i16> @vdiv_vx_v4i16_unmasked(<4 x i16> %va, i16 %b, i32 zeroext %evl) {
323 ; CHECK-LABEL: vdiv_vx_v4i16_unmasked:
325 ; CHECK-NEXT: vsetvli zero, a1, e16, mf2, ta, ma
326 ; CHECK-NEXT: vdiv.vx v8, v8, a0
328 %elt.head = insertelement <4 x i16> poison, i16 %b, i32 0
329 %vb = shufflevector <4 x i16> %elt.head, <4 x i16> poison, <4 x i32> zeroinitializer
330 %head = insertelement <4 x i1> poison, i1 true, i32 0
331 %m = shufflevector <4 x i1> %head, <4 x i1> poison, <4 x i32> zeroinitializer
332 %v = call <4 x i16> @llvm.vp.sdiv.v4i16(<4 x i16> %va, <4 x i16> %vb, <4 x i1> %m, i32 %evl)
336 declare <8 x i16> @llvm.vp.sdiv.v8i16(<8 x i16>, <8 x i16>, <8 x i1>, i32)
338 define <8 x i16> @vdiv_vv_v8i16(<8 x i16> %va, <8 x i16> %b, <8 x i1> %m, i32 zeroext %evl) {
339 ; CHECK-LABEL: vdiv_vv_v8i16:
341 ; CHECK-NEXT: vsetvli zero, a0, e16, m1, ta, ma
342 ; CHECK-NEXT: vdiv.vv v8, v8, v9, v0.t
344 %v = call <8 x i16> @llvm.vp.sdiv.v8i16(<8 x i16> %va, <8 x i16> %b, <8 x i1> %m, i32 %evl)
348 define <8 x i16> @vdiv_vv_v8i16_unmasked(<8 x i16> %va, <8 x i16> %b, i32 zeroext %evl) {
349 ; CHECK-LABEL: vdiv_vv_v8i16_unmasked:
351 ; CHECK-NEXT: vsetvli zero, a0, e16, m1, ta, ma
352 ; CHECK-NEXT: vdiv.vv v8, v8, v9
354 %head = insertelement <8 x i1> poison, i1 true, i32 0
355 %m = shufflevector <8 x i1> %head, <8 x i1> poison, <8 x i32> zeroinitializer
356 %v = call <8 x i16> @llvm.vp.sdiv.v8i16(<8 x i16> %va, <8 x i16> %b, <8 x i1> %m, i32 %evl)
360 define <8 x i16> @vdiv_vx_v8i16(<8 x i16> %va, i16 %b, <8 x i1> %m, i32 zeroext %evl) {
361 ; CHECK-LABEL: vdiv_vx_v8i16:
363 ; CHECK-NEXT: vsetvli zero, a1, e16, m1, ta, ma
364 ; CHECK-NEXT: vdiv.vx v8, v8, a0, v0.t
366 %elt.head = insertelement <8 x i16> poison, i16 %b, i32 0
367 %vb = shufflevector <8 x i16> %elt.head, <8 x i16> poison, <8 x i32> zeroinitializer
368 %v = call <8 x i16> @llvm.vp.sdiv.v8i16(<8 x i16> %va, <8 x i16> %vb, <8 x i1> %m, i32 %evl)
372 define <8 x i16> @vdiv_vx_v8i16_unmasked(<8 x i16> %va, i16 %b, i32 zeroext %evl) {
373 ; CHECK-LABEL: vdiv_vx_v8i16_unmasked:
375 ; CHECK-NEXT: vsetvli zero, a1, e16, m1, ta, ma
376 ; CHECK-NEXT: vdiv.vx v8, v8, a0
378 %elt.head = insertelement <8 x i16> poison, i16 %b, i32 0
379 %vb = shufflevector <8 x i16> %elt.head, <8 x i16> poison, <8 x i32> zeroinitializer
380 %head = insertelement <8 x i1> poison, i1 true, i32 0
381 %m = shufflevector <8 x i1> %head, <8 x i1> poison, <8 x i32> zeroinitializer
382 %v = call <8 x i16> @llvm.vp.sdiv.v8i16(<8 x i16> %va, <8 x i16> %vb, <8 x i1> %m, i32 %evl)
386 declare <16 x i16> @llvm.vp.sdiv.v16i16(<16 x i16>, <16 x i16>, <16 x i1>, i32)
388 define <16 x i16> @vdiv_vv_v16i16(<16 x i16> %va, <16 x i16> %b, <16 x i1> %m, i32 zeroext %evl) {
389 ; CHECK-LABEL: vdiv_vv_v16i16:
391 ; CHECK-NEXT: vsetvli zero, a0, e16, m2, ta, ma
392 ; CHECK-NEXT: vdiv.vv v8, v8, v10, v0.t
394 %v = call <16 x i16> @llvm.vp.sdiv.v16i16(<16 x i16> %va, <16 x i16> %b, <16 x i1> %m, i32 %evl)
398 define <16 x i16> @vdiv_vv_v16i16_unmasked(<16 x i16> %va, <16 x i16> %b, i32 zeroext %evl) {
399 ; CHECK-LABEL: vdiv_vv_v16i16_unmasked:
401 ; CHECK-NEXT: vsetvli zero, a0, e16, m2, ta, ma
402 ; CHECK-NEXT: vdiv.vv v8, v8, v10
404 %head = insertelement <16 x i1> poison, i1 true, i32 0
405 %m = shufflevector <16 x i1> %head, <16 x i1> poison, <16 x i32> zeroinitializer
406 %v = call <16 x i16> @llvm.vp.sdiv.v16i16(<16 x i16> %va, <16 x i16> %b, <16 x i1> %m, i32 %evl)
410 define <16 x i16> @vdiv_vx_v16i16(<16 x i16> %va, i16 %b, <16 x i1> %m, i32 zeroext %evl) {
411 ; CHECK-LABEL: vdiv_vx_v16i16:
413 ; CHECK-NEXT: vsetvli zero, a1, e16, m2, ta, ma
414 ; CHECK-NEXT: vdiv.vx v8, v8, a0, v0.t
416 %elt.head = insertelement <16 x i16> poison, i16 %b, i32 0
417 %vb = shufflevector <16 x i16> %elt.head, <16 x i16> poison, <16 x i32> zeroinitializer
418 %v = call <16 x i16> @llvm.vp.sdiv.v16i16(<16 x i16> %va, <16 x i16> %vb, <16 x i1> %m, i32 %evl)
422 define <16 x i16> @vdiv_vx_v16i16_unmasked(<16 x i16> %va, i16 %b, i32 zeroext %evl) {
423 ; CHECK-LABEL: vdiv_vx_v16i16_unmasked:
425 ; CHECK-NEXT: vsetvli zero, a1, e16, m2, ta, ma
426 ; CHECK-NEXT: vdiv.vx v8, v8, a0
428 %elt.head = insertelement <16 x i16> poison, i16 %b, i32 0
429 %vb = shufflevector <16 x i16> %elt.head, <16 x i16> poison, <16 x i32> zeroinitializer
430 %head = insertelement <16 x i1> poison, i1 true, i32 0
431 %m = shufflevector <16 x i1> %head, <16 x i1> poison, <16 x i32> zeroinitializer
432 %v = call <16 x i16> @llvm.vp.sdiv.v16i16(<16 x i16> %va, <16 x i16> %vb, <16 x i1> %m, i32 %evl)
436 declare <2 x i32> @llvm.vp.sdiv.v2i32(<2 x i32>, <2 x i32>, <2 x i1>, i32)
438 define <2 x i32> @vdiv_vv_v2i32(<2 x i32> %va, <2 x i32> %b, <2 x i1> %m, i32 zeroext %evl) {
439 ; CHECK-LABEL: vdiv_vv_v2i32:
441 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
442 ; CHECK-NEXT: vdiv.vv v8, v8, v9, v0.t
444 %v = call <2 x i32> @llvm.vp.sdiv.v2i32(<2 x i32> %va, <2 x i32> %b, <2 x i1> %m, i32 %evl)
448 define <2 x i32> @vdiv_vv_v2i32_unmasked(<2 x i32> %va, <2 x i32> %b, i32 zeroext %evl) {
449 ; CHECK-LABEL: vdiv_vv_v2i32_unmasked:
451 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
452 ; CHECK-NEXT: vdiv.vv v8, v8, v9
454 %head = insertelement <2 x i1> poison, i1 true, i32 0
455 %m = shufflevector <2 x i1> %head, <2 x i1> poison, <2 x i32> zeroinitializer
456 %v = call <2 x i32> @llvm.vp.sdiv.v2i32(<2 x i32> %va, <2 x i32> %b, <2 x i1> %m, i32 %evl)
460 define <2 x i32> @vdiv_vx_v2i32(<2 x i32> %va, i32 %b, <2 x i1> %m, i32 zeroext %evl) {
461 ; CHECK-LABEL: vdiv_vx_v2i32:
463 ; CHECK-NEXT: vsetvli zero, a1, e32, mf2, ta, ma
464 ; CHECK-NEXT: vdiv.vx v8, v8, a0, v0.t
466 %elt.head = insertelement <2 x i32> poison, i32 %b, i32 0
467 %vb = shufflevector <2 x i32> %elt.head, <2 x i32> poison, <2 x i32> zeroinitializer
468 %v = call <2 x i32> @llvm.vp.sdiv.v2i32(<2 x i32> %va, <2 x i32> %vb, <2 x i1> %m, i32 %evl)
472 define <2 x i32> @vdiv_vx_v2i32_unmasked(<2 x i32> %va, i32 %b, i32 zeroext %evl) {
473 ; CHECK-LABEL: vdiv_vx_v2i32_unmasked:
475 ; CHECK-NEXT: vsetvli zero, a1, e32, mf2, ta, ma
476 ; CHECK-NEXT: vdiv.vx v8, v8, a0
478 %elt.head = insertelement <2 x i32> poison, i32 %b, i32 0
479 %vb = shufflevector <2 x i32> %elt.head, <2 x i32> poison, <2 x i32> zeroinitializer
480 %head = insertelement <2 x i1> poison, i1 true, i32 0
481 %m = shufflevector <2 x i1> %head, <2 x i1> poison, <2 x i32> zeroinitializer
482 %v = call <2 x i32> @llvm.vp.sdiv.v2i32(<2 x i32> %va, <2 x i32> %vb, <2 x i1> %m, i32 %evl)
486 declare <4 x i32> @llvm.vp.sdiv.v4i32(<4 x i32>, <4 x i32>, <4 x i1>, i32)
488 define <4 x i32> @vdiv_vv_v4i32(<4 x i32> %va, <4 x i32> %b, <4 x i1> %m, i32 zeroext %evl) {
489 ; CHECK-LABEL: vdiv_vv_v4i32:
491 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, ma
492 ; CHECK-NEXT: vdiv.vv v8, v8, v9, v0.t
494 %v = call <4 x i32> @llvm.vp.sdiv.v4i32(<4 x i32> %va, <4 x i32> %b, <4 x i1> %m, i32 %evl)
498 define <4 x i32> @vdiv_vv_v4i32_unmasked(<4 x i32> %va, <4 x i32> %b, i32 zeroext %evl) {
499 ; CHECK-LABEL: vdiv_vv_v4i32_unmasked:
501 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, ma
502 ; CHECK-NEXT: vdiv.vv v8, v8, v9
504 %head = insertelement <4 x i1> poison, i1 true, i32 0
505 %m = shufflevector <4 x i1> %head, <4 x i1> poison, <4 x i32> zeroinitializer
506 %v = call <4 x i32> @llvm.vp.sdiv.v4i32(<4 x i32> %va, <4 x i32> %b, <4 x i1> %m, i32 %evl)
510 define <4 x i32> @vdiv_vx_v4i32(<4 x i32> %va, i32 %b, <4 x i1> %m, i32 zeroext %evl) {
511 ; CHECK-LABEL: vdiv_vx_v4i32:
513 ; CHECK-NEXT: vsetvli zero, a1, e32, m1, ta, ma
514 ; CHECK-NEXT: vdiv.vx v8, v8, a0, v0.t
516 %elt.head = insertelement <4 x i32> poison, i32 %b, i32 0
517 %vb = shufflevector <4 x i32> %elt.head, <4 x i32> poison, <4 x i32> zeroinitializer
518 %v = call <4 x i32> @llvm.vp.sdiv.v4i32(<4 x i32> %va, <4 x i32> %vb, <4 x i1> %m, i32 %evl)
522 define <4 x i32> @vdiv_vx_v4i32_unmasked(<4 x i32> %va, i32 %b, i32 zeroext %evl) {
523 ; CHECK-LABEL: vdiv_vx_v4i32_unmasked:
525 ; CHECK-NEXT: vsetvli zero, a1, e32, m1, ta, ma
526 ; CHECK-NEXT: vdiv.vx v8, v8, a0
528 %elt.head = insertelement <4 x i32> poison, i32 %b, i32 0
529 %vb = shufflevector <4 x i32> %elt.head, <4 x i32> poison, <4 x i32> zeroinitializer
530 %head = insertelement <4 x i1> poison, i1 true, i32 0
531 %m = shufflevector <4 x i1> %head, <4 x i1> poison, <4 x i32> zeroinitializer
532 %v = call <4 x i32> @llvm.vp.sdiv.v4i32(<4 x i32> %va, <4 x i32> %vb, <4 x i1> %m, i32 %evl)
536 declare <8 x i32> @llvm.vp.sdiv.v8i32(<8 x i32>, <8 x i32>, <8 x i1>, i32)
538 define <8 x i32> @vdiv_vv_v8i32(<8 x i32> %va, <8 x i32> %b, <8 x i1> %m, i32 zeroext %evl) {
539 ; CHECK-LABEL: vdiv_vv_v8i32:
541 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
542 ; CHECK-NEXT: vdiv.vv v8, v8, v10, v0.t
544 %v = call <8 x i32> @llvm.vp.sdiv.v8i32(<8 x i32> %va, <8 x i32> %b, <8 x i1> %m, i32 %evl)
548 define <8 x i32> @vdiv_vv_v8i32_unmasked(<8 x i32> %va, <8 x i32> %b, i32 zeroext %evl) {
549 ; CHECK-LABEL: vdiv_vv_v8i32_unmasked:
551 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
552 ; CHECK-NEXT: vdiv.vv v8, v8, v10
554 %head = insertelement <8 x i1> poison, i1 true, i32 0
555 %m = shufflevector <8 x i1> %head, <8 x i1> poison, <8 x i32> zeroinitializer
556 %v = call <8 x i32> @llvm.vp.sdiv.v8i32(<8 x i32> %va, <8 x i32> %b, <8 x i1> %m, i32 %evl)
560 define <8 x i32> @vdiv_vx_v8i32(<8 x i32> %va, i32 %b, <8 x i1> %m, i32 zeroext %evl) {
561 ; CHECK-LABEL: vdiv_vx_v8i32:
563 ; CHECK-NEXT: vsetvli zero, a1, e32, m2, ta, ma
564 ; CHECK-NEXT: vdiv.vx v8, v8, a0, v0.t
566 %elt.head = insertelement <8 x i32> poison, i32 %b, i32 0
567 %vb = shufflevector <8 x i32> %elt.head, <8 x i32> poison, <8 x i32> zeroinitializer
568 %v = call <8 x i32> @llvm.vp.sdiv.v8i32(<8 x i32> %va, <8 x i32> %vb, <8 x i1> %m, i32 %evl)
572 define <8 x i32> @vdiv_vx_v8i32_unmasked(<8 x i32> %va, i32 %b, i32 zeroext %evl) {
573 ; CHECK-LABEL: vdiv_vx_v8i32_unmasked:
575 ; CHECK-NEXT: vsetvli zero, a1, e32, m2, ta, ma
576 ; CHECK-NEXT: vdiv.vx v8, v8, a0
578 %elt.head = insertelement <8 x i32> poison, i32 %b, i32 0
579 %vb = shufflevector <8 x i32> %elt.head, <8 x i32> poison, <8 x i32> zeroinitializer
580 %head = insertelement <8 x i1> poison, i1 true, i32 0
581 %m = shufflevector <8 x i1> %head, <8 x i1> poison, <8 x i32> zeroinitializer
582 %v = call <8 x i32> @llvm.vp.sdiv.v8i32(<8 x i32> %va, <8 x i32> %vb, <8 x i1> %m, i32 %evl)
586 declare <16 x i32> @llvm.vp.sdiv.v16i32(<16 x i32>, <16 x i32>, <16 x i1>, i32)
588 define <16 x i32> @vdiv_vv_v16i32(<16 x i32> %va, <16 x i32> %b, <16 x i1> %m, i32 zeroext %evl) {
589 ; CHECK-LABEL: vdiv_vv_v16i32:
591 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
592 ; CHECK-NEXT: vdiv.vv v8, v8, v12, v0.t
594 %v = call <16 x i32> @llvm.vp.sdiv.v16i32(<16 x i32> %va, <16 x i32> %b, <16 x i1> %m, i32 %evl)
598 define <16 x i32> @vdiv_vv_v16i32_unmasked(<16 x i32> %va, <16 x i32> %b, i32 zeroext %evl) {
599 ; CHECK-LABEL: vdiv_vv_v16i32_unmasked:
601 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
602 ; CHECK-NEXT: vdiv.vv v8, v8, v12
604 %head = insertelement <16 x i1> poison, i1 true, i32 0
605 %m = shufflevector <16 x i1> %head, <16 x i1> poison, <16 x i32> zeroinitializer
606 %v = call <16 x i32> @llvm.vp.sdiv.v16i32(<16 x i32> %va, <16 x i32> %b, <16 x i1> %m, i32 %evl)
610 define <16 x i32> @vdiv_vx_v16i32(<16 x i32> %va, i32 %b, <16 x i1> %m, i32 zeroext %evl) {
611 ; CHECK-LABEL: vdiv_vx_v16i32:
613 ; CHECK-NEXT: vsetvli zero, a1, e32, m4, ta, ma
614 ; CHECK-NEXT: vdiv.vx v8, v8, a0, v0.t
616 %elt.head = insertelement <16 x i32> poison, i32 %b, i32 0
617 %vb = shufflevector <16 x i32> %elt.head, <16 x i32> poison, <16 x i32> zeroinitializer
618 %v = call <16 x i32> @llvm.vp.sdiv.v16i32(<16 x i32> %va, <16 x i32> %vb, <16 x i1> %m, i32 %evl)
622 define <16 x i32> @vdiv_vx_v16i32_unmasked(<16 x i32> %va, i32 %b, i32 zeroext %evl) {
623 ; CHECK-LABEL: vdiv_vx_v16i32_unmasked:
625 ; CHECK-NEXT: vsetvli zero, a1, e32, m4, ta, ma
626 ; CHECK-NEXT: vdiv.vx v8, v8, a0
628 %elt.head = insertelement <16 x i32> poison, i32 %b, i32 0
629 %vb = shufflevector <16 x i32> %elt.head, <16 x i32> poison, <16 x i32> zeroinitializer
630 %head = insertelement <16 x i1> poison, i1 true, i32 0
631 %m = shufflevector <16 x i1> %head, <16 x i1> poison, <16 x i32> zeroinitializer
632 %v = call <16 x i32> @llvm.vp.sdiv.v16i32(<16 x i32> %va, <16 x i32> %vb, <16 x i1> %m, i32 %evl)
636 declare <2 x i64> @llvm.vp.sdiv.v2i64(<2 x i64>, <2 x i64>, <2 x i1>, i32)
638 define <2 x i64> @vdiv_vv_v2i64(<2 x i64> %va, <2 x i64> %b, <2 x i1> %m, i32 zeroext %evl) {
639 ; CHECK-LABEL: vdiv_vv_v2i64:
641 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
642 ; CHECK-NEXT: vdiv.vv v8, v8, v9, v0.t
644 %v = call <2 x i64> @llvm.vp.sdiv.v2i64(<2 x i64> %va, <2 x i64> %b, <2 x i1> %m, i32 %evl)
648 define <2 x i64> @vdiv_vv_v2i64_unmasked(<2 x i64> %va, <2 x i64> %b, i32 zeroext %evl) {
649 ; CHECK-LABEL: vdiv_vv_v2i64_unmasked:
651 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
652 ; CHECK-NEXT: vdiv.vv v8, v8, v9
654 %head = insertelement <2 x i1> poison, i1 true, i32 0
655 %m = shufflevector <2 x i1> %head, <2 x i1> poison, <2 x i32> zeroinitializer
656 %v = call <2 x i64> @llvm.vp.sdiv.v2i64(<2 x i64> %va, <2 x i64> %b, <2 x i1> %m, i32 %evl)
660 define <2 x i64> @vdiv_vx_v2i64(<2 x i64> %va, i64 %b, <2 x i1> %m, i32 zeroext %evl) {
661 ; RV32-LABEL: vdiv_vx_v2i64:
663 ; RV32-NEXT: addi sp, sp, -16
664 ; RV32-NEXT: .cfi_def_cfa_offset 16
665 ; RV32-NEXT: sw a1, 12(sp)
666 ; RV32-NEXT: sw a0, 8(sp)
667 ; RV32-NEXT: addi a0, sp, 8
668 ; RV32-NEXT: vsetivli zero, 2, e64, m1, ta, ma
669 ; RV32-NEXT: vlse64.v v9, (a0), zero
670 ; RV32-NEXT: vsetvli zero, a2, e64, m1, ta, ma
671 ; RV32-NEXT: vdiv.vv v8, v8, v9, v0.t
672 ; RV32-NEXT: addi sp, sp, 16
675 ; RV64-LABEL: vdiv_vx_v2i64:
677 ; RV64-NEXT: vsetvli zero, a1, e64, m1, ta, ma
678 ; RV64-NEXT: vdiv.vx v8, v8, a0, v0.t
680 %elt.head = insertelement <2 x i64> poison, i64 %b, i32 0
681 %vb = shufflevector <2 x i64> %elt.head, <2 x i64> poison, <2 x i32> zeroinitializer
682 %v = call <2 x i64> @llvm.vp.sdiv.v2i64(<2 x i64> %va, <2 x i64> %vb, <2 x i1> %m, i32 %evl)
686 define <2 x i64> @vdiv_vx_v2i64_unmasked(<2 x i64> %va, i64 %b, i32 zeroext %evl) {
687 ; RV32-LABEL: vdiv_vx_v2i64_unmasked:
689 ; RV32-NEXT: addi sp, sp, -16
690 ; RV32-NEXT: .cfi_def_cfa_offset 16
691 ; RV32-NEXT: sw a1, 12(sp)
692 ; RV32-NEXT: sw a0, 8(sp)
693 ; RV32-NEXT: addi a0, sp, 8
694 ; RV32-NEXT: vsetivli zero, 2, e64, m1, ta, ma
695 ; RV32-NEXT: vlse64.v v9, (a0), zero
696 ; RV32-NEXT: vsetvli zero, a2, e64, m1, ta, ma
697 ; RV32-NEXT: vdiv.vv v8, v8, v9
698 ; RV32-NEXT: addi sp, sp, 16
701 ; RV64-LABEL: vdiv_vx_v2i64_unmasked:
703 ; RV64-NEXT: vsetvli zero, a1, e64, m1, ta, ma
704 ; RV64-NEXT: vdiv.vx v8, v8, a0
706 %elt.head = insertelement <2 x i64> poison, i64 %b, i32 0
707 %vb = shufflevector <2 x i64> %elt.head, <2 x i64> poison, <2 x i32> zeroinitializer
708 %head = insertelement <2 x i1> poison, i1 true, i32 0
709 %m = shufflevector <2 x i1> %head, <2 x i1> poison, <2 x i32> zeroinitializer
710 %v = call <2 x i64> @llvm.vp.sdiv.v2i64(<2 x i64> %va, <2 x i64> %vb, <2 x i1> %m, i32 %evl)
714 declare <4 x i64> @llvm.vp.sdiv.v4i64(<4 x i64>, <4 x i64>, <4 x i1>, i32)
716 define <4 x i64> @vdiv_vv_v4i64(<4 x i64> %va, <4 x i64> %b, <4 x i1> %m, i32 zeroext %evl) {
717 ; CHECK-LABEL: vdiv_vv_v4i64:
719 ; CHECK-NEXT: vsetvli zero, a0, e64, m2, ta, ma
720 ; CHECK-NEXT: vdiv.vv v8, v8, v10, v0.t
722 %v = call <4 x i64> @llvm.vp.sdiv.v4i64(<4 x i64> %va, <4 x i64> %b, <4 x i1> %m, i32 %evl)
726 define <4 x i64> @vdiv_vv_v4i64_unmasked(<4 x i64> %va, <4 x i64> %b, i32 zeroext %evl) {
727 ; CHECK-LABEL: vdiv_vv_v4i64_unmasked:
729 ; CHECK-NEXT: vsetvli zero, a0, e64, m2, ta, ma
730 ; CHECK-NEXT: vdiv.vv v8, v8, v10
732 %head = insertelement <4 x i1> poison, i1 true, i32 0
733 %m = shufflevector <4 x i1> %head, <4 x i1> poison, <4 x i32> zeroinitializer
734 %v = call <4 x i64> @llvm.vp.sdiv.v4i64(<4 x i64> %va, <4 x i64> %b, <4 x i1> %m, i32 %evl)
738 define <4 x i64> @vdiv_vx_v4i64(<4 x i64> %va, i64 %b, <4 x i1> %m, i32 zeroext %evl) {
739 ; RV32-LABEL: vdiv_vx_v4i64:
741 ; RV32-NEXT: addi sp, sp, -16
742 ; RV32-NEXT: .cfi_def_cfa_offset 16
743 ; RV32-NEXT: sw a1, 12(sp)
744 ; RV32-NEXT: sw a0, 8(sp)
745 ; RV32-NEXT: addi a0, sp, 8
746 ; RV32-NEXT: vsetivli zero, 4, e64, m2, ta, ma
747 ; RV32-NEXT: vlse64.v v10, (a0), zero
748 ; RV32-NEXT: vsetvli zero, a2, e64, m2, ta, ma
749 ; RV32-NEXT: vdiv.vv v8, v8, v10, v0.t
750 ; RV32-NEXT: addi sp, sp, 16
753 ; RV64-LABEL: vdiv_vx_v4i64:
755 ; RV64-NEXT: vsetvli zero, a1, e64, m2, ta, ma
756 ; RV64-NEXT: vdiv.vx v8, v8, a0, v0.t
758 %elt.head = insertelement <4 x i64> poison, i64 %b, i32 0
759 %vb = shufflevector <4 x i64> %elt.head, <4 x i64> poison, <4 x i32> zeroinitializer
760 %v = call <4 x i64> @llvm.vp.sdiv.v4i64(<4 x i64> %va, <4 x i64> %vb, <4 x i1> %m, i32 %evl)
764 define <4 x i64> @vdiv_vx_v4i64_unmasked(<4 x i64> %va, i64 %b, i32 zeroext %evl) {
765 ; RV32-LABEL: vdiv_vx_v4i64_unmasked:
767 ; RV32-NEXT: addi sp, sp, -16
768 ; RV32-NEXT: .cfi_def_cfa_offset 16
769 ; RV32-NEXT: sw a1, 12(sp)
770 ; RV32-NEXT: sw a0, 8(sp)
771 ; RV32-NEXT: addi a0, sp, 8
772 ; RV32-NEXT: vsetivli zero, 4, e64, m2, ta, ma
773 ; RV32-NEXT: vlse64.v v10, (a0), zero
774 ; RV32-NEXT: vsetvli zero, a2, e64, m2, ta, ma
775 ; RV32-NEXT: vdiv.vv v8, v8, v10
776 ; RV32-NEXT: addi sp, sp, 16
779 ; RV64-LABEL: vdiv_vx_v4i64_unmasked:
781 ; RV64-NEXT: vsetvli zero, a1, e64, m2, ta, ma
782 ; RV64-NEXT: vdiv.vx v8, v8, a0
784 %elt.head = insertelement <4 x i64> poison, i64 %b, i32 0
785 %vb = shufflevector <4 x i64> %elt.head, <4 x i64> poison, <4 x i32> zeroinitializer
786 %head = insertelement <4 x i1> poison, i1 true, i32 0
787 %m = shufflevector <4 x i1> %head, <4 x i1> poison, <4 x i32> zeroinitializer
788 %v = call <4 x i64> @llvm.vp.sdiv.v4i64(<4 x i64> %va, <4 x i64> %vb, <4 x i1> %m, i32 %evl)
792 declare <8 x i64> @llvm.vp.sdiv.v8i64(<8 x i64>, <8 x i64>, <8 x i1>, i32)
794 define <8 x i64> @vdiv_vv_v8i64(<8 x i64> %va, <8 x i64> %b, <8 x i1> %m, i32 zeroext %evl) {
795 ; CHECK-LABEL: vdiv_vv_v8i64:
797 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
798 ; CHECK-NEXT: vdiv.vv v8, v8, v12, v0.t
800 %v = call <8 x i64> @llvm.vp.sdiv.v8i64(<8 x i64> %va, <8 x i64> %b, <8 x i1> %m, i32 %evl)
804 define <8 x i64> @vdiv_vv_v8i64_unmasked(<8 x i64> %va, <8 x i64> %b, i32 zeroext %evl) {
805 ; CHECK-LABEL: vdiv_vv_v8i64_unmasked:
807 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
808 ; CHECK-NEXT: vdiv.vv v8, v8, v12
810 %head = insertelement <8 x i1> poison, i1 true, i32 0
811 %m = shufflevector <8 x i1> %head, <8 x i1> poison, <8 x i32> zeroinitializer
812 %v = call <8 x i64> @llvm.vp.sdiv.v8i64(<8 x i64> %va, <8 x i64> %b, <8 x i1> %m, i32 %evl)
816 define <8 x i64> @vdiv_vx_v8i64(<8 x i64> %va, i64 %b, <8 x i1> %m, i32 zeroext %evl) {
817 ; RV32-LABEL: vdiv_vx_v8i64:
819 ; RV32-NEXT: addi sp, sp, -16
820 ; RV32-NEXT: .cfi_def_cfa_offset 16
821 ; RV32-NEXT: sw a1, 12(sp)
822 ; RV32-NEXT: sw a0, 8(sp)
823 ; RV32-NEXT: addi a0, sp, 8
824 ; RV32-NEXT: vsetivli zero, 8, e64, m4, ta, ma
825 ; RV32-NEXT: vlse64.v v12, (a0), zero
826 ; RV32-NEXT: vsetvli zero, a2, e64, m4, ta, ma
827 ; RV32-NEXT: vdiv.vv v8, v8, v12, v0.t
828 ; RV32-NEXT: addi sp, sp, 16
831 ; RV64-LABEL: vdiv_vx_v8i64:
833 ; RV64-NEXT: vsetvli zero, a1, e64, m4, ta, ma
834 ; RV64-NEXT: vdiv.vx v8, v8, a0, v0.t
836 %elt.head = insertelement <8 x i64> poison, i64 %b, i32 0
837 %vb = shufflevector <8 x i64> %elt.head, <8 x i64> poison, <8 x i32> zeroinitializer
838 %v = call <8 x i64> @llvm.vp.sdiv.v8i64(<8 x i64> %va, <8 x i64> %vb, <8 x i1> %m, i32 %evl)
842 define <8 x i64> @vdiv_vx_v8i64_unmasked(<8 x i64> %va, i64 %b, i32 zeroext %evl) {
843 ; RV32-LABEL: vdiv_vx_v8i64_unmasked:
845 ; RV32-NEXT: addi sp, sp, -16
846 ; RV32-NEXT: .cfi_def_cfa_offset 16
847 ; RV32-NEXT: sw a1, 12(sp)
848 ; RV32-NEXT: sw a0, 8(sp)
849 ; RV32-NEXT: addi a0, sp, 8
850 ; RV32-NEXT: vsetivli zero, 8, e64, m4, ta, ma
851 ; RV32-NEXT: vlse64.v v12, (a0), zero
852 ; RV32-NEXT: vsetvli zero, a2, e64, m4, ta, ma
853 ; RV32-NEXT: vdiv.vv v8, v8, v12
854 ; RV32-NEXT: addi sp, sp, 16
857 ; RV64-LABEL: vdiv_vx_v8i64_unmasked:
859 ; RV64-NEXT: vsetvli zero, a1, e64, m4, ta, ma
860 ; RV64-NEXT: vdiv.vx v8, v8, a0
862 %elt.head = insertelement <8 x i64> poison, i64 %b, i32 0
863 %vb = shufflevector <8 x i64> %elt.head, <8 x i64> poison, <8 x i32> zeroinitializer
864 %head = insertelement <8 x i1> poison, i1 true, i32 0
865 %m = shufflevector <8 x i1> %head, <8 x i1> poison, <8 x i32> zeroinitializer
866 %v = call <8 x i64> @llvm.vp.sdiv.v8i64(<8 x i64> %va, <8 x i64> %vb, <8 x i1> %m, i32 %evl)
870 declare <16 x i64> @llvm.vp.sdiv.v16i64(<16 x i64>, <16 x i64>, <16 x i1>, i32)
872 define <16 x i64> @vdiv_vv_v16i64(<16 x i64> %va, <16 x i64> %b, <16 x i1> %m, i32 zeroext %evl) {
873 ; CHECK-LABEL: vdiv_vv_v16i64:
875 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
876 ; CHECK-NEXT: vdiv.vv v8, v8, v16, v0.t
878 %v = call <16 x i64> @llvm.vp.sdiv.v16i64(<16 x i64> %va, <16 x i64> %b, <16 x i1> %m, i32 %evl)
882 define <16 x i64> @vdiv_vv_v16i64_unmasked(<16 x i64> %va, <16 x i64> %b, i32 zeroext %evl) {
883 ; CHECK-LABEL: vdiv_vv_v16i64_unmasked:
885 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
886 ; CHECK-NEXT: vdiv.vv v8, v8, v16
888 %head = insertelement <16 x i1> poison, i1 true, i32 0
889 %m = shufflevector <16 x i1> %head, <16 x i1> poison, <16 x i32> zeroinitializer
890 %v = call <16 x i64> @llvm.vp.sdiv.v16i64(<16 x i64> %va, <16 x i64> %b, <16 x i1> %m, i32 %evl)
894 define <16 x i64> @vdiv_vx_v16i64(<16 x i64> %va, i64 %b, <16 x i1> %m, i32 zeroext %evl) {
895 ; RV32-LABEL: vdiv_vx_v16i64:
897 ; RV32-NEXT: addi sp, sp, -16
898 ; RV32-NEXT: .cfi_def_cfa_offset 16
899 ; RV32-NEXT: sw a1, 12(sp)
900 ; RV32-NEXT: sw a0, 8(sp)
901 ; RV32-NEXT: addi a0, sp, 8
902 ; RV32-NEXT: vsetivli zero, 16, e64, m8, ta, ma
903 ; RV32-NEXT: vlse64.v v16, (a0), zero
904 ; RV32-NEXT: vsetvli zero, a2, e64, m8, ta, ma
905 ; RV32-NEXT: vdiv.vv v8, v8, v16, v0.t
906 ; RV32-NEXT: addi sp, sp, 16
909 ; RV64-LABEL: vdiv_vx_v16i64:
911 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
912 ; RV64-NEXT: vdiv.vx v8, v8, a0, v0.t
914 %elt.head = insertelement <16 x i64> poison, i64 %b, i32 0
915 %vb = shufflevector <16 x i64> %elt.head, <16 x i64> poison, <16 x i32> zeroinitializer
916 %v = call <16 x i64> @llvm.vp.sdiv.v16i64(<16 x i64> %va, <16 x i64> %vb, <16 x i1> %m, i32 %evl)
920 define <16 x i64> @vdiv_vx_v16i64_unmasked(<16 x i64> %va, i64 %b, i32 zeroext %evl) {
921 ; RV32-LABEL: vdiv_vx_v16i64_unmasked:
923 ; RV32-NEXT: addi sp, sp, -16
924 ; RV32-NEXT: .cfi_def_cfa_offset 16
925 ; RV32-NEXT: sw a1, 12(sp)
926 ; RV32-NEXT: sw a0, 8(sp)
927 ; RV32-NEXT: addi a0, sp, 8
928 ; RV32-NEXT: vsetivli zero, 16, e64, m8, ta, ma
929 ; RV32-NEXT: vlse64.v v16, (a0), zero
930 ; RV32-NEXT: vsetvli zero, a2, e64, m8, ta, ma
931 ; RV32-NEXT: vdiv.vv v8, v8, v16
932 ; RV32-NEXT: addi sp, sp, 16
935 ; RV64-LABEL: vdiv_vx_v16i64_unmasked:
937 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
938 ; RV64-NEXT: vdiv.vx v8, v8, a0
940 %elt.head = insertelement <16 x i64> poison, i64 %b, i32 0
941 %vb = shufflevector <16 x i64> %elt.head, <16 x i64> poison, <16 x i32> zeroinitializer
942 %head = insertelement <16 x i1> poison, i1 true, i32 0
943 %m = shufflevector <16 x i1> %head, <16 x i1> poison, <16 x i32> zeroinitializer
944 %v = call <16 x i64> @llvm.vp.sdiv.v16i64(<16 x i64> %va, <16 x i64> %vb, <16 x i1> %m, i32 %evl)