1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=riscv32 -mattr=+v -verify-machineinstrs < %s \
3 ; RUN: | FileCheck %s --check-prefixes=CHECK,RV32
4 ; RUN: llc -mtriple=riscv64 -mattr=+v -verify-machineinstrs < %s \
5 ; RUN: | FileCheck %s --check-prefixes=CHECK,RV64
7 declare <vscale x 8 x i7> @llvm.vp.sdiv.nxv8i7(<vscale x 8 x i7>, <vscale x 8 x i7>, <vscale x 8 x i1>, i32)
9 define <vscale x 8 x i7> @vdiv_vx_nxv8i7(<vscale x 8 x i7> %a, i7 signext %b, <vscale x 8 x i1> %mask, i32 zeroext %evl) {
10 ; CHECK-LABEL: vdiv_vx_nxv8i7:
12 ; CHECK-NEXT: vsetvli zero, a1, e8, m1, ta, ma
13 ; CHECK-NEXT: vsll.vi v8, v8, 1, v0.t
14 ; CHECK-NEXT: vsra.vi v8, v8, 1, v0.t
15 ; CHECK-NEXT: vsetvli a2, zero, e8, m1, ta, ma
16 ; CHECK-NEXT: vmv.v.x v9, a0
17 ; CHECK-NEXT: vsetvli zero, a1, e8, m1, ta, ma
18 ; CHECK-NEXT: vsll.vi v9, v9, 1, v0.t
19 ; CHECK-NEXT: vsra.vi v9, v9, 1, v0.t
20 ; CHECK-NEXT: vdiv.vv v8, v8, v9, v0.t
22 %elt.head = insertelement <vscale x 8 x i7> poison, i7 %b, i32 0
23 %vb = shufflevector <vscale x 8 x i7> %elt.head, <vscale x 8 x i7> poison, <vscale x 8 x i32> zeroinitializer
24 %v = call <vscale x 8 x i7> @llvm.vp.sdiv.nxv8i7(<vscale x 8 x i7> %a, <vscale x 8 x i7> %vb, <vscale x 8 x i1> %mask, i32 %evl)
25 ret <vscale x 8 x i7> %v
28 declare <vscale x 1 x i8> @llvm.vp.sdiv.nxv1i8(<vscale x 1 x i8>, <vscale x 1 x i8>, <vscale x 1 x i1>, i32)
30 define <vscale x 1 x i8> @vdiv_vv_nxv1i8(<vscale x 1 x i8> %va, <vscale x 1 x i8> %b, <vscale x 1 x i1> %m, i32 zeroext %evl) {
31 ; CHECK-LABEL: vdiv_vv_nxv1i8:
33 ; CHECK-NEXT: vsetvli zero, a0, e8, mf8, ta, ma
34 ; CHECK-NEXT: vdiv.vv v8, v8, v9, v0.t
36 %v = call <vscale x 1 x i8> @llvm.vp.sdiv.nxv1i8(<vscale x 1 x i8> %va, <vscale x 1 x i8> %b, <vscale x 1 x i1> %m, i32 %evl)
37 ret <vscale x 1 x i8> %v
40 define <vscale x 1 x i8> @vdiv_vv_nxv1i8_unmasked(<vscale x 1 x i8> %va, <vscale x 1 x i8> %b, i32 zeroext %evl) {
41 ; CHECK-LABEL: vdiv_vv_nxv1i8_unmasked:
43 ; CHECK-NEXT: vsetvli zero, a0, e8, mf8, ta, ma
44 ; CHECK-NEXT: vdiv.vv v8, v8, v9
46 %v = call <vscale x 1 x i8> @llvm.vp.sdiv.nxv1i8(<vscale x 1 x i8> %va, <vscale x 1 x i8> %b, <vscale x 1 x i1> splat (i1 true), i32 %evl)
47 ret <vscale x 1 x i8> %v
50 define <vscale x 1 x i8> @vdiv_vx_nxv1i8(<vscale x 1 x i8> %va, i8 %b, <vscale x 1 x i1> %m, i32 zeroext %evl) {
51 ; CHECK-LABEL: vdiv_vx_nxv1i8:
53 ; CHECK-NEXT: vsetvli zero, a1, e8, mf8, ta, ma
54 ; CHECK-NEXT: vdiv.vx v8, v8, a0, v0.t
56 %elt.head = insertelement <vscale x 1 x i8> poison, i8 %b, i32 0
57 %vb = shufflevector <vscale x 1 x i8> %elt.head, <vscale x 1 x i8> poison, <vscale x 1 x i32> zeroinitializer
58 %v = call <vscale x 1 x i8> @llvm.vp.sdiv.nxv1i8(<vscale x 1 x i8> %va, <vscale x 1 x i8> %vb, <vscale x 1 x i1> %m, i32 %evl)
59 ret <vscale x 1 x i8> %v
62 define <vscale x 1 x i8> @vdiv_vx_nxv1i8_unmasked(<vscale x 1 x i8> %va, i8 %b, i32 zeroext %evl) {
63 ; CHECK-LABEL: vdiv_vx_nxv1i8_unmasked:
65 ; CHECK-NEXT: vsetvli zero, a1, e8, mf8, ta, ma
66 ; CHECK-NEXT: vdiv.vx v8, v8, a0
68 %elt.head = insertelement <vscale x 1 x i8> poison, i8 %b, i32 0
69 %vb = shufflevector <vscale x 1 x i8> %elt.head, <vscale x 1 x i8> poison, <vscale x 1 x i32> zeroinitializer
70 %v = call <vscale x 1 x i8> @llvm.vp.sdiv.nxv1i8(<vscale x 1 x i8> %va, <vscale x 1 x i8> %vb, <vscale x 1 x i1> splat (i1 true), i32 %evl)
71 ret <vscale x 1 x i8> %v
74 declare <vscale x 2 x i8> @llvm.vp.sdiv.nxv2i8(<vscale x 2 x i8>, <vscale x 2 x i8>, <vscale x 2 x i1>, i32)
76 define <vscale x 2 x i8> @vdiv_vv_nxv2i8(<vscale x 2 x i8> %va, <vscale x 2 x i8> %b, <vscale x 2 x i1> %m, i32 zeroext %evl) {
77 ; CHECK-LABEL: vdiv_vv_nxv2i8:
79 ; CHECK-NEXT: vsetvli zero, a0, e8, mf4, ta, ma
80 ; CHECK-NEXT: vdiv.vv v8, v8, v9, v0.t
82 %v = call <vscale x 2 x i8> @llvm.vp.sdiv.nxv2i8(<vscale x 2 x i8> %va, <vscale x 2 x i8> %b, <vscale x 2 x i1> %m, i32 %evl)
83 ret <vscale x 2 x i8> %v
86 define <vscale x 2 x i8> @vdiv_vv_nxv2i8_unmasked(<vscale x 2 x i8> %va, <vscale x 2 x i8> %b, i32 zeroext %evl) {
87 ; CHECK-LABEL: vdiv_vv_nxv2i8_unmasked:
89 ; CHECK-NEXT: vsetvli zero, a0, e8, mf4, ta, ma
90 ; CHECK-NEXT: vdiv.vv v8, v8, v9
92 %v = call <vscale x 2 x i8> @llvm.vp.sdiv.nxv2i8(<vscale x 2 x i8> %va, <vscale x 2 x i8> %b, <vscale x 2 x i1> splat (i1 true), i32 %evl)
93 ret <vscale x 2 x i8> %v
96 define <vscale x 2 x i8> @vdiv_vx_nxv2i8(<vscale x 2 x i8> %va, i8 %b, <vscale x 2 x i1> %m, i32 zeroext %evl) {
97 ; CHECK-LABEL: vdiv_vx_nxv2i8:
99 ; CHECK-NEXT: vsetvli zero, a1, e8, mf4, ta, ma
100 ; CHECK-NEXT: vdiv.vx v8, v8, a0, v0.t
102 %elt.head = insertelement <vscale x 2 x i8> poison, i8 %b, i32 0
103 %vb = shufflevector <vscale x 2 x i8> %elt.head, <vscale x 2 x i8> poison, <vscale x 2 x i32> zeroinitializer
104 %v = call <vscale x 2 x i8> @llvm.vp.sdiv.nxv2i8(<vscale x 2 x i8> %va, <vscale x 2 x i8> %vb, <vscale x 2 x i1> %m, i32 %evl)
105 ret <vscale x 2 x i8> %v
108 define <vscale x 2 x i8> @vdiv_vx_nxv2i8_unmasked(<vscale x 2 x i8> %va, i8 %b, i32 zeroext %evl) {
109 ; CHECK-LABEL: vdiv_vx_nxv2i8_unmasked:
111 ; CHECK-NEXT: vsetvli zero, a1, e8, mf4, ta, ma
112 ; CHECK-NEXT: vdiv.vx v8, v8, a0
114 %elt.head = insertelement <vscale x 2 x i8> poison, i8 %b, i32 0
115 %vb = shufflevector <vscale x 2 x i8> %elt.head, <vscale x 2 x i8> poison, <vscale x 2 x i32> zeroinitializer
116 %v = call <vscale x 2 x i8> @llvm.vp.sdiv.nxv2i8(<vscale x 2 x i8> %va, <vscale x 2 x i8> %vb, <vscale x 2 x i1> splat (i1 true), i32 %evl)
117 ret <vscale x 2 x i8> %v
120 declare <vscale x 3 x i8> @llvm.vp.sdiv.nxv3i8(<vscale x 3 x i8>, <vscale x 3 x i8>, <vscale x 3 x i1>, i32)
122 define <vscale x 3 x i8> @vdiv_vv_nxv3i8(<vscale x 3 x i8> %va, <vscale x 3 x i8> %b, <vscale x 3 x i1> %m, i32 zeroext %evl) {
123 ; CHECK-LABEL: vdiv_vv_nxv3i8:
125 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
126 ; CHECK-NEXT: vdiv.vv v8, v8, v9, v0.t
128 %v = call <vscale x 3 x i8> @llvm.vp.sdiv.nxv3i8(<vscale x 3 x i8> %va, <vscale x 3 x i8> %b, <vscale x 3 x i1> %m, i32 %evl)
129 ret <vscale x 3 x i8> %v
132 declare <vscale x 4 x i8> @llvm.vp.sdiv.nxv4i8(<vscale x 4 x i8>, <vscale x 4 x i8>, <vscale x 4 x i1>, i32)
134 define <vscale x 4 x i8> @vdiv_vv_nxv4i8(<vscale x 4 x i8> %va, <vscale x 4 x i8> %b, <vscale x 4 x i1> %m, i32 zeroext %evl) {
135 ; CHECK-LABEL: vdiv_vv_nxv4i8:
137 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
138 ; CHECK-NEXT: vdiv.vv v8, v8, v9, v0.t
140 %v = call <vscale x 4 x i8> @llvm.vp.sdiv.nxv4i8(<vscale x 4 x i8> %va, <vscale x 4 x i8> %b, <vscale x 4 x i1> %m, i32 %evl)
141 ret <vscale x 4 x i8> %v
144 define <vscale x 4 x i8> @vdiv_vv_nxv4i8_unmasked(<vscale x 4 x i8> %va, <vscale x 4 x i8> %b, i32 zeroext %evl) {
145 ; CHECK-LABEL: vdiv_vv_nxv4i8_unmasked:
147 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
148 ; CHECK-NEXT: vdiv.vv v8, v8, v9
150 %v = call <vscale x 4 x i8> @llvm.vp.sdiv.nxv4i8(<vscale x 4 x i8> %va, <vscale x 4 x i8> %b, <vscale x 4 x i1> splat (i1 true), i32 %evl)
151 ret <vscale x 4 x i8> %v
154 define <vscale x 4 x i8> @vdiv_vx_nxv4i8(<vscale x 4 x i8> %va, i8 %b, <vscale x 4 x i1> %m, i32 zeroext %evl) {
155 ; CHECK-LABEL: vdiv_vx_nxv4i8:
157 ; CHECK-NEXT: vsetvli zero, a1, e8, mf2, ta, ma
158 ; CHECK-NEXT: vdiv.vx v8, v8, a0, v0.t
160 %elt.head = insertelement <vscale x 4 x i8> poison, i8 %b, i32 0
161 %vb = shufflevector <vscale x 4 x i8> %elt.head, <vscale x 4 x i8> poison, <vscale x 4 x i32> zeroinitializer
162 %v = call <vscale x 4 x i8> @llvm.vp.sdiv.nxv4i8(<vscale x 4 x i8> %va, <vscale x 4 x i8> %vb, <vscale x 4 x i1> %m, i32 %evl)
163 ret <vscale x 4 x i8> %v
166 define <vscale x 4 x i8> @vdiv_vx_nxv4i8_unmasked(<vscale x 4 x i8> %va, i8 %b, i32 zeroext %evl) {
167 ; CHECK-LABEL: vdiv_vx_nxv4i8_unmasked:
169 ; CHECK-NEXT: vsetvli zero, a1, e8, mf2, ta, ma
170 ; CHECK-NEXT: vdiv.vx v8, v8, a0
172 %elt.head = insertelement <vscale x 4 x i8> poison, i8 %b, i32 0
173 %vb = shufflevector <vscale x 4 x i8> %elt.head, <vscale x 4 x i8> poison, <vscale x 4 x i32> zeroinitializer
174 %v = call <vscale x 4 x i8> @llvm.vp.sdiv.nxv4i8(<vscale x 4 x i8> %va, <vscale x 4 x i8> %vb, <vscale x 4 x i1> splat (i1 true), i32 %evl)
175 ret <vscale x 4 x i8> %v
178 declare <vscale x 8 x i8> @llvm.vp.sdiv.nxv8i8(<vscale x 8 x i8>, <vscale x 8 x i8>, <vscale x 8 x i1>, i32)
180 define <vscale x 8 x i8> @vdiv_vv_nxv8i8(<vscale x 8 x i8> %va, <vscale x 8 x i8> %b, <vscale x 8 x i1> %m, i32 zeroext %evl) {
181 ; CHECK-LABEL: vdiv_vv_nxv8i8:
183 ; CHECK-NEXT: vsetvli zero, a0, e8, m1, ta, ma
184 ; CHECK-NEXT: vdiv.vv v8, v8, v9, v0.t
186 %v = call <vscale x 8 x i8> @llvm.vp.sdiv.nxv8i8(<vscale x 8 x i8> %va, <vscale x 8 x i8> %b, <vscale x 8 x i1> %m, i32 %evl)
187 ret <vscale x 8 x i8> %v
190 define <vscale x 8 x i8> @vdiv_vv_nxv8i8_unmasked(<vscale x 8 x i8> %va, <vscale x 8 x i8> %b, i32 zeroext %evl) {
191 ; CHECK-LABEL: vdiv_vv_nxv8i8_unmasked:
193 ; CHECK-NEXT: vsetvli zero, a0, e8, m1, ta, ma
194 ; CHECK-NEXT: vdiv.vv v8, v8, v9
196 %v = call <vscale x 8 x i8> @llvm.vp.sdiv.nxv8i8(<vscale x 8 x i8> %va, <vscale x 8 x i8> %b, <vscale x 8 x i1> splat (i1 true), i32 %evl)
197 ret <vscale x 8 x i8> %v
200 define <vscale x 8 x i8> @vdiv_vx_nxv8i8(<vscale x 8 x i8> %va, i8 %b, <vscale x 8 x i1> %m, i32 zeroext %evl) {
201 ; CHECK-LABEL: vdiv_vx_nxv8i8:
203 ; CHECK-NEXT: vsetvli zero, a1, e8, m1, ta, ma
204 ; CHECK-NEXT: vdiv.vx v8, v8, a0, v0.t
206 %elt.head = insertelement <vscale x 8 x i8> poison, i8 %b, i32 0
207 %vb = shufflevector <vscale x 8 x i8> %elt.head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
208 %v = call <vscale x 8 x i8> @llvm.vp.sdiv.nxv8i8(<vscale x 8 x i8> %va, <vscale x 8 x i8> %vb, <vscale x 8 x i1> %m, i32 %evl)
209 ret <vscale x 8 x i8> %v
212 define <vscale x 8 x i8> @vdiv_vx_nxv8i8_unmasked(<vscale x 8 x i8> %va, i8 %b, i32 zeroext %evl) {
213 ; CHECK-LABEL: vdiv_vx_nxv8i8_unmasked:
215 ; CHECK-NEXT: vsetvli zero, a1, e8, m1, ta, ma
216 ; CHECK-NEXT: vdiv.vx v8, v8, a0
218 %elt.head = insertelement <vscale x 8 x i8> poison, i8 %b, i32 0
219 %vb = shufflevector <vscale x 8 x i8> %elt.head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
220 %v = call <vscale x 8 x i8> @llvm.vp.sdiv.nxv8i8(<vscale x 8 x i8> %va, <vscale x 8 x i8> %vb, <vscale x 8 x i1> splat (i1 true), i32 %evl)
221 ret <vscale x 8 x i8> %v
224 declare <vscale x 16 x i8> @llvm.vp.sdiv.nxv16i8(<vscale x 16 x i8>, <vscale x 16 x i8>, <vscale x 16 x i1>, i32)
226 define <vscale x 16 x i8> @vdiv_vv_nxv16i8(<vscale x 16 x i8> %va, <vscale x 16 x i8> %b, <vscale x 16 x i1> %m, i32 zeroext %evl) {
227 ; CHECK-LABEL: vdiv_vv_nxv16i8:
229 ; CHECK-NEXT: vsetvli zero, a0, e8, m2, ta, ma
230 ; CHECK-NEXT: vdiv.vv v8, v8, v10, v0.t
232 %v = call <vscale x 16 x i8> @llvm.vp.sdiv.nxv16i8(<vscale x 16 x i8> %va, <vscale x 16 x i8> %b, <vscale x 16 x i1> %m, i32 %evl)
233 ret <vscale x 16 x i8> %v
236 define <vscale x 16 x i8> @vdiv_vv_nxv16i8_unmasked(<vscale x 16 x i8> %va, <vscale x 16 x i8> %b, i32 zeroext %evl) {
237 ; CHECK-LABEL: vdiv_vv_nxv16i8_unmasked:
239 ; CHECK-NEXT: vsetvli zero, a0, e8, m2, ta, ma
240 ; CHECK-NEXT: vdiv.vv v8, v8, v10
242 %v = call <vscale x 16 x i8> @llvm.vp.sdiv.nxv16i8(<vscale x 16 x i8> %va, <vscale x 16 x i8> %b, <vscale x 16 x i1> splat (i1 true), i32 %evl)
243 ret <vscale x 16 x i8> %v
246 define <vscale x 16 x i8> @vdiv_vx_nxv16i8(<vscale x 16 x i8> %va, i8 %b, <vscale x 16 x i1> %m, i32 zeroext %evl) {
247 ; CHECK-LABEL: vdiv_vx_nxv16i8:
249 ; CHECK-NEXT: vsetvli zero, a1, e8, m2, ta, ma
250 ; CHECK-NEXT: vdiv.vx v8, v8, a0, v0.t
252 %elt.head = insertelement <vscale x 16 x i8> poison, i8 %b, i32 0
253 %vb = shufflevector <vscale x 16 x i8> %elt.head, <vscale x 16 x i8> poison, <vscale x 16 x i32> zeroinitializer
254 %v = call <vscale x 16 x i8> @llvm.vp.sdiv.nxv16i8(<vscale x 16 x i8> %va, <vscale x 16 x i8> %vb, <vscale x 16 x i1> %m, i32 %evl)
255 ret <vscale x 16 x i8> %v
258 define <vscale x 16 x i8> @vdiv_vx_nxv16i8_unmasked(<vscale x 16 x i8> %va, i8 %b, i32 zeroext %evl) {
259 ; CHECK-LABEL: vdiv_vx_nxv16i8_unmasked:
261 ; CHECK-NEXT: vsetvli zero, a1, e8, m2, ta, ma
262 ; CHECK-NEXT: vdiv.vx v8, v8, a0
264 %elt.head = insertelement <vscale x 16 x i8> poison, i8 %b, i32 0
265 %vb = shufflevector <vscale x 16 x i8> %elt.head, <vscale x 16 x i8> poison, <vscale x 16 x i32> zeroinitializer
266 %v = call <vscale x 16 x i8> @llvm.vp.sdiv.nxv16i8(<vscale x 16 x i8> %va, <vscale x 16 x i8> %vb, <vscale x 16 x i1> splat (i1 true), i32 %evl)
267 ret <vscale x 16 x i8> %v
270 declare <vscale x 32 x i8> @llvm.vp.sdiv.nxv32i8(<vscale x 32 x i8>, <vscale x 32 x i8>, <vscale x 32 x i1>, i32)
272 define <vscale x 32 x i8> @vdiv_vv_nxv32i8(<vscale x 32 x i8> %va, <vscale x 32 x i8> %b, <vscale x 32 x i1> %m, i32 zeroext %evl) {
273 ; CHECK-LABEL: vdiv_vv_nxv32i8:
275 ; CHECK-NEXT: vsetvli zero, a0, e8, m4, ta, ma
276 ; CHECK-NEXT: vdiv.vv v8, v8, v12, v0.t
278 %v = call <vscale x 32 x i8> @llvm.vp.sdiv.nxv32i8(<vscale x 32 x i8> %va, <vscale x 32 x i8> %b, <vscale x 32 x i1> %m, i32 %evl)
279 ret <vscale x 32 x i8> %v
282 define <vscale x 32 x i8> @vdiv_vv_nxv32i8_unmasked(<vscale x 32 x i8> %va, <vscale x 32 x i8> %b, i32 zeroext %evl) {
283 ; CHECK-LABEL: vdiv_vv_nxv32i8_unmasked:
285 ; CHECK-NEXT: vsetvli zero, a0, e8, m4, ta, ma
286 ; CHECK-NEXT: vdiv.vv v8, v8, v12
288 %v = call <vscale x 32 x i8> @llvm.vp.sdiv.nxv32i8(<vscale x 32 x i8> %va, <vscale x 32 x i8> %b, <vscale x 32 x i1> splat (i1 true), i32 %evl)
289 ret <vscale x 32 x i8> %v
292 define <vscale x 32 x i8> @vdiv_vx_nxv32i8(<vscale x 32 x i8> %va, i8 %b, <vscale x 32 x i1> %m, i32 zeroext %evl) {
293 ; CHECK-LABEL: vdiv_vx_nxv32i8:
295 ; CHECK-NEXT: vsetvli zero, a1, e8, m4, ta, ma
296 ; CHECK-NEXT: vdiv.vx v8, v8, a0, v0.t
298 %elt.head = insertelement <vscale x 32 x i8> poison, i8 %b, i32 0
299 %vb = shufflevector <vscale x 32 x i8> %elt.head, <vscale x 32 x i8> poison, <vscale x 32 x i32> zeroinitializer
300 %v = call <vscale x 32 x i8> @llvm.vp.sdiv.nxv32i8(<vscale x 32 x i8> %va, <vscale x 32 x i8> %vb, <vscale x 32 x i1> %m, i32 %evl)
301 ret <vscale x 32 x i8> %v
304 define <vscale x 32 x i8> @vdiv_vx_nxv32i8_unmasked(<vscale x 32 x i8> %va, i8 %b, i32 zeroext %evl) {
305 ; CHECK-LABEL: vdiv_vx_nxv32i8_unmasked:
307 ; CHECK-NEXT: vsetvli zero, a1, e8, m4, ta, ma
308 ; CHECK-NEXT: vdiv.vx v8, v8, a0
310 %elt.head = insertelement <vscale x 32 x i8> poison, i8 %b, i32 0
311 %vb = shufflevector <vscale x 32 x i8> %elt.head, <vscale x 32 x i8> poison, <vscale x 32 x i32> zeroinitializer
312 %v = call <vscale x 32 x i8> @llvm.vp.sdiv.nxv32i8(<vscale x 32 x i8> %va, <vscale x 32 x i8> %vb, <vscale x 32 x i1> splat (i1 true), i32 %evl)
313 ret <vscale x 32 x i8> %v
316 declare <vscale x 64 x i8> @llvm.vp.sdiv.nxv64i8(<vscale x 64 x i8>, <vscale x 64 x i8>, <vscale x 64 x i1>, i32)
318 define <vscale x 64 x i8> @vdiv_vv_nxv64i8(<vscale x 64 x i8> %va, <vscale x 64 x i8> %b, <vscale x 64 x i1> %m, i32 zeroext %evl) {
319 ; CHECK-LABEL: vdiv_vv_nxv64i8:
321 ; CHECK-NEXT: vsetvli zero, a0, e8, m8, ta, ma
322 ; CHECK-NEXT: vdiv.vv v8, v8, v16, v0.t
324 %v = call <vscale x 64 x i8> @llvm.vp.sdiv.nxv64i8(<vscale x 64 x i8> %va, <vscale x 64 x i8> %b, <vscale x 64 x i1> %m, i32 %evl)
325 ret <vscale x 64 x i8> %v
328 define <vscale x 64 x i8> @vdiv_vv_nxv64i8_unmasked(<vscale x 64 x i8> %va, <vscale x 64 x i8> %b, i32 zeroext %evl) {
329 ; CHECK-LABEL: vdiv_vv_nxv64i8_unmasked:
331 ; CHECK-NEXT: vsetvli zero, a0, e8, m8, ta, ma
332 ; CHECK-NEXT: vdiv.vv v8, v8, v16
334 %v = call <vscale x 64 x i8> @llvm.vp.sdiv.nxv64i8(<vscale x 64 x i8> %va, <vscale x 64 x i8> %b, <vscale x 64 x i1> splat (i1 true), i32 %evl)
335 ret <vscale x 64 x i8> %v
338 define <vscale x 64 x i8> @vdiv_vx_nxv64i8(<vscale x 64 x i8> %va, i8 %b, <vscale x 64 x i1> %m, i32 zeroext %evl) {
339 ; CHECK-LABEL: vdiv_vx_nxv64i8:
341 ; CHECK-NEXT: vsetvli zero, a1, e8, m8, ta, ma
342 ; CHECK-NEXT: vdiv.vx v8, v8, a0, v0.t
344 %elt.head = insertelement <vscale x 64 x i8> poison, i8 %b, i32 0
345 %vb = shufflevector <vscale x 64 x i8> %elt.head, <vscale x 64 x i8> poison, <vscale x 64 x i32> zeroinitializer
346 %v = call <vscale x 64 x i8> @llvm.vp.sdiv.nxv64i8(<vscale x 64 x i8> %va, <vscale x 64 x i8> %vb, <vscale x 64 x i1> %m, i32 %evl)
347 ret <vscale x 64 x i8> %v
350 define <vscale x 64 x i8> @vdiv_vx_nxv64i8_unmasked(<vscale x 64 x i8> %va, i8 %b, i32 zeroext %evl) {
351 ; CHECK-LABEL: vdiv_vx_nxv64i8_unmasked:
353 ; CHECK-NEXT: vsetvli zero, a1, e8, m8, ta, ma
354 ; CHECK-NEXT: vdiv.vx v8, v8, a0
356 %elt.head = insertelement <vscale x 64 x i8> poison, i8 %b, i32 0
357 %vb = shufflevector <vscale x 64 x i8> %elt.head, <vscale x 64 x i8> poison, <vscale x 64 x i32> zeroinitializer
358 %v = call <vscale x 64 x i8> @llvm.vp.sdiv.nxv64i8(<vscale x 64 x i8> %va, <vscale x 64 x i8> %vb, <vscale x 64 x i1> splat (i1 true), i32 %evl)
359 ret <vscale x 64 x i8> %v
362 declare <vscale x 1 x i16> @llvm.vp.sdiv.nxv1i16(<vscale x 1 x i16>, <vscale x 1 x i16>, <vscale x 1 x i1>, i32)
364 define <vscale x 1 x i16> @vdiv_vv_nxv1i16(<vscale x 1 x i16> %va, <vscale x 1 x i16> %b, <vscale x 1 x i1> %m, i32 zeroext %evl) {
365 ; CHECK-LABEL: vdiv_vv_nxv1i16:
367 ; CHECK-NEXT: vsetvli zero, a0, e16, mf4, ta, ma
368 ; CHECK-NEXT: vdiv.vv v8, v8, v9, v0.t
370 %v = call <vscale x 1 x i16> @llvm.vp.sdiv.nxv1i16(<vscale x 1 x i16> %va, <vscale x 1 x i16> %b, <vscale x 1 x i1> %m, i32 %evl)
371 ret <vscale x 1 x i16> %v
374 define <vscale x 1 x i16> @vdiv_vv_nxv1i16_unmasked(<vscale x 1 x i16> %va, <vscale x 1 x i16> %b, i32 zeroext %evl) {
375 ; CHECK-LABEL: vdiv_vv_nxv1i16_unmasked:
377 ; CHECK-NEXT: vsetvli zero, a0, e16, mf4, ta, ma
378 ; CHECK-NEXT: vdiv.vv v8, v8, v9
380 %v = call <vscale x 1 x i16> @llvm.vp.sdiv.nxv1i16(<vscale x 1 x i16> %va, <vscale x 1 x i16> %b, <vscale x 1 x i1> splat (i1 true), i32 %evl)
381 ret <vscale x 1 x i16> %v
384 define <vscale x 1 x i16> @vdiv_vx_nxv1i16(<vscale x 1 x i16> %va, i16 %b, <vscale x 1 x i1> %m, i32 zeroext %evl) {
385 ; CHECK-LABEL: vdiv_vx_nxv1i16:
387 ; CHECK-NEXT: vsetvli zero, a1, e16, mf4, ta, ma
388 ; CHECK-NEXT: vdiv.vx v8, v8, a0, v0.t
390 %elt.head = insertelement <vscale x 1 x i16> poison, i16 %b, i32 0
391 %vb = shufflevector <vscale x 1 x i16> %elt.head, <vscale x 1 x i16> poison, <vscale x 1 x i32> zeroinitializer
392 %v = call <vscale x 1 x i16> @llvm.vp.sdiv.nxv1i16(<vscale x 1 x i16> %va, <vscale x 1 x i16> %vb, <vscale x 1 x i1> %m, i32 %evl)
393 ret <vscale x 1 x i16> %v
396 define <vscale x 1 x i16> @vdiv_vx_nxv1i16_unmasked(<vscale x 1 x i16> %va, i16 %b, i32 zeroext %evl) {
397 ; CHECK-LABEL: vdiv_vx_nxv1i16_unmasked:
399 ; CHECK-NEXT: vsetvli zero, a1, e16, mf4, ta, ma
400 ; CHECK-NEXT: vdiv.vx v8, v8, a0
402 %elt.head = insertelement <vscale x 1 x i16> poison, i16 %b, i32 0
403 %vb = shufflevector <vscale x 1 x i16> %elt.head, <vscale x 1 x i16> poison, <vscale x 1 x i32> zeroinitializer
404 %v = call <vscale x 1 x i16> @llvm.vp.sdiv.nxv1i16(<vscale x 1 x i16> %va, <vscale x 1 x i16> %vb, <vscale x 1 x i1> splat (i1 true), i32 %evl)
405 ret <vscale x 1 x i16> %v
408 declare <vscale x 2 x i16> @llvm.vp.sdiv.nxv2i16(<vscale x 2 x i16>, <vscale x 2 x i16>, <vscale x 2 x i1>, i32)
410 define <vscale x 2 x i16> @vdiv_vv_nxv2i16(<vscale x 2 x i16> %va, <vscale x 2 x i16> %b, <vscale x 2 x i1> %m, i32 zeroext %evl) {
411 ; CHECK-LABEL: vdiv_vv_nxv2i16:
413 ; CHECK-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
414 ; CHECK-NEXT: vdiv.vv v8, v8, v9, v0.t
416 %v = call <vscale x 2 x i16> @llvm.vp.sdiv.nxv2i16(<vscale x 2 x i16> %va, <vscale x 2 x i16> %b, <vscale x 2 x i1> %m, i32 %evl)
417 ret <vscale x 2 x i16> %v
420 define <vscale x 2 x i16> @vdiv_vv_nxv2i16_unmasked(<vscale x 2 x i16> %va, <vscale x 2 x i16> %b, i32 zeroext %evl) {
421 ; CHECK-LABEL: vdiv_vv_nxv2i16_unmasked:
423 ; CHECK-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
424 ; CHECK-NEXT: vdiv.vv v8, v8, v9
426 %v = call <vscale x 2 x i16> @llvm.vp.sdiv.nxv2i16(<vscale x 2 x i16> %va, <vscale x 2 x i16> %b, <vscale x 2 x i1> splat (i1 true), i32 %evl)
427 ret <vscale x 2 x i16> %v
430 define <vscale x 2 x i16> @vdiv_vx_nxv2i16(<vscale x 2 x i16> %va, i16 %b, <vscale x 2 x i1> %m, i32 zeroext %evl) {
431 ; CHECK-LABEL: vdiv_vx_nxv2i16:
433 ; CHECK-NEXT: vsetvli zero, a1, e16, mf2, ta, ma
434 ; CHECK-NEXT: vdiv.vx v8, v8, a0, v0.t
436 %elt.head = insertelement <vscale x 2 x i16> poison, i16 %b, i32 0
437 %vb = shufflevector <vscale x 2 x i16> %elt.head, <vscale x 2 x i16> poison, <vscale x 2 x i32> zeroinitializer
438 %v = call <vscale x 2 x i16> @llvm.vp.sdiv.nxv2i16(<vscale x 2 x i16> %va, <vscale x 2 x i16> %vb, <vscale x 2 x i1> %m, i32 %evl)
439 ret <vscale x 2 x i16> %v
442 define <vscale x 2 x i16> @vdiv_vx_nxv2i16_unmasked(<vscale x 2 x i16> %va, i16 %b, i32 zeroext %evl) {
443 ; CHECK-LABEL: vdiv_vx_nxv2i16_unmasked:
445 ; CHECK-NEXT: vsetvli zero, a1, e16, mf2, ta, ma
446 ; CHECK-NEXT: vdiv.vx v8, v8, a0
448 %elt.head = insertelement <vscale x 2 x i16> poison, i16 %b, i32 0
449 %vb = shufflevector <vscale x 2 x i16> %elt.head, <vscale x 2 x i16> poison, <vscale x 2 x i32> zeroinitializer
450 %v = call <vscale x 2 x i16> @llvm.vp.sdiv.nxv2i16(<vscale x 2 x i16> %va, <vscale x 2 x i16> %vb, <vscale x 2 x i1> splat (i1 true), i32 %evl)
451 ret <vscale x 2 x i16> %v
454 declare <vscale x 4 x i16> @llvm.vp.sdiv.nxv4i16(<vscale x 4 x i16>, <vscale x 4 x i16>, <vscale x 4 x i1>, i32)
456 define <vscale x 4 x i16> @vdiv_vv_nxv4i16(<vscale x 4 x i16> %va, <vscale x 4 x i16> %b, <vscale x 4 x i1> %m, i32 zeroext %evl) {
457 ; CHECK-LABEL: vdiv_vv_nxv4i16:
459 ; CHECK-NEXT: vsetvli zero, a0, e16, m1, ta, ma
460 ; CHECK-NEXT: vdiv.vv v8, v8, v9, v0.t
462 %v = call <vscale x 4 x i16> @llvm.vp.sdiv.nxv4i16(<vscale x 4 x i16> %va, <vscale x 4 x i16> %b, <vscale x 4 x i1> %m, i32 %evl)
463 ret <vscale x 4 x i16> %v
466 define <vscale x 4 x i16> @vdiv_vv_nxv4i16_unmasked(<vscale x 4 x i16> %va, <vscale x 4 x i16> %b, i32 zeroext %evl) {
467 ; CHECK-LABEL: vdiv_vv_nxv4i16_unmasked:
469 ; CHECK-NEXT: vsetvli zero, a0, e16, m1, ta, ma
470 ; CHECK-NEXT: vdiv.vv v8, v8, v9
472 %v = call <vscale x 4 x i16> @llvm.vp.sdiv.nxv4i16(<vscale x 4 x i16> %va, <vscale x 4 x i16> %b, <vscale x 4 x i1> splat (i1 true), i32 %evl)
473 ret <vscale x 4 x i16> %v
476 define <vscale x 4 x i16> @vdiv_vx_nxv4i16(<vscale x 4 x i16> %va, i16 %b, <vscale x 4 x i1> %m, i32 zeroext %evl) {
477 ; CHECK-LABEL: vdiv_vx_nxv4i16:
479 ; CHECK-NEXT: vsetvli zero, a1, e16, m1, ta, ma
480 ; CHECK-NEXT: vdiv.vx v8, v8, a0, v0.t
482 %elt.head = insertelement <vscale x 4 x i16> poison, i16 %b, i32 0
483 %vb = shufflevector <vscale x 4 x i16> %elt.head, <vscale x 4 x i16> poison, <vscale x 4 x i32> zeroinitializer
484 %v = call <vscale x 4 x i16> @llvm.vp.sdiv.nxv4i16(<vscale x 4 x i16> %va, <vscale x 4 x i16> %vb, <vscale x 4 x i1> %m, i32 %evl)
485 ret <vscale x 4 x i16> %v
488 define <vscale x 4 x i16> @vdiv_vx_nxv4i16_unmasked(<vscale x 4 x i16> %va, i16 %b, i32 zeroext %evl) {
489 ; CHECK-LABEL: vdiv_vx_nxv4i16_unmasked:
491 ; CHECK-NEXT: vsetvli zero, a1, e16, m1, ta, ma
492 ; CHECK-NEXT: vdiv.vx v8, v8, a0
494 %elt.head = insertelement <vscale x 4 x i16> poison, i16 %b, i32 0
495 %vb = shufflevector <vscale x 4 x i16> %elt.head, <vscale x 4 x i16> poison, <vscale x 4 x i32> zeroinitializer
496 %v = call <vscale x 4 x i16> @llvm.vp.sdiv.nxv4i16(<vscale x 4 x i16> %va, <vscale x 4 x i16> %vb, <vscale x 4 x i1> splat (i1 true), i32 %evl)
497 ret <vscale x 4 x i16> %v
500 declare <vscale x 8 x i16> @llvm.vp.sdiv.nxv8i16(<vscale x 8 x i16>, <vscale x 8 x i16>, <vscale x 8 x i1>, i32)
502 define <vscale x 8 x i16> @vdiv_vv_nxv8i16(<vscale x 8 x i16> %va, <vscale x 8 x i16> %b, <vscale x 8 x i1> %m, i32 zeroext %evl) {
503 ; CHECK-LABEL: vdiv_vv_nxv8i16:
505 ; CHECK-NEXT: vsetvli zero, a0, e16, m2, ta, ma
506 ; CHECK-NEXT: vdiv.vv v8, v8, v10, v0.t
508 %v = call <vscale x 8 x i16> @llvm.vp.sdiv.nxv8i16(<vscale x 8 x i16> %va, <vscale x 8 x i16> %b, <vscale x 8 x i1> %m, i32 %evl)
509 ret <vscale x 8 x i16> %v
512 define <vscale x 8 x i16> @vdiv_vv_nxv8i16_unmasked(<vscale x 8 x i16> %va, <vscale x 8 x i16> %b, i32 zeroext %evl) {
513 ; CHECK-LABEL: vdiv_vv_nxv8i16_unmasked:
515 ; CHECK-NEXT: vsetvli zero, a0, e16, m2, ta, ma
516 ; CHECK-NEXT: vdiv.vv v8, v8, v10
518 %v = call <vscale x 8 x i16> @llvm.vp.sdiv.nxv8i16(<vscale x 8 x i16> %va, <vscale x 8 x i16> %b, <vscale x 8 x i1> splat (i1 true), i32 %evl)
519 ret <vscale x 8 x i16> %v
522 define <vscale x 8 x i16> @vdiv_vx_nxv8i16(<vscale x 8 x i16> %va, i16 %b, <vscale x 8 x i1> %m, i32 zeroext %evl) {
523 ; CHECK-LABEL: vdiv_vx_nxv8i16:
525 ; CHECK-NEXT: vsetvli zero, a1, e16, m2, ta, ma
526 ; CHECK-NEXT: vdiv.vx v8, v8, a0, v0.t
528 %elt.head = insertelement <vscale x 8 x i16> poison, i16 %b, i32 0
529 %vb = shufflevector <vscale x 8 x i16> %elt.head, <vscale x 8 x i16> poison, <vscale x 8 x i32> zeroinitializer
530 %v = call <vscale x 8 x i16> @llvm.vp.sdiv.nxv8i16(<vscale x 8 x i16> %va, <vscale x 8 x i16> %vb, <vscale x 8 x i1> %m, i32 %evl)
531 ret <vscale x 8 x i16> %v
534 define <vscale x 8 x i16> @vdiv_vx_nxv8i16_unmasked(<vscale x 8 x i16> %va, i16 %b, i32 zeroext %evl) {
535 ; CHECK-LABEL: vdiv_vx_nxv8i16_unmasked:
537 ; CHECK-NEXT: vsetvli zero, a1, e16, m2, ta, ma
538 ; CHECK-NEXT: vdiv.vx v8, v8, a0
540 %elt.head = insertelement <vscale x 8 x i16> poison, i16 %b, i32 0
541 %vb = shufflevector <vscale x 8 x i16> %elt.head, <vscale x 8 x i16> poison, <vscale x 8 x i32> zeroinitializer
542 %v = call <vscale x 8 x i16> @llvm.vp.sdiv.nxv8i16(<vscale x 8 x i16> %va, <vscale x 8 x i16> %vb, <vscale x 8 x i1> splat (i1 true), i32 %evl)
543 ret <vscale x 8 x i16> %v
546 declare <vscale x 16 x i16> @llvm.vp.sdiv.nxv16i16(<vscale x 16 x i16>, <vscale x 16 x i16>, <vscale x 16 x i1>, i32)
548 define <vscale x 16 x i16> @vdiv_vv_nxv16i16(<vscale x 16 x i16> %va, <vscale x 16 x i16> %b, <vscale x 16 x i1> %m, i32 zeroext %evl) {
549 ; CHECK-LABEL: vdiv_vv_nxv16i16:
551 ; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, ma
552 ; CHECK-NEXT: vdiv.vv v8, v8, v12, v0.t
554 %v = call <vscale x 16 x i16> @llvm.vp.sdiv.nxv16i16(<vscale x 16 x i16> %va, <vscale x 16 x i16> %b, <vscale x 16 x i1> %m, i32 %evl)
555 ret <vscale x 16 x i16> %v
558 define <vscale x 16 x i16> @vdiv_vv_nxv16i16_unmasked(<vscale x 16 x i16> %va, <vscale x 16 x i16> %b, i32 zeroext %evl) {
559 ; CHECK-LABEL: vdiv_vv_nxv16i16_unmasked:
561 ; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, ma
562 ; CHECK-NEXT: vdiv.vv v8, v8, v12
564 %v = call <vscale x 16 x i16> @llvm.vp.sdiv.nxv16i16(<vscale x 16 x i16> %va, <vscale x 16 x i16> %b, <vscale x 16 x i1> splat (i1 true), i32 %evl)
565 ret <vscale x 16 x i16> %v
568 define <vscale x 16 x i16> @vdiv_vx_nxv16i16(<vscale x 16 x i16> %va, i16 %b, <vscale x 16 x i1> %m, i32 zeroext %evl) {
569 ; CHECK-LABEL: vdiv_vx_nxv16i16:
571 ; CHECK-NEXT: vsetvli zero, a1, e16, m4, ta, ma
572 ; CHECK-NEXT: vdiv.vx v8, v8, a0, v0.t
574 %elt.head = insertelement <vscale x 16 x i16> poison, i16 %b, i32 0
575 %vb = shufflevector <vscale x 16 x i16> %elt.head, <vscale x 16 x i16> poison, <vscale x 16 x i32> zeroinitializer
576 %v = call <vscale x 16 x i16> @llvm.vp.sdiv.nxv16i16(<vscale x 16 x i16> %va, <vscale x 16 x i16> %vb, <vscale x 16 x i1> %m, i32 %evl)
577 ret <vscale x 16 x i16> %v
580 define <vscale x 16 x i16> @vdiv_vx_nxv16i16_unmasked(<vscale x 16 x i16> %va, i16 %b, i32 zeroext %evl) {
581 ; CHECK-LABEL: vdiv_vx_nxv16i16_unmasked:
583 ; CHECK-NEXT: vsetvli zero, a1, e16, m4, ta, ma
584 ; CHECK-NEXT: vdiv.vx v8, v8, a0
586 %elt.head = insertelement <vscale x 16 x i16> poison, i16 %b, i32 0
587 %vb = shufflevector <vscale x 16 x i16> %elt.head, <vscale x 16 x i16> poison, <vscale x 16 x i32> zeroinitializer
588 %v = call <vscale x 16 x i16> @llvm.vp.sdiv.nxv16i16(<vscale x 16 x i16> %va, <vscale x 16 x i16> %vb, <vscale x 16 x i1> splat (i1 true), i32 %evl)
589 ret <vscale x 16 x i16> %v
592 declare <vscale x 32 x i16> @llvm.vp.sdiv.nxv32i16(<vscale x 32 x i16>, <vscale x 32 x i16>, <vscale x 32 x i1>, i32)
594 define <vscale x 32 x i16> @vdiv_vv_nxv32i16(<vscale x 32 x i16> %va, <vscale x 32 x i16> %b, <vscale x 32 x i1> %m, i32 zeroext %evl) {
595 ; CHECK-LABEL: vdiv_vv_nxv32i16:
597 ; CHECK-NEXT: vsetvli zero, a0, e16, m8, ta, ma
598 ; CHECK-NEXT: vdiv.vv v8, v8, v16, v0.t
600 %v = call <vscale x 32 x i16> @llvm.vp.sdiv.nxv32i16(<vscale x 32 x i16> %va, <vscale x 32 x i16> %b, <vscale x 32 x i1> %m, i32 %evl)
601 ret <vscale x 32 x i16> %v
604 define <vscale x 32 x i16> @vdiv_vv_nxv32i16_unmasked(<vscale x 32 x i16> %va, <vscale x 32 x i16> %b, i32 zeroext %evl) {
605 ; CHECK-LABEL: vdiv_vv_nxv32i16_unmasked:
607 ; CHECK-NEXT: vsetvli zero, a0, e16, m8, ta, ma
608 ; CHECK-NEXT: vdiv.vv v8, v8, v16
610 %v = call <vscale x 32 x i16> @llvm.vp.sdiv.nxv32i16(<vscale x 32 x i16> %va, <vscale x 32 x i16> %b, <vscale x 32 x i1> splat (i1 true), i32 %evl)
611 ret <vscale x 32 x i16> %v
614 define <vscale x 32 x i16> @vdiv_vx_nxv32i16(<vscale x 32 x i16> %va, i16 %b, <vscale x 32 x i1> %m, i32 zeroext %evl) {
615 ; CHECK-LABEL: vdiv_vx_nxv32i16:
617 ; CHECK-NEXT: vsetvli zero, a1, e16, m8, ta, ma
618 ; CHECK-NEXT: vdiv.vx v8, v8, a0, v0.t
620 %elt.head = insertelement <vscale x 32 x i16> poison, i16 %b, i32 0
621 %vb = shufflevector <vscale x 32 x i16> %elt.head, <vscale x 32 x i16> poison, <vscale x 32 x i32> zeroinitializer
622 %v = call <vscale x 32 x i16> @llvm.vp.sdiv.nxv32i16(<vscale x 32 x i16> %va, <vscale x 32 x i16> %vb, <vscale x 32 x i1> %m, i32 %evl)
623 ret <vscale x 32 x i16> %v
626 define <vscale x 32 x i16> @vdiv_vx_nxv32i16_unmasked(<vscale x 32 x i16> %va, i16 %b, i32 zeroext %evl) {
627 ; CHECK-LABEL: vdiv_vx_nxv32i16_unmasked:
629 ; CHECK-NEXT: vsetvli zero, a1, e16, m8, ta, ma
630 ; CHECK-NEXT: vdiv.vx v8, v8, a0
632 %elt.head = insertelement <vscale x 32 x i16> poison, i16 %b, i32 0
633 %vb = shufflevector <vscale x 32 x i16> %elt.head, <vscale x 32 x i16> poison, <vscale x 32 x i32> zeroinitializer
634 %v = call <vscale x 32 x i16> @llvm.vp.sdiv.nxv32i16(<vscale x 32 x i16> %va, <vscale x 32 x i16> %vb, <vscale x 32 x i1> splat (i1 true), i32 %evl)
635 ret <vscale x 32 x i16> %v
638 declare <vscale x 1 x i32> @llvm.vp.sdiv.nxv1i32(<vscale x 1 x i32>, <vscale x 1 x i32>, <vscale x 1 x i1>, i32)
640 define <vscale x 1 x i32> @vdiv_vv_nxv1i32(<vscale x 1 x i32> %va, <vscale x 1 x i32> %b, <vscale x 1 x i1> %m, i32 zeroext %evl) {
641 ; CHECK-LABEL: vdiv_vv_nxv1i32:
643 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
644 ; CHECK-NEXT: vdiv.vv v8, v8, v9, v0.t
646 %v = call <vscale x 1 x i32> @llvm.vp.sdiv.nxv1i32(<vscale x 1 x i32> %va, <vscale x 1 x i32> %b, <vscale x 1 x i1> %m, i32 %evl)
647 ret <vscale x 1 x i32> %v
650 define <vscale x 1 x i32> @vdiv_vv_nxv1i32_unmasked(<vscale x 1 x i32> %va, <vscale x 1 x i32> %b, i32 zeroext %evl) {
651 ; CHECK-LABEL: vdiv_vv_nxv1i32_unmasked:
653 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
654 ; CHECK-NEXT: vdiv.vv v8, v8, v9
656 %v = call <vscale x 1 x i32> @llvm.vp.sdiv.nxv1i32(<vscale x 1 x i32> %va, <vscale x 1 x i32> %b, <vscale x 1 x i1> splat (i1 true), i32 %evl)
657 ret <vscale x 1 x i32> %v
660 define <vscale x 1 x i32> @vdiv_vx_nxv1i32(<vscale x 1 x i32> %va, i32 %b, <vscale x 1 x i1> %m, i32 zeroext %evl) {
661 ; CHECK-LABEL: vdiv_vx_nxv1i32:
663 ; CHECK-NEXT: vsetvli zero, a1, e32, mf2, ta, ma
664 ; CHECK-NEXT: vdiv.vx v8, v8, a0, v0.t
666 %elt.head = insertelement <vscale x 1 x i32> poison, i32 %b, i32 0
667 %vb = shufflevector <vscale x 1 x i32> %elt.head, <vscale x 1 x i32> poison, <vscale x 1 x i32> zeroinitializer
668 %v = call <vscale x 1 x i32> @llvm.vp.sdiv.nxv1i32(<vscale x 1 x i32> %va, <vscale x 1 x i32> %vb, <vscale x 1 x i1> %m, i32 %evl)
669 ret <vscale x 1 x i32> %v
672 define <vscale x 1 x i32> @vdiv_vx_nxv1i32_unmasked(<vscale x 1 x i32> %va, i32 %b, i32 zeroext %evl) {
673 ; CHECK-LABEL: vdiv_vx_nxv1i32_unmasked:
675 ; CHECK-NEXT: vsetvli zero, a1, e32, mf2, ta, ma
676 ; CHECK-NEXT: vdiv.vx v8, v8, a0
678 %elt.head = insertelement <vscale x 1 x i32> poison, i32 %b, i32 0
679 %vb = shufflevector <vscale x 1 x i32> %elt.head, <vscale x 1 x i32> poison, <vscale x 1 x i32> zeroinitializer
680 %v = call <vscale x 1 x i32> @llvm.vp.sdiv.nxv1i32(<vscale x 1 x i32> %va, <vscale x 1 x i32> %vb, <vscale x 1 x i1> splat (i1 true), i32 %evl)
681 ret <vscale x 1 x i32> %v
684 declare <vscale x 2 x i32> @llvm.vp.sdiv.nxv2i32(<vscale x 2 x i32>, <vscale x 2 x i32>, <vscale x 2 x i1>, i32)
686 define <vscale x 2 x i32> @vdiv_vv_nxv2i32(<vscale x 2 x i32> %va, <vscale x 2 x i32> %b, <vscale x 2 x i1> %m, i32 zeroext %evl) {
687 ; CHECK-LABEL: vdiv_vv_nxv2i32:
689 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, ma
690 ; CHECK-NEXT: vdiv.vv v8, v8, v9, v0.t
692 %v = call <vscale x 2 x i32> @llvm.vp.sdiv.nxv2i32(<vscale x 2 x i32> %va, <vscale x 2 x i32> %b, <vscale x 2 x i1> %m, i32 %evl)
693 ret <vscale x 2 x i32> %v
696 define <vscale x 2 x i32> @vdiv_vv_nxv2i32_unmasked(<vscale x 2 x i32> %va, <vscale x 2 x i32> %b, i32 zeroext %evl) {
697 ; CHECK-LABEL: vdiv_vv_nxv2i32_unmasked:
699 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, ma
700 ; CHECK-NEXT: vdiv.vv v8, v8, v9
702 %v = call <vscale x 2 x i32> @llvm.vp.sdiv.nxv2i32(<vscale x 2 x i32> %va, <vscale x 2 x i32> %b, <vscale x 2 x i1> splat (i1 true), i32 %evl)
703 ret <vscale x 2 x i32> %v
706 define <vscale x 2 x i32> @vdiv_vx_nxv2i32(<vscale x 2 x i32> %va, i32 %b, <vscale x 2 x i1> %m, i32 zeroext %evl) {
707 ; CHECK-LABEL: vdiv_vx_nxv2i32:
709 ; CHECK-NEXT: vsetvli zero, a1, e32, m1, ta, ma
710 ; CHECK-NEXT: vdiv.vx v8, v8, a0, v0.t
712 %elt.head = insertelement <vscale x 2 x i32> poison, i32 %b, i32 0
713 %vb = shufflevector <vscale x 2 x i32> %elt.head, <vscale x 2 x i32> poison, <vscale x 2 x i32> zeroinitializer
714 %v = call <vscale x 2 x i32> @llvm.vp.sdiv.nxv2i32(<vscale x 2 x i32> %va, <vscale x 2 x i32> %vb, <vscale x 2 x i1> %m, i32 %evl)
715 ret <vscale x 2 x i32> %v
718 define <vscale x 2 x i32> @vdiv_vx_nxv2i32_unmasked(<vscale x 2 x i32> %va, i32 %b, i32 zeroext %evl) {
719 ; CHECK-LABEL: vdiv_vx_nxv2i32_unmasked:
721 ; CHECK-NEXT: vsetvli zero, a1, e32, m1, ta, ma
722 ; CHECK-NEXT: vdiv.vx v8, v8, a0
724 %elt.head = insertelement <vscale x 2 x i32> poison, i32 %b, i32 0
725 %vb = shufflevector <vscale x 2 x i32> %elt.head, <vscale x 2 x i32> poison, <vscale x 2 x i32> zeroinitializer
726 %v = call <vscale x 2 x i32> @llvm.vp.sdiv.nxv2i32(<vscale x 2 x i32> %va, <vscale x 2 x i32> %vb, <vscale x 2 x i1> splat (i1 true), i32 %evl)
727 ret <vscale x 2 x i32> %v
730 declare <vscale x 4 x i32> @llvm.vp.sdiv.nxv4i32(<vscale x 4 x i32>, <vscale x 4 x i32>, <vscale x 4 x i1>, i32)
732 define <vscale x 4 x i32> @vdiv_vv_nxv4i32(<vscale x 4 x i32> %va, <vscale x 4 x i32> %b, <vscale x 4 x i1> %m, i32 zeroext %evl) {
733 ; CHECK-LABEL: vdiv_vv_nxv4i32:
735 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
736 ; CHECK-NEXT: vdiv.vv v8, v8, v10, v0.t
738 %v = call <vscale x 4 x i32> @llvm.vp.sdiv.nxv4i32(<vscale x 4 x i32> %va, <vscale x 4 x i32> %b, <vscale x 4 x i1> %m, i32 %evl)
739 ret <vscale x 4 x i32> %v
742 define <vscale x 4 x i32> @vdiv_vv_nxv4i32_unmasked(<vscale x 4 x i32> %va, <vscale x 4 x i32> %b, i32 zeroext %evl) {
743 ; CHECK-LABEL: vdiv_vv_nxv4i32_unmasked:
745 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
746 ; CHECK-NEXT: vdiv.vv v8, v8, v10
748 %v = call <vscale x 4 x i32> @llvm.vp.sdiv.nxv4i32(<vscale x 4 x i32> %va, <vscale x 4 x i32> %b, <vscale x 4 x i1> splat (i1 true), i32 %evl)
749 ret <vscale x 4 x i32> %v
752 define <vscale x 4 x i32> @vdiv_vx_nxv4i32(<vscale x 4 x i32> %va, i32 %b, <vscale x 4 x i1> %m, i32 zeroext %evl) {
753 ; CHECK-LABEL: vdiv_vx_nxv4i32:
755 ; CHECK-NEXT: vsetvli zero, a1, e32, m2, ta, ma
756 ; CHECK-NEXT: vdiv.vx v8, v8, a0, v0.t
758 %elt.head = insertelement <vscale x 4 x i32> poison, i32 %b, i32 0
759 %vb = shufflevector <vscale x 4 x i32> %elt.head, <vscale x 4 x i32> poison, <vscale x 4 x i32> zeroinitializer
760 %v = call <vscale x 4 x i32> @llvm.vp.sdiv.nxv4i32(<vscale x 4 x i32> %va, <vscale x 4 x i32> %vb, <vscale x 4 x i1> %m, i32 %evl)
761 ret <vscale x 4 x i32> %v
764 define <vscale x 4 x i32> @vdiv_vx_nxv4i32_unmasked(<vscale x 4 x i32> %va, i32 %b, i32 zeroext %evl) {
765 ; CHECK-LABEL: vdiv_vx_nxv4i32_unmasked:
767 ; CHECK-NEXT: vsetvli zero, a1, e32, m2, ta, ma
768 ; CHECK-NEXT: vdiv.vx v8, v8, a0
770 %elt.head = insertelement <vscale x 4 x i32> poison, i32 %b, i32 0
771 %vb = shufflevector <vscale x 4 x i32> %elt.head, <vscale x 4 x i32> poison, <vscale x 4 x i32> zeroinitializer
772 %v = call <vscale x 4 x i32> @llvm.vp.sdiv.nxv4i32(<vscale x 4 x i32> %va, <vscale x 4 x i32> %vb, <vscale x 4 x i1> splat (i1 true), i32 %evl)
773 ret <vscale x 4 x i32> %v
776 declare <vscale x 8 x i32> @llvm.vp.sdiv.nxv8i32(<vscale x 8 x i32>, <vscale x 8 x i32>, <vscale x 8 x i1>, i32)
778 define <vscale x 8 x i32> @vdiv_vv_nxv8i32(<vscale x 8 x i32> %va, <vscale x 8 x i32> %b, <vscale x 8 x i1> %m, i32 zeroext %evl) {
779 ; CHECK-LABEL: vdiv_vv_nxv8i32:
781 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
782 ; CHECK-NEXT: vdiv.vv v8, v8, v12, v0.t
784 %v = call <vscale x 8 x i32> @llvm.vp.sdiv.nxv8i32(<vscale x 8 x i32> %va, <vscale x 8 x i32> %b, <vscale x 8 x i1> %m, i32 %evl)
785 ret <vscale x 8 x i32> %v
788 define <vscale x 8 x i32> @vdiv_vv_nxv8i32_unmasked(<vscale x 8 x i32> %va, <vscale x 8 x i32> %b, i32 zeroext %evl) {
789 ; CHECK-LABEL: vdiv_vv_nxv8i32_unmasked:
791 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
792 ; CHECK-NEXT: vdiv.vv v8, v8, v12
794 %v = call <vscale x 8 x i32> @llvm.vp.sdiv.nxv8i32(<vscale x 8 x i32> %va, <vscale x 8 x i32> %b, <vscale x 8 x i1> splat (i1 true), i32 %evl)
795 ret <vscale x 8 x i32> %v
798 define <vscale x 8 x i32> @vdiv_vx_nxv8i32(<vscale x 8 x i32> %va, i32 %b, <vscale x 8 x i1> %m, i32 zeroext %evl) {
799 ; CHECK-LABEL: vdiv_vx_nxv8i32:
801 ; CHECK-NEXT: vsetvli zero, a1, e32, m4, ta, ma
802 ; CHECK-NEXT: vdiv.vx v8, v8, a0, v0.t
804 %elt.head = insertelement <vscale x 8 x i32> poison, i32 %b, i32 0
805 %vb = shufflevector <vscale x 8 x i32> %elt.head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
806 %v = call <vscale x 8 x i32> @llvm.vp.sdiv.nxv8i32(<vscale x 8 x i32> %va, <vscale x 8 x i32> %vb, <vscale x 8 x i1> %m, i32 %evl)
807 ret <vscale x 8 x i32> %v
810 define <vscale x 8 x i32> @vdiv_vx_nxv8i32_unmasked(<vscale x 8 x i32> %va, i32 %b, i32 zeroext %evl) {
811 ; CHECK-LABEL: vdiv_vx_nxv8i32_unmasked:
813 ; CHECK-NEXT: vsetvli zero, a1, e32, m4, ta, ma
814 ; CHECK-NEXT: vdiv.vx v8, v8, a0
816 %elt.head = insertelement <vscale x 8 x i32> poison, i32 %b, i32 0
817 %vb = shufflevector <vscale x 8 x i32> %elt.head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
818 %v = call <vscale x 8 x i32> @llvm.vp.sdiv.nxv8i32(<vscale x 8 x i32> %va, <vscale x 8 x i32> %vb, <vscale x 8 x i1> splat (i1 true), i32 %evl)
819 ret <vscale x 8 x i32> %v
822 declare <vscale x 16 x i32> @llvm.vp.sdiv.nxv16i32(<vscale x 16 x i32>, <vscale x 16 x i32>, <vscale x 16 x i1>, i32)
824 define <vscale x 16 x i32> @vdiv_vv_nxv16i32(<vscale x 16 x i32> %va, <vscale x 16 x i32> %b, <vscale x 16 x i1> %m, i32 zeroext %evl) {
825 ; CHECK-LABEL: vdiv_vv_nxv16i32:
827 ; CHECK-NEXT: vsetvli zero, a0, e32, m8, ta, ma
828 ; CHECK-NEXT: vdiv.vv v8, v8, v16, v0.t
830 %v = call <vscale x 16 x i32> @llvm.vp.sdiv.nxv16i32(<vscale x 16 x i32> %va, <vscale x 16 x i32> %b, <vscale x 16 x i1> %m, i32 %evl)
831 ret <vscale x 16 x i32> %v
834 define <vscale x 16 x i32> @vdiv_vv_nxv16i32_unmasked(<vscale x 16 x i32> %va, <vscale x 16 x i32> %b, i32 zeroext %evl) {
835 ; CHECK-LABEL: vdiv_vv_nxv16i32_unmasked:
837 ; CHECK-NEXT: vsetvli zero, a0, e32, m8, ta, ma
838 ; CHECK-NEXT: vdiv.vv v8, v8, v16
840 %v = call <vscale x 16 x i32> @llvm.vp.sdiv.nxv16i32(<vscale x 16 x i32> %va, <vscale x 16 x i32> %b, <vscale x 16 x i1> splat (i1 true), i32 %evl)
841 ret <vscale x 16 x i32> %v
844 define <vscale x 16 x i32> @vdiv_vx_nxv16i32(<vscale x 16 x i32> %va, i32 %b, <vscale x 16 x i1> %m, i32 zeroext %evl) {
845 ; CHECK-LABEL: vdiv_vx_nxv16i32:
847 ; CHECK-NEXT: vsetvli zero, a1, e32, m8, ta, ma
848 ; CHECK-NEXT: vdiv.vx v8, v8, a0, v0.t
850 %elt.head = insertelement <vscale x 16 x i32> poison, i32 %b, i32 0
851 %vb = shufflevector <vscale x 16 x i32> %elt.head, <vscale x 16 x i32> poison, <vscale x 16 x i32> zeroinitializer
852 %v = call <vscale x 16 x i32> @llvm.vp.sdiv.nxv16i32(<vscale x 16 x i32> %va, <vscale x 16 x i32> %vb, <vscale x 16 x i1> %m, i32 %evl)
853 ret <vscale x 16 x i32> %v
856 define <vscale x 16 x i32> @vdiv_vx_nxv16i32_unmasked(<vscale x 16 x i32> %va, i32 %b, i32 zeroext %evl) {
857 ; CHECK-LABEL: vdiv_vx_nxv16i32_unmasked:
859 ; CHECK-NEXT: vsetvli zero, a1, e32, m8, ta, ma
860 ; CHECK-NEXT: vdiv.vx v8, v8, a0
862 %elt.head = insertelement <vscale x 16 x i32> poison, i32 %b, i32 0
863 %vb = shufflevector <vscale x 16 x i32> %elt.head, <vscale x 16 x i32> poison, <vscale x 16 x i32> zeroinitializer
864 %v = call <vscale x 16 x i32> @llvm.vp.sdiv.nxv16i32(<vscale x 16 x i32> %va, <vscale x 16 x i32> %vb, <vscale x 16 x i1> splat (i1 true), i32 %evl)
865 ret <vscale x 16 x i32> %v
868 declare <vscale x 1 x i64> @llvm.vp.sdiv.nxv1i64(<vscale x 1 x i64>, <vscale x 1 x i64>, <vscale x 1 x i1>, i32)
870 define <vscale x 1 x i64> @vdiv_vv_nxv1i64(<vscale x 1 x i64> %va, <vscale x 1 x i64> %b, <vscale x 1 x i1> %m, i32 zeroext %evl) {
871 ; CHECK-LABEL: vdiv_vv_nxv1i64:
873 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
874 ; CHECK-NEXT: vdiv.vv v8, v8, v9, v0.t
876 %v = call <vscale x 1 x i64> @llvm.vp.sdiv.nxv1i64(<vscale x 1 x i64> %va, <vscale x 1 x i64> %b, <vscale x 1 x i1> %m, i32 %evl)
877 ret <vscale x 1 x i64> %v
880 define <vscale x 1 x i64> @vdiv_vv_nxv1i64_unmasked(<vscale x 1 x i64> %va, <vscale x 1 x i64> %b, i32 zeroext %evl) {
881 ; CHECK-LABEL: vdiv_vv_nxv1i64_unmasked:
883 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
884 ; CHECK-NEXT: vdiv.vv v8, v8, v9
886 %v = call <vscale x 1 x i64> @llvm.vp.sdiv.nxv1i64(<vscale x 1 x i64> %va, <vscale x 1 x i64> %b, <vscale x 1 x i1> splat (i1 true), i32 %evl)
887 ret <vscale x 1 x i64> %v
890 define <vscale x 1 x i64> @vdiv_vx_nxv1i64(<vscale x 1 x i64> %va, i64 %b, <vscale x 1 x i1> %m, i32 zeroext %evl) {
891 ; RV32-LABEL: vdiv_vx_nxv1i64:
893 ; RV32-NEXT: addi sp, sp, -16
894 ; RV32-NEXT: .cfi_def_cfa_offset 16
895 ; RV32-NEXT: sw a1, 12(sp)
896 ; RV32-NEXT: sw a0, 8(sp)
897 ; RV32-NEXT: addi a0, sp, 8
898 ; RV32-NEXT: vsetvli a1, zero, e64, m1, ta, ma
899 ; RV32-NEXT: vlse64.v v9, (a0), zero
900 ; RV32-NEXT: vsetvli zero, a2, e64, m1, ta, ma
901 ; RV32-NEXT: vdiv.vv v8, v8, v9, v0.t
902 ; RV32-NEXT: addi sp, sp, 16
905 ; RV64-LABEL: vdiv_vx_nxv1i64:
907 ; RV64-NEXT: vsetvli zero, a1, e64, m1, ta, ma
908 ; RV64-NEXT: vdiv.vx v8, v8, a0, v0.t
910 %elt.head = insertelement <vscale x 1 x i64> poison, i64 %b, i32 0
911 %vb = shufflevector <vscale x 1 x i64> %elt.head, <vscale x 1 x i64> poison, <vscale x 1 x i32> zeroinitializer
912 %v = call <vscale x 1 x i64> @llvm.vp.sdiv.nxv1i64(<vscale x 1 x i64> %va, <vscale x 1 x i64> %vb, <vscale x 1 x i1> %m, i32 %evl)
913 ret <vscale x 1 x i64> %v
916 define <vscale x 1 x i64> @vdiv_vx_nxv1i64_unmasked(<vscale x 1 x i64> %va, i64 %b, i32 zeroext %evl) {
917 ; RV32-LABEL: vdiv_vx_nxv1i64_unmasked:
919 ; RV32-NEXT: addi sp, sp, -16
920 ; RV32-NEXT: .cfi_def_cfa_offset 16
921 ; RV32-NEXT: sw a1, 12(sp)
922 ; RV32-NEXT: sw a0, 8(sp)
923 ; RV32-NEXT: addi a0, sp, 8
924 ; RV32-NEXT: vsetvli a1, zero, e64, m1, ta, ma
925 ; RV32-NEXT: vlse64.v v9, (a0), zero
926 ; RV32-NEXT: vsetvli zero, a2, e64, m1, ta, ma
927 ; RV32-NEXT: vdiv.vv v8, v8, v9
928 ; RV32-NEXT: addi sp, sp, 16
931 ; RV64-LABEL: vdiv_vx_nxv1i64_unmasked:
933 ; RV64-NEXT: vsetvli zero, a1, e64, m1, ta, ma
934 ; RV64-NEXT: vdiv.vx v8, v8, a0
936 %elt.head = insertelement <vscale x 1 x i64> poison, i64 %b, i32 0
937 %vb = shufflevector <vscale x 1 x i64> %elt.head, <vscale x 1 x i64> poison, <vscale x 1 x i32> zeroinitializer
938 %v = call <vscale x 1 x i64> @llvm.vp.sdiv.nxv1i64(<vscale x 1 x i64> %va, <vscale x 1 x i64> %vb, <vscale x 1 x i1> splat (i1 true), i32 %evl)
939 ret <vscale x 1 x i64> %v
942 declare <vscale x 2 x i64> @llvm.vp.sdiv.nxv2i64(<vscale x 2 x i64>, <vscale x 2 x i64>, <vscale x 2 x i1>, i32)
944 define <vscale x 2 x i64> @vdiv_vv_nxv2i64(<vscale x 2 x i64> %va, <vscale x 2 x i64> %b, <vscale x 2 x i1> %m, i32 zeroext %evl) {
945 ; CHECK-LABEL: vdiv_vv_nxv2i64:
947 ; CHECK-NEXT: vsetvli zero, a0, e64, m2, ta, ma
948 ; CHECK-NEXT: vdiv.vv v8, v8, v10, v0.t
950 %v = call <vscale x 2 x i64> @llvm.vp.sdiv.nxv2i64(<vscale x 2 x i64> %va, <vscale x 2 x i64> %b, <vscale x 2 x i1> %m, i32 %evl)
951 ret <vscale x 2 x i64> %v
954 define <vscale x 2 x i64> @vdiv_vv_nxv2i64_unmasked(<vscale x 2 x i64> %va, <vscale x 2 x i64> %b, i32 zeroext %evl) {
955 ; CHECK-LABEL: vdiv_vv_nxv2i64_unmasked:
957 ; CHECK-NEXT: vsetvli zero, a0, e64, m2, ta, ma
958 ; CHECK-NEXT: vdiv.vv v8, v8, v10
960 %v = call <vscale x 2 x i64> @llvm.vp.sdiv.nxv2i64(<vscale x 2 x i64> %va, <vscale x 2 x i64> %b, <vscale x 2 x i1> splat (i1 true), i32 %evl)
961 ret <vscale x 2 x i64> %v
964 define <vscale x 2 x i64> @vdiv_vx_nxv2i64(<vscale x 2 x i64> %va, i64 %b, <vscale x 2 x i1> %m, i32 zeroext %evl) {
965 ; RV32-LABEL: vdiv_vx_nxv2i64:
967 ; RV32-NEXT: addi sp, sp, -16
968 ; RV32-NEXT: .cfi_def_cfa_offset 16
969 ; RV32-NEXT: sw a1, 12(sp)
970 ; RV32-NEXT: sw a0, 8(sp)
971 ; RV32-NEXT: addi a0, sp, 8
972 ; RV32-NEXT: vsetvli a1, zero, e64, m2, ta, ma
973 ; RV32-NEXT: vlse64.v v10, (a0), zero
974 ; RV32-NEXT: vsetvli zero, a2, e64, m2, ta, ma
975 ; RV32-NEXT: vdiv.vv v8, v8, v10, v0.t
976 ; RV32-NEXT: addi sp, sp, 16
979 ; RV64-LABEL: vdiv_vx_nxv2i64:
981 ; RV64-NEXT: vsetvli zero, a1, e64, m2, ta, ma
982 ; RV64-NEXT: vdiv.vx v8, v8, a0, v0.t
984 %elt.head = insertelement <vscale x 2 x i64> poison, i64 %b, i32 0
985 %vb = shufflevector <vscale x 2 x i64> %elt.head, <vscale x 2 x i64> poison, <vscale x 2 x i32> zeroinitializer
986 %v = call <vscale x 2 x i64> @llvm.vp.sdiv.nxv2i64(<vscale x 2 x i64> %va, <vscale x 2 x i64> %vb, <vscale x 2 x i1> %m, i32 %evl)
987 ret <vscale x 2 x i64> %v
990 define <vscale x 2 x i64> @vdiv_vx_nxv2i64_unmasked(<vscale x 2 x i64> %va, i64 %b, i32 zeroext %evl) {
991 ; RV32-LABEL: vdiv_vx_nxv2i64_unmasked:
993 ; RV32-NEXT: addi sp, sp, -16
994 ; RV32-NEXT: .cfi_def_cfa_offset 16
995 ; RV32-NEXT: sw a1, 12(sp)
996 ; RV32-NEXT: sw a0, 8(sp)
997 ; RV32-NEXT: addi a0, sp, 8
998 ; RV32-NEXT: vsetvli a1, zero, e64, m2, ta, ma
999 ; RV32-NEXT: vlse64.v v10, (a0), zero
1000 ; RV32-NEXT: vsetvli zero, a2, e64, m2, ta, ma
1001 ; RV32-NEXT: vdiv.vv v8, v8, v10
1002 ; RV32-NEXT: addi sp, sp, 16
1005 ; RV64-LABEL: vdiv_vx_nxv2i64_unmasked:
1007 ; RV64-NEXT: vsetvli zero, a1, e64, m2, ta, ma
1008 ; RV64-NEXT: vdiv.vx v8, v8, a0
1010 %elt.head = insertelement <vscale x 2 x i64> poison, i64 %b, i32 0
1011 %vb = shufflevector <vscale x 2 x i64> %elt.head, <vscale x 2 x i64> poison, <vscale x 2 x i32> zeroinitializer
1012 %v = call <vscale x 2 x i64> @llvm.vp.sdiv.nxv2i64(<vscale x 2 x i64> %va, <vscale x 2 x i64> %vb, <vscale x 2 x i1> splat (i1 true), i32 %evl)
1013 ret <vscale x 2 x i64> %v
1016 declare <vscale x 4 x i64> @llvm.vp.sdiv.nxv4i64(<vscale x 4 x i64>, <vscale x 4 x i64>, <vscale x 4 x i1>, i32)
1018 define <vscale x 4 x i64> @vdiv_vv_nxv4i64(<vscale x 4 x i64> %va, <vscale x 4 x i64> %b, <vscale x 4 x i1> %m, i32 zeroext %evl) {
1019 ; CHECK-LABEL: vdiv_vv_nxv4i64:
1021 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1022 ; CHECK-NEXT: vdiv.vv v8, v8, v12, v0.t
1024 %v = call <vscale x 4 x i64> @llvm.vp.sdiv.nxv4i64(<vscale x 4 x i64> %va, <vscale x 4 x i64> %b, <vscale x 4 x i1> %m, i32 %evl)
1025 ret <vscale x 4 x i64> %v
1028 define <vscale x 4 x i64> @vdiv_vv_nxv4i64_unmasked(<vscale x 4 x i64> %va, <vscale x 4 x i64> %b, i32 zeroext %evl) {
1029 ; CHECK-LABEL: vdiv_vv_nxv4i64_unmasked:
1031 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1032 ; CHECK-NEXT: vdiv.vv v8, v8, v12
1034 %v = call <vscale x 4 x i64> @llvm.vp.sdiv.nxv4i64(<vscale x 4 x i64> %va, <vscale x 4 x i64> %b, <vscale x 4 x i1> splat (i1 true), i32 %evl)
1035 ret <vscale x 4 x i64> %v
1038 define <vscale x 4 x i64> @vdiv_vx_nxv4i64(<vscale x 4 x i64> %va, i64 %b, <vscale x 4 x i1> %m, i32 zeroext %evl) {
1039 ; RV32-LABEL: vdiv_vx_nxv4i64:
1041 ; RV32-NEXT: addi sp, sp, -16
1042 ; RV32-NEXT: .cfi_def_cfa_offset 16
1043 ; RV32-NEXT: sw a1, 12(sp)
1044 ; RV32-NEXT: sw a0, 8(sp)
1045 ; RV32-NEXT: addi a0, sp, 8
1046 ; RV32-NEXT: vsetvli a1, zero, e64, m4, ta, ma
1047 ; RV32-NEXT: vlse64.v v12, (a0), zero
1048 ; RV32-NEXT: vsetvli zero, a2, e64, m4, ta, ma
1049 ; RV32-NEXT: vdiv.vv v8, v8, v12, v0.t
1050 ; RV32-NEXT: addi sp, sp, 16
1053 ; RV64-LABEL: vdiv_vx_nxv4i64:
1055 ; RV64-NEXT: vsetvli zero, a1, e64, m4, ta, ma
1056 ; RV64-NEXT: vdiv.vx v8, v8, a0, v0.t
1058 %elt.head = insertelement <vscale x 4 x i64> poison, i64 %b, i32 0
1059 %vb = shufflevector <vscale x 4 x i64> %elt.head, <vscale x 4 x i64> poison, <vscale x 4 x i32> zeroinitializer
1060 %v = call <vscale x 4 x i64> @llvm.vp.sdiv.nxv4i64(<vscale x 4 x i64> %va, <vscale x 4 x i64> %vb, <vscale x 4 x i1> %m, i32 %evl)
1061 ret <vscale x 4 x i64> %v
1064 define <vscale x 4 x i64> @vdiv_vx_nxv4i64_unmasked(<vscale x 4 x i64> %va, i64 %b, i32 zeroext %evl) {
1065 ; RV32-LABEL: vdiv_vx_nxv4i64_unmasked:
1067 ; RV32-NEXT: addi sp, sp, -16
1068 ; RV32-NEXT: .cfi_def_cfa_offset 16
1069 ; RV32-NEXT: sw a1, 12(sp)
1070 ; RV32-NEXT: sw a0, 8(sp)
1071 ; RV32-NEXT: addi a0, sp, 8
1072 ; RV32-NEXT: vsetvli a1, zero, e64, m4, ta, ma
1073 ; RV32-NEXT: vlse64.v v12, (a0), zero
1074 ; RV32-NEXT: vsetvli zero, a2, e64, m4, ta, ma
1075 ; RV32-NEXT: vdiv.vv v8, v8, v12
1076 ; RV32-NEXT: addi sp, sp, 16
1079 ; RV64-LABEL: vdiv_vx_nxv4i64_unmasked:
1081 ; RV64-NEXT: vsetvli zero, a1, e64, m4, ta, ma
1082 ; RV64-NEXT: vdiv.vx v8, v8, a0
1084 %elt.head = insertelement <vscale x 4 x i64> poison, i64 %b, i32 0
1085 %vb = shufflevector <vscale x 4 x i64> %elt.head, <vscale x 4 x i64> poison, <vscale x 4 x i32> zeroinitializer
1086 %v = call <vscale x 4 x i64> @llvm.vp.sdiv.nxv4i64(<vscale x 4 x i64> %va, <vscale x 4 x i64> %vb, <vscale x 4 x i1> splat (i1 true), i32 %evl)
1087 ret <vscale x 4 x i64> %v
1090 declare <vscale x 8 x i64> @llvm.vp.sdiv.nxv8i64(<vscale x 8 x i64>, <vscale x 8 x i64>, <vscale x 8 x i1>, i32)
1092 define <vscale x 8 x i64> @vdiv_vv_nxv8i64(<vscale x 8 x i64> %va, <vscale x 8 x i64> %b, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1093 ; CHECK-LABEL: vdiv_vv_nxv8i64:
1095 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
1096 ; CHECK-NEXT: vdiv.vv v8, v8, v16, v0.t
1098 %v = call <vscale x 8 x i64> @llvm.vp.sdiv.nxv8i64(<vscale x 8 x i64> %va, <vscale x 8 x i64> %b, <vscale x 8 x i1> %m, i32 %evl)
1099 ret <vscale x 8 x i64> %v
1102 define <vscale x 8 x i64> @vdiv_vv_nxv8i64_unmasked(<vscale x 8 x i64> %va, <vscale x 8 x i64> %b, i32 zeroext %evl) {
1103 ; CHECK-LABEL: vdiv_vv_nxv8i64_unmasked:
1105 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
1106 ; CHECK-NEXT: vdiv.vv v8, v8, v16
1108 %v = call <vscale x 8 x i64> @llvm.vp.sdiv.nxv8i64(<vscale x 8 x i64> %va, <vscale x 8 x i64> %b, <vscale x 8 x i1> splat (i1 true), i32 %evl)
1109 ret <vscale x 8 x i64> %v
1112 define <vscale x 8 x i64> @vdiv_vx_nxv8i64(<vscale x 8 x i64> %va, i64 %b, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1113 ; RV32-LABEL: vdiv_vx_nxv8i64:
1115 ; RV32-NEXT: addi sp, sp, -16
1116 ; RV32-NEXT: .cfi_def_cfa_offset 16
1117 ; RV32-NEXT: sw a1, 12(sp)
1118 ; RV32-NEXT: sw a0, 8(sp)
1119 ; RV32-NEXT: addi a0, sp, 8
1120 ; RV32-NEXT: vsetvli a1, zero, e64, m8, ta, ma
1121 ; RV32-NEXT: vlse64.v v16, (a0), zero
1122 ; RV32-NEXT: vsetvli zero, a2, e64, m8, ta, ma
1123 ; RV32-NEXT: vdiv.vv v8, v8, v16, v0.t
1124 ; RV32-NEXT: addi sp, sp, 16
1127 ; RV64-LABEL: vdiv_vx_nxv8i64:
1129 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
1130 ; RV64-NEXT: vdiv.vx v8, v8, a0, v0.t
1132 %elt.head = insertelement <vscale x 8 x i64> poison, i64 %b, i32 0
1133 %vb = shufflevector <vscale x 8 x i64> %elt.head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
1134 %v = call <vscale x 8 x i64> @llvm.vp.sdiv.nxv8i64(<vscale x 8 x i64> %va, <vscale x 8 x i64> %vb, <vscale x 8 x i1> %m, i32 %evl)
1135 ret <vscale x 8 x i64> %v
1138 define <vscale x 8 x i64> @vdiv_vx_nxv8i64_unmasked(<vscale x 8 x i64> %va, i64 %b, i32 zeroext %evl) {
1139 ; RV32-LABEL: vdiv_vx_nxv8i64_unmasked:
1141 ; RV32-NEXT: addi sp, sp, -16
1142 ; RV32-NEXT: .cfi_def_cfa_offset 16
1143 ; RV32-NEXT: sw a1, 12(sp)
1144 ; RV32-NEXT: sw a0, 8(sp)
1145 ; RV32-NEXT: addi a0, sp, 8
1146 ; RV32-NEXT: vsetvli a1, zero, e64, m8, ta, ma
1147 ; RV32-NEXT: vlse64.v v16, (a0), zero
1148 ; RV32-NEXT: vsetvli zero, a2, e64, m8, ta, ma
1149 ; RV32-NEXT: vdiv.vv v8, v8, v16
1150 ; RV32-NEXT: addi sp, sp, 16
1153 ; RV64-LABEL: vdiv_vx_nxv8i64_unmasked:
1155 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
1156 ; RV64-NEXT: vdiv.vx v8, v8, a0
1158 %elt.head = insertelement <vscale x 8 x i64> poison, i64 %b, i32 0
1159 %vb = shufflevector <vscale x 8 x i64> %elt.head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
1160 %v = call <vscale x 8 x i64> @llvm.vp.sdiv.nxv8i64(<vscale x 8 x i64> %va, <vscale x 8 x i64> %vb, <vscale x 8 x i1> splat (i1 true), i32 %evl)
1161 ret <vscale x 8 x i64> %v