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.srem.nxv8i7(<vscale x 8 x i7>, <vscale x 8 x i7>, <vscale x 8 x i1>, i32)
9 define <vscale x 8 x i7> @vrem_vx_nxv8i7(<vscale x 8 x i7> %a, i7 signext %b, <vscale x 8 x i1> %mask, i32 zeroext %evl) {
10 ; CHECK-LABEL: vrem_vx_nxv8i7:
12 ; CHECK-NEXT: vsetvli a2, zero, e8, m1, ta, ma
13 ; CHECK-NEXT: vadd.vv v8, v8, v8
14 ; CHECK-NEXT: vsra.vi v8, v8, 1
15 ; CHECK-NEXT: vsetvli zero, a1, e8, m1, ta, ma
16 ; CHECK-NEXT: vrem.vx v8, v8, a0, v0.t
18 %elt.head = insertelement <vscale x 8 x i7> poison, i7 %b, i32 0
19 %vb = shufflevector <vscale x 8 x i7> %elt.head, <vscale x 8 x i7> poison, <vscale x 8 x i32> zeroinitializer
20 %v = call <vscale x 8 x i7> @llvm.vp.srem.nxv8i7(<vscale x 8 x i7> %a, <vscale x 8 x i7> %vb, <vscale x 8 x i1> %mask, i32 %evl)
21 ret <vscale x 8 x i7> %v
24 declare <vscale x 1 x i8> @llvm.vp.srem.nxv1i8(<vscale x 1 x i8>, <vscale x 1 x i8>, <vscale x 1 x i1>, i32)
26 define <vscale x 1 x i8> @vrem_vv_nxv1i8(<vscale x 1 x i8> %va, <vscale x 1 x i8> %b, <vscale x 1 x i1> %m, i32 zeroext %evl) {
27 ; CHECK-LABEL: vrem_vv_nxv1i8:
29 ; CHECK-NEXT: vsetvli zero, a0, e8, mf8, ta, ma
30 ; CHECK-NEXT: vrem.vv v8, v8, v9, v0.t
32 %v = call <vscale x 1 x i8> @llvm.vp.srem.nxv1i8(<vscale x 1 x i8> %va, <vscale x 1 x i8> %b, <vscale x 1 x i1> %m, i32 %evl)
33 ret <vscale x 1 x i8> %v
36 define <vscale x 1 x i8> @vrem_vv_nxv1i8_unmasked(<vscale x 1 x i8> %va, <vscale x 1 x i8> %b, i32 zeroext %evl) {
37 ; CHECK-LABEL: vrem_vv_nxv1i8_unmasked:
39 ; CHECK-NEXT: vsetvli zero, a0, e8, mf8, ta, ma
40 ; CHECK-NEXT: vrem.vv v8, v8, v9
42 %head = insertelement <vscale x 1 x i1> poison, i1 true, i32 0
43 %m = shufflevector <vscale x 1 x i1> %head, <vscale x 1 x i1> poison, <vscale x 1 x i32> zeroinitializer
44 %v = call <vscale x 1 x i8> @llvm.vp.srem.nxv1i8(<vscale x 1 x i8> %va, <vscale x 1 x i8> %b, <vscale x 1 x i1> %m, i32 %evl)
45 ret <vscale x 1 x i8> %v
48 define <vscale x 1 x i8> @vrem_vx_nxv1i8(<vscale x 1 x i8> %va, i8 %b, <vscale x 1 x i1> %m, i32 zeroext %evl) {
49 ; CHECK-LABEL: vrem_vx_nxv1i8:
51 ; CHECK-NEXT: vsetvli zero, a1, e8, mf8, ta, ma
52 ; CHECK-NEXT: vrem.vx v8, v8, a0, v0.t
54 %elt.head = insertelement <vscale x 1 x i8> poison, i8 %b, i32 0
55 %vb = shufflevector <vscale x 1 x i8> %elt.head, <vscale x 1 x i8> poison, <vscale x 1 x i32> zeroinitializer
56 %v = call <vscale x 1 x i8> @llvm.vp.srem.nxv1i8(<vscale x 1 x i8> %va, <vscale x 1 x i8> %vb, <vscale x 1 x i1> %m, i32 %evl)
57 ret <vscale x 1 x i8> %v
60 define <vscale x 1 x i8> @vrem_vx_nxv1i8_unmasked(<vscale x 1 x i8> %va, i8 %b, i32 zeroext %evl) {
61 ; CHECK-LABEL: vrem_vx_nxv1i8_unmasked:
63 ; CHECK-NEXT: vsetvli zero, a1, e8, mf8, ta, ma
64 ; CHECK-NEXT: vrem.vx v8, v8, a0
66 %elt.head = insertelement <vscale x 1 x i8> poison, i8 %b, i32 0
67 %vb = shufflevector <vscale x 1 x i8> %elt.head, <vscale x 1 x i8> poison, <vscale x 1 x i32> zeroinitializer
68 %head = insertelement <vscale x 1 x i1> poison, i1 true, i32 0
69 %m = shufflevector <vscale x 1 x i1> %head, <vscale x 1 x i1> poison, <vscale x 1 x i32> zeroinitializer
70 %v = call <vscale x 1 x i8> @llvm.vp.srem.nxv1i8(<vscale x 1 x i8> %va, <vscale x 1 x i8> %vb, <vscale x 1 x i1> %m, i32 %evl)
71 ret <vscale x 1 x i8> %v
74 declare <vscale x 2 x i8> @llvm.vp.srem.nxv2i8(<vscale x 2 x i8>, <vscale x 2 x i8>, <vscale x 2 x i1>, i32)
76 define <vscale x 2 x i8> @vrem_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: vrem_vv_nxv2i8:
79 ; CHECK-NEXT: vsetvli zero, a0, e8, mf4, ta, ma
80 ; CHECK-NEXT: vrem.vv v8, v8, v9, v0.t
82 %v = call <vscale x 2 x i8> @llvm.vp.srem.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> @vrem_vv_nxv2i8_unmasked(<vscale x 2 x i8> %va, <vscale x 2 x i8> %b, i32 zeroext %evl) {
87 ; CHECK-LABEL: vrem_vv_nxv2i8_unmasked:
89 ; CHECK-NEXT: vsetvli zero, a0, e8, mf4, ta, ma
90 ; CHECK-NEXT: vrem.vv v8, v8, v9
92 %head = insertelement <vscale x 2 x i1> poison, i1 true, i32 0
93 %m = shufflevector <vscale x 2 x i1> %head, <vscale x 2 x i1> poison, <vscale x 2 x i32> zeroinitializer
94 %v = call <vscale x 2 x i8> @llvm.vp.srem.nxv2i8(<vscale x 2 x i8> %va, <vscale x 2 x i8> %b, <vscale x 2 x i1> %m, i32 %evl)
95 ret <vscale x 2 x i8> %v
98 define <vscale x 2 x i8> @vrem_vx_nxv2i8(<vscale x 2 x i8> %va, i8 %b, <vscale x 2 x i1> %m, i32 zeroext %evl) {
99 ; CHECK-LABEL: vrem_vx_nxv2i8:
101 ; CHECK-NEXT: vsetvli zero, a1, e8, mf4, ta, ma
102 ; CHECK-NEXT: vrem.vx v8, v8, a0, v0.t
104 %elt.head = insertelement <vscale x 2 x i8> poison, i8 %b, i32 0
105 %vb = shufflevector <vscale x 2 x i8> %elt.head, <vscale x 2 x i8> poison, <vscale x 2 x i32> zeroinitializer
106 %v = call <vscale x 2 x i8> @llvm.vp.srem.nxv2i8(<vscale x 2 x i8> %va, <vscale x 2 x i8> %vb, <vscale x 2 x i1> %m, i32 %evl)
107 ret <vscale x 2 x i8> %v
110 define <vscale x 2 x i8> @vrem_vx_nxv2i8_unmasked(<vscale x 2 x i8> %va, i8 %b, i32 zeroext %evl) {
111 ; CHECK-LABEL: vrem_vx_nxv2i8_unmasked:
113 ; CHECK-NEXT: vsetvli zero, a1, e8, mf4, ta, ma
114 ; CHECK-NEXT: vrem.vx v8, v8, a0
116 %elt.head = insertelement <vscale x 2 x i8> poison, i8 %b, i32 0
117 %vb = shufflevector <vscale x 2 x i8> %elt.head, <vscale x 2 x i8> poison, <vscale x 2 x i32> zeroinitializer
118 %head = insertelement <vscale x 2 x i1> poison, i1 true, i32 0
119 %m = shufflevector <vscale x 2 x i1> %head, <vscale x 2 x i1> poison, <vscale x 2 x i32> zeroinitializer
120 %v = call <vscale x 2 x i8> @llvm.vp.srem.nxv2i8(<vscale x 2 x i8> %va, <vscale x 2 x i8> %vb, <vscale x 2 x i1> %m, i32 %evl)
121 ret <vscale x 2 x i8> %v
124 declare <vscale x 3 x i8> @llvm.vp.srem.nxv3i8(<vscale x 3 x i8>, <vscale x 3 x i8>, <vscale x 3 x i1>, i32)
126 define <vscale x 3 x i8> @vrem_vv_nxv3i8(<vscale x 3 x i8> %va, <vscale x 3 x i8> %b, <vscale x 3 x i1> %m, i32 zeroext %evl) {
127 ; CHECK-LABEL: vrem_vv_nxv3i8:
129 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
130 ; CHECK-NEXT: vrem.vv v8, v8, v9, v0.t
132 %v = call <vscale x 3 x i8> @llvm.vp.srem.nxv3i8(<vscale x 3 x i8> %va, <vscale x 3 x i8> %b, <vscale x 3 x i1> %m, i32 %evl)
133 ret <vscale x 3 x i8> %v
136 declare <vscale x 4 x i8> @llvm.vp.srem.nxv4i8(<vscale x 4 x i8>, <vscale x 4 x i8>, <vscale x 4 x i1>, i32)
138 define <vscale x 4 x i8> @vrem_vv_nxv4i8(<vscale x 4 x i8> %va, <vscale x 4 x i8> %b, <vscale x 4 x i1> %m, i32 zeroext %evl) {
139 ; CHECK-LABEL: vrem_vv_nxv4i8:
141 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
142 ; CHECK-NEXT: vrem.vv v8, v8, v9, v0.t
144 %v = call <vscale x 4 x i8> @llvm.vp.srem.nxv4i8(<vscale x 4 x i8> %va, <vscale x 4 x i8> %b, <vscale x 4 x i1> %m, i32 %evl)
145 ret <vscale x 4 x i8> %v
148 define <vscale x 4 x i8> @vrem_vv_nxv4i8_unmasked(<vscale x 4 x i8> %va, <vscale x 4 x i8> %b, i32 zeroext %evl) {
149 ; CHECK-LABEL: vrem_vv_nxv4i8_unmasked:
151 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
152 ; CHECK-NEXT: vrem.vv v8, v8, v9
154 %head = insertelement <vscale x 4 x i1> poison, i1 true, i32 0
155 %m = shufflevector <vscale x 4 x i1> %head, <vscale x 4 x i1> poison, <vscale x 4 x i32> zeroinitializer
156 %v = call <vscale x 4 x i8> @llvm.vp.srem.nxv4i8(<vscale x 4 x i8> %va, <vscale x 4 x i8> %b, <vscale x 4 x i1> %m, i32 %evl)
157 ret <vscale x 4 x i8> %v
160 define <vscale x 4 x i8> @vrem_vx_nxv4i8(<vscale x 4 x i8> %va, i8 %b, <vscale x 4 x i1> %m, i32 zeroext %evl) {
161 ; CHECK-LABEL: vrem_vx_nxv4i8:
163 ; CHECK-NEXT: vsetvli zero, a1, e8, mf2, ta, ma
164 ; CHECK-NEXT: vrem.vx v8, v8, a0, v0.t
166 %elt.head = insertelement <vscale x 4 x i8> poison, i8 %b, i32 0
167 %vb = shufflevector <vscale x 4 x i8> %elt.head, <vscale x 4 x i8> poison, <vscale x 4 x i32> zeroinitializer
168 %v = call <vscale x 4 x i8> @llvm.vp.srem.nxv4i8(<vscale x 4 x i8> %va, <vscale x 4 x i8> %vb, <vscale x 4 x i1> %m, i32 %evl)
169 ret <vscale x 4 x i8> %v
172 define <vscale x 4 x i8> @vrem_vx_nxv4i8_unmasked(<vscale x 4 x i8> %va, i8 %b, i32 zeroext %evl) {
173 ; CHECK-LABEL: vrem_vx_nxv4i8_unmasked:
175 ; CHECK-NEXT: vsetvli zero, a1, e8, mf2, ta, ma
176 ; CHECK-NEXT: vrem.vx v8, v8, a0
178 %elt.head = insertelement <vscale x 4 x i8> poison, i8 %b, i32 0
179 %vb = shufflevector <vscale x 4 x i8> %elt.head, <vscale x 4 x i8> poison, <vscale x 4 x i32> zeroinitializer
180 %head = insertelement <vscale x 4 x i1> poison, i1 true, i32 0
181 %m = shufflevector <vscale x 4 x i1> %head, <vscale x 4 x i1> poison, <vscale x 4 x i32> zeroinitializer
182 %v = call <vscale x 4 x i8> @llvm.vp.srem.nxv4i8(<vscale x 4 x i8> %va, <vscale x 4 x i8> %vb, <vscale x 4 x i1> %m, i32 %evl)
183 ret <vscale x 4 x i8> %v
186 declare <vscale x 8 x i8> @llvm.vp.srem.nxv8i8(<vscale x 8 x i8>, <vscale x 8 x i8>, <vscale x 8 x i1>, i32)
188 define <vscale x 8 x i8> @vrem_vv_nxv8i8(<vscale x 8 x i8> %va, <vscale x 8 x i8> %b, <vscale x 8 x i1> %m, i32 zeroext %evl) {
189 ; CHECK-LABEL: vrem_vv_nxv8i8:
191 ; CHECK-NEXT: vsetvli zero, a0, e8, m1, ta, ma
192 ; CHECK-NEXT: vrem.vv v8, v8, v9, v0.t
194 %v = call <vscale x 8 x i8> @llvm.vp.srem.nxv8i8(<vscale x 8 x i8> %va, <vscale x 8 x i8> %b, <vscale x 8 x i1> %m, i32 %evl)
195 ret <vscale x 8 x i8> %v
198 define <vscale x 8 x i8> @vrem_vv_nxv8i8_unmasked(<vscale x 8 x i8> %va, <vscale x 8 x i8> %b, i32 zeroext %evl) {
199 ; CHECK-LABEL: vrem_vv_nxv8i8_unmasked:
201 ; CHECK-NEXT: vsetvli zero, a0, e8, m1, ta, ma
202 ; CHECK-NEXT: vrem.vv v8, v8, v9
204 %head = insertelement <vscale x 8 x i1> poison, i1 true, i32 0
205 %m = shufflevector <vscale x 8 x i1> %head, <vscale x 8 x i1> poison, <vscale x 8 x i32> zeroinitializer
206 %v = call <vscale x 8 x i8> @llvm.vp.srem.nxv8i8(<vscale x 8 x i8> %va, <vscale x 8 x i8> %b, <vscale x 8 x i1> %m, i32 %evl)
207 ret <vscale x 8 x i8> %v
210 define <vscale x 8 x i8> @vrem_vx_nxv8i8(<vscale x 8 x i8> %va, i8 %b, <vscale x 8 x i1> %m, i32 zeroext %evl) {
211 ; CHECK-LABEL: vrem_vx_nxv8i8:
213 ; CHECK-NEXT: vsetvli zero, a1, e8, m1, ta, ma
214 ; CHECK-NEXT: vrem.vx v8, v8, a0, v0.t
216 %elt.head = insertelement <vscale x 8 x i8> poison, i8 %b, i32 0
217 %vb = shufflevector <vscale x 8 x i8> %elt.head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
218 %v = call <vscale x 8 x i8> @llvm.vp.srem.nxv8i8(<vscale x 8 x i8> %va, <vscale x 8 x i8> %vb, <vscale x 8 x i1> %m, i32 %evl)
219 ret <vscale x 8 x i8> %v
222 define <vscale x 8 x i8> @vrem_vx_nxv8i8_unmasked(<vscale x 8 x i8> %va, i8 %b, i32 zeroext %evl) {
223 ; CHECK-LABEL: vrem_vx_nxv8i8_unmasked:
225 ; CHECK-NEXT: vsetvli zero, a1, e8, m1, ta, ma
226 ; CHECK-NEXT: vrem.vx v8, v8, a0
228 %elt.head = insertelement <vscale x 8 x i8> poison, i8 %b, i32 0
229 %vb = shufflevector <vscale x 8 x i8> %elt.head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
230 %head = insertelement <vscale x 8 x i1> poison, i1 true, i32 0
231 %m = shufflevector <vscale x 8 x i1> %head, <vscale x 8 x i1> poison, <vscale x 8 x i32> zeroinitializer
232 %v = call <vscale x 8 x i8> @llvm.vp.srem.nxv8i8(<vscale x 8 x i8> %va, <vscale x 8 x i8> %vb, <vscale x 8 x i1> %m, i32 %evl)
233 ret <vscale x 8 x i8> %v
236 declare <vscale x 16 x i8> @llvm.vp.srem.nxv16i8(<vscale x 16 x i8>, <vscale x 16 x i8>, <vscale x 16 x i1>, i32)
238 define <vscale x 16 x i8> @vrem_vv_nxv16i8(<vscale x 16 x i8> %va, <vscale x 16 x i8> %b, <vscale x 16 x i1> %m, i32 zeroext %evl) {
239 ; CHECK-LABEL: vrem_vv_nxv16i8:
241 ; CHECK-NEXT: vsetvli zero, a0, e8, m2, ta, ma
242 ; CHECK-NEXT: vrem.vv v8, v8, v10, v0.t
244 %v = call <vscale x 16 x i8> @llvm.vp.srem.nxv16i8(<vscale x 16 x i8> %va, <vscale x 16 x i8> %b, <vscale x 16 x i1> %m, i32 %evl)
245 ret <vscale x 16 x i8> %v
248 define <vscale x 16 x i8> @vrem_vv_nxv16i8_unmasked(<vscale x 16 x i8> %va, <vscale x 16 x i8> %b, i32 zeroext %evl) {
249 ; CHECK-LABEL: vrem_vv_nxv16i8_unmasked:
251 ; CHECK-NEXT: vsetvli zero, a0, e8, m2, ta, ma
252 ; CHECK-NEXT: vrem.vv v8, v8, v10
254 %head = insertelement <vscale x 16 x i1> poison, i1 true, i32 0
255 %m = shufflevector <vscale x 16 x i1> %head, <vscale x 16 x i1> poison, <vscale x 16 x i32> zeroinitializer
256 %v = call <vscale x 16 x i8> @llvm.vp.srem.nxv16i8(<vscale x 16 x i8> %va, <vscale x 16 x i8> %b, <vscale x 16 x i1> %m, i32 %evl)
257 ret <vscale x 16 x i8> %v
260 define <vscale x 16 x i8> @vrem_vx_nxv16i8(<vscale x 16 x i8> %va, i8 %b, <vscale x 16 x i1> %m, i32 zeroext %evl) {
261 ; CHECK-LABEL: vrem_vx_nxv16i8:
263 ; CHECK-NEXT: vsetvli zero, a1, e8, m2, ta, ma
264 ; CHECK-NEXT: vrem.vx v8, v8, a0, v0.t
266 %elt.head = insertelement <vscale x 16 x i8> poison, i8 %b, i32 0
267 %vb = shufflevector <vscale x 16 x i8> %elt.head, <vscale x 16 x i8> poison, <vscale x 16 x i32> zeroinitializer
268 %v = call <vscale x 16 x i8> @llvm.vp.srem.nxv16i8(<vscale x 16 x i8> %va, <vscale x 16 x i8> %vb, <vscale x 16 x i1> %m, i32 %evl)
269 ret <vscale x 16 x i8> %v
272 define <vscale x 16 x i8> @vrem_vx_nxv16i8_unmasked(<vscale x 16 x i8> %va, i8 %b, i32 zeroext %evl) {
273 ; CHECK-LABEL: vrem_vx_nxv16i8_unmasked:
275 ; CHECK-NEXT: vsetvli zero, a1, e8, m2, ta, ma
276 ; CHECK-NEXT: vrem.vx v8, v8, a0
278 %elt.head = insertelement <vscale x 16 x i8> poison, i8 %b, i32 0
279 %vb = shufflevector <vscale x 16 x i8> %elt.head, <vscale x 16 x i8> poison, <vscale x 16 x i32> zeroinitializer
280 %head = insertelement <vscale x 16 x i1> poison, i1 true, i32 0
281 %m = shufflevector <vscale x 16 x i1> %head, <vscale x 16 x i1> poison, <vscale x 16 x i32> zeroinitializer
282 %v = call <vscale x 16 x i8> @llvm.vp.srem.nxv16i8(<vscale x 16 x i8> %va, <vscale x 16 x i8> %vb, <vscale x 16 x i1> %m, i32 %evl)
283 ret <vscale x 16 x i8> %v
286 declare <vscale x 32 x i8> @llvm.vp.srem.nxv32i8(<vscale x 32 x i8>, <vscale x 32 x i8>, <vscale x 32 x i1>, i32)
288 define <vscale x 32 x i8> @vrem_vv_nxv32i8(<vscale x 32 x i8> %va, <vscale x 32 x i8> %b, <vscale x 32 x i1> %m, i32 zeroext %evl) {
289 ; CHECK-LABEL: vrem_vv_nxv32i8:
291 ; CHECK-NEXT: vsetvli zero, a0, e8, m4, ta, ma
292 ; CHECK-NEXT: vrem.vv v8, v8, v12, v0.t
294 %v = call <vscale x 32 x i8> @llvm.vp.srem.nxv32i8(<vscale x 32 x i8> %va, <vscale x 32 x i8> %b, <vscale x 32 x i1> %m, i32 %evl)
295 ret <vscale x 32 x i8> %v
298 define <vscale x 32 x i8> @vrem_vv_nxv32i8_unmasked(<vscale x 32 x i8> %va, <vscale x 32 x i8> %b, i32 zeroext %evl) {
299 ; CHECK-LABEL: vrem_vv_nxv32i8_unmasked:
301 ; CHECK-NEXT: vsetvli zero, a0, e8, m4, ta, ma
302 ; CHECK-NEXT: vrem.vv v8, v8, v12
304 %head = insertelement <vscale x 32 x i1> poison, i1 true, i32 0
305 %m = shufflevector <vscale x 32 x i1> %head, <vscale x 32 x i1> poison, <vscale x 32 x i32> zeroinitializer
306 %v = call <vscale x 32 x i8> @llvm.vp.srem.nxv32i8(<vscale x 32 x i8> %va, <vscale x 32 x i8> %b, <vscale x 32 x i1> %m, i32 %evl)
307 ret <vscale x 32 x i8> %v
310 define <vscale x 32 x i8> @vrem_vx_nxv32i8(<vscale x 32 x i8> %va, i8 %b, <vscale x 32 x i1> %m, i32 zeroext %evl) {
311 ; CHECK-LABEL: vrem_vx_nxv32i8:
313 ; CHECK-NEXT: vsetvli zero, a1, e8, m4, ta, ma
314 ; CHECK-NEXT: vrem.vx v8, v8, a0, v0.t
316 %elt.head = insertelement <vscale x 32 x i8> poison, i8 %b, i32 0
317 %vb = shufflevector <vscale x 32 x i8> %elt.head, <vscale x 32 x i8> poison, <vscale x 32 x i32> zeroinitializer
318 %v = call <vscale x 32 x i8> @llvm.vp.srem.nxv32i8(<vscale x 32 x i8> %va, <vscale x 32 x i8> %vb, <vscale x 32 x i1> %m, i32 %evl)
319 ret <vscale x 32 x i8> %v
322 define <vscale x 32 x i8> @vrem_vx_nxv32i8_unmasked(<vscale x 32 x i8> %va, i8 %b, i32 zeroext %evl) {
323 ; CHECK-LABEL: vrem_vx_nxv32i8_unmasked:
325 ; CHECK-NEXT: vsetvli zero, a1, e8, m4, ta, ma
326 ; CHECK-NEXT: vrem.vx v8, v8, a0
328 %elt.head = insertelement <vscale x 32 x i8> poison, i8 %b, i32 0
329 %vb = shufflevector <vscale x 32 x i8> %elt.head, <vscale x 32 x i8> poison, <vscale x 32 x i32> zeroinitializer
330 %head = insertelement <vscale x 32 x i1> poison, i1 true, i32 0
331 %m = shufflevector <vscale x 32 x i1> %head, <vscale x 32 x i1> poison, <vscale x 32 x i32> zeroinitializer
332 %v = call <vscale x 32 x i8> @llvm.vp.srem.nxv32i8(<vscale x 32 x i8> %va, <vscale x 32 x i8> %vb, <vscale x 32 x i1> %m, i32 %evl)
333 ret <vscale x 32 x i8> %v
336 declare <vscale x 64 x i8> @llvm.vp.srem.nxv64i8(<vscale x 64 x i8>, <vscale x 64 x i8>, <vscale x 64 x i1>, i32)
338 define <vscale x 64 x i8> @vrem_vv_nxv64i8(<vscale x 64 x i8> %va, <vscale x 64 x i8> %b, <vscale x 64 x i1> %m, i32 zeroext %evl) {
339 ; CHECK-LABEL: vrem_vv_nxv64i8:
341 ; CHECK-NEXT: vsetvli zero, a0, e8, m8, ta, ma
342 ; CHECK-NEXT: vrem.vv v8, v8, v16, v0.t
344 %v = call <vscale x 64 x i8> @llvm.vp.srem.nxv64i8(<vscale x 64 x i8> %va, <vscale x 64 x i8> %b, <vscale x 64 x i1> %m, i32 %evl)
345 ret <vscale x 64 x i8> %v
348 define <vscale x 64 x i8> @vrem_vv_nxv64i8_unmasked(<vscale x 64 x i8> %va, <vscale x 64 x i8> %b, i32 zeroext %evl) {
349 ; CHECK-LABEL: vrem_vv_nxv64i8_unmasked:
351 ; CHECK-NEXT: vsetvli zero, a0, e8, m8, ta, ma
352 ; CHECK-NEXT: vrem.vv v8, v8, v16
354 %head = insertelement <vscale x 64 x i1> poison, i1 true, i32 0
355 %m = shufflevector <vscale x 64 x i1> %head, <vscale x 64 x i1> poison, <vscale x 64 x i32> zeroinitializer
356 %v = call <vscale x 64 x i8> @llvm.vp.srem.nxv64i8(<vscale x 64 x i8> %va, <vscale x 64 x i8> %b, <vscale x 64 x i1> %m, i32 %evl)
357 ret <vscale x 64 x i8> %v
360 define <vscale x 64 x i8> @vrem_vx_nxv64i8(<vscale x 64 x i8> %va, i8 %b, <vscale x 64 x i1> %m, i32 zeroext %evl) {
361 ; CHECK-LABEL: vrem_vx_nxv64i8:
363 ; CHECK-NEXT: vsetvli zero, a1, e8, m8, ta, ma
364 ; CHECK-NEXT: vrem.vx v8, v8, a0, v0.t
366 %elt.head = insertelement <vscale x 64 x i8> poison, i8 %b, i32 0
367 %vb = shufflevector <vscale x 64 x i8> %elt.head, <vscale x 64 x i8> poison, <vscale x 64 x i32> zeroinitializer
368 %v = call <vscale x 64 x i8> @llvm.vp.srem.nxv64i8(<vscale x 64 x i8> %va, <vscale x 64 x i8> %vb, <vscale x 64 x i1> %m, i32 %evl)
369 ret <vscale x 64 x i8> %v
372 define <vscale x 64 x i8> @vrem_vx_nxv64i8_unmasked(<vscale x 64 x i8> %va, i8 %b, i32 zeroext %evl) {
373 ; CHECK-LABEL: vrem_vx_nxv64i8_unmasked:
375 ; CHECK-NEXT: vsetvli zero, a1, e8, m8, ta, ma
376 ; CHECK-NEXT: vrem.vx v8, v8, a0
378 %elt.head = insertelement <vscale x 64 x i8> poison, i8 %b, i32 0
379 %vb = shufflevector <vscale x 64 x i8> %elt.head, <vscale x 64 x i8> poison, <vscale x 64 x i32> zeroinitializer
380 %head = insertelement <vscale x 64 x i1> poison, i1 true, i32 0
381 %m = shufflevector <vscale x 64 x i1> %head, <vscale x 64 x i1> poison, <vscale x 64 x i32> zeroinitializer
382 %v = call <vscale x 64 x i8> @llvm.vp.srem.nxv64i8(<vscale x 64 x i8> %va, <vscale x 64 x i8> %vb, <vscale x 64 x i1> %m, i32 %evl)
383 ret <vscale x 64 x i8> %v
386 declare <vscale x 1 x i16> @llvm.vp.srem.nxv1i16(<vscale x 1 x i16>, <vscale x 1 x i16>, <vscale x 1 x i1>, i32)
388 define <vscale x 1 x i16> @vrem_vv_nxv1i16(<vscale x 1 x i16> %va, <vscale x 1 x i16> %b, <vscale x 1 x i1> %m, i32 zeroext %evl) {
389 ; CHECK-LABEL: vrem_vv_nxv1i16:
391 ; CHECK-NEXT: vsetvli zero, a0, e16, mf4, ta, ma
392 ; CHECK-NEXT: vrem.vv v8, v8, v9, v0.t
394 %v = call <vscale x 1 x i16> @llvm.vp.srem.nxv1i16(<vscale x 1 x i16> %va, <vscale x 1 x i16> %b, <vscale x 1 x i1> %m, i32 %evl)
395 ret <vscale x 1 x i16> %v
398 define <vscale x 1 x i16> @vrem_vv_nxv1i16_unmasked(<vscale x 1 x i16> %va, <vscale x 1 x i16> %b, i32 zeroext %evl) {
399 ; CHECK-LABEL: vrem_vv_nxv1i16_unmasked:
401 ; CHECK-NEXT: vsetvli zero, a0, e16, mf4, ta, ma
402 ; CHECK-NEXT: vrem.vv v8, v8, v9
404 %head = insertelement <vscale x 1 x i1> poison, i1 true, i32 0
405 %m = shufflevector <vscale x 1 x i1> %head, <vscale x 1 x i1> poison, <vscale x 1 x i32> zeroinitializer
406 %v = call <vscale x 1 x i16> @llvm.vp.srem.nxv1i16(<vscale x 1 x i16> %va, <vscale x 1 x i16> %b, <vscale x 1 x i1> %m, i32 %evl)
407 ret <vscale x 1 x i16> %v
410 define <vscale x 1 x i16> @vrem_vx_nxv1i16(<vscale x 1 x i16> %va, i16 %b, <vscale x 1 x i1> %m, i32 zeroext %evl) {
411 ; CHECK-LABEL: vrem_vx_nxv1i16:
413 ; CHECK-NEXT: vsetvli zero, a1, e16, mf4, ta, ma
414 ; CHECK-NEXT: vrem.vx v8, v8, a0, v0.t
416 %elt.head = insertelement <vscale x 1 x i16> poison, i16 %b, i32 0
417 %vb = shufflevector <vscale x 1 x i16> %elt.head, <vscale x 1 x i16> poison, <vscale x 1 x i32> zeroinitializer
418 %v = call <vscale x 1 x i16> @llvm.vp.srem.nxv1i16(<vscale x 1 x i16> %va, <vscale x 1 x i16> %vb, <vscale x 1 x i1> %m, i32 %evl)
419 ret <vscale x 1 x i16> %v
422 define <vscale x 1 x i16> @vrem_vx_nxv1i16_unmasked(<vscale x 1 x i16> %va, i16 %b, i32 zeroext %evl) {
423 ; CHECK-LABEL: vrem_vx_nxv1i16_unmasked:
425 ; CHECK-NEXT: vsetvli zero, a1, e16, mf4, ta, ma
426 ; CHECK-NEXT: vrem.vx v8, v8, a0
428 %elt.head = insertelement <vscale x 1 x i16> poison, i16 %b, i32 0
429 %vb = shufflevector <vscale x 1 x i16> %elt.head, <vscale x 1 x i16> poison, <vscale x 1 x i32> zeroinitializer
430 %head = insertelement <vscale x 1 x i1> poison, i1 true, i32 0
431 %m = shufflevector <vscale x 1 x i1> %head, <vscale x 1 x i1> poison, <vscale x 1 x i32> zeroinitializer
432 %v = call <vscale x 1 x i16> @llvm.vp.srem.nxv1i16(<vscale x 1 x i16> %va, <vscale x 1 x i16> %vb, <vscale x 1 x i1> %m, i32 %evl)
433 ret <vscale x 1 x i16> %v
436 declare <vscale x 2 x i16> @llvm.vp.srem.nxv2i16(<vscale x 2 x i16>, <vscale x 2 x i16>, <vscale x 2 x i1>, i32)
438 define <vscale x 2 x i16> @vrem_vv_nxv2i16(<vscale x 2 x i16> %va, <vscale x 2 x i16> %b, <vscale x 2 x i1> %m, i32 zeroext %evl) {
439 ; CHECK-LABEL: vrem_vv_nxv2i16:
441 ; CHECK-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
442 ; CHECK-NEXT: vrem.vv v8, v8, v9, v0.t
444 %v = call <vscale x 2 x i16> @llvm.vp.srem.nxv2i16(<vscale x 2 x i16> %va, <vscale x 2 x i16> %b, <vscale x 2 x i1> %m, i32 %evl)
445 ret <vscale x 2 x i16> %v
448 define <vscale x 2 x i16> @vrem_vv_nxv2i16_unmasked(<vscale x 2 x i16> %va, <vscale x 2 x i16> %b, i32 zeroext %evl) {
449 ; CHECK-LABEL: vrem_vv_nxv2i16_unmasked:
451 ; CHECK-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
452 ; CHECK-NEXT: vrem.vv v8, v8, v9
454 %head = insertelement <vscale x 2 x i1> poison, i1 true, i32 0
455 %m = shufflevector <vscale x 2 x i1> %head, <vscale x 2 x i1> poison, <vscale x 2 x i32> zeroinitializer
456 %v = call <vscale x 2 x i16> @llvm.vp.srem.nxv2i16(<vscale x 2 x i16> %va, <vscale x 2 x i16> %b, <vscale x 2 x i1> %m, i32 %evl)
457 ret <vscale x 2 x i16> %v
460 define <vscale x 2 x i16> @vrem_vx_nxv2i16(<vscale x 2 x i16> %va, i16 %b, <vscale x 2 x i1> %m, i32 zeroext %evl) {
461 ; CHECK-LABEL: vrem_vx_nxv2i16:
463 ; CHECK-NEXT: vsetvli zero, a1, e16, mf2, ta, ma
464 ; CHECK-NEXT: vrem.vx v8, v8, a0, v0.t
466 %elt.head = insertelement <vscale x 2 x i16> poison, i16 %b, i32 0
467 %vb = shufflevector <vscale x 2 x i16> %elt.head, <vscale x 2 x i16> poison, <vscale x 2 x i32> zeroinitializer
468 %v = call <vscale x 2 x i16> @llvm.vp.srem.nxv2i16(<vscale x 2 x i16> %va, <vscale x 2 x i16> %vb, <vscale x 2 x i1> %m, i32 %evl)
469 ret <vscale x 2 x i16> %v
472 define <vscale x 2 x i16> @vrem_vx_nxv2i16_unmasked(<vscale x 2 x i16> %va, i16 %b, i32 zeroext %evl) {
473 ; CHECK-LABEL: vrem_vx_nxv2i16_unmasked:
475 ; CHECK-NEXT: vsetvli zero, a1, e16, mf2, ta, ma
476 ; CHECK-NEXT: vrem.vx v8, v8, a0
478 %elt.head = insertelement <vscale x 2 x i16> poison, i16 %b, i32 0
479 %vb = shufflevector <vscale x 2 x i16> %elt.head, <vscale x 2 x i16> poison, <vscale x 2 x i32> zeroinitializer
480 %head = insertelement <vscale x 2 x i1> poison, i1 true, i32 0
481 %m = shufflevector <vscale x 2 x i1> %head, <vscale x 2 x i1> poison, <vscale x 2 x i32> zeroinitializer
482 %v = call <vscale x 2 x i16> @llvm.vp.srem.nxv2i16(<vscale x 2 x i16> %va, <vscale x 2 x i16> %vb, <vscale x 2 x i1> %m, i32 %evl)
483 ret <vscale x 2 x i16> %v
486 declare <vscale x 4 x i16> @llvm.vp.srem.nxv4i16(<vscale x 4 x i16>, <vscale x 4 x i16>, <vscale x 4 x i1>, i32)
488 define <vscale x 4 x i16> @vrem_vv_nxv4i16(<vscale x 4 x i16> %va, <vscale x 4 x i16> %b, <vscale x 4 x i1> %m, i32 zeroext %evl) {
489 ; CHECK-LABEL: vrem_vv_nxv4i16:
491 ; CHECK-NEXT: vsetvli zero, a0, e16, m1, ta, ma
492 ; CHECK-NEXT: vrem.vv v8, v8, v9, v0.t
494 %v = call <vscale x 4 x i16> @llvm.vp.srem.nxv4i16(<vscale x 4 x i16> %va, <vscale x 4 x i16> %b, <vscale x 4 x i1> %m, i32 %evl)
495 ret <vscale x 4 x i16> %v
498 define <vscale x 4 x i16> @vrem_vv_nxv4i16_unmasked(<vscale x 4 x i16> %va, <vscale x 4 x i16> %b, i32 zeroext %evl) {
499 ; CHECK-LABEL: vrem_vv_nxv4i16_unmasked:
501 ; CHECK-NEXT: vsetvli zero, a0, e16, m1, ta, ma
502 ; CHECK-NEXT: vrem.vv v8, v8, v9
504 %head = insertelement <vscale x 4 x i1> poison, i1 true, i32 0
505 %m = shufflevector <vscale x 4 x i1> %head, <vscale x 4 x i1> poison, <vscale x 4 x i32> zeroinitializer
506 %v = call <vscale x 4 x i16> @llvm.vp.srem.nxv4i16(<vscale x 4 x i16> %va, <vscale x 4 x i16> %b, <vscale x 4 x i1> %m, i32 %evl)
507 ret <vscale x 4 x i16> %v
510 define <vscale x 4 x i16> @vrem_vx_nxv4i16(<vscale x 4 x i16> %va, i16 %b, <vscale x 4 x i1> %m, i32 zeroext %evl) {
511 ; CHECK-LABEL: vrem_vx_nxv4i16:
513 ; CHECK-NEXT: vsetvli zero, a1, e16, m1, ta, ma
514 ; CHECK-NEXT: vrem.vx v8, v8, a0, v0.t
516 %elt.head = insertelement <vscale x 4 x i16> poison, i16 %b, i32 0
517 %vb = shufflevector <vscale x 4 x i16> %elt.head, <vscale x 4 x i16> poison, <vscale x 4 x i32> zeroinitializer
518 %v = call <vscale x 4 x i16> @llvm.vp.srem.nxv4i16(<vscale x 4 x i16> %va, <vscale x 4 x i16> %vb, <vscale x 4 x i1> %m, i32 %evl)
519 ret <vscale x 4 x i16> %v
522 define <vscale x 4 x i16> @vrem_vx_nxv4i16_unmasked(<vscale x 4 x i16> %va, i16 %b, i32 zeroext %evl) {
523 ; CHECK-LABEL: vrem_vx_nxv4i16_unmasked:
525 ; CHECK-NEXT: vsetvli zero, a1, e16, m1, ta, ma
526 ; CHECK-NEXT: vrem.vx v8, v8, a0
528 %elt.head = insertelement <vscale x 4 x i16> poison, i16 %b, i32 0
529 %vb = shufflevector <vscale x 4 x i16> %elt.head, <vscale x 4 x i16> poison, <vscale x 4 x i32> zeroinitializer
530 %head = insertelement <vscale x 4 x i1> poison, i1 true, i32 0
531 %m = shufflevector <vscale x 4 x i1> %head, <vscale x 4 x i1> poison, <vscale x 4 x i32> zeroinitializer
532 %v = call <vscale x 4 x i16> @llvm.vp.srem.nxv4i16(<vscale x 4 x i16> %va, <vscale x 4 x i16> %vb, <vscale x 4 x i1> %m, i32 %evl)
533 ret <vscale x 4 x i16> %v
536 declare <vscale x 8 x i16> @llvm.vp.srem.nxv8i16(<vscale x 8 x i16>, <vscale x 8 x i16>, <vscale x 8 x i1>, i32)
538 define <vscale x 8 x i16> @vrem_vv_nxv8i16(<vscale x 8 x i16> %va, <vscale x 8 x i16> %b, <vscale x 8 x i1> %m, i32 zeroext %evl) {
539 ; CHECK-LABEL: vrem_vv_nxv8i16:
541 ; CHECK-NEXT: vsetvli zero, a0, e16, m2, ta, ma
542 ; CHECK-NEXT: vrem.vv v8, v8, v10, v0.t
544 %v = call <vscale x 8 x i16> @llvm.vp.srem.nxv8i16(<vscale x 8 x i16> %va, <vscale x 8 x i16> %b, <vscale x 8 x i1> %m, i32 %evl)
545 ret <vscale x 8 x i16> %v
548 define <vscale x 8 x i16> @vrem_vv_nxv8i16_unmasked(<vscale x 8 x i16> %va, <vscale x 8 x i16> %b, i32 zeroext %evl) {
549 ; CHECK-LABEL: vrem_vv_nxv8i16_unmasked:
551 ; CHECK-NEXT: vsetvli zero, a0, e16, m2, ta, ma
552 ; CHECK-NEXT: vrem.vv v8, v8, v10
554 %head = insertelement <vscale x 8 x i1> poison, i1 true, i32 0
555 %m = shufflevector <vscale x 8 x i1> %head, <vscale x 8 x i1> poison, <vscale x 8 x i32> zeroinitializer
556 %v = call <vscale x 8 x i16> @llvm.vp.srem.nxv8i16(<vscale x 8 x i16> %va, <vscale x 8 x i16> %b, <vscale x 8 x i1> %m, i32 %evl)
557 ret <vscale x 8 x i16> %v
560 define <vscale x 8 x i16> @vrem_vx_nxv8i16(<vscale x 8 x i16> %va, i16 %b, <vscale x 8 x i1> %m, i32 zeroext %evl) {
561 ; CHECK-LABEL: vrem_vx_nxv8i16:
563 ; CHECK-NEXT: vsetvli zero, a1, e16, m2, ta, ma
564 ; CHECK-NEXT: vrem.vx v8, v8, a0, v0.t
566 %elt.head = insertelement <vscale x 8 x i16> poison, i16 %b, i32 0
567 %vb = shufflevector <vscale x 8 x i16> %elt.head, <vscale x 8 x i16> poison, <vscale x 8 x i32> zeroinitializer
568 %v = call <vscale x 8 x i16> @llvm.vp.srem.nxv8i16(<vscale x 8 x i16> %va, <vscale x 8 x i16> %vb, <vscale x 8 x i1> %m, i32 %evl)
569 ret <vscale x 8 x i16> %v
572 define <vscale x 8 x i16> @vrem_vx_nxv8i16_unmasked(<vscale x 8 x i16> %va, i16 %b, i32 zeroext %evl) {
573 ; CHECK-LABEL: vrem_vx_nxv8i16_unmasked:
575 ; CHECK-NEXT: vsetvli zero, a1, e16, m2, ta, ma
576 ; CHECK-NEXT: vrem.vx v8, v8, a0
578 %elt.head = insertelement <vscale x 8 x i16> poison, i16 %b, i32 0
579 %vb = shufflevector <vscale x 8 x i16> %elt.head, <vscale x 8 x i16> poison, <vscale x 8 x i32> zeroinitializer
580 %head = insertelement <vscale x 8 x i1> poison, i1 true, i32 0
581 %m = shufflevector <vscale x 8 x i1> %head, <vscale x 8 x i1> poison, <vscale x 8 x i32> zeroinitializer
582 %v = call <vscale x 8 x i16> @llvm.vp.srem.nxv8i16(<vscale x 8 x i16> %va, <vscale x 8 x i16> %vb, <vscale x 8 x i1> %m, i32 %evl)
583 ret <vscale x 8 x i16> %v
586 declare <vscale x 16 x i16> @llvm.vp.srem.nxv16i16(<vscale x 16 x i16>, <vscale x 16 x i16>, <vscale x 16 x i1>, i32)
588 define <vscale x 16 x i16> @vrem_vv_nxv16i16(<vscale x 16 x i16> %va, <vscale x 16 x i16> %b, <vscale x 16 x i1> %m, i32 zeroext %evl) {
589 ; CHECK-LABEL: vrem_vv_nxv16i16:
591 ; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, ma
592 ; CHECK-NEXT: vrem.vv v8, v8, v12, v0.t
594 %v = call <vscale x 16 x i16> @llvm.vp.srem.nxv16i16(<vscale x 16 x i16> %va, <vscale x 16 x i16> %b, <vscale x 16 x i1> %m, i32 %evl)
595 ret <vscale x 16 x i16> %v
598 define <vscale x 16 x i16> @vrem_vv_nxv16i16_unmasked(<vscale x 16 x i16> %va, <vscale x 16 x i16> %b, i32 zeroext %evl) {
599 ; CHECK-LABEL: vrem_vv_nxv16i16_unmasked:
601 ; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, ma
602 ; CHECK-NEXT: vrem.vv v8, v8, v12
604 %head = insertelement <vscale x 16 x i1> poison, i1 true, i32 0
605 %m = shufflevector <vscale x 16 x i1> %head, <vscale x 16 x i1> poison, <vscale x 16 x i32> zeroinitializer
606 %v = call <vscale x 16 x i16> @llvm.vp.srem.nxv16i16(<vscale x 16 x i16> %va, <vscale x 16 x i16> %b, <vscale x 16 x i1> %m, i32 %evl)
607 ret <vscale x 16 x i16> %v
610 define <vscale x 16 x i16> @vrem_vx_nxv16i16(<vscale x 16 x i16> %va, i16 %b, <vscale x 16 x i1> %m, i32 zeroext %evl) {
611 ; CHECK-LABEL: vrem_vx_nxv16i16:
613 ; CHECK-NEXT: vsetvli zero, a1, e16, m4, ta, ma
614 ; CHECK-NEXT: vrem.vx v8, v8, a0, v0.t
616 %elt.head = insertelement <vscale x 16 x i16> poison, i16 %b, i32 0
617 %vb = shufflevector <vscale x 16 x i16> %elt.head, <vscale x 16 x i16> poison, <vscale x 16 x i32> zeroinitializer
618 %v = call <vscale x 16 x i16> @llvm.vp.srem.nxv16i16(<vscale x 16 x i16> %va, <vscale x 16 x i16> %vb, <vscale x 16 x i1> %m, i32 %evl)
619 ret <vscale x 16 x i16> %v
622 define <vscale x 16 x i16> @vrem_vx_nxv16i16_unmasked(<vscale x 16 x i16> %va, i16 %b, i32 zeroext %evl) {
623 ; CHECK-LABEL: vrem_vx_nxv16i16_unmasked:
625 ; CHECK-NEXT: vsetvli zero, a1, e16, m4, ta, ma
626 ; CHECK-NEXT: vrem.vx v8, v8, a0
628 %elt.head = insertelement <vscale x 16 x i16> poison, i16 %b, i32 0
629 %vb = shufflevector <vscale x 16 x i16> %elt.head, <vscale x 16 x i16> poison, <vscale x 16 x i32> zeroinitializer
630 %head = insertelement <vscale x 16 x i1> poison, i1 true, i32 0
631 %m = shufflevector <vscale x 16 x i1> %head, <vscale x 16 x i1> poison, <vscale x 16 x i32> zeroinitializer
632 %v = call <vscale x 16 x i16> @llvm.vp.srem.nxv16i16(<vscale x 16 x i16> %va, <vscale x 16 x i16> %vb, <vscale x 16 x i1> %m, i32 %evl)
633 ret <vscale x 16 x i16> %v
636 declare <vscale x 32 x i16> @llvm.vp.srem.nxv32i16(<vscale x 32 x i16>, <vscale x 32 x i16>, <vscale x 32 x i1>, i32)
638 define <vscale x 32 x i16> @vrem_vv_nxv32i16(<vscale x 32 x i16> %va, <vscale x 32 x i16> %b, <vscale x 32 x i1> %m, i32 zeroext %evl) {
639 ; CHECK-LABEL: vrem_vv_nxv32i16:
641 ; CHECK-NEXT: vsetvli zero, a0, e16, m8, ta, ma
642 ; CHECK-NEXT: vrem.vv v8, v8, v16, v0.t
644 %v = call <vscale x 32 x i16> @llvm.vp.srem.nxv32i16(<vscale x 32 x i16> %va, <vscale x 32 x i16> %b, <vscale x 32 x i1> %m, i32 %evl)
645 ret <vscale x 32 x i16> %v
648 define <vscale x 32 x i16> @vrem_vv_nxv32i16_unmasked(<vscale x 32 x i16> %va, <vscale x 32 x i16> %b, i32 zeroext %evl) {
649 ; CHECK-LABEL: vrem_vv_nxv32i16_unmasked:
651 ; CHECK-NEXT: vsetvli zero, a0, e16, m8, ta, ma
652 ; CHECK-NEXT: vrem.vv v8, v8, v16
654 %head = insertelement <vscale x 32 x i1> poison, i1 true, i32 0
655 %m = shufflevector <vscale x 32 x i1> %head, <vscale x 32 x i1> poison, <vscale x 32 x i32> zeroinitializer
656 %v = call <vscale x 32 x i16> @llvm.vp.srem.nxv32i16(<vscale x 32 x i16> %va, <vscale x 32 x i16> %b, <vscale x 32 x i1> %m, i32 %evl)
657 ret <vscale x 32 x i16> %v
660 define <vscale x 32 x i16> @vrem_vx_nxv32i16(<vscale x 32 x i16> %va, i16 %b, <vscale x 32 x i1> %m, i32 zeroext %evl) {
661 ; CHECK-LABEL: vrem_vx_nxv32i16:
663 ; CHECK-NEXT: vsetvli zero, a1, e16, m8, ta, ma
664 ; CHECK-NEXT: vrem.vx v8, v8, a0, v0.t
666 %elt.head = insertelement <vscale x 32 x i16> poison, i16 %b, i32 0
667 %vb = shufflevector <vscale x 32 x i16> %elt.head, <vscale x 32 x i16> poison, <vscale x 32 x i32> zeroinitializer
668 %v = call <vscale x 32 x i16> @llvm.vp.srem.nxv32i16(<vscale x 32 x i16> %va, <vscale x 32 x i16> %vb, <vscale x 32 x i1> %m, i32 %evl)
669 ret <vscale x 32 x i16> %v
672 define <vscale x 32 x i16> @vrem_vx_nxv32i16_unmasked(<vscale x 32 x i16> %va, i16 %b, i32 zeroext %evl) {
673 ; CHECK-LABEL: vrem_vx_nxv32i16_unmasked:
675 ; CHECK-NEXT: vsetvli zero, a1, e16, m8, ta, ma
676 ; CHECK-NEXT: vrem.vx v8, v8, a0
678 %elt.head = insertelement <vscale x 32 x i16> poison, i16 %b, i32 0
679 %vb = shufflevector <vscale x 32 x i16> %elt.head, <vscale x 32 x i16> poison, <vscale x 32 x i32> zeroinitializer
680 %head = insertelement <vscale x 32 x i1> poison, i1 true, i32 0
681 %m = shufflevector <vscale x 32 x i1> %head, <vscale x 32 x i1> poison, <vscale x 32 x i32> zeroinitializer
682 %v = call <vscale x 32 x i16> @llvm.vp.srem.nxv32i16(<vscale x 32 x i16> %va, <vscale x 32 x i16> %vb, <vscale x 32 x i1> %m, i32 %evl)
683 ret <vscale x 32 x i16> %v
686 declare <vscale x 1 x i32> @llvm.vp.srem.nxv1i32(<vscale x 1 x i32>, <vscale x 1 x i32>, <vscale x 1 x i1>, i32)
688 define <vscale x 1 x i32> @vrem_vv_nxv1i32(<vscale x 1 x i32> %va, <vscale x 1 x i32> %b, <vscale x 1 x i1> %m, i32 zeroext %evl) {
689 ; CHECK-LABEL: vrem_vv_nxv1i32:
691 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
692 ; CHECK-NEXT: vrem.vv v8, v8, v9, v0.t
694 %v = call <vscale x 1 x i32> @llvm.vp.srem.nxv1i32(<vscale x 1 x i32> %va, <vscale x 1 x i32> %b, <vscale x 1 x i1> %m, i32 %evl)
695 ret <vscale x 1 x i32> %v
698 define <vscale x 1 x i32> @vrem_vv_nxv1i32_unmasked(<vscale x 1 x i32> %va, <vscale x 1 x i32> %b, i32 zeroext %evl) {
699 ; CHECK-LABEL: vrem_vv_nxv1i32_unmasked:
701 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
702 ; CHECK-NEXT: vrem.vv v8, v8, v9
704 %head = insertelement <vscale x 1 x i1> poison, i1 true, i32 0
705 %m = shufflevector <vscale x 1 x i1> %head, <vscale x 1 x i1> poison, <vscale x 1 x i32> zeroinitializer
706 %v = call <vscale x 1 x i32> @llvm.vp.srem.nxv1i32(<vscale x 1 x i32> %va, <vscale x 1 x i32> %b, <vscale x 1 x i1> %m, i32 %evl)
707 ret <vscale x 1 x i32> %v
710 define <vscale x 1 x i32> @vrem_vx_nxv1i32(<vscale x 1 x i32> %va, i32 %b, <vscale x 1 x i1> %m, i32 zeroext %evl) {
711 ; CHECK-LABEL: vrem_vx_nxv1i32:
713 ; CHECK-NEXT: vsetvli zero, a1, e32, mf2, ta, ma
714 ; CHECK-NEXT: vrem.vx v8, v8, a0, v0.t
716 %elt.head = insertelement <vscale x 1 x i32> poison, i32 %b, i32 0
717 %vb = shufflevector <vscale x 1 x i32> %elt.head, <vscale x 1 x i32> poison, <vscale x 1 x i32> zeroinitializer
718 %v = call <vscale x 1 x i32> @llvm.vp.srem.nxv1i32(<vscale x 1 x i32> %va, <vscale x 1 x i32> %vb, <vscale x 1 x i1> %m, i32 %evl)
719 ret <vscale x 1 x i32> %v
722 define <vscale x 1 x i32> @vrem_vx_nxv1i32_unmasked(<vscale x 1 x i32> %va, i32 %b, i32 zeroext %evl) {
723 ; CHECK-LABEL: vrem_vx_nxv1i32_unmasked:
725 ; CHECK-NEXT: vsetvli zero, a1, e32, mf2, ta, ma
726 ; CHECK-NEXT: vrem.vx v8, v8, a0
728 %elt.head = insertelement <vscale x 1 x i32> poison, i32 %b, i32 0
729 %vb = shufflevector <vscale x 1 x i32> %elt.head, <vscale x 1 x i32> poison, <vscale x 1 x i32> zeroinitializer
730 %head = insertelement <vscale x 1 x i1> poison, i1 true, i32 0
731 %m = shufflevector <vscale x 1 x i1> %head, <vscale x 1 x i1> poison, <vscale x 1 x i32> zeroinitializer
732 %v = call <vscale x 1 x i32> @llvm.vp.srem.nxv1i32(<vscale x 1 x i32> %va, <vscale x 1 x i32> %vb, <vscale x 1 x i1> %m, i32 %evl)
733 ret <vscale x 1 x i32> %v
736 declare <vscale x 2 x i32> @llvm.vp.srem.nxv2i32(<vscale x 2 x i32>, <vscale x 2 x i32>, <vscale x 2 x i1>, i32)
738 define <vscale x 2 x i32> @vrem_vv_nxv2i32(<vscale x 2 x i32> %va, <vscale x 2 x i32> %b, <vscale x 2 x i1> %m, i32 zeroext %evl) {
739 ; CHECK-LABEL: vrem_vv_nxv2i32:
741 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, ma
742 ; CHECK-NEXT: vrem.vv v8, v8, v9, v0.t
744 %v = call <vscale x 2 x i32> @llvm.vp.srem.nxv2i32(<vscale x 2 x i32> %va, <vscale x 2 x i32> %b, <vscale x 2 x i1> %m, i32 %evl)
745 ret <vscale x 2 x i32> %v
748 define <vscale x 2 x i32> @vrem_vv_nxv2i32_unmasked(<vscale x 2 x i32> %va, <vscale x 2 x i32> %b, i32 zeroext %evl) {
749 ; CHECK-LABEL: vrem_vv_nxv2i32_unmasked:
751 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, ma
752 ; CHECK-NEXT: vrem.vv v8, v8, v9
754 %head = insertelement <vscale x 2 x i1> poison, i1 true, i32 0
755 %m = shufflevector <vscale x 2 x i1> %head, <vscale x 2 x i1> poison, <vscale x 2 x i32> zeroinitializer
756 %v = call <vscale x 2 x i32> @llvm.vp.srem.nxv2i32(<vscale x 2 x i32> %va, <vscale x 2 x i32> %b, <vscale x 2 x i1> %m, i32 %evl)
757 ret <vscale x 2 x i32> %v
760 define <vscale x 2 x i32> @vrem_vx_nxv2i32(<vscale x 2 x i32> %va, i32 %b, <vscale x 2 x i1> %m, i32 zeroext %evl) {
761 ; CHECK-LABEL: vrem_vx_nxv2i32:
763 ; CHECK-NEXT: vsetvli zero, a1, e32, m1, ta, ma
764 ; CHECK-NEXT: vrem.vx v8, v8, a0, v0.t
766 %elt.head = insertelement <vscale x 2 x i32> poison, i32 %b, i32 0
767 %vb = shufflevector <vscale x 2 x i32> %elt.head, <vscale x 2 x i32> poison, <vscale x 2 x i32> zeroinitializer
768 %v = call <vscale x 2 x i32> @llvm.vp.srem.nxv2i32(<vscale x 2 x i32> %va, <vscale x 2 x i32> %vb, <vscale x 2 x i1> %m, i32 %evl)
769 ret <vscale x 2 x i32> %v
772 define <vscale x 2 x i32> @vrem_vx_nxv2i32_unmasked(<vscale x 2 x i32> %va, i32 %b, i32 zeroext %evl) {
773 ; CHECK-LABEL: vrem_vx_nxv2i32_unmasked:
775 ; CHECK-NEXT: vsetvli zero, a1, e32, m1, ta, ma
776 ; CHECK-NEXT: vrem.vx v8, v8, a0
778 %elt.head = insertelement <vscale x 2 x i32> poison, i32 %b, i32 0
779 %vb = shufflevector <vscale x 2 x i32> %elt.head, <vscale x 2 x i32> poison, <vscale x 2 x i32> zeroinitializer
780 %head = insertelement <vscale x 2 x i1> poison, i1 true, i32 0
781 %m = shufflevector <vscale x 2 x i1> %head, <vscale x 2 x i1> poison, <vscale x 2 x i32> zeroinitializer
782 %v = call <vscale x 2 x i32> @llvm.vp.srem.nxv2i32(<vscale x 2 x i32> %va, <vscale x 2 x i32> %vb, <vscale x 2 x i1> %m, i32 %evl)
783 ret <vscale x 2 x i32> %v
786 declare <vscale x 4 x i32> @llvm.vp.srem.nxv4i32(<vscale x 4 x i32>, <vscale x 4 x i32>, <vscale x 4 x i1>, i32)
788 define <vscale x 4 x i32> @vrem_vv_nxv4i32(<vscale x 4 x i32> %va, <vscale x 4 x i32> %b, <vscale x 4 x i1> %m, i32 zeroext %evl) {
789 ; CHECK-LABEL: vrem_vv_nxv4i32:
791 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
792 ; CHECK-NEXT: vrem.vv v8, v8, v10, v0.t
794 %v = call <vscale x 4 x i32> @llvm.vp.srem.nxv4i32(<vscale x 4 x i32> %va, <vscale x 4 x i32> %b, <vscale x 4 x i1> %m, i32 %evl)
795 ret <vscale x 4 x i32> %v
798 define <vscale x 4 x i32> @vrem_vv_nxv4i32_unmasked(<vscale x 4 x i32> %va, <vscale x 4 x i32> %b, i32 zeroext %evl) {
799 ; CHECK-LABEL: vrem_vv_nxv4i32_unmasked:
801 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
802 ; CHECK-NEXT: vrem.vv v8, v8, v10
804 %head = insertelement <vscale x 4 x i1> poison, i1 true, i32 0
805 %m = shufflevector <vscale x 4 x i1> %head, <vscale x 4 x i1> poison, <vscale x 4 x i32> zeroinitializer
806 %v = call <vscale x 4 x i32> @llvm.vp.srem.nxv4i32(<vscale x 4 x i32> %va, <vscale x 4 x i32> %b, <vscale x 4 x i1> %m, i32 %evl)
807 ret <vscale x 4 x i32> %v
810 define <vscale x 4 x i32> @vrem_vx_nxv4i32(<vscale x 4 x i32> %va, i32 %b, <vscale x 4 x i1> %m, i32 zeroext %evl) {
811 ; CHECK-LABEL: vrem_vx_nxv4i32:
813 ; CHECK-NEXT: vsetvli zero, a1, e32, m2, ta, ma
814 ; CHECK-NEXT: vrem.vx v8, v8, a0, v0.t
816 %elt.head = insertelement <vscale x 4 x i32> poison, i32 %b, i32 0
817 %vb = shufflevector <vscale x 4 x i32> %elt.head, <vscale x 4 x i32> poison, <vscale x 4 x i32> zeroinitializer
818 %v = call <vscale x 4 x i32> @llvm.vp.srem.nxv4i32(<vscale x 4 x i32> %va, <vscale x 4 x i32> %vb, <vscale x 4 x i1> %m, i32 %evl)
819 ret <vscale x 4 x i32> %v
822 define <vscale x 4 x i32> @vrem_vx_nxv4i32_unmasked(<vscale x 4 x i32> %va, i32 %b, i32 zeroext %evl) {
823 ; CHECK-LABEL: vrem_vx_nxv4i32_unmasked:
825 ; CHECK-NEXT: vsetvli zero, a1, e32, m2, ta, ma
826 ; CHECK-NEXT: vrem.vx v8, v8, a0
828 %elt.head = insertelement <vscale x 4 x i32> poison, i32 %b, i32 0
829 %vb = shufflevector <vscale x 4 x i32> %elt.head, <vscale x 4 x i32> poison, <vscale x 4 x i32> zeroinitializer
830 %head = insertelement <vscale x 4 x i1> poison, i1 true, i32 0
831 %m = shufflevector <vscale x 4 x i1> %head, <vscale x 4 x i1> poison, <vscale x 4 x i32> zeroinitializer
832 %v = call <vscale x 4 x i32> @llvm.vp.srem.nxv4i32(<vscale x 4 x i32> %va, <vscale x 4 x i32> %vb, <vscale x 4 x i1> %m, i32 %evl)
833 ret <vscale x 4 x i32> %v
836 declare <vscale x 8 x i32> @llvm.vp.srem.nxv8i32(<vscale x 8 x i32>, <vscale x 8 x i32>, <vscale x 8 x i1>, i32)
838 define <vscale x 8 x i32> @vrem_vv_nxv8i32(<vscale x 8 x i32> %va, <vscale x 8 x i32> %b, <vscale x 8 x i1> %m, i32 zeroext %evl) {
839 ; CHECK-LABEL: vrem_vv_nxv8i32:
841 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
842 ; CHECK-NEXT: vrem.vv v8, v8, v12, v0.t
844 %v = call <vscale x 8 x i32> @llvm.vp.srem.nxv8i32(<vscale x 8 x i32> %va, <vscale x 8 x i32> %b, <vscale x 8 x i1> %m, i32 %evl)
845 ret <vscale x 8 x i32> %v
848 define <vscale x 8 x i32> @vrem_vv_nxv8i32_unmasked(<vscale x 8 x i32> %va, <vscale x 8 x i32> %b, i32 zeroext %evl) {
849 ; CHECK-LABEL: vrem_vv_nxv8i32_unmasked:
851 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
852 ; CHECK-NEXT: vrem.vv v8, v8, v12
854 %head = insertelement <vscale x 8 x i1> poison, i1 true, i32 0
855 %m = shufflevector <vscale x 8 x i1> %head, <vscale x 8 x i1> poison, <vscale x 8 x i32> zeroinitializer
856 %v = call <vscale x 8 x i32> @llvm.vp.srem.nxv8i32(<vscale x 8 x i32> %va, <vscale x 8 x i32> %b, <vscale x 8 x i1> %m, i32 %evl)
857 ret <vscale x 8 x i32> %v
860 define <vscale x 8 x i32> @vrem_vx_nxv8i32(<vscale x 8 x i32> %va, i32 %b, <vscale x 8 x i1> %m, i32 zeroext %evl) {
861 ; CHECK-LABEL: vrem_vx_nxv8i32:
863 ; CHECK-NEXT: vsetvli zero, a1, e32, m4, ta, ma
864 ; CHECK-NEXT: vrem.vx v8, v8, a0, v0.t
866 %elt.head = insertelement <vscale x 8 x i32> poison, i32 %b, i32 0
867 %vb = shufflevector <vscale x 8 x i32> %elt.head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
868 %v = call <vscale x 8 x i32> @llvm.vp.srem.nxv8i32(<vscale x 8 x i32> %va, <vscale x 8 x i32> %vb, <vscale x 8 x i1> %m, i32 %evl)
869 ret <vscale x 8 x i32> %v
872 define <vscale x 8 x i32> @vrem_vx_nxv8i32_unmasked(<vscale x 8 x i32> %va, i32 %b, i32 zeroext %evl) {
873 ; CHECK-LABEL: vrem_vx_nxv8i32_unmasked:
875 ; CHECK-NEXT: vsetvli zero, a1, e32, m4, ta, ma
876 ; CHECK-NEXT: vrem.vx v8, v8, a0
878 %elt.head = insertelement <vscale x 8 x i32> poison, i32 %b, i32 0
879 %vb = shufflevector <vscale x 8 x i32> %elt.head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
880 %head = insertelement <vscale x 8 x i1> poison, i1 true, i32 0
881 %m = shufflevector <vscale x 8 x i1> %head, <vscale x 8 x i1> poison, <vscale x 8 x i32> zeroinitializer
882 %v = call <vscale x 8 x i32> @llvm.vp.srem.nxv8i32(<vscale x 8 x i32> %va, <vscale x 8 x i32> %vb, <vscale x 8 x i1> %m, i32 %evl)
883 ret <vscale x 8 x i32> %v
886 declare <vscale x 16 x i32> @llvm.vp.srem.nxv16i32(<vscale x 16 x i32>, <vscale x 16 x i32>, <vscale x 16 x i1>, i32)
888 define <vscale x 16 x i32> @vrem_vv_nxv16i32(<vscale x 16 x i32> %va, <vscale x 16 x i32> %b, <vscale x 16 x i1> %m, i32 zeroext %evl) {
889 ; CHECK-LABEL: vrem_vv_nxv16i32:
891 ; CHECK-NEXT: vsetvli zero, a0, e32, m8, ta, ma
892 ; CHECK-NEXT: vrem.vv v8, v8, v16, v0.t
894 %v = call <vscale x 16 x i32> @llvm.vp.srem.nxv16i32(<vscale x 16 x i32> %va, <vscale x 16 x i32> %b, <vscale x 16 x i1> %m, i32 %evl)
895 ret <vscale x 16 x i32> %v
898 define <vscale x 16 x i32> @vrem_vv_nxv16i32_unmasked(<vscale x 16 x i32> %va, <vscale x 16 x i32> %b, i32 zeroext %evl) {
899 ; CHECK-LABEL: vrem_vv_nxv16i32_unmasked:
901 ; CHECK-NEXT: vsetvli zero, a0, e32, m8, ta, ma
902 ; CHECK-NEXT: vrem.vv v8, v8, v16
904 %head = insertelement <vscale x 16 x i1> poison, i1 true, i32 0
905 %m = shufflevector <vscale x 16 x i1> %head, <vscale x 16 x i1> poison, <vscale x 16 x i32> zeroinitializer
906 %v = call <vscale x 16 x i32> @llvm.vp.srem.nxv16i32(<vscale x 16 x i32> %va, <vscale x 16 x i32> %b, <vscale x 16 x i1> %m, i32 %evl)
907 ret <vscale x 16 x i32> %v
910 define <vscale x 16 x i32> @vrem_vx_nxv16i32(<vscale x 16 x i32> %va, i32 %b, <vscale x 16 x i1> %m, i32 zeroext %evl) {
911 ; CHECK-LABEL: vrem_vx_nxv16i32:
913 ; CHECK-NEXT: vsetvli zero, a1, e32, m8, ta, ma
914 ; CHECK-NEXT: vrem.vx v8, v8, a0, v0.t
916 %elt.head = insertelement <vscale x 16 x i32> poison, i32 %b, i32 0
917 %vb = shufflevector <vscale x 16 x i32> %elt.head, <vscale x 16 x i32> poison, <vscale x 16 x i32> zeroinitializer
918 %v = call <vscale x 16 x i32> @llvm.vp.srem.nxv16i32(<vscale x 16 x i32> %va, <vscale x 16 x i32> %vb, <vscale x 16 x i1> %m, i32 %evl)
919 ret <vscale x 16 x i32> %v
922 define <vscale x 16 x i32> @vrem_vx_nxv16i32_unmasked(<vscale x 16 x i32> %va, i32 %b, i32 zeroext %evl) {
923 ; CHECK-LABEL: vrem_vx_nxv16i32_unmasked:
925 ; CHECK-NEXT: vsetvli zero, a1, e32, m8, ta, ma
926 ; CHECK-NEXT: vrem.vx v8, v8, a0
928 %elt.head = insertelement <vscale x 16 x i32> poison, i32 %b, i32 0
929 %vb = shufflevector <vscale x 16 x i32> %elt.head, <vscale x 16 x i32> poison, <vscale x 16 x i32> zeroinitializer
930 %head = insertelement <vscale x 16 x i1> poison, i1 true, i32 0
931 %m = shufflevector <vscale x 16 x i1> %head, <vscale x 16 x i1> poison, <vscale x 16 x i32> zeroinitializer
932 %v = call <vscale x 16 x i32> @llvm.vp.srem.nxv16i32(<vscale x 16 x i32> %va, <vscale x 16 x i32> %vb, <vscale x 16 x i1> %m, i32 %evl)
933 ret <vscale x 16 x i32> %v
936 declare <vscale x 1 x i64> @llvm.vp.srem.nxv1i64(<vscale x 1 x i64>, <vscale x 1 x i64>, <vscale x 1 x i1>, i32)
938 define <vscale x 1 x i64> @vrem_vv_nxv1i64(<vscale x 1 x i64> %va, <vscale x 1 x i64> %b, <vscale x 1 x i1> %m, i32 zeroext %evl) {
939 ; CHECK-LABEL: vrem_vv_nxv1i64:
941 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
942 ; CHECK-NEXT: vrem.vv v8, v8, v9, v0.t
944 %v = call <vscale x 1 x i64> @llvm.vp.srem.nxv1i64(<vscale x 1 x i64> %va, <vscale x 1 x i64> %b, <vscale x 1 x i1> %m, i32 %evl)
945 ret <vscale x 1 x i64> %v
948 define <vscale x 1 x i64> @vrem_vv_nxv1i64_unmasked(<vscale x 1 x i64> %va, <vscale x 1 x i64> %b, i32 zeroext %evl) {
949 ; CHECK-LABEL: vrem_vv_nxv1i64_unmasked:
951 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
952 ; CHECK-NEXT: vrem.vv v8, v8, v9
954 %head = insertelement <vscale x 1 x i1> poison, i1 true, i32 0
955 %m = shufflevector <vscale x 1 x i1> %head, <vscale x 1 x i1> poison, <vscale x 1 x i32> zeroinitializer
956 %v = call <vscale x 1 x i64> @llvm.vp.srem.nxv1i64(<vscale x 1 x i64> %va, <vscale x 1 x i64> %b, <vscale x 1 x i1> %m, i32 %evl)
957 ret <vscale x 1 x i64> %v
960 define <vscale x 1 x i64> @vrem_vx_nxv1i64(<vscale x 1 x i64> %va, i64 %b, <vscale x 1 x i1> %m, i32 zeroext %evl) {
961 ; RV32-LABEL: vrem_vx_nxv1i64:
963 ; RV32-NEXT: addi sp, sp, -16
964 ; RV32-NEXT: .cfi_def_cfa_offset 16
965 ; RV32-NEXT: sw a1, 12(sp)
966 ; RV32-NEXT: sw a0, 8(sp)
967 ; RV32-NEXT: addi a0, sp, 8
968 ; RV32-NEXT: vsetvli a1, zero, e64, m1, ta, ma
969 ; RV32-NEXT: vlse64.v v9, (a0), zero
970 ; RV32-NEXT: vsetvli zero, a2, e64, m1, ta, ma
971 ; RV32-NEXT: vrem.vv v8, v8, v9, v0.t
972 ; RV32-NEXT: addi sp, sp, 16
975 ; RV64-LABEL: vrem_vx_nxv1i64:
977 ; RV64-NEXT: vsetvli zero, a1, e64, m1, ta, ma
978 ; RV64-NEXT: vrem.vx v8, v8, a0, v0.t
980 %elt.head = insertelement <vscale x 1 x i64> poison, i64 %b, i32 0
981 %vb = shufflevector <vscale x 1 x i64> %elt.head, <vscale x 1 x i64> poison, <vscale x 1 x i32> zeroinitializer
982 %v = call <vscale x 1 x i64> @llvm.vp.srem.nxv1i64(<vscale x 1 x i64> %va, <vscale x 1 x i64> %vb, <vscale x 1 x i1> %m, i32 %evl)
983 ret <vscale x 1 x i64> %v
986 define <vscale x 1 x i64> @vrem_vx_nxv1i64_unmasked(<vscale x 1 x i64> %va, i64 %b, i32 zeroext %evl) {
987 ; RV32-LABEL: vrem_vx_nxv1i64_unmasked:
989 ; RV32-NEXT: addi sp, sp, -16
990 ; RV32-NEXT: .cfi_def_cfa_offset 16
991 ; RV32-NEXT: sw a1, 12(sp)
992 ; RV32-NEXT: sw a0, 8(sp)
993 ; RV32-NEXT: addi a0, sp, 8
994 ; RV32-NEXT: vsetvli a1, zero, e64, m1, ta, ma
995 ; RV32-NEXT: vlse64.v v9, (a0), zero
996 ; RV32-NEXT: vsetvli zero, a2, e64, m1, ta, ma
997 ; RV32-NEXT: vrem.vv v8, v8, v9
998 ; RV32-NEXT: addi sp, sp, 16
1001 ; RV64-LABEL: vrem_vx_nxv1i64_unmasked:
1003 ; RV64-NEXT: vsetvli zero, a1, e64, m1, ta, ma
1004 ; RV64-NEXT: vrem.vx v8, v8, a0
1006 %elt.head = insertelement <vscale x 1 x i64> poison, i64 %b, i32 0
1007 %vb = shufflevector <vscale x 1 x i64> %elt.head, <vscale x 1 x i64> poison, <vscale x 1 x i32> zeroinitializer
1008 %head = insertelement <vscale x 1 x i1> poison, i1 true, i32 0
1009 %m = shufflevector <vscale x 1 x i1> %head, <vscale x 1 x i1> poison, <vscale x 1 x i32> zeroinitializer
1010 %v = call <vscale x 1 x i64> @llvm.vp.srem.nxv1i64(<vscale x 1 x i64> %va, <vscale x 1 x i64> %vb, <vscale x 1 x i1> %m, i32 %evl)
1011 ret <vscale x 1 x i64> %v
1014 declare <vscale x 2 x i64> @llvm.vp.srem.nxv2i64(<vscale x 2 x i64>, <vscale x 2 x i64>, <vscale x 2 x i1>, i32)
1016 define <vscale x 2 x i64> @vrem_vv_nxv2i64(<vscale x 2 x i64> %va, <vscale x 2 x i64> %b, <vscale x 2 x i1> %m, i32 zeroext %evl) {
1017 ; CHECK-LABEL: vrem_vv_nxv2i64:
1019 ; CHECK-NEXT: vsetvli zero, a0, e64, m2, ta, ma
1020 ; CHECK-NEXT: vrem.vv v8, v8, v10, v0.t
1022 %v = call <vscale x 2 x i64> @llvm.vp.srem.nxv2i64(<vscale x 2 x i64> %va, <vscale x 2 x i64> %b, <vscale x 2 x i1> %m, i32 %evl)
1023 ret <vscale x 2 x i64> %v
1026 define <vscale x 2 x i64> @vrem_vv_nxv2i64_unmasked(<vscale x 2 x i64> %va, <vscale x 2 x i64> %b, i32 zeroext %evl) {
1027 ; CHECK-LABEL: vrem_vv_nxv2i64_unmasked:
1029 ; CHECK-NEXT: vsetvli zero, a0, e64, m2, ta, ma
1030 ; CHECK-NEXT: vrem.vv v8, v8, v10
1032 %head = insertelement <vscale x 2 x i1> poison, i1 true, i32 0
1033 %m = shufflevector <vscale x 2 x i1> %head, <vscale x 2 x i1> poison, <vscale x 2 x i32> zeroinitializer
1034 %v = call <vscale x 2 x i64> @llvm.vp.srem.nxv2i64(<vscale x 2 x i64> %va, <vscale x 2 x i64> %b, <vscale x 2 x i1> %m, i32 %evl)
1035 ret <vscale x 2 x i64> %v
1038 define <vscale x 2 x i64> @vrem_vx_nxv2i64(<vscale x 2 x i64> %va, i64 %b, <vscale x 2 x i1> %m, i32 zeroext %evl) {
1039 ; RV32-LABEL: vrem_vx_nxv2i64:
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, m2, ta, ma
1047 ; RV32-NEXT: vlse64.v v10, (a0), zero
1048 ; RV32-NEXT: vsetvli zero, a2, e64, m2, ta, ma
1049 ; RV32-NEXT: vrem.vv v8, v8, v10, v0.t
1050 ; RV32-NEXT: addi sp, sp, 16
1053 ; RV64-LABEL: vrem_vx_nxv2i64:
1055 ; RV64-NEXT: vsetvli zero, a1, e64, m2, ta, ma
1056 ; RV64-NEXT: vrem.vx v8, v8, a0, v0.t
1058 %elt.head = insertelement <vscale x 2 x i64> poison, i64 %b, i32 0
1059 %vb = shufflevector <vscale x 2 x i64> %elt.head, <vscale x 2 x i64> poison, <vscale x 2 x i32> zeroinitializer
1060 %v = call <vscale x 2 x i64> @llvm.vp.srem.nxv2i64(<vscale x 2 x i64> %va, <vscale x 2 x i64> %vb, <vscale x 2 x i1> %m, i32 %evl)
1061 ret <vscale x 2 x i64> %v
1064 define <vscale x 2 x i64> @vrem_vx_nxv2i64_unmasked(<vscale x 2 x i64> %va, i64 %b, i32 zeroext %evl) {
1065 ; RV32-LABEL: vrem_vx_nxv2i64_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, m2, ta, ma
1073 ; RV32-NEXT: vlse64.v v10, (a0), zero
1074 ; RV32-NEXT: vsetvli zero, a2, e64, m2, ta, ma
1075 ; RV32-NEXT: vrem.vv v8, v8, v10
1076 ; RV32-NEXT: addi sp, sp, 16
1079 ; RV64-LABEL: vrem_vx_nxv2i64_unmasked:
1081 ; RV64-NEXT: vsetvli zero, a1, e64, m2, ta, ma
1082 ; RV64-NEXT: vrem.vx v8, v8, a0
1084 %elt.head = insertelement <vscale x 2 x i64> poison, i64 %b, i32 0
1085 %vb = shufflevector <vscale x 2 x i64> %elt.head, <vscale x 2 x i64> poison, <vscale x 2 x i32> zeroinitializer
1086 %head = insertelement <vscale x 2 x i1> poison, i1 true, i32 0
1087 %m = shufflevector <vscale x 2 x i1> %head, <vscale x 2 x i1> poison, <vscale x 2 x i32> zeroinitializer
1088 %v = call <vscale x 2 x i64> @llvm.vp.srem.nxv2i64(<vscale x 2 x i64> %va, <vscale x 2 x i64> %vb, <vscale x 2 x i1> %m, i32 %evl)
1089 ret <vscale x 2 x i64> %v
1092 declare <vscale x 4 x i64> @llvm.vp.srem.nxv4i64(<vscale x 4 x i64>, <vscale x 4 x i64>, <vscale x 4 x i1>, i32)
1094 define <vscale x 4 x i64> @vrem_vv_nxv4i64(<vscale x 4 x i64> %va, <vscale x 4 x i64> %b, <vscale x 4 x i1> %m, i32 zeroext %evl) {
1095 ; CHECK-LABEL: vrem_vv_nxv4i64:
1097 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1098 ; CHECK-NEXT: vrem.vv v8, v8, v12, v0.t
1100 %v = call <vscale x 4 x i64> @llvm.vp.srem.nxv4i64(<vscale x 4 x i64> %va, <vscale x 4 x i64> %b, <vscale x 4 x i1> %m, i32 %evl)
1101 ret <vscale x 4 x i64> %v
1104 define <vscale x 4 x i64> @vrem_vv_nxv4i64_unmasked(<vscale x 4 x i64> %va, <vscale x 4 x i64> %b, i32 zeroext %evl) {
1105 ; CHECK-LABEL: vrem_vv_nxv4i64_unmasked:
1107 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1108 ; CHECK-NEXT: vrem.vv v8, v8, v12
1110 %head = insertelement <vscale x 4 x i1> poison, i1 true, i32 0
1111 %m = shufflevector <vscale x 4 x i1> %head, <vscale x 4 x i1> poison, <vscale x 4 x i32> zeroinitializer
1112 %v = call <vscale x 4 x i64> @llvm.vp.srem.nxv4i64(<vscale x 4 x i64> %va, <vscale x 4 x i64> %b, <vscale x 4 x i1> %m, i32 %evl)
1113 ret <vscale x 4 x i64> %v
1116 define <vscale x 4 x i64> @vrem_vx_nxv4i64(<vscale x 4 x i64> %va, i64 %b, <vscale x 4 x i1> %m, i32 zeroext %evl) {
1117 ; RV32-LABEL: vrem_vx_nxv4i64:
1119 ; RV32-NEXT: addi sp, sp, -16
1120 ; RV32-NEXT: .cfi_def_cfa_offset 16
1121 ; RV32-NEXT: sw a1, 12(sp)
1122 ; RV32-NEXT: sw a0, 8(sp)
1123 ; RV32-NEXT: addi a0, sp, 8
1124 ; RV32-NEXT: vsetvli a1, zero, e64, m4, ta, ma
1125 ; RV32-NEXT: vlse64.v v12, (a0), zero
1126 ; RV32-NEXT: vsetvli zero, a2, e64, m4, ta, ma
1127 ; RV32-NEXT: vrem.vv v8, v8, v12, v0.t
1128 ; RV32-NEXT: addi sp, sp, 16
1131 ; RV64-LABEL: vrem_vx_nxv4i64:
1133 ; RV64-NEXT: vsetvli zero, a1, e64, m4, ta, ma
1134 ; RV64-NEXT: vrem.vx v8, v8, a0, v0.t
1136 %elt.head = insertelement <vscale x 4 x i64> poison, i64 %b, i32 0
1137 %vb = shufflevector <vscale x 4 x i64> %elt.head, <vscale x 4 x i64> poison, <vscale x 4 x i32> zeroinitializer
1138 %v = call <vscale x 4 x i64> @llvm.vp.srem.nxv4i64(<vscale x 4 x i64> %va, <vscale x 4 x i64> %vb, <vscale x 4 x i1> %m, i32 %evl)
1139 ret <vscale x 4 x i64> %v
1142 define <vscale x 4 x i64> @vrem_vx_nxv4i64_unmasked(<vscale x 4 x i64> %va, i64 %b, i32 zeroext %evl) {
1143 ; RV32-LABEL: vrem_vx_nxv4i64_unmasked:
1145 ; RV32-NEXT: addi sp, sp, -16
1146 ; RV32-NEXT: .cfi_def_cfa_offset 16
1147 ; RV32-NEXT: sw a1, 12(sp)
1148 ; RV32-NEXT: sw a0, 8(sp)
1149 ; RV32-NEXT: addi a0, sp, 8
1150 ; RV32-NEXT: vsetvli a1, zero, e64, m4, ta, ma
1151 ; RV32-NEXT: vlse64.v v12, (a0), zero
1152 ; RV32-NEXT: vsetvli zero, a2, e64, m4, ta, ma
1153 ; RV32-NEXT: vrem.vv v8, v8, v12
1154 ; RV32-NEXT: addi sp, sp, 16
1157 ; RV64-LABEL: vrem_vx_nxv4i64_unmasked:
1159 ; RV64-NEXT: vsetvli zero, a1, e64, m4, ta, ma
1160 ; RV64-NEXT: vrem.vx v8, v8, a0
1162 %elt.head = insertelement <vscale x 4 x i64> poison, i64 %b, i32 0
1163 %vb = shufflevector <vscale x 4 x i64> %elt.head, <vscale x 4 x i64> poison, <vscale x 4 x i32> zeroinitializer
1164 %head = insertelement <vscale x 4 x i1> poison, i1 true, i32 0
1165 %m = shufflevector <vscale x 4 x i1> %head, <vscale x 4 x i1> poison, <vscale x 4 x i32> zeroinitializer
1166 %v = call <vscale x 4 x i64> @llvm.vp.srem.nxv4i64(<vscale x 4 x i64> %va, <vscale x 4 x i64> %vb, <vscale x 4 x i1> %m, i32 %evl)
1167 ret <vscale x 4 x i64> %v
1170 declare <vscale x 8 x i64> @llvm.vp.srem.nxv8i64(<vscale x 8 x i64>, <vscale x 8 x i64>, <vscale x 8 x i1>, i32)
1172 define <vscale x 8 x i64> @vrem_vv_nxv8i64(<vscale x 8 x i64> %va, <vscale x 8 x i64> %b, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1173 ; CHECK-LABEL: vrem_vv_nxv8i64:
1175 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
1176 ; CHECK-NEXT: vrem.vv v8, v8, v16, v0.t
1178 %v = call <vscale x 8 x i64> @llvm.vp.srem.nxv8i64(<vscale x 8 x i64> %va, <vscale x 8 x i64> %b, <vscale x 8 x i1> %m, i32 %evl)
1179 ret <vscale x 8 x i64> %v
1182 define <vscale x 8 x i64> @vrem_vv_nxv8i64_unmasked(<vscale x 8 x i64> %va, <vscale x 8 x i64> %b, i32 zeroext %evl) {
1183 ; CHECK-LABEL: vrem_vv_nxv8i64_unmasked:
1185 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
1186 ; CHECK-NEXT: vrem.vv v8, v8, v16
1188 %head = insertelement <vscale x 8 x i1> poison, i1 true, i32 0
1189 %m = shufflevector <vscale x 8 x i1> %head, <vscale x 8 x i1> poison, <vscale x 8 x i32> zeroinitializer
1190 %v = call <vscale x 8 x i64> @llvm.vp.srem.nxv8i64(<vscale x 8 x i64> %va, <vscale x 8 x i64> %b, <vscale x 8 x i1> %m, i32 %evl)
1191 ret <vscale x 8 x i64> %v
1194 define <vscale x 8 x i64> @vrem_vx_nxv8i64(<vscale x 8 x i64> %va, i64 %b, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1195 ; RV32-LABEL: vrem_vx_nxv8i64:
1197 ; RV32-NEXT: addi sp, sp, -16
1198 ; RV32-NEXT: .cfi_def_cfa_offset 16
1199 ; RV32-NEXT: sw a1, 12(sp)
1200 ; RV32-NEXT: sw a0, 8(sp)
1201 ; RV32-NEXT: addi a0, sp, 8
1202 ; RV32-NEXT: vsetvli a1, zero, e64, m8, ta, ma
1203 ; RV32-NEXT: vlse64.v v16, (a0), zero
1204 ; RV32-NEXT: vsetvli zero, a2, e64, m8, ta, ma
1205 ; RV32-NEXT: vrem.vv v8, v8, v16, v0.t
1206 ; RV32-NEXT: addi sp, sp, 16
1209 ; RV64-LABEL: vrem_vx_nxv8i64:
1211 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
1212 ; RV64-NEXT: vrem.vx v8, v8, a0, v0.t
1214 %elt.head = insertelement <vscale x 8 x i64> poison, i64 %b, i32 0
1215 %vb = shufflevector <vscale x 8 x i64> %elt.head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
1216 %v = call <vscale x 8 x i64> @llvm.vp.srem.nxv8i64(<vscale x 8 x i64> %va, <vscale x 8 x i64> %vb, <vscale x 8 x i1> %m, i32 %evl)
1217 ret <vscale x 8 x i64> %v
1220 define <vscale x 8 x i64> @vrem_vx_nxv8i64_unmasked(<vscale x 8 x i64> %va, i64 %b, i32 zeroext %evl) {
1221 ; RV32-LABEL: vrem_vx_nxv8i64_unmasked:
1223 ; RV32-NEXT: addi sp, sp, -16
1224 ; RV32-NEXT: .cfi_def_cfa_offset 16
1225 ; RV32-NEXT: sw a1, 12(sp)
1226 ; RV32-NEXT: sw a0, 8(sp)
1227 ; RV32-NEXT: addi a0, sp, 8
1228 ; RV32-NEXT: vsetvli a1, zero, e64, m8, ta, ma
1229 ; RV32-NEXT: vlse64.v v16, (a0), zero
1230 ; RV32-NEXT: vsetvli zero, a2, e64, m8, ta, ma
1231 ; RV32-NEXT: vrem.vv v8, v8, v16
1232 ; RV32-NEXT: addi sp, sp, 16
1235 ; RV64-LABEL: vrem_vx_nxv8i64_unmasked:
1237 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
1238 ; RV64-NEXT: vrem.vx v8, v8, a0
1240 %elt.head = insertelement <vscale x 8 x i64> poison, i64 %b, i32 0
1241 %vb = shufflevector <vscale x 8 x i64> %elt.head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
1242 %head = insertelement <vscale x 8 x i1> poison, i1 true, i32 0
1243 %m = shufflevector <vscale x 8 x i1> %head, <vscale x 8 x i1> poison, <vscale x 8 x i32> zeroinitializer
1244 %v = call <vscale x 8 x i64> @llvm.vp.srem.nxv8i64(<vscale x 8 x i64> %va, <vscale x 8 x i64> %vb, <vscale x 8 x i1> %m, i32 %evl)
1245 ret <vscale x 8 x i64> %v