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.srem.v8i7(<8 x i7>, <8 x i7>, <8 x i1>, i32)
9 define <8 x i7> @vrem_vv_v8i7(<8 x i7> %va, <8 x i7> %b, <8 x i1> %m, i32 zeroext %evl) {
10 ; CHECK-LABEL: vrem_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: vrem.vv v8, v8, v9, v0.t
20 %v = call <8 x i7> @llvm.vp.srem.v8i7(<8 x i7> %va, <8 x i7> %b, <8 x i1> %m, i32 %evl)
24 declare <2 x i8> @llvm.vp.srem.v2i8(<2 x i8>, <2 x i8>, <2 x i1>, i32)
26 define <2 x i8> @vrem_vv_v2i8(<2 x i8> %va, <2 x i8> %b, <2 x i1> %m, i32 zeroext %evl) {
27 ; CHECK-LABEL: vrem_vv_v2i8:
29 ; CHECK-NEXT: vsetvli zero, a0, e8, mf8, ta, ma
30 ; CHECK-NEXT: vrem.vv v8, v8, v9, v0.t
32 %v = call <2 x i8> @llvm.vp.srem.v2i8(<2 x i8> %va, <2 x i8> %b, <2 x i1> %m, i32 %evl)
36 define <2 x i8> @vrem_vv_v2i8_unmasked(<2 x i8> %va, <2 x i8> %b, i32 zeroext %evl) {
37 ; CHECK-LABEL: vrem_vv_v2i8_unmasked:
39 ; CHECK-NEXT: vsetvli zero, a0, e8, mf8, ta, ma
40 ; CHECK-NEXT: vrem.vv v8, v8, v9
42 %v = call <2 x i8> @llvm.vp.srem.v2i8(<2 x i8> %va, <2 x i8> %b, <2 x i1> splat (i1 true), i32 %evl)
46 define <2 x i8> @vrem_vx_v2i8(<2 x i8> %va, i8 %b, <2 x i1> %m, i32 zeroext %evl) {
47 ; CHECK-LABEL: vrem_vx_v2i8:
49 ; CHECK-NEXT: vsetvli zero, a1, e8, mf8, ta, ma
50 ; CHECK-NEXT: vrem.vx v8, v8, a0, v0.t
52 %elt.head = insertelement <2 x i8> poison, i8 %b, i32 0
53 %vb = shufflevector <2 x i8> %elt.head, <2 x i8> poison, <2 x i32> zeroinitializer
54 %v = call <2 x i8> @llvm.vp.srem.v2i8(<2 x i8> %va, <2 x i8> %vb, <2 x i1> %m, i32 %evl)
58 define <2 x i8> @vrem_vx_v2i8_unmasked(<2 x i8> %va, i8 %b, i32 zeroext %evl) {
59 ; CHECK-LABEL: vrem_vx_v2i8_unmasked:
61 ; CHECK-NEXT: vsetvli zero, a1, e8, mf8, ta, ma
62 ; CHECK-NEXT: vrem.vx v8, v8, a0
64 %elt.head = insertelement <2 x i8> poison, i8 %b, i32 0
65 %vb = shufflevector <2 x i8> %elt.head, <2 x i8> poison, <2 x i32> zeroinitializer
66 %v = call <2 x i8> @llvm.vp.srem.v2i8(<2 x i8> %va, <2 x i8> %vb, <2 x i1> splat (i1 true), i32 %evl)
70 declare <4 x i8> @llvm.vp.srem.v4i8(<4 x i8>, <4 x i8>, <4 x i1>, i32)
72 define <4 x i8> @vrem_vv_v4i8(<4 x i8> %va, <4 x i8> %b, <4 x i1> %m, i32 zeroext %evl) {
73 ; CHECK-LABEL: vrem_vv_v4i8:
75 ; CHECK-NEXT: vsetvli zero, a0, e8, mf4, ta, ma
76 ; CHECK-NEXT: vrem.vv v8, v8, v9, v0.t
78 %v = call <4 x i8> @llvm.vp.srem.v4i8(<4 x i8> %va, <4 x i8> %b, <4 x i1> %m, i32 %evl)
82 define <4 x i8> @vrem_vv_v4i8_unmasked(<4 x i8> %va, <4 x i8> %b, i32 zeroext %evl) {
83 ; CHECK-LABEL: vrem_vv_v4i8_unmasked:
85 ; CHECK-NEXT: vsetvli zero, a0, e8, mf4, ta, ma
86 ; CHECK-NEXT: vrem.vv v8, v8, v9
88 %v = call <4 x i8> @llvm.vp.srem.v4i8(<4 x i8> %va, <4 x i8> %b, <4 x i1> splat (i1 true), i32 %evl)
92 define <4 x i8> @vrem_vx_v4i8(<4 x i8> %va, i8 %b, <4 x i1> %m, i32 zeroext %evl) {
93 ; CHECK-LABEL: vrem_vx_v4i8:
95 ; CHECK-NEXT: vsetvli zero, a1, e8, mf4, ta, ma
96 ; CHECK-NEXT: vrem.vx v8, v8, a0, v0.t
98 %elt.head = insertelement <4 x i8> poison, i8 %b, i32 0
99 %vb = shufflevector <4 x i8> %elt.head, <4 x i8> poison, <4 x i32> zeroinitializer
100 %v = call <4 x i8> @llvm.vp.srem.v4i8(<4 x i8> %va, <4 x i8> %vb, <4 x i1> %m, i32 %evl)
104 define <4 x i8> @vrem_vx_v4i8_unmasked(<4 x i8> %va, i8 %b, i32 zeroext %evl) {
105 ; CHECK-LABEL: vrem_vx_v4i8_unmasked:
107 ; CHECK-NEXT: vsetvli zero, a1, e8, mf4, ta, ma
108 ; CHECK-NEXT: vrem.vx v8, v8, a0
110 %elt.head = insertelement <4 x i8> poison, i8 %b, i32 0
111 %vb = shufflevector <4 x i8> %elt.head, <4 x i8> poison, <4 x i32> zeroinitializer
112 %v = call <4 x i8> @llvm.vp.srem.v4i8(<4 x i8> %va, <4 x i8> %vb, <4 x i1> splat (i1 true), i32 %evl)
116 declare <6 x i8> @llvm.vp.srem.v6i8(<6 x i8>, <6 x i8>, <6 x i1>, i32)
118 define <6 x i8> @vrem_vv_v6i8(<6 x i8> %va, <6 x i8> %b, <6 x i1> %m, i32 zeroext %evl) {
119 ; CHECK-LABEL: vrem_vv_v6i8:
121 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
122 ; CHECK-NEXT: vrem.vv v8, v8, v9, v0.t
124 %v = call <6 x i8> @llvm.vp.srem.v6i8(<6 x i8> %va, <6 x i8> %b, <6 x i1> %m, i32 %evl)
128 declare <8 x i8> @llvm.vp.srem.v8i8(<8 x i8>, <8 x i8>, <8 x i1>, i32)
130 define <8 x i8> @vrem_vv_v8i8(<8 x i8> %va, <8 x i8> %b, <8 x i1> %m, i32 zeroext %evl) {
131 ; CHECK-LABEL: vrem_vv_v8i8:
133 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
134 ; CHECK-NEXT: vrem.vv v8, v8, v9, v0.t
136 %v = call <8 x i8> @llvm.vp.srem.v8i8(<8 x i8> %va, <8 x i8> %b, <8 x i1> %m, i32 %evl)
140 define <8 x i8> @vrem_vv_v8i8_unmasked(<8 x i8> %va, <8 x i8> %b, i32 zeroext %evl) {
141 ; CHECK-LABEL: vrem_vv_v8i8_unmasked:
143 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
144 ; CHECK-NEXT: vrem.vv v8, v8, v9
146 %v = call <8 x i8> @llvm.vp.srem.v8i8(<8 x i8> %va, <8 x i8> %b, <8 x i1> splat (i1 true), i32 %evl)
150 define <8 x i8> @vrem_vx_v8i8(<8 x i8> %va, i8 %b, <8 x i1> %m, i32 zeroext %evl) {
151 ; CHECK-LABEL: vrem_vx_v8i8:
153 ; CHECK-NEXT: vsetvli zero, a1, e8, mf2, ta, ma
154 ; CHECK-NEXT: vrem.vx v8, v8, a0, v0.t
156 %elt.head = insertelement <8 x i8> poison, i8 %b, i32 0
157 %vb = shufflevector <8 x i8> %elt.head, <8 x i8> poison, <8 x i32> zeroinitializer
158 %v = call <8 x i8> @llvm.vp.srem.v8i8(<8 x i8> %va, <8 x i8> %vb, <8 x i1> %m, i32 %evl)
162 define <8 x i8> @vrem_vx_v8i8_unmasked(<8 x i8> %va, i8 %b, i32 zeroext %evl) {
163 ; CHECK-LABEL: vrem_vx_v8i8_unmasked:
165 ; CHECK-NEXT: vsetvli zero, a1, e8, mf2, ta, ma
166 ; CHECK-NEXT: vrem.vx v8, v8, a0
168 %elt.head = insertelement <8 x i8> poison, i8 %b, i32 0
169 %vb = shufflevector <8 x i8> %elt.head, <8 x i8> poison, <8 x i32> zeroinitializer
170 %v = call <8 x i8> @llvm.vp.srem.v8i8(<8 x i8> %va, <8 x i8> %vb, <8 x i1> splat (i1 true), i32 %evl)
174 declare <16 x i8> @llvm.vp.srem.v16i8(<16 x i8>, <16 x i8>, <16 x i1>, i32)
176 define <16 x i8> @vrem_vv_v16i8(<16 x i8> %va, <16 x i8> %b, <16 x i1> %m, i32 zeroext %evl) {
177 ; CHECK-LABEL: vrem_vv_v16i8:
179 ; CHECK-NEXT: vsetvli zero, a0, e8, m1, ta, ma
180 ; CHECK-NEXT: vrem.vv v8, v8, v9, v0.t
182 %v = call <16 x i8> @llvm.vp.srem.v16i8(<16 x i8> %va, <16 x i8> %b, <16 x i1> %m, i32 %evl)
186 define <16 x i8> @vrem_vv_v16i8_unmasked(<16 x i8> %va, <16 x i8> %b, i32 zeroext %evl) {
187 ; CHECK-LABEL: vrem_vv_v16i8_unmasked:
189 ; CHECK-NEXT: vsetvli zero, a0, e8, m1, ta, ma
190 ; CHECK-NEXT: vrem.vv v8, v8, v9
192 %v = call <16 x i8> @llvm.vp.srem.v16i8(<16 x i8> %va, <16 x i8> %b, <16 x i1> splat (i1 true), i32 %evl)
196 define <16 x i8> @vrem_vx_v16i8(<16 x i8> %va, i8 %b, <16 x i1> %m, i32 zeroext %evl) {
197 ; CHECK-LABEL: vrem_vx_v16i8:
199 ; CHECK-NEXT: vsetvli zero, a1, e8, m1, ta, ma
200 ; CHECK-NEXT: vrem.vx v8, v8, a0, v0.t
202 %elt.head = insertelement <16 x i8> poison, i8 %b, i32 0
203 %vb = shufflevector <16 x i8> %elt.head, <16 x i8> poison, <16 x i32> zeroinitializer
204 %v = call <16 x i8> @llvm.vp.srem.v16i8(<16 x i8> %va, <16 x i8> %vb, <16 x i1> %m, i32 %evl)
208 define <16 x i8> @vrem_vx_v16i8_unmasked(<16 x i8> %va, i8 %b, i32 zeroext %evl) {
209 ; CHECK-LABEL: vrem_vx_v16i8_unmasked:
211 ; CHECK-NEXT: vsetvli zero, a1, e8, m1, ta, ma
212 ; CHECK-NEXT: vrem.vx v8, v8, a0
214 %elt.head = insertelement <16 x i8> poison, i8 %b, i32 0
215 %vb = shufflevector <16 x i8> %elt.head, <16 x i8> poison, <16 x i32> zeroinitializer
216 %v = call <16 x i8> @llvm.vp.srem.v16i8(<16 x i8> %va, <16 x i8> %vb, <16 x i1> splat (i1 true), i32 %evl)
220 declare <2 x i16> @llvm.vp.srem.v2i16(<2 x i16>, <2 x i16>, <2 x i1>, i32)
222 define <2 x i16> @vrem_vv_v2i16(<2 x i16> %va, <2 x i16> %b, <2 x i1> %m, i32 zeroext %evl) {
223 ; CHECK-LABEL: vrem_vv_v2i16:
225 ; CHECK-NEXT: vsetvli zero, a0, e16, mf4, ta, ma
226 ; CHECK-NEXT: vrem.vv v8, v8, v9, v0.t
228 %v = call <2 x i16> @llvm.vp.srem.v2i16(<2 x i16> %va, <2 x i16> %b, <2 x i1> %m, i32 %evl)
232 define <2 x i16> @vrem_vv_v2i16_unmasked(<2 x i16> %va, <2 x i16> %b, i32 zeroext %evl) {
233 ; CHECK-LABEL: vrem_vv_v2i16_unmasked:
235 ; CHECK-NEXT: vsetvli zero, a0, e16, mf4, ta, ma
236 ; CHECK-NEXT: vrem.vv v8, v8, v9
238 %v = call <2 x i16> @llvm.vp.srem.v2i16(<2 x i16> %va, <2 x i16> %b, <2 x i1> splat (i1 true), i32 %evl)
242 define <2 x i16> @vrem_vx_v2i16(<2 x i16> %va, i16 %b, <2 x i1> %m, i32 zeroext %evl) {
243 ; CHECK-LABEL: vrem_vx_v2i16:
245 ; CHECK-NEXT: vsetvli zero, a1, e16, mf4, ta, ma
246 ; CHECK-NEXT: vrem.vx v8, v8, a0, v0.t
248 %elt.head = insertelement <2 x i16> poison, i16 %b, i32 0
249 %vb = shufflevector <2 x i16> %elt.head, <2 x i16> poison, <2 x i32> zeroinitializer
250 %v = call <2 x i16> @llvm.vp.srem.v2i16(<2 x i16> %va, <2 x i16> %vb, <2 x i1> %m, i32 %evl)
254 define <2 x i16> @vrem_vx_v2i16_unmasked(<2 x i16> %va, i16 %b, i32 zeroext %evl) {
255 ; CHECK-LABEL: vrem_vx_v2i16_unmasked:
257 ; CHECK-NEXT: vsetvli zero, a1, e16, mf4, ta, ma
258 ; CHECK-NEXT: vrem.vx v8, v8, a0
260 %elt.head = insertelement <2 x i16> poison, i16 %b, i32 0
261 %vb = shufflevector <2 x i16> %elt.head, <2 x i16> poison, <2 x i32> zeroinitializer
262 %v = call <2 x i16> @llvm.vp.srem.v2i16(<2 x i16> %va, <2 x i16> %vb, <2 x i1> splat (i1 true), i32 %evl)
266 declare <4 x i16> @llvm.vp.srem.v4i16(<4 x i16>, <4 x i16>, <4 x i1>, i32)
268 define <4 x i16> @vrem_vv_v4i16(<4 x i16> %va, <4 x i16> %b, <4 x i1> %m, i32 zeroext %evl) {
269 ; CHECK-LABEL: vrem_vv_v4i16:
271 ; CHECK-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
272 ; CHECK-NEXT: vrem.vv v8, v8, v9, v0.t
274 %v = call <4 x i16> @llvm.vp.srem.v4i16(<4 x i16> %va, <4 x i16> %b, <4 x i1> %m, i32 %evl)
278 define <4 x i16> @vrem_vv_v4i16_unmasked(<4 x i16> %va, <4 x i16> %b, i32 zeroext %evl) {
279 ; CHECK-LABEL: vrem_vv_v4i16_unmasked:
281 ; CHECK-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
282 ; CHECK-NEXT: vrem.vv v8, v8, v9
284 %v = call <4 x i16> @llvm.vp.srem.v4i16(<4 x i16> %va, <4 x i16> %b, <4 x i1> splat (i1 true), i32 %evl)
288 define <4 x i16> @vrem_vx_v4i16(<4 x i16> %va, i16 %b, <4 x i1> %m, i32 zeroext %evl) {
289 ; CHECK-LABEL: vrem_vx_v4i16:
291 ; CHECK-NEXT: vsetvli zero, a1, e16, mf2, ta, ma
292 ; CHECK-NEXT: vrem.vx v8, v8, a0, v0.t
294 %elt.head = insertelement <4 x i16> poison, i16 %b, i32 0
295 %vb = shufflevector <4 x i16> %elt.head, <4 x i16> poison, <4 x i32> zeroinitializer
296 %v = call <4 x i16> @llvm.vp.srem.v4i16(<4 x i16> %va, <4 x i16> %vb, <4 x i1> %m, i32 %evl)
300 define <4 x i16> @vrem_vx_v4i16_unmasked(<4 x i16> %va, i16 %b, i32 zeroext %evl) {
301 ; CHECK-LABEL: vrem_vx_v4i16_unmasked:
303 ; CHECK-NEXT: vsetvli zero, a1, e16, mf2, ta, ma
304 ; CHECK-NEXT: vrem.vx v8, v8, a0
306 %elt.head = insertelement <4 x i16> poison, i16 %b, i32 0
307 %vb = shufflevector <4 x i16> %elt.head, <4 x i16> poison, <4 x i32> zeroinitializer
308 %v = call <4 x i16> @llvm.vp.srem.v4i16(<4 x i16> %va, <4 x i16> %vb, <4 x i1> splat (i1 true), i32 %evl)
312 declare <8 x i16> @llvm.vp.srem.v8i16(<8 x i16>, <8 x i16>, <8 x i1>, i32)
314 define <8 x i16> @vrem_vv_v8i16(<8 x i16> %va, <8 x i16> %b, <8 x i1> %m, i32 zeroext %evl) {
315 ; CHECK-LABEL: vrem_vv_v8i16:
317 ; CHECK-NEXT: vsetvli zero, a0, e16, m1, ta, ma
318 ; CHECK-NEXT: vrem.vv v8, v8, v9, v0.t
320 %v = call <8 x i16> @llvm.vp.srem.v8i16(<8 x i16> %va, <8 x i16> %b, <8 x i1> %m, i32 %evl)
324 define <8 x i16> @vrem_vv_v8i16_unmasked(<8 x i16> %va, <8 x i16> %b, i32 zeroext %evl) {
325 ; CHECK-LABEL: vrem_vv_v8i16_unmasked:
327 ; CHECK-NEXT: vsetvli zero, a0, e16, m1, ta, ma
328 ; CHECK-NEXT: vrem.vv v8, v8, v9
330 %v = call <8 x i16> @llvm.vp.srem.v8i16(<8 x i16> %va, <8 x i16> %b, <8 x i1> splat (i1 true), i32 %evl)
334 define <8 x i16> @vrem_vx_v8i16(<8 x i16> %va, i16 %b, <8 x i1> %m, i32 zeroext %evl) {
335 ; CHECK-LABEL: vrem_vx_v8i16:
337 ; CHECK-NEXT: vsetvli zero, a1, e16, m1, ta, ma
338 ; CHECK-NEXT: vrem.vx v8, v8, a0, v0.t
340 %elt.head = insertelement <8 x i16> poison, i16 %b, i32 0
341 %vb = shufflevector <8 x i16> %elt.head, <8 x i16> poison, <8 x i32> zeroinitializer
342 %v = call <8 x i16> @llvm.vp.srem.v8i16(<8 x i16> %va, <8 x i16> %vb, <8 x i1> %m, i32 %evl)
346 define <8 x i16> @vrem_vx_v8i16_unmasked(<8 x i16> %va, i16 %b, i32 zeroext %evl) {
347 ; CHECK-LABEL: vrem_vx_v8i16_unmasked:
349 ; CHECK-NEXT: vsetvli zero, a1, e16, m1, ta, ma
350 ; CHECK-NEXT: vrem.vx v8, v8, a0
352 %elt.head = insertelement <8 x i16> poison, i16 %b, i32 0
353 %vb = shufflevector <8 x i16> %elt.head, <8 x i16> poison, <8 x i32> zeroinitializer
354 %v = call <8 x i16> @llvm.vp.srem.v8i16(<8 x i16> %va, <8 x i16> %vb, <8 x i1> splat (i1 true), i32 %evl)
358 declare <16 x i16> @llvm.vp.srem.v16i16(<16 x i16>, <16 x i16>, <16 x i1>, i32)
360 define <16 x i16> @vrem_vv_v16i16(<16 x i16> %va, <16 x i16> %b, <16 x i1> %m, i32 zeroext %evl) {
361 ; CHECK-LABEL: vrem_vv_v16i16:
363 ; CHECK-NEXT: vsetvli zero, a0, e16, m2, ta, ma
364 ; CHECK-NEXT: vrem.vv v8, v8, v10, v0.t
366 %v = call <16 x i16> @llvm.vp.srem.v16i16(<16 x i16> %va, <16 x i16> %b, <16 x i1> %m, i32 %evl)
370 define <16 x i16> @vrem_vv_v16i16_unmasked(<16 x i16> %va, <16 x i16> %b, i32 zeroext %evl) {
371 ; CHECK-LABEL: vrem_vv_v16i16_unmasked:
373 ; CHECK-NEXT: vsetvli zero, a0, e16, m2, ta, ma
374 ; CHECK-NEXT: vrem.vv v8, v8, v10
376 %v = call <16 x i16> @llvm.vp.srem.v16i16(<16 x i16> %va, <16 x i16> %b, <16 x i1> splat (i1 true), i32 %evl)
380 define <16 x i16> @vrem_vx_v16i16(<16 x i16> %va, i16 %b, <16 x i1> %m, i32 zeroext %evl) {
381 ; CHECK-LABEL: vrem_vx_v16i16:
383 ; CHECK-NEXT: vsetvli zero, a1, e16, m2, ta, ma
384 ; CHECK-NEXT: vrem.vx v8, v8, a0, v0.t
386 %elt.head = insertelement <16 x i16> poison, i16 %b, i32 0
387 %vb = shufflevector <16 x i16> %elt.head, <16 x i16> poison, <16 x i32> zeroinitializer
388 %v = call <16 x i16> @llvm.vp.srem.v16i16(<16 x i16> %va, <16 x i16> %vb, <16 x i1> %m, i32 %evl)
392 define <16 x i16> @vrem_vx_v16i16_unmasked(<16 x i16> %va, i16 %b, i32 zeroext %evl) {
393 ; CHECK-LABEL: vrem_vx_v16i16_unmasked:
395 ; CHECK-NEXT: vsetvli zero, a1, e16, m2, ta, ma
396 ; CHECK-NEXT: vrem.vx v8, v8, a0
398 %elt.head = insertelement <16 x i16> poison, i16 %b, i32 0
399 %vb = shufflevector <16 x i16> %elt.head, <16 x i16> poison, <16 x i32> zeroinitializer
400 %v = call <16 x i16> @llvm.vp.srem.v16i16(<16 x i16> %va, <16 x i16> %vb, <16 x i1> splat (i1 true), i32 %evl)
404 declare <2 x i32> @llvm.vp.srem.v2i32(<2 x i32>, <2 x i32>, <2 x i1>, i32)
406 define <2 x i32> @vrem_vv_v2i32(<2 x i32> %va, <2 x i32> %b, <2 x i1> %m, i32 zeroext %evl) {
407 ; CHECK-LABEL: vrem_vv_v2i32:
409 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
410 ; CHECK-NEXT: vrem.vv v8, v8, v9, v0.t
412 %v = call <2 x i32> @llvm.vp.srem.v2i32(<2 x i32> %va, <2 x i32> %b, <2 x i1> %m, i32 %evl)
416 define <2 x i32> @vrem_vv_v2i32_unmasked(<2 x i32> %va, <2 x i32> %b, i32 zeroext %evl) {
417 ; CHECK-LABEL: vrem_vv_v2i32_unmasked:
419 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
420 ; CHECK-NEXT: vrem.vv v8, v8, v9
422 %v = call <2 x i32> @llvm.vp.srem.v2i32(<2 x i32> %va, <2 x i32> %b, <2 x i1> splat (i1 true), i32 %evl)
426 define <2 x i32> @vrem_vx_v2i32(<2 x i32> %va, i32 %b, <2 x i1> %m, i32 zeroext %evl) {
427 ; CHECK-LABEL: vrem_vx_v2i32:
429 ; CHECK-NEXT: vsetvli zero, a1, e32, mf2, ta, ma
430 ; CHECK-NEXT: vrem.vx v8, v8, a0, v0.t
432 %elt.head = insertelement <2 x i32> poison, i32 %b, i32 0
433 %vb = shufflevector <2 x i32> %elt.head, <2 x i32> poison, <2 x i32> zeroinitializer
434 %v = call <2 x i32> @llvm.vp.srem.v2i32(<2 x i32> %va, <2 x i32> %vb, <2 x i1> %m, i32 %evl)
438 define <2 x i32> @vrem_vx_v2i32_unmasked(<2 x i32> %va, i32 %b, i32 zeroext %evl) {
439 ; CHECK-LABEL: vrem_vx_v2i32_unmasked:
441 ; CHECK-NEXT: vsetvli zero, a1, e32, mf2, ta, ma
442 ; CHECK-NEXT: vrem.vx v8, v8, a0
444 %elt.head = insertelement <2 x i32> poison, i32 %b, i32 0
445 %vb = shufflevector <2 x i32> %elt.head, <2 x i32> poison, <2 x i32> zeroinitializer
446 %v = call <2 x i32> @llvm.vp.srem.v2i32(<2 x i32> %va, <2 x i32> %vb, <2 x i1> splat (i1 true), i32 %evl)
450 declare <4 x i32> @llvm.vp.srem.v4i32(<4 x i32>, <4 x i32>, <4 x i1>, i32)
452 define <4 x i32> @vrem_vv_v4i32(<4 x i32> %va, <4 x i32> %b, <4 x i1> %m, i32 zeroext %evl) {
453 ; CHECK-LABEL: vrem_vv_v4i32:
455 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, ma
456 ; CHECK-NEXT: vrem.vv v8, v8, v9, v0.t
458 %v = call <4 x i32> @llvm.vp.srem.v4i32(<4 x i32> %va, <4 x i32> %b, <4 x i1> %m, i32 %evl)
462 define <4 x i32> @vrem_vv_v4i32_unmasked(<4 x i32> %va, <4 x i32> %b, i32 zeroext %evl) {
463 ; CHECK-LABEL: vrem_vv_v4i32_unmasked:
465 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, ma
466 ; CHECK-NEXT: vrem.vv v8, v8, v9
468 %v = call <4 x i32> @llvm.vp.srem.v4i32(<4 x i32> %va, <4 x i32> %b, <4 x i1> splat (i1 true), i32 %evl)
472 define <4 x i32> @vrem_vx_v4i32(<4 x i32> %va, i32 %b, <4 x i1> %m, i32 zeroext %evl) {
473 ; CHECK-LABEL: vrem_vx_v4i32:
475 ; CHECK-NEXT: vsetvli zero, a1, e32, m1, ta, ma
476 ; CHECK-NEXT: vrem.vx v8, v8, a0, v0.t
478 %elt.head = insertelement <4 x i32> poison, i32 %b, i32 0
479 %vb = shufflevector <4 x i32> %elt.head, <4 x i32> poison, <4 x i32> zeroinitializer
480 %v = call <4 x i32> @llvm.vp.srem.v4i32(<4 x i32> %va, <4 x i32> %vb, <4 x i1> %m, i32 %evl)
484 define <4 x i32> @vrem_vx_v4i32_unmasked(<4 x i32> %va, i32 %b, i32 zeroext %evl) {
485 ; CHECK-LABEL: vrem_vx_v4i32_unmasked:
487 ; CHECK-NEXT: vsetvli zero, a1, e32, m1, ta, ma
488 ; CHECK-NEXT: vrem.vx v8, v8, a0
490 %elt.head = insertelement <4 x i32> poison, i32 %b, i32 0
491 %vb = shufflevector <4 x i32> %elt.head, <4 x i32> poison, <4 x i32> zeroinitializer
492 %v = call <4 x i32> @llvm.vp.srem.v4i32(<4 x i32> %va, <4 x i32> %vb, <4 x i1> splat (i1 true), i32 %evl)
496 declare <8 x i32> @llvm.vp.srem.v8i32(<8 x i32>, <8 x i32>, <8 x i1>, i32)
498 define <8 x i32> @vrem_vv_v8i32(<8 x i32> %va, <8 x i32> %b, <8 x i1> %m, i32 zeroext %evl) {
499 ; CHECK-LABEL: vrem_vv_v8i32:
501 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
502 ; CHECK-NEXT: vrem.vv v8, v8, v10, v0.t
504 %v = call <8 x i32> @llvm.vp.srem.v8i32(<8 x i32> %va, <8 x i32> %b, <8 x i1> %m, i32 %evl)
508 define <8 x i32> @vrem_vv_v8i32_unmasked(<8 x i32> %va, <8 x i32> %b, i32 zeroext %evl) {
509 ; CHECK-LABEL: vrem_vv_v8i32_unmasked:
511 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
512 ; CHECK-NEXT: vrem.vv v8, v8, v10
514 %v = call <8 x i32> @llvm.vp.srem.v8i32(<8 x i32> %va, <8 x i32> %b, <8 x i1> splat (i1 true), i32 %evl)
518 define <8 x i32> @vrem_vx_v8i32(<8 x i32> %va, i32 %b, <8 x i1> %m, i32 zeroext %evl) {
519 ; CHECK-LABEL: vrem_vx_v8i32:
521 ; CHECK-NEXT: vsetvli zero, a1, e32, m2, ta, ma
522 ; CHECK-NEXT: vrem.vx v8, v8, a0, v0.t
524 %elt.head = insertelement <8 x i32> poison, i32 %b, i32 0
525 %vb = shufflevector <8 x i32> %elt.head, <8 x i32> poison, <8 x i32> zeroinitializer
526 %v = call <8 x i32> @llvm.vp.srem.v8i32(<8 x i32> %va, <8 x i32> %vb, <8 x i1> %m, i32 %evl)
530 define <8 x i32> @vrem_vx_v8i32_unmasked(<8 x i32> %va, i32 %b, i32 zeroext %evl) {
531 ; CHECK-LABEL: vrem_vx_v8i32_unmasked:
533 ; CHECK-NEXT: vsetvli zero, a1, e32, m2, ta, ma
534 ; CHECK-NEXT: vrem.vx v8, v8, a0
536 %elt.head = insertelement <8 x i32> poison, i32 %b, i32 0
537 %vb = shufflevector <8 x i32> %elt.head, <8 x i32> poison, <8 x i32> zeroinitializer
538 %v = call <8 x i32> @llvm.vp.srem.v8i32(<8 x i32> %va, <8 x i32> %vb, <8 x i1> splat (i1 true), i32 %evl)
542 declare <16 x i32> @llvm.vp.srem.v16i32(<16 x i32>, <16 x i32>, <16 x i1>, i32)
544 define <16 x i32> @vrem_vv_v16i32(<16 x i32> %va, <16 x i32> %b, <16 x i1> %m, i32 zeroext %evl) {
545 ; CHECK-LABEL: vrem_vv_v16i32:
547 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
548 ; CHECK-NEXT: vrem.vv v8, v8, v12, v0.t
550 %v = call <16 x i32> @llvm.vp.srem.v16i32(<16 x i32> %va, <16 x i32> %b, <16 x i1> %m, i32 %evl)
554 define <16 x i32> @vrem_vv_v16i32_unmasked(<16 x i32> %va, <16 x i32> %b, i32 zeroext %evl) {
555 ; CHECK-LABEL: vrem_vv_v16i32_unmasked:
557 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
558 ; CHECK-NEXT: vrem.vv v8, v8, v12
560 %v = call <16 x i32> @llvm.vp.srem.v16i32(<16 x i32> %va, <16 x i32> %b, <16 x i1> splat (i1 true), i32 %evl)
564 define <16 x i32> @vrem_vx_v16i32(<16 x i32> %va, i32 %b, <16 x i1> %m, i32 zeroext %evl) {
565 ; CHECK-LABEL: vrem_vx_v16i32:
567 ; CHECK-NEXT: vsetvli zero, a1, e32, m4, ta, ma
568 ; CHECK-NEXT: vrem.vx v8, v8, a0, v0.t
570 %elt.head = insertelement <16 x i32> poison, i32 %b, i32 0
571 %vb = shufflevector <16 x i32> %elt.head, <16 x i32> poison, <16 x i32> zeroinitializer
572 %v = call <16 x i32> @llvm.vp.srem.v16i32(<16 x i32> %va, <16 x i32> %vb, <16 x i1> %m, i32 %evl)
576 define <16 x i32> @vrem_vx_v16i32_unmasked(<16 x i32> %va, i32 %b, i32 zeroext %evl) {
577 ; CHECK-LABEL: vrem_vx_v16i32_unmasked:
579 ; CHECK-NEXT: vsetvli zero, a1, e32, m4, ta, ma
580 ; CHECK-NEXT: vrem.vx v8, v8, a0
582 %elt.head = insertelement <16 x i32> poison, i32 %b, i32 0
583 %vb = shufflevector <16 x i32> %elt.head, <16 x i32> poison, <16 x i32> zeroinitializer
584 %v = call <16 x i32> @llvm.vp.srem.v16i32(<16 x i32> %va, <16 x i32> %vb, <16 x i1> splat (i1 true), i32 %evl)
588 declare <2 x i64> @llvm.vp.srem.v2i64(<2 x i64>, <2 x i64>, <2 x i1>, i32)
590 define <2 x i64> @vrem_vv_v2i64(<2 x i64> %va, <2 x i64> %b, <2 x i1> %m, i32 zeroext %evl) {
591 ; CHECK-LABEL: vrem_vv_v2i64:
593 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
594 ; CHECK-NEXT: vrem.vv v8, v8, v9, v0.t
596 %v = call <2 x i64> @llvm.vp.srem.v2i64(<2 x i64> %va, <2 x i64> %b, <2 x i1> %m, i32 %evl)
600 define <2 x i64> @vrem_vv_v2i64_unmasked(<2 x i64> %va, <2 x i64> %b, i32 zeroext %evl) {
601 ; CHECK-LABEL: vrem_vv_v2i64_unmasked:
603 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
604 ; CHECK-NEXT: vrem.vv v8, v8, v9
606 %v = call <2 x i64> @llvm.vp.srem.v2i64(<2 x i64> %va, <2 x i64> %b, <2 x i1> splat (i1 true), i32 %evl)
610 define <2 x i64> @vrem_vx_v2i64(<2 x i64> %va, i64 %b, <2 x i1> %m, i32 zeroext %evl) {
611 ; RV32-LABEL: vrem_vx_v2i64:
613 ; RV32-NEXT: addi sp, sp, -16
614 ; RV32-NEXT: .cfi_def_cfa_offset 16
615 ; RV32-NEXT: sw a1, 12(sp)
616 ; RV32-NEXT: sw a0, 8(sp)
617 ; RV32-NEXT: addi a0, sp, 8
618 ; RV32-NEXT: vsetivli zero, 2, e64, m1, ta, ma
619 ; RV32-NEXT: vlse64.v v9, (a0), zero
620 ; RV32-NEXT: vsetvli zero, a2, e64, m1, ta, ma
621 ; RV32-NEXT: vrem.vv v8, v8, v9, v0.t
622 ; RV32-NEXT: addi sp, sp, 16
625 ; RV64-LABEL: vrem_vx_v2i64:
627 ; RV64-NEXT: vsetvli zero, a1, e64, m1, ta, ma
628 ; RV64-NEXT: vrem.vx v8, v8, a0, v0.t
630 %elt.head = insertelement <2 x i64> poison, i64 %b, i32 0
631 %vb = shufflevector <2 x i64> %elt.head, <2 x i64> poison, <2 x i32> zeroinitializer
632 %v = call <2 x i64> @llvm.vp.srem.v2i64(<2 x i64> %va, <2 x i64> %vb, <2 x i1> %m, i32 %evl)
636 define <2 x i64> @vrem_vx_v2i64_unmasked(<2 x i64> %va, i64 %b, i32 zeroext %evl) {
637 ; RV32-LABEL: vrem_vx_v2i64_unmasked:
639 ; RV32-NEXT: addi sp, sp, -16
640 ; RV32-NEXT: .cfi_def_cfa_offset 16
641 ; RV32-NEXT: sw a1, 12(sp)
642 ; RV32-NEXT: sw a0, 8(sp)
643 ; RV32-NEXT: addi a0, sp, 8
644 ; RV32-NEXT: vsetivli zero, 2, e64, m1, ta, ma
645 ; RV32-NEXT: vlse64.v v9, (a0), zero
646 ; RV32-NEXT: vsetvli zero, a2, e64, m1, ta, ma
647 ; RV32-NEXT: vrem.vv v8, v8, v9
648 ; RV32-NEXT: addi sp, sp, 16
651 ; RV64-LABEL: vrem_vx_v2i64_unmasked:
653 ; RV64-NEXT: vsetvli zero, a1, e64, m1, ta, ma
654 ; RV64-NEXT: vrem.vx v8, v8, a0
656 %elt.head = insertelement <2 x i64> poison, i64 %b, i32 0
657 %vb = shufflevector <2 x i64> %elt.head, <2 x i64> poison, <2 x i32> zeroinitializer
658 %v = call <2 x i64> @llvm.vp.srem.v2i64(<2 x i64> %va, <2 x i64> %vb, <2 x i1> splat (i1 true), i32 %evl)
662 declare <4 x i64> @llvm.vp.srem.v4i64(<4 x i64>, <4 x i64>, <4 x i1>, i32)
664 define <4 x i64> @vrem_vv_v4i64(<4 x i64> %va, <4 x i64> %b, <4 x i1> %m, i32 zeroext %evl) {
665 ; CHECK-LABEL: vrem_vv_v4i64:
667 ; CHECK-NEXT: vsetvli zero, a0, e64, m2, ta, ma
668 ; CHECK-NEXT: vrem.vv v8, v8, v10, v0.t
670 %v = call <4 x i64> @llvm.vp.srem.v4i64(<4 x i64> %va, <4 x i64> %b, <4 x i1> %m, i32 %evl)
674 define <4 x i64> @vrem_vv_v4i64_unmasked(<4 x i64> %va, <4 x i64> %b, i32 zeroext %evl) {
675 ; CHECK-LABEL: vrem_vv_v4i64_unmasked:
677 ; CHECK-NEXT: vsetvli zero, a0, e64, m2, ta, ma
678 ; CHECK-NEXT: vrem.vv v8, v8, v10
680 %v = call <4 x i64> @llvm.vp.srem.v4i64(<4 x i64> %va, <4 x i64> %b, <4 x i1> splat (i1 true), i32 %evl)
684 define <4 x i64> @vrem_vx_v4i64(<4 x i64> %va, i64 %b, <4 x i1> %m, i32 zeroext %evl) {
685 ; RV32-LABEL: vrem_vx_v4i64:
687 ; RV32-NEXT: addi sp, sp, -16
688 ; RV32-NEXT: .cfi_def_cfa_offset 16
689 ; RV32-NEXT: sw a1, 12(sp)
690 ; RV32-NEXT: sw a0, 8(sp)
691 ; RV32-NEXT: addi a0, sp, 8
692 ; RV32-NEXT: vsetivli zero, 4, e64, m2, ta, ma
693 ; RV32-NEXT: vlse64.v v10, (a0), zero
694 ; RV32-NEXT: vsetvli zero, a2, e64, m2, ta, ma
695 ; RV32-NEXT: vrem.vv v8, v8, v10, v0.t
696 ; RV32-NEXT: addi sp, sp, 16
699 ; RV64-LABEL: vrem_vx_v4i64:
701 ; RV64-NEXT: vsetvli zero, a1, e64, m2, ta, ma
702 ; RV64-NEXT: vrem.vx v8, v8, a0, v0.t
704 %elt.head = insertelement <4 x i64> poison, i64 %b, i32 0
705 %vb = shufflevector <4 x i64> %elt.head, <4 x i64> poison, <4 x i32> zeroinitializer
706 %v = call <4 x i64> @llvm.vp.srem.v4i64(<4 x i64> %va, <4 x i64> %vb, <4 x i1> %m, i32 %evl)
710 define <4 x i64> @vrem_vx_v4i64_unmasked(<4 x i64> %va, i64 %b, i32 zeroext %evl) {
711 ; RV32-LABEL: vrem_vx_v4i64_unmasked:
713 ; RV32-NEXT: addi sp, sp, -16
714 ; RV32-NEXT: .cfi_def_cfa_offset 16
715 ; RV32-NEXT: sw a1, 12(sp)
716 ; RV32-NEXT: sw a0, 8(sp)
717 ; RV32-NEXT: addi a0, sp, 8
718 ; RV32-NEXT: vsetivli zero, 4, e64, m2, ta, ma
719 ; RV32-NEXT: vlse64.v v10, (a0), zero
720 ; RV32-NEXT: vsetvli zero, a2, e64, m2, ta, ma
721 ; RV32-NEXT: vrem.vv v8, v8, v10
722 ; RV32-NEXT: addi sp, sp, 16
725 ; RV64-LABEL: vrem_vx_v4i64_unmasked:
727 ; RV64-NEXT: vsetvli zero, a1, e64, m2, ta, ma
728 ; RV64-NEXT: vrem.vx v8, v8, a0
730 %elt.head = insertelement <4 x i64> poison, i64 %b, i32 0
731 %vb = shufflevector <4 x i64> %elt.head, <4 x i64> poison, <4 x i32> zeroinitializer
732 %v = call <4 x i64> @llvm.vp.srem.v4i64(<4 x i64> %va, <4 x i64> %vb, <4 x i1> splat (i1 true), i32 %evl)
736 declare <8 x i64> @llvm.vp.srem.v8i64(<8 x i64>, <8 x i64>, <8 x i1>, i32)
738 define <8 x i64> @vrem_vv_v8i64(<8 x i64> %va, <8 x i64> %b, <8 x i1> %m, i32 zeroext %evl) {
739 ; CHECK-LABEL: vrem_vv_v8i64:
741 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
742 ; CHECK-NEXT: vrem.vv v8, v8, v12, v0.t
744 %v = call <8 x i64> @llvm.vp.srem.v8i64(<8 x i64> %va, <8 x i64> %b, <8 x i1> %m, i32 %evl)
748 define <8 x i64> @vrem_vv_v8i64_unmasked(<8 x i64> %va, <8 x i64> %b, i32 zeroext %evl) {
749 ; CHECK-LABEL: vrem_vv_v8i64_unmasked:
751 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
752 ; CHECK-NEXT: vrem.vv v8, v8, v12
754 %v = call <8 x i64> @llvm.vp.srem.v8i64(<8 x i64> %va, <8 x i64> %b, <8 x i1> splat (i1 true), i32 %evl)
758 define <8 x i64> @vrem_vx_v8i64(<8 x i64> %va, i64 %b, <8 x i1> %m, i32 zeroext %evl) {
759 ; RV32-LABEL: vrem_vx_v8i64:
761 ; RV32-NEXT: addi sp, sp, -16
762 ; RV32-NEXT: .cfi_def_cfa_offset 16
763 ; RV32-NEXT: sw a1, 12(sp)
764 ; RV32-NEXT: sw a0, 8(sp)
765 ; RV32-NEXT: addi a0, sp, 8
766 ; RV32-NEXT: vsetivli zero, 8, e64, m4, ta, ma
767 ; RV32-NEXT: vlse64.v v12, (a0), zero
768 ; RV32-NEXT: vsetvli zero, a2, e64, m4, ta, ma
769 ; RV32-NEXT: vrem.vv v8, v8, v12, v0.t
770 ; RV32-NEXT: addi sp, sp, 16
773 ; RV64-LABEL: vrem_vx_v8i64:
775 ; RV64-NEXT: vsetvli zero, a1, e64, m4, ta, ma
776 ; RV64-NEXT: vrem.vx v8, v8, a0, v0.t
778 %elt.head = insertelement <8 x i64> poison, i64 %b, i32 0
779 %vb = shufflevector <8 x i64> %elt.head, <8 x i64> poison, <8 x i32> zeroinitializer
780 %v = call <8 x i64> @llvm.vp.srem.v8i64(<8 x i64> %va, <8 x i64> %vb, <8 x i1> %m, i32 %evl)
784 define <8 x i64> @vrem_vx_v8i64_unmasked(<8 x i64> %va, i64 %b, i32 zeroext %evl) {
785 ; RV32-LABEL: vrem_vx_v8i64_unmasked:
787 ; RV32-NEXT: addi sp, sp, -16
788 ; RV32-NEXT: .cfi_def_cfa_offset 16
789 ; RV32-NEXT: sw a1, 12(sp)
790 ; RV32-NEXT: sw a0, 8(sp)
791 ; RV32-NEXT: addi a0, sp, 8
792 ; RV32-NEXT: vsetivli zero, 8, e64, m4, ta, ma
793 ; RV32-NEXT: vlse64.v v12, (a0), zero
794 ; RV32-NEXT: vsetvli zero, a2, e64, m4, ta, ma
795 ; RV32-NEXT: vrem.vv v8, v8, v12
796 ; RV32-NEXT: addi sp, sp, 16
799 ; RV64-LABEL: vrem_vx_v8i64_unmasked:
801 ; RV64-NEXT: vsetvli zero, a1, e64, m4, ta, ma
802 ; RV64-NEXT: vrem.vx v8, v8, a0
804 %elt.head = insertelement <8 x i64> poison, i64 %b, i32 0
805 %vb = shufflevector <8 x i64> %elt.head, <8 x i64> poison, <8 x i32> zeroinitializer
806 %v = call <8 x i64> @llvm.vp.srem.v8i64(<8 x i64> %va, <8 x i64> %vb, <8 x i1> splat (i1 true), i32 %evl)
810 declare <16 x i64> @llvm.vp.srem.v16i64(<16 x i64>, <16 x i64>, <16 x i1>, i32)
812 define <16 x i64> @vrem_vv_v16i64(<16 x i64> %va, <16 x i64> %b, <16 x i1> %m, i32 zeroext %evl) {
813 ; CHECK-LABEL: vrem_vv_v16i64:
815 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
816 ; CHECK-NEXT: vrem.vv v8, v8, v16, v0.t
818 %v = call <16 x i64> @llvm.vp.srem.v16i64(<16 x i64> %va, <16 x i64> %b, <16 x i1> %m, i32 %evl)
822 define <16 x i64> @vrem_vv_v16i64_unmasked(<16 x i64> %va, <16 x i64> %b, i32 zeroext %evl) {
823 ; CHECK-LABEL: vrem_vv_v16i64_unmasked:
825 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
826 ; CHECK-NEXT: vrem.vv v8, v8, v16
828 %v = call <16 x i64> @llvm.vp.srem.v16i64(<16 x i64> %va, <16 x i64> %b, <16 x i1> splat (i1 true), i32 %evl)
832 define <16 x i64> @vrem_vx_v16i64(<16 x i64> %va, i64 %b, <16 x i1> %m, i32 zeroext %evl) {
833 ; RV32-LABEL: vrem_vx_v16i64:
835 ; RV32-NEXT: addi sp, sp, -16
836 ; RV32-NEXT: .cfi_def_cfa_offset 16
837 ; RV32-NEXT: sw a1, 12(sp)
838 ; RV32-NEXT: sw a0, 8(sp)
839 ; RV32-NEXT: addi a0, sp, 8
840 ; RV32-NEXT: vsetivli zero, 16, e64, m8, ta, ma
841 ; RV32-NEXT: vlse64.v v16, (a0), zero
842 ; RV32-NEXT: vsetvli zero, a2, e64, m8, ta, ma
843 ; RV32-NEXT: vrem.vv v8, v8, v16, v0.t
844 ; RV32-NEXT: addi sp, sp, 16
847 ; RV64-LABEL: vrem_vx_v16i64:
849 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
850 ; RV64-NEXT: vrem.vx v8, v8, a0, v0.t
852 %elt.head = insertelement <16 x i64> poison, i64 %b, i32 0
853 %vb = shufflevector <16 x i64> %elt.head, <16 x i64> poison, <16 x i32> zeroinitializer
854 %v = call <16 x i64> @llvm.vp.srem.v16i64(<16 x i64> %va, <16 x i64> %vb, <16 x i1> %m, i32 %evl)
858 define <16 x i64> @vrem_vx_v16i64_unmasked(<16 x i64> %va, i64 %b, i32 zeroext %evl) {
859 ; RV32-LABEL: vrem_vx_v16i64_unmasked:
861 ; RV32-NEXT: addi sp, sp, -16
862 ; RV32-NEXT: .cfi_def_cfa_offset 16
863 ; RV32-NEXT: sw a1, 12(sp)
864 ; RV32-NEXT: sw a0, 8(sp)
865 ; RV32-NEXT: addi a0, sp, 8
866 ; RV32-NEXT: vsetivli zero, 16, e64, m8, ta, ma
867 ; RV32-NEXT: vlse64.v v16, (a0), zero
868 ; RV32-NEXT: vsetvli zero, a2, e64, m8, ta, ma
869 ; RV32-NEXT: vrem.vv v8, v8, v16
870 ; RV32-NEXT: addi sp, sp, 16
873 ; RV64-LABEL: vrem_vx_v16i64_unmasked:
875 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
876 ; RV64-NEXT: vrem.vx v8, v8, a0
878 %elt.head = insertelement <16 x i64> poison, i64 %b, i32 0
879 %vb = shufflevector <16 x i64> %elt.head, <16 x i64> poison, <16 x i32> zeroinitializer
880 %v = call <16 x i64> @llvm.vp.srem.v16i64(<16 x i64> %va, <16 x i64> %vb, <16 x i1> splat (i1 true), i32 %evl)