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.and.v8i7(<8 x i7>, <8 x i7>, <8 x i1>, i32)
9 define <8 x i7> @vand_vv_v8i7(<8 x i7> %va, <8 x i7> %b, <8 x i1> %m, i32 zeroext %evl) {
10 ; CHECK-LABEL: vand_vv_v8i7:
12 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
13 ; CHECK-NEXT: vand.vv v8, v8, v9, v0.t
15 %v = call <8 x i7> @llvm.vp.and.v8i7(<8 x i7> %va, <8 x i7> %b, <8 x i1> %m, i32 %evl)
19 declare <2 x i8> @llvm.vp.and.v2i8(<2 x i8>, <2 x i8>, <2 x i1>, i32)
21 define <2 x i8> @vand_vv_v2i8(<2 x i8> %va, <2 x i8> %b, <2 x i1> %m, i32 zeroext %evl) {
22 ; CHECK-LABEL: vand_vv_v2i8:
24 ; CHECK-NEXT: vsetvli zero, a0, e8, mf8, ta, ma
25 ; CHECK-NEXT: vand.vv v8, v8, v9, v0.t
27 %v = call <2 x i8> @llvm.vp.and.v2i8(<2 x i8> %va, <2 x i8> %b, <2 x i1> %m, i32 %evl)
31 define <2 x i8> @vand_vv_v2i8_unmasked(<2 x i8> %va, <2 x i8> %b, i32 zeroext %evl) {
32 ; CHECK-LABEL: vand_vv_v2i8_unmasked:
34 ; CHECK-NEXT: vsetvli zero, a0, e8, mf8, ta, ma
35 ; CHECK-NEXT: vand.vv v8, v8, v9
37 %head = insertelement <2 x i1> poison, i1 true, i32 0
38 %m = shufflevector <2 x i1> %head, <2 x i1> poison, <2 x i32> zeroinitializer
39 %v = call <2 x i8> @llvm.vp.and.v2i8(<2 x i8> %va, <2 x i8> %b, <2 x i1> %m, i32 %evl)
43 define <2 x i8> @vand_vx_v2i8(<2 x i8> %va, i8 %b, <2 x i1> %m, i32 zeroext %evl) {
44 ; CHECK-LABEL: vand_vx_v2i8:
46 ; CHECK-NEXT: vsetvli zero, a1, e8, mf8, ta, ma
47 ; CHECK-NEXT: vand.vx v8, v8, a0, v0.t
49 %elt.head = insertelement <2 x i8> poison, i8 %b, i32 0
50 %vb = shufflevector <2 x i8> %elt.head, <2 x i8> poison, <2 x i32> zeroinitializer
51 %v = call <2 x i8> @llvm.vp.and.v2i8(<2 x i8> %va, <2 x i8> %vb, <2 x i1> %m, i32 %evl)
55 define <2 x i8> @vand_vx_v2i8_commute(<2 x i8> %va, i8 %b, <2 x i1> %m, i32 zeroext %evl) {
56 ; CHECK-LABEL: vand_vx_v2i8_commute:
58 ; CHECK-NEXT: vsetvli zero, a1, e8, mf8, ta, ma
59 ; CHECK-NEXT: vand.vx v8, v8, a0, v0.t
61 %elt.head = insertelement <2 x i8> poison, i8 %b, i32 0
62 %vb = shufflevector <2 x i8> %elt.head, <2 x i8> poison, <2 x i32> zeroinitializer
63 %v = call <2 x i8> @llvm.vp.and.v2i8(<2 x i8> %vb, <2 x i8> %va, <2 x i1> %m, i32 %evl)
67 define <2 x i8> @vand_vx_v2i8_unmasked(<2 x i8> %va, i8 %b, i32 zeroext %evl) {
68 ; CHECK-LABEL: vand_vx_v2i8_unmasked:
70 ; CHECK-NEXT: vsetvli zero, a1, e8, mf8, ta, ma
71 ; CHECK-NEXT: vand.vx v8, v8, a0
73 %elt.head = insertelement <2 x i8> poison, i8 %b, i32 0
74 %vb = shufflevector <2 x i8> %elt.head, <2 x i8> poison, <2 x i32> zeroinitializer
75 %head = insertelement <2 x i1> poison, i1 true, i32 0
76 %m = shufflevector <2 x i1> %head, <2 x i1> poison, <2 x i32> zeroinitializer
77 %v = call <2 x i8> @llvm.vp.and.v2i8(<2 x i8> %va, <2 x i8> %vb, <2 x i1> %m, i32 %evl)
81 define <2 x i8> @vand_vx_v2i8_unmasked_commute(<2 x i8> %va, i8 %b, i32 zeroext %evl) {
82 ; CHECK-LABEL: vand_vx_v2i8_unmasked_commute:
84 ; CHECK-NEXT: vsetvli zero, a1, e8, mf8, ta, ma
85 ; CHECK-NEXT: vand.vx v8, v8, a0
87 %elt.head = insertelement <2 x i8> poison, i8 %b, i32 0
88 %vb = shufflevector <2 x i8> %elt.head, <2 x i8> poison, <2 x i32> zeroinitializer
89 %head = insertelement <2 x i1> poison, i1 true, i32 0
90 %m = shufflevector <2 x i1> %head, <2 x i1> poison, <2 x i32> zeroinitializer
91 %v = call <2 x i8> @llvm.vp.and.v2i8(<2 x i8> %vb, <2 x i8> %va, <2 x i1> %m, i32 %evl)
95 define <2 x i8> @vand_vi_v2i8(<2 x i8> %va, <2 x i1> %m, i32 zeroext %evl) {
96 ; CHECK-LABEL: vand_vi_v2i8:
98 ; CHECK-NEXT: vsetvli zero, a0, e8, mf8, ta, ma
99 ; CHECK-NEXT: vand.vi v8, v8, 4, v0.t
101 %elt.head = insertelement <2 x i8> poison, i8 4, i32 0
102 %vb = shufflevector <2 x i8> %elt.head, <2 x i8> poison, <2 x i32> zeroinitializer
103 %v = call <2 x i8> @llvm.vp.and.v2i8(<2 x i8> %va, <2 x i8> %vb, <2 x i1> %m, i32 %evl)
107 define <2 x i8> @vand_vi_v2i8_unmasked(<2 x i8> %va, i32 zeroext %evl) {
108 ; CHECK-LABEL: vand_vi_v2i8_unmasked:
110 ; CHECK-NEXT: vsetvli zero, a0, e8, mf8, ta, ma
111 ; CHECK-NEXT: vand.vi v8, v8, 4
113 %elt.head = insertelement <2 x i8> poison, i8 4, i32 0
114 %vb = shufflevector <2 x i8> %elt.head, <2 x i8> poison, <2 x i32> zeroinitializer
115 %head = insertelement <2 x i1> poison, i1 true, i32 0
116 %m = shufflevector <2 x i1> %head, <2 x i1> poison, <2 x i32> zeroinitializer
117 %v = call <2 x i8> @llvm.vp.and.v2i8(<2 x i8> %va, <2 x i8> %vb, <2 x i1> %m, i32 %evl)
121 declare <4 x i8> @llvm.vp.and.v4i8(<4 x i8>, <4 x i8>, <4 x i1>, i32)
123 define <4 x i8> @vand_vv_v4i8(<4 x i8> %va, <4 x i8> %b, <4 x i1> %m, i32 zeroext %evl) {
124 ; CHECK-LABEL: vand_vv_v4i8:
126 ; CHECK-NEXT: vsetvli zero, a0, e8, mf4, ta, ma
127 ; CHECK-NEXT: vand.vv v8, v8, v9, v0.t
129 %v = call <4 x i8> @llvm.vp.and.v4i8(<4 x i8> %va, <4 x i8> %b, <4 x i1> %m, i32 %evl)
133 define <4 x i8> @vand_vv_v4i8_unmasked(<4 x i8> %va, <4 x i8> %b, i32 zeroext %evl) {
134 ; CHECK-LABEL: vand_vv_v4i8_unmasked:
136 ; CHECK-NEXT: vsetvli zero, a0, e8, mf4, ta, ma
137 ; CHECK-NEXT: vand.vv v8, v8, v9
139 %head = insertelement <4 x i1> poison, i1 true, i32 0
140 %m = shufflevector <4 x i1> %head, <4 x i1> poison, <4 x i32> zeroinitializer
141 %v = call <4 x i8> @llvm.vp.and.v4i8(<4 x i8> %va, <4 x i8> %b, <4 x i1> %m, i32 %evl)
145 define <4 x i8> @vand_vx_v4i8(<4 x i8> %va, i8 %b, <4 x i1> %m, i32 zeroext %evl) {
146 ; CHECK-LABEL: vand_vx_v4i8:
148 ; CHECK-NEXT: vsetvli zero, a1, e8, mf4, ta, ma
149 ; CHECK-NEXT: vand.vx v8, v8, a0, v0.t
151 %elt.head = insertelement <4 x i8> poison, i8 %b, i32 0
152 %vb = shufflevector <4 x i8> %elt.head, <4 x i8> poison, <4 x i32> zeroinitializer
153 %v = call <4 x i8> @llvm.vp.and.v4i8(<4 x i8> %va, <4 x i8> %vb, <4 x i1> %m, i32 %evl)
157 define <4 x i8> @vand_vx_v4i8_unmasked(<4 x i8> %va, i8 %b, i32 zeroext %evl) {
158 ; CHECK-LABEL: vand_vx_v4i8_unmasked:
160 ; CHECK-NEXT: vsetvli zero, a1, e8, mf4, ta, ma
161 ; CHECK-NEXT: vand.vx v8, v8, a0
163 %elt.head = insertelement <4 x i8> poison, i8 %b, i32 0
164 %vb = shufflevector <4 x i8> %elt.head, <4 x i8> poison, <4 x i32> zeroinitializer
165 %head = insertelement <4 x i1> poison, i1 true, i32 0
166 %m = shufflevector <4 x i1> %head, <4 x i1> poison, <4 x i32> zeroinitializer
167 %v = call <4 x i8> @llvm.vp.and.v4i8(<4 x i8> %va, <4 x i8> %vb, <4 x i1> %m, i32 %evl)
171 define <4 x i8> @vand_vi_v4i8(<4 x i8> %va, <4 x i1> %m, i32 zeroext %evl) {
172 ; CHECK-LABEL: vand_vi_v4i8:
174 ; CHECK-NEXT: vsetvli zero, a0, e8, mf4, ta, ma
175 ; CHECK-NEXT: vand.vi v8, v8, 4, v0.t
177 %elt.head = insertelement <4 x i8> poison, i8 4, i32 0
178 %vb = shufflevector <4 x i8> %elt.head, <4 x i8> poison, <4 x i32> zeroinitializer
179 %v = call <4 x i8> @llvm.vp.and.v4i8(<4 x i8> %va, <4 x i8> %vb, <4 x i1> %m, i32 %evl)
183 define <4 x i8> @vand_vi_v4i8_unmasked(<4 x i8> %va, i32 zeroext %evl) {
184 ; CHECK-LABEL: vand_vi_v4i8_unmasked:
186 ; CHECK-NEXT: vsetvli zero, a0, e8, mf4, ta, ma
187 ; CHECK-NEXT: vand.vi v8, v8, 4
189 %elt.head = insertelement <4 x i8> poison, i8 4, i32 0
190 %vb = shufflevector <4 x i8> %elt.head, <4 x i8> poison, <4 x i32> zeroinitializer
191 %head = insertelement <4 x i1> poison, i1 true, i32 0
192 %m = shufflevector <4 x i1> %head, <4 x i1> poison, <4 x i32> zeroinitializer
193 %v = call <4 x i8> @llvm.vp.and.v4i8(<4 x i8> %va, <4 x i8> %vb, <4 x i1> %m, i32 %evl)
197 declare <8 x i8> @llvm.vp.and.v8i8(<8 x i8>, <8 x i8>, <8 x i1>, i32)
199 define <8 x i8> @vand_vv_v8i8(<8 x i8> %va, <8 x i8> %b, <8 x i1> %m, i32 zeroext %evl) {
200 ; CHECK-LABEL: vand_vv_v8i8:
202 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
203 ; CHECK-NEXT: vand.vv v8, v8, v9, v0.t
205 %v = call <8 x i8> @llvm.vp.and.v8i8(<8 x i8> %va, <8 x i8> %b, <8 x i1> %m, i32 %evl)
209 define <8 x i8> @vand_vv_v8i8_unmasked(<8 x i8> %va, <8 x i8> %b, i32 zeroext %evl) {
210 ; CHECK-LABEL: vand_vv_v8i8_unmasked:
212 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
213 ; CHECK-NEXT: vand.vv v8, v8, v9
215 %head = insertelement <8 x i1> poison, i1 true, i32 0
216 %m = shufflevector <8 x i1> %head, <8 x i1> poison, <8 x i32> zeroinitializer
217 %v = call <8 x i8> @llvm.vp.and.v8i8(<8 x i8> %va, <8 x i8> %b, <8 x i1> %m, i32 %evl)
221 define <8 x i8> @vand_vx_v8i8(<8 x i8> %va, i8 %b, <8 x i1> %m, i32 zeroext %evl) {
222 ; CHECK-LABEL: vand_vx_v8i8:
224 ; CHECK-NEXT: vsetvli zero, a1, e8, mf2, ta, ma
225 ; CHECK-NEXT: vand.vx v8, v8, a0, v0.t
227 %elt.head = insertelement <8 x i8> poison, i8 %b, i32 0
228 %vb = shufflevector <8 x i8> %elt.head, <8 x i8> poison, <8 x i32> zeroinitializer
229 %v = call <8 x i8> @llvm.vp.and.v8i8(<8 x i8> %va, <8 x i8> %vb, <8 x i1> %m, i32 %evl)
233 define <8 x i8> @vand_vx_v8i8_unmasked(<8 x i8> %va, i8 %b, i32 zeroext %evl) {
234 ; CHECK-LABEL: vand_vx_v8i8_unmasked:
236 ; CHECK-NEXT: vsetvli zero, a1, e8, mf2, ta, ma
237 ; CHECK-NEXT: vand.vx v8, v8, a0
239 %elt.head = insertelement <8 x i8> poison, i8 %b, i32 0
240 %vb = shufflevector <8 x i8> %elt.head, <8 x i8> poison, <8 x i32> zeroinitializer
241 %head = insertelement <8 x i1> poison, i1 true, i32 0
242 %m = shufflevector <8 x i1> %head, <8 x i1> poison, <8 x i32> zeroinitializer
243 %v = call <8 x i8> @llvm.vp.and.v8i8(<8 x i8> %va, <8 x i8> %vb, <8 x i1> %m, i32 %evl)
247 define <8 x i8> @vand_vi_v8i8(<8 x i8> %va, <8 x i1> %m, i32 zeroext %evl) {
248 ; CHECK-LABEL: vand_vi_v8i8:
250 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
251 ; CHECK-NEXT: vand.vi v8, v8, 4, v0.t
253 %elt.head = insertelement <8 x i8> poison, i8 4, i32 0
254 %vb = shufflevector <8 x i8> %elt.head, <8 x i8> poison, <8 x i32> zeroinitializer
255 %v = call <8 x i8> @llvm.vp.and.v8i8(<8 x i8> %va, <8 x i8> %vb, <8 x i1> %m, i32 %evl)
259 define <8 x i8> @vand_vi_v8i8_unmasked(<8 x i8> %va, i32 zeroext %evl) {
260 ; CHECK-LABEL: vand_vi_v8i8_unmasked:
262 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
263 ; CHECK-NEXT: vand.vi v8, v8, 4
265 %elt.head = insertelement <8 x i8> poison, i8 4, i32 0
266 %vb = shufflevector <8 x i8> %elt.head, <8 x i8> poison, <8 x i32> zeroinitializer
267 %head = insertelement <8 x i1> poison, i1 true, i32 0
268 %m = shufflevector <8 x i1> %head, <8 x i1> poison, <8 x i32> zeroinitializer
269 %v = call <8 x i8> @llvm.vp.and.v8i8(<8 x i8> %va, <8 x i8> %vb, <8 x i1> %m, i32 %evl)
273 declare <16 x i8> @llvm.vp.and.v16i8(<16 x i8>, <16 x i8>, <16 x i1>, i32)
275 define <16 x i8> @vand_vv_v16i8(<16 x i8> %va, <16 x i8> %b, <16 x i1> %m, i32 zeroext %evl) {
276 ; CHECK-LABEL: vand_vv_v16i8:
278 ; CHECK-NEXT: vsetvli zero, a0, e8, m1, ta, ma
279 ; CHECK-NEXT: vand.vv v8, v8, v9, v0.t
281 %v = call <16 x i8> @llvm.vp.and.v16i8(<16 x i8> %va, <16 x i8> %b, <16 x i1> %m, i32 %evl)
285 define <16 x i8> @vand_vv_v16i8_unmasked(<16 x i8> %va, <16 x i8> %b, i32 zeroext %evl) {
286 ; CHECK-LABEL: vand_vv_v16i8_unmasked:
288 ; CHECK-NEXT: vsetvli zero, a0, e8, m1, ta, ma
289 ; CHECK-NEXT: vand.vv v8, v8, v9
291 %head = insertelement <16 x i1> poison, i1 true, i32 0
292 %m = shufflevector <16 x i1> %head, <16 x i1> poison, <16 x i32> zeroinitializer
293 %v = call <16 x i8> @llvm.vp.and.v16i8(<16 x i8> %va, <16 x i8> %b, <16 x i1> %m, i32 %evl)
297 define <16 x i8> @vand_vx_v16i8(<16 x i8> %va, i8 %b, <16 x i1> %m, i32 zeroext %evl) {
298 ; CHECK-LABEL: vand_vx_v16i8:
300 ; CHECK-NEXT: vsetvli zero, a1, e8, m1, ta, ma
301 ; CHECK-NEXT: vand.vx v8, v8, a0, v0.t
303 %elt.head = insertelement <16 x i8> poison, i8 %b, i32 0
304 %vb = shufflevector <16 x i8> %elt.head, <16 x i8> poison, <16 x i32> zeroinitializer
305 %v = call <16 x i8> @llvm.vp.and.v16i8(<16 x i8> %va, <16 x i8> %vb, <16 x i1> %m, i32 %evl)
309 define <16 x i8> @vand_vx_v16i8_unmasked(<16 x i8> %va, i8 %b, i32 zeroext %evl) {
310 ; CHECK-LABEL: vand_vx_v16i8_unmasked:
312 ; CHECK-NEXT: vsetvli zero, a1, e8, m1, ta, ma
313 ; CHECK-NEXT: vand.vx v8, v8, a0
315 %elt.head = insertelement <16 x i8> poison, i8 %b, i32 0
316 %vb = shufflevector <16 x i8> %elt.head, <16 x i8> poison, <16 x i32> zeroinitializer
317 %head = insertelement <16 x i1> poison, i1 true, i32 0
318 %m = shufflevector <16 x i1> %head, <16 x i1> poison, <16 x i32> zeroinitializer
319 %v = call <16 x i8> @llvm.vp.and.v16i8(<16 x i8> %va, <16 x i8> %vb, <16 x i1> %m, i32 %evl)
323 define <16 x i8> @vand_vi_v16i8(<16 x i8> %va, <16 x i1> %m, i32 zeroext %evl) {
324 ; CHECK-LABEL: vand_vi_v16i8:
326 ; CHECK-NEXT: vsetvli zero, a0, e8, m1, ta, ma
327 ; CHECK-NEXT: vand.vi v8, v8, 4, v0.t
329 %elt.head = insertelement <16 x i8> poison, i8 4, i32 0
330 %vb = shufflevector <16 x i8> %elt.head, <16 x i8> poison, <16 x i32> zeroinitializer
331 %v = call <16 x i8> @llvm.vp.and.v16i8(<16 x i8> %va, <16 x i8> %vb, <16 x i1> %m, i32 %evl)
335 define <16 x i8> @vand_vi_v16i8_unmasked(<16 x i8> %va, i32 zeroext %evl) {
336 ; CHECK-LABEL: vand_vi_v16i8_unmasked:
338 ; CHECK-NEXT: vsetvli zero, a0, e8, m1, ta, ma
339 ; CHECK-NEXT: vand.vi v8, v8, 4
341 %elt.head = insertelement <16 x i8> poison, i8 4, i32 0
342 %vb = shufflevector <16 x i8> %elt.head, <16 x i8> poison, <16 x i32> zeroinitializer
343 %head = insertelement <16 x i1> poison, i1 true, i32 0
344 %m = shufflevector <16 x i1> %head, <16 x i1> poison, <16 x i32> zeroinitializer
345 %v = call <16 x i8> @llvm.vp.and.v16i8(<16 x i8> %va, <16 x i8> %vb, <16 x i1> %m, i32 %evl)
349 declare <2 x i16> @llvm.vp.and.v2i16(<2 x i16>, <2 x i16>, <2 x i1>, i32)
351 define <2 x i16> @vand_vv_v2i16(<2 x i16> %va, <2 x i16> %b, <2 x i1> %m, i32 zeroext %evl) {
352 ; CHECK-LABEL: vand_vv_v2i16:
354 ; CHECK-NEXT: vsetvli zero, a0, e16, mf4, ta, ma
355 ; CHECK-NEXT: vand.vv v8, v8, v9, v0.t
357 %v = call <2 x i16> @llvm.vp.and.v2i16(<2 x i16> %va, <2 x i16> %b, <2 x i1> %m, i32 %evl)
361 define <2 x i16> @vand_vv_v2i16_unmasked(<2 x i16> %va, <2 x i16> %b, i32 zeroext %evl) {
362 ; CHECK-LABEL: vand_vv_v2i16_unmasked:
364 ; CHECK-NEXT: vsetvli zero, a0, e16, mf4, ta, ma
365 ; CHECK-NEXT: vand.vv v8, v8, v9
367 %head = insertelement <2 x i1> poison, i1 true, i32 0
368 %m = shufflevector <2 x i1> %head, <2 x i1> poison, <2 x i32> zeroinitializer
369 %v = call <2 x i16> @llvm.vp.and.v2i16(<2 x i16> %va, <2 x i16> %b, <2 x i1> %m, i32 %evl)
373 define <2 x i16> @vand_vx_v2i16(<2 x i16> %va, i16 %b, <2 x i1> %m, i32 zeroext %evl) {
374 ; CHECK-LABEL: vand_vx_v2i16:
376 ; CHECK-NEXT: vsetvli zero, a1, e16, mf4, ta, ma
377 ; CHECK-NEXT: vand.vx v8, v8, a0, v0.t
379 %elt.head = insertelement <2 x i16> poison, i16 %b, i32 0
380 %vb = shufflevector <2 x i16> %elt.head, <2 x i16> poison, <2 x i32> zeroinitializer
381 %v = call <2 x i16> @llvm.vp.and.v2i16(<2 x i16> %va, <2 x i16> %vb, <2 x i1> %m, i32 %evl)
385 define <2 x i16> @vand_vx_v2i16_unmasked(<2 x i16> %va, i16 %b, i32 zeroext %evl) {
386 ; CHECK-LABEL: vand_vx_v2i16_unmasked:
388 ; CHECK-NEXT: vsetvli zero, a1, e16, mf4, ta, ma
389 ; CHECK-NEXT: vand.vx v8, v8, a0
391 %elt.head = insertelement <2 x i16> poison, i16 %b, i32 0
392 %vb = shufflevector <2 x i16> %elt.head, <2 x i16> poison, <2 x i32> zeroinitializer
393 %head = insertelement <2 x i1> poison, i1 true, i32 0
394 %m = shufflevector <2 x i1> %head, <2 x i1> poison, <2 x i32> zeroinitializer
395 %v = call <2 x i16> @llvm.vp.and.v2i16(<2 x i16> %va, <2 x i16> %vb, <2 x i1> %m, i32 %evl)
399 define <2 x i16> @vand_vi_v2i16(<2 x i16> %va, <2 x i1> %m, i32 zeroext %evl) {
400 ; CHECK-LABEL: vand_vi_v2i16:
402 ; CHECK-NEXT: vsetvli zero, a0, e16, mf4, ta, ma
403 ; CHECK-NEXT: vand.vi v8, v8, 4, v0.t
405 %elt.head = insertelement <2 x i16> poison, i16 4, i32 0
406 %vb = shufflevector <2 x i16> %elt.head, <2 x i16> poison, <2 x i32> zeroinitializer
407 %v = call <2 x i16> @llvm.vp.and.v2i16(<2 x i16> %va, <2 x i16> %vb, <2 x i1> %m, i32 %evl)
411 define <2 x i16> @vand_vi_v2i16_unmasked(<2 x i16> %va, i32 zeroext %evl) {
412 ; CHECK-LABEL: vand_vi_v2i16_unmasked:
414 ; CHECK-NEXT: vsetvli zero, a0, e16, mf4, ta, ma
415 ; CHECK-NEXT: vand.vi v8, v8, 4
417 %elt.head = insertelement <2 x i16> poison, i16 4, i32 0
418 %vb = shufflevector <2 x i16> %elt.head, <2 x i16> poison, <2 x i32> zeroinitializer
419 %head = insertelement <2 x i1> poison, i1 true, i32 0
420 %m = shufflevector <2 x i1> %head, <2 x i1> poison, <2 x i32> zeroinitializer
421 %v = call <2 x i16> @llvm.vp.and.v2i16(<2 x i16> %va, <2 x i16> %vb, <2 x i1> %m, i32 %evl)
425 declare <4 x i16> @llvm.vp.and.v4i16(<4 x i16>, <4 x i16>, <4 x i1>, i32)
427 define <4 x i16> @vand_vv_v4i16(<4 x i16> %va, <4 x i16> %b, <4 x i1> %m, i32 zeroext %evl) {
428 ; CHECK-LABEL: vand_vv_v4i16:
430 ; CHECK-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
431 ; CHECK-NEXT: vand.vv v8, v8, v9, v0.t
433 %v = call <4 x i16> @llvm.vp.and.v4i16(<4 x i16> %va, <4 x i16> %b, <4 x i1> %m, i32 %evl)
437 define <4 x i16> @vand_vv_v4i16_unmasked(<4 x i16> %va, <4 x i16> %b, i32 zeroext %evl) {
438 ; CHECK-LABEL: vand_vv_v4i16_unmasked:
440 ; CHECK-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
441 ; CHECK-NEXT: vand.vv v8, v8, v9
443 %head = insertelement <4 x i1> poison, i1 true, i32 0
444 %m = shufflevector <4 x i1> %head, <4 x i1> poison, <4 x i32> zeroinitializer
445 %v = call <4 x i16> @llvm.vp.and.v4i16(<4 x i16> %va, <4 x i16> %b, <4 x i1> %m, i32 %evl)
449 define <4 x i16> @vand_vx_v4i16(<4 x i16> %va, i16 %b, <4 x i1> %m, i32 zeroext %evl) {
450 ; CHECK-LABEL: vand_vx_v4i16:
452 ; CHECK-NEXT: vsetvli zero, a1, e16, mf2, ta, ma
453 ; CHECK-NEXT: vand.vx v8, v8, a0, v0.t
455 %elt.head = insertelement <4 x i16> poison, i16 %b, i32 0
456 %vb = shufflevector <4 x i16> %elt.head, <4 x i16> poison, <4 x i32> zeroinitializer
457 %v = call <4 x i16> @llvm.vp.and.v4i16(<4 x i16> %va, <4 x i16> %vb, <4 x i1> %m, i32 %evl)
461 define <4 x i16> @vand_vx_v4i16_unmasked(<4 x i16> %va, i16 %b, i32 zeroext %evl) {
462 ; CHECK-LABEL: vand_vx_v4i16_unmasked:
464 ; CHECK-NEXT: vsetvli zero, a1, e16, mf2, ta, ma
465 ; CHECK-NEXT: vand.vx v8, v8, a0
467 %elt.head = insertelement <4 x i16> poison, i16 %b, i32 0
468 %vb = shufflevector <4 x i16> %elt.head, <4 x i16> poison, <4 x i32> zeroinitializer
469 %head = insertelement <4 x i1> poison, i1 true, i32 0
470 %m = shufflevector <4 x i1> %head, <4 x i1> poison, <4 x i32> zeroinitializer
471 %v = call <4 x i16> @llvm.vp.and.v4i16(<4 x i16> %va, <4 x i16> %vb, <4 x i1> %m, i32 %evl)
475 define <4 x i16> @vand_vi_v4i16(<4 x i16> %va, <4 x i1> %m, i32 zeroext %evl) {
476 ; CHECK-LABEL: vand_vi_v4i16:
478 ; CHECK-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
479 ; CHECK-NEXT: vand.vi v8, v8, 4, v0.t
481 %elt.head = insertelement <4 x i16> poison, i16 4, i32 0
482 %vb = shufflevector <4 x i16> %elt.head, <4 x i16> poison, <4 x i32> zeroinitializer
483 %v = call <4 x i16> @llvm.vp.and.v4i16(<4 x i16> %va, <4 x i16> %vb, <4 x i1> %m, i32 %evl)
487 define <4 x i16> @vand_vi_v4i16_unmasked(<4 x i16> %va, i32 zeroext %evl) {
488 ; CHECK-LABEL: vand_vi_v4i16_unmasked:
490 ; CHECK-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
491 ; CHECK-NEXT: vand.vi v8, v8, 4
493 %elt.head = insertelement <4 x i16> poison, i16 4, i32 0
494 %vb = shufflevector <4 x i16> %elt.head, <4 x i16> poison, <4 x i32> zeroinitializer
495 %head = insertelement <4 x i1> poison, i1 true, i32 0
496 %m = shufflevector <4 x i1> %head, <4 x i1> poison, <4 x i32> zeroinitializer
497 %v = call <4 x i16> @llvm.vp.and.v4i16(<4 x i16> %va, <4 x i16> %vb, <4 x i1> %m, i32 %evl)
501 declare <8 x i16> @llvm.vp.and.v8i16(<8 x i16>, <8 x i16>, <8 x i1>, i32)
503 define <8 x i16> @vand_vv_v8i16(<8 x i16> %va, <8 x i16> %b, <8 x i1> %m, i32 zeroext %evl) {
504 ; CHECK-LABEL: vand_vv_v8i16:
506 ; CHECK-NEXT: vsetvli zero, a0, e16, m1, ta, ma
507 ; CHECK-NEXT: vand.vv v8, v8, v9, v0.t
509 %v = call <8 x i16> @llvm.vp.and.v8i16(<8 x i16> %va, <8 x i16> %b, <8 x i1> %m, i32 %evl)
513 define <8 x i16> @vand_vv_v8i16_unmasked(<8 x i16> %va, <8 x i16> %b, i32 zeroext %evl) {
514 ; CHECK-LABEL: vand_vv_v8i16_unmasked:
516 ; CHECK-NEXT: vsetvli zero, a0, e16, m1, ta, ma
517 ; CHECK-NEXT: vand.vv v8, v8, v9
519 %head = insertelement <8 x i1> poison, i1 true, i32 0
520 %m = shufflevector <8 x i1> %head, <8 x i1> poison, <8 x i32> zeroinitializer
521 %v = call <8 x i16> @llvm.vp.and.v8i16(<8 x i16> %va, <8 x i16> %b, <8 x i1> %m, i32 %evl)
525 define <8 x i16> @vand_vx_v8i16(<8 x i16> %va, i16 %b, <8 x i1> %m, i32 zeroext %evl) {
526 ; CHECK-LABEL: vand_vx_v8i16:
528 ; CHECK-NEXT: vsetvli zero, a1, e16, m1, ta, ma
529 ; CHECK-NEXT: vand.vx v8, v8, a0, v0.t
531 %elt.head = insertelement <8 x i16> poison, i16 %b, i32 0
532 %vb = shufflevector <8 x i16> %elt.head, <8 x i16> poison, <8 x i32> zeroinitializer
533 %v = call <8 x i16> @llvm.vp.and.v8i16(<8 x i16> %va, <8 x i16> %vb, <8 x i1> %m, i32 %evl)
537 define <8 x i16> @vand_vx_v8i16_unmasked(<8 x i16> %va, i16 %b, i32 zeroext %evl) {
538 ; CHECK-LABEL: vand_vx_v8i16_unmasked:
540 ; CHECK-NEXT: vsetvli zero, a1, e16, m1, ta, ma
541 ; CHECK-NEXT: vand.vx v8, v8, a0
543 %elt.head = insertelement <8 x i16> poison, i16 %b, i32 0
544 %vb = shufflevector <8 x i16> %elt.head, <8 x i16> poison, <8 x i32> zeroinitializer
545 %head = insertelement <8 x i1> poison, i1 true, i32 0
546 %m = shufflevector <8 x i1> %head, <8 x i1> poison, <8 x i32> zeroinitializer
547 %v = call <8 x i16> @llvm.vp.and.v8i16(<8 x i16> %va, <8 x i16> %vb, <8 x i1> %m, i32 %evl)
551 define <8 x i16> @vand_vi_v8i16(<8 x i16> %va, <8 x i1> %m, i32 zeroext %evl) {
552 ; CHECK-LABEL: vand_vi_v8i16:
554 ; CHECK-NEXT: vsetvli zero, a0, e16, m1, ta, ma
555 ; CHECK-NEXT: vand.vi v8, v8, 4, v0.t
557 %elt.head = insertelement <8 x i16> poison, i16 4, i32 0
558 %vb = shufflevector <8 x i16> %elt.head, <8 x i16> poison, <8 x i32> zeroinitializer
559 %v = call <8 x i16> @llvm.vp.and.v8i16(<8 x i16> %va, <8 x i16> %vb, <8 x i1> %m, i32 %evl)
563 define <8 x i16> @vand_vi_v8i16_unmasked(<8 x i16> %va, i32 zeroext %evl) {
564 ; CHECK-LABEL: vand_vi_v8i16_unmasked:
566 ; CHECK-NEXT: vsetvli zero, a0, e16, m1, ta, ma
567 ; CHECK-NEXT: vand.vi v8, v8, 4
569 %elt.head = insertelement <8 x i16> poison, i16 4, i32 0
570 %vb = shufflevector <8 x i16> %elt.head, <8 x i16> poison, <8 x i32> zeroinitializer
571 %head = insertelement <8 x i1> poison, i1 true, i32 0
572 %m = shufflevector <8 x i1> %head, <8 x i1> poison, <8 x i32> zeroinitializer
573 %v = call <8 x i16> @llvm.vp.and.v8i16(<8 x i16> %va, <8 x i16> %vb, <8 x i1> %m, i32 %evl)
577 declare <16 x i16> @llvm.vp.and.v16i16(<16 x i16>, <16 x i16>, <16 x i1>, i32)
579 define <16 x i16> @vand_vv_v16i16(<16 x i16> %va, <16 x i16> %b, <16 x i1> %m, i32 zeroext %evl) {
580 ; CHECK-LABEL: vand_vv_v16i16:
582 ; CHECK-NEXT: vsetvli zero, a0, e16, m2, ta, ma
583 ; CHECK-NEXT: vand.vv v8, v8, v10, v0.t
585 %v = call <16 x i16> @llvm.vp.and.v16i16(<16 x i16> %va, <16 x i16> %b, <16 x i1> %m, i32 %evl)
589 define <16 x i16> @vand_vv_v16i16_unmasked(<16 x i16> %va, <16 x i16> %b, i32 zeroext %evl) {
590 ; CHECK-LABEL: vand_vv_v16i16_unmasked:
592 ; CHECK-NEXT: vsetvli zero, a0, e16, m2, ta, ma
593 ; CHECK-NEXT: vand.vv v8, v8, v10
595 %head = insertelement <16 x i1> poison, i1 true, i32 0
596 %m = shufflevector <16 x i1> %head, <16 x i1> poison, <16 x i32> zeroinitializer
597 %v = call <16 x i16> @llvm.vp.and.v16i16(<16 x i16> %va, <16 x i16> %b, <16 x i1> %m, i32 %evl)
601 define <16 x i16> @vand_vx_v16i16(<16 x i16> %va, i16 %b, <16 x i1> %m, i32 zeroext %evl) {
602 ; CHECK-LABEL: vand_vx_v16i16:
604 ; CHECK-NEXT: vsetvli zero, a1, e16, m2, ta, ma
605 ; CHECK-NEXT: vand.vx v8, v8, a0, v0.t
607 %elt.head = insertelement <16 x i16> poison, i16 %b, i32 0
608 %vb = shufflevector <16 x i16> %elt.head, <16 x i16> poison, <16 x i32> zeroinitializer
609 %v = call <16 x i16> @llvm.vp.and.v16i16(<16 x i16> %va, <16 x i16> %vb, <16 x i1> %m, i32 %evl)
613 define <16 x i16> @vand_vx_v16i16_unmasked(<16 x i16> %va, i16 %b, i32 zeroext %evl) {
614 ; CHECK-LABEL: vand_vx_v16i16_unmasked:
616 ; CHECK-NEXT: vsetvli zero, a1, e16, m2, ta, ma
617 ; CHECK-NEXT: vand.vx v8, v8, a0
619 %elt.head = insertelement <16 x i16> poison, i16 %b, i32 0
620 %vb = shufflevector <16 x i16> %elt.head, <16 x i16> poison, <16 x i32> zeroinitializer
621 %head = insertelement <16 x i1> poison, i1 true, i32 0
622 %m = shufflevector <16 x i1> %head, <16 x i1> poison, <16 x i32> zeroinitializer
623 %v = call <16 x i16> @llvm.vp.and.v16i16(<16 x i16> %va, <16 x i16> %vb, <16 x i1> %m, i32 %evl)
627 define <16 x i16> @vand_vi_v16i16(<16 x i16> %va, <16 x i1> %m, i32 zeroext %evl) {
628 ; CHECK-LABEL: vand_vi_v16i16:
630 ; CHECK-NEXT: vsetvli zero, a0, e16, m2, ta, ma
631 ; CHECK-NEXT: vand.vi v8, v8, 4, v0.t
633 %elt.head = insertelement <16 x i16> poison, i16 4, i32 0
634 %vb = shufflevector <16 x i16> %elt.head, <16 x i16> poison, <16 x i32> zeroinitializer
635 %v = call <16 x i16> @llvm.vp.and.v16i16(<16 x i16> %va, <16 x i16> %vb, <16 x i1> %m, i32 %evl)
639 define <16 x i16> @vand_vi_v16i16_unmasked(<16 x i16> %va, i32 zeroext %evl) {
640 ; CHECK-LABEL: vand_vi_v16i16_unmasked:
642 ; CHECK-NEXT: vsetvli zero, a0, e16, m2, ta, ma
643 ; CHECK-NEXT: vand.vi v8, v8, 4
645 %elt.head = insertelement <16 x i16> poison, i16 4, i32 0
646 %vb = shufflevector <16 x i16> %elt.head, <16 x i16> poison, <16 x i32> zeroinitializer
647 %head = insertelement <16 x i1> poison, i1 true, i32 0
648 %m = shufflevector <16 x i1> %head, <16 x i1> poison, <16 x i32> zeroinitializer
649 %v = call <16 x i16> @llvm.vp.and.v16i16(<16 x i16> %va, <16 x i16> %vb, <16 x i1> %m, i32 %evl)
653 declare <2 x i32> @llvm.vp.and.v2i32(<2 x i32>, <2 x i32>, <2 x i1>, i32)
655 define <2 x i32> @vand_vv_v2i32(<2 x i32> %va, <2 x i32> %b, <2 x i1> %m, i32 zeroext %evl) {
656 ; CHECK-LABEL: vand_vv_v2i32:
658 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
659 ; CHECK-NEXT: vand.vv v8, v8, v9, v0.t
661 %v = call <2 x i32> @llvm.vp.and.v2i32(<2 x i32> %va, <2 x i32> %b, <2 x i1> %m, i32 %evl)
665 define <2 x i32> @vand_vv_v2i32_unmasked(<2 x i32> %va, <2 x i32> %b, i32 zeroext %evl) {
666 ; CHECK-LABEL: vand_vv_v2i32_unmasked:
668 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
669 ; CHECK-NEXT: vand.vv v8, v8, v9
671 %head = insertelement <2 x i1> poison, i1 true, i32 0
672 %m = shufflevector <2 x i1> %head, <2 x i1> poison, <2 x i32> zeroinitializer
673 %v = call <2 x i32> @llvm.vp.and.v2i32(<2 x i32> %va, <2 x i32> %b, <2 x i1> %m, i32 %evl)
677 define <2 x i32> @vand_vx_v2i32(<2 x i32> %va, i32 %b, <2 x i1> %m, i32 zeroext %evl) {
678 ; CHECK-LABEL: vand_vx_v2i32:
680 ; CHECK-NEXT: vsetvli zero, a1, e32, mf2, ta, ma
681 ; CHECK-NEXT: vand.vx v8, v8, a0, v0.t
683 %elt.head = insertelement <2 x i32> poison, i32 %b, i32 0
684 %vb = shufflevector <2 x i32> %elt.head, <2 x i32> poison, <2 x i32> zeroinitializer
685 %v = call <2 x i32> @llvm.vp.and.v2i32(<2 x i32> %va, <2 x i32> %vb, <2 x i1> %m, i32 %evl)
689 define <2 x i32> @vand_vx_v2i32_unmasked(<2 x i32> %va, i32 %b, i32 zeroext %evl) {
690 ; CHECK-LABEL: vand_vx_v2i32_unmasked:
692 ; CHECK-NEXT: vsetvli zero, a1, e32, mf2, ta, ma
693 ; CHECK-NEXT: vand.vx v8, v8, a0
695 %elt.head = insertelement <2 x i32> poison, i32 %b, i32 0
696 %vb = shufflevector <2 x i32> %elt.head, <2 x i32> poison, <2 x i32> zeroinitializer
697 %head = insertelement <2 x i1> poison, i1 true, i32 0
698 %m = shufflevector <2 x i1> %head, <2 x i1> poison, <2 x i32> zeroinitializer
699 %v = call <2 x i32> @llvm.vp.and.v2i32(<2 x i32> %va, <2 x i32> %vb, <2 x i1> %m, i32 %evl)
703 define <2 x i32> @vand_vi_v2i32(<2 x i32> %va, <2 x i1> %m, i32 zeroext %evl) {
704 ; CHECK-LABEL: vand_vi_v2i32:
706 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
707 ; CHECK-NEXT: vand.vi v8, v8, 4, v0.t
709 %elt.head = insertelement <2 x i32> poison, i32 4, i32 0
710 %vb = shufflevector <2 x i32> %elt.head, <2 x i32> poison, <2 x i32> zeroinitializer
711 %v = call <2 x i32> @llvm.vp.and.v2i32(<2 x i32> %va, <2 x i32> %vb, <2 x i1> %m, i32 %evl)
715 define <2 x i32> @vand_vi_v2i32_unmasked(<2 x i32> %va, i32 zeroext %evl) {
716 ; CHECK-LABEL: vand_vi_v2i32_unmasked:
718 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
719 ; CHECK-NEXT: vand.vi v8, v8, 4
721 %elt.head = insertelement <2 x i32> poison, i32 4, i32 0
722 %vb = shufflevector <2 x i32> %elt.head, <2 x i32> poison, <2 x i32> zeroinitializer
723 %head = insertelement <2 x i1> poison, i1 true, i32 0
724 %m = shufflevector <2 x i1> %head, <2 x i1> poison, <2 x i32> zeroinitializer
725 %v = call <2 x i32> @llvm.vp.and.v2i32(<2 x i32> %va, <2 x i32> %vb, <2 x i1> %m, i32 %evl)
729 declare <4 x i32> @llvm.vp.and.v4i32(<4 x i32>, <4 x i32>, <4 x i1>, i32)
731 define <4 x i32> @vand_vv_v4i32(<4 x i32> %va, <4 x i32> %b, <4 x i1> %m, i32 zeroext %evl) {
732 ; CHECK-LABEL: vand_vv_v4i32:
734 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, ma
735 ; CHECK-NEXT: vand.vv v8, v8, v9, v0.t
737 %v = call <4 x i32> @llvm.vp.and.v4i32(<4 x i32> %va, <4 x i32> %b, <4 x i1> %m, i32 %evl)
741 define <4 x i32> @vand_vv_v4i32_unmasked(<4 x i32> %va, <4 x i32> %b, i32 zeroext %evl) {
742 ; CHECK-LABEL: vand_vv_v4i32_unmasked:
744 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, ma
745 ; CHECK-NEXT: vand.vv v8, v8, v9
747 %head = insertelement <4 x i1> poison, i1 true, i32 0
748 %m = shufflevector <4 x i1> %head, <4 x i1> poison, <4 x i32> zeroinitializer
749 %v = call <4 x i32> @llvm.vp.and.v4i32(<4 x i32> %va, <4 x i32> %b, <4 x i1> %m, i32 %evl)
753 define <4 x i32> @vand_vx_v4i32(<4 x i32> %va, i32 %b, <4 x i1> %m, i32 zeroext %evl) {
754 ; CHECK-LABEL: vand_vx_v4i32:
756 ; CHECK-NEXT: vsetvli zero, a1, e32, m1, ta, ma
757 ; CHECK-NEXT: vand.vx v8, v8, a0, v0.t
759 %elt.head = insertelement <4 x i32> poison, i32 %b, i32 0
760 %vb = shufflevector <4 x i32> %elt.head, <4 x i32> poison, <4 x i32> zeroinitializer
761 %v = call <4 x i32> @llvm.vp.and.v4i32(<4 x i32> %va, <4 x i32> %vb, <4 x i1> %m, i32 %evl)
765 define <4 x i32> @vand_vx_v4i32_unmasked(<4 x i32> %va, i32 %b, i32 zeroext %evl) {
766 ; CHECK-LABEL: vand_vx_v4i32_unmasked:
768 ; CHECK-NEXT: vsetvli zero, a1, e32, m1, ta, ma
769 ; CHECK-NEXT: vand.vx v8, v8, a0
771 %elt.head = insertelement <4 x i32> poison, i32 %b, i32 0
772 %vb = shufflevector <4 x i32> %elt.head, <4 x i32> poison, <4 x i32> zeroinitializer
773 %head = insertelement <4 x i1> poison, i1 true, i32 0
774 %m = shufflevector <4 x i1> %head, <4 x i1> poison, <4 x i32> zeroinitializer
775 %v = call <4 x i32> @llvm.vp.and.v4i32(<4 x i32> %va, <4 x i32> %vb, <4 x i1> %m, i32 %evl)
779 define <4 x i32> @vand_vi_v4i32(<4 x i32> %va, <4 x i1> %m, i32 zeroext %evl) {
780 ; CHECK-LABEL: vand_vi_v4i32:
782 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, ma
783 ; CHECK-NEXT: vand.vi v8, v8, 4, v0.t
785 %elt.head = insertelement <4 x i32> poison, i32 4, i32 0
786 %vb = shufflevector <4 x i32> %elt.head, <4 x i32> poison, <4 x i32> zeroinitializer
787 %v = call <4 x i32> @llvm.vp.and.v4i32(<4 x i32> %va, <4 x i32> %vb, <4 x i1> %m, i32 %evl)
791 define <4 x i32> @vand_vi_v4i32_unmasked(<4 x i32> %va, i32 zeroext %evl) {
792 ; CHECK-LABEL: vand_vi_v4i32_unmasked:
794 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, ma
795 ; CHECK-NEXT: vand.vi v8, v8, 4
797 %elt.head = insertelement <4 x i32> poison, i32 4, i32 0
798 %vb = shufflevector <4 x i32> %elt.head, <4 x i32> poison, <4 x i32> zeroinitializer
799 %head = insertelement <4 x i1> poison, i1 true, i32 0
800 %m = shufflevector <4 x i1> %head, <4 x i1> poison, <4 x i32> zeroinitializer
801 %v = call <4 x i32> @llvm.vp.and.v4i32(<4 x i32> %va, <4 x i32> %vb, <4 x i1> %m, i32 %evl)
805 declare <8 x i32> @llvm.vp.and.v8i32(<8 x i32>, <8 x i32>, <8 x i1>, i32)
807 define <8 x i32> @vand_vv_v8i32(<8 x i32> %va, <8 x i32> %b, <8 x i1> %m, i32 zeroext %evl) {
808 ; CHECK-LABEL: vand_vv_v8i32:
810 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
811 ; CHECK-NEXT: vand.vv v8, v8, v10, v0.t
813 %v = call <8 x i32> @llvm.vp.and.v8i32(<8 x i32> %va, <8 x i32> %b, <8 x i1> %m, i32 %evl)
817 define <8 x i32> @vand_vv_v8i32_unmasked(<8 x i32> %va, <8 x i32> %b, i32 zeroext %evl) {
818 ; CHECK-LABEL: vand_vv_v8i32_unmasked:
820 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
821 ; CHECK-NEXT: vand.vv v8, v8, v10
823 %head = insertelement <8 x i1> poison, i1 true, i32 0
824 %m = shufflevector <8 x i1> %head, <8 x i1> poison, <8 x i32> zeroinitializer
825 %v = call <8 x i32> @llvm.vp.and.v8i32(<8 x i32> %va, <8 x i32> %b, <8 x i1> %m, i32 %evl)
829 define <8 x i32> @vand_vx_v8i32(<8 x i32> %va, i32 %b, <8 x i1> %m, i32 zeroext %evl) {
830 ; CHECK-LABEL: vand_vx_v8i32:
832 ; CHECK-NEXT: vsetvli zero, a1, e32, m2, ta, ma
833 ; CHECK-NEXT: vand.vx v8, v8, a0, v0.t
835 %elt.head = insertelement <8 x i32> poison, i32 %b, i32 0
836 %vb = shufflevector <8 x i32> %elt.head, <8 x i32> poison, <8 x i32> zeroinitializer
837 %v = call <8 x i32> @llvm.vp.and.v8i32(<8 x i32> %va, <8 x i32> %vb, <8 x i1> %m, i32 %evl)
841 define <8 x i32> @vand_vx_v8i32_unmasked(<8 x i32> %va, i32 %b, i32 zeroext %evl) {
842 ; CHECK-LABEL: vand_vx_v8i32_unmasked:
844 ; CHECK-NEXT: vsetvli zero, a1, e32, m2, ta, ma
845 ; CHECK-NEXT: vand.vx v8, v8, a0
847 %elt.head = insertelement <8 x i32> poison, i32 %b, i32 0
848 %vb = shufflevector <8 x i32> %elt.head, <8 x i32> poison, <8 x i32> zeroinitializer
849 %head = insertelement <8 x i1> poison, i1 true, i32 0
850 %m = shufflevector <8 x i1> %head, <8 x i1> poison, <8 x i32> zeroinitializer
851 %v = call <8 x i32> @llvm.vp.and.v8i32(<8 x i32> %va, <8 x i32> %vb, <8 x i1> %m, i32 %evl)
855 define <8 x i32> @vand_vi_v8i32(<8 x i32> %va, <8 x i1> %m, i32 zeroext %evl) {
856 ; CHECK-LABEL: vand_vi_v8i32:
858 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
859 ; CHECK-NEXT: vand.vi v8, v8, 4, v0.t
861 %elt.head = insertelement <8 x i32> poison, i32 4, i32 0
862 %vb = shufflevector <8 x i32> %elt.head, <8 x i32> poison, <8 x i32> zeroinitializer
863 %v = call <8 x i32> @llvm.vp.and.v8i32(<8 x i32> %va, <8 x i32> %vb, <8 x i1> %m, i32 %evl)
867 define <8 x i32> @vand_vi_v8i32_unmasked(<8 x i32> %va, i32 zeroext %evl) {
868 ; CHECK-LABEL: vand_vi_v8i32_unmasked:
870 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
871 ; CHECK-NEXT: vand.vi v8, v8, 4
873 %elt.head = insertelement <8 x i32> poison, i32 4, i32 0
874 %vb = shufflevector <8 x i32> %elt.head, <8 x i32> poison, <8 x i32> zeroinitializer
875 %head = insertelement <8 x i1> poison, i1 true, i32 0
876 %m = shufflevector <8 x i1> %head, <8 x i1> poison, <8 x i32> zeroinitializer
877 %v = call <8 x i32> @llvm.vp.and.v8i32(<8 x i32> %va, <8 x i32> %vb, <8 x i1> %m, i32 %evl)
881 declare <16 x i32> @llvm.vp.and.v16i32(<16 x i32>, <16 x i32>, <16 x i1>, i32)
883 define <16 x i32> @vand_vv_v16i32(<16 x i32> %va, <16 x i32> %b, <16 x i1> %m, i32 zeroext %evl) {
884 ; CHECK-LABEL: vand_vv_v16i32:
886 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
887 ; CHECK-NEXT: vand.vv v8, v8, v12, v0.t
889 %v = call <16 x i32> @llvm.vp.and.v16i32(<16 x i32> %va, <16 x i32> %b, <16 x i1> %m, i32 %evl)
893 define <16 x i32> @vand_vv_v16i32_unmasked(<16 x i32> %va, <16 x i32> %b, i32 zeroext %evl) {
894 ; CHECK-LABEL: vand_vv_v16i32_unmasked:
896 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
897 ; CHECK-NEXT: vand.vv v8, v8, v12
899 %head = insertelement <16 x i1> poison, i1 true, i32 0
900 %m = shufflevector <16 x i1> %head, <16 x i1> poison, <16 x i32> zeroinitializer
901 %v = call <16 x i32> @llvm.vp.and.v16i32(<16 x i32> %va, <16 x i32> %b, <16 x i1> %m, i32 %evl)
905 define <16 x i32> @vand_vx_v16i32(<16 x i32> %va, i32 %b, <16 x i1> %m, i32 zeroext %evl) {
906 ; CHECK-LABEL: vand_vx_v16i32:
908 ; CHECK-NEXT: vsetvli zero, a1, e32, m4, ta, ma
909 ; CHECK-NEXT: vand.vx v8, v8, a0, v0.t
911 %elt.head = insertelement <16 x i32> poison, i32 %b, i32 0
912 %vb = shufflevector <16 x i32> %elt.head, <16 x i32> poison, <16 x i32> zeroinitializer
913 %v = call <16 x i32> @llvm.vp.and.v16i32(<16 x i32> %va, <16 x i32> %vb, <16 x i1> %m, i32 %evl)
917 define <16 x i32> @vand_vx_v16i32_unmasked(<16 x i32> %va, i32 %b, i32 zeroext %evl) {
918 ; CHECK-LABEL: vand_vx_v16i32_unmasked:
920 ; CHECK-NEXT: vsetvli zero, a1, e32, m4, ta, ma
921 ; CHECK-NEXT: vand.vx v8, v8, a0
923 %elt.head = insertelement <16 x i32> poison, i32 %b, i32 0
924 %vb = shufflevector <16 x i32> %elt.head, <16 x i32> poison, <16 x i32> zeroinitializer
925 %head = insertelement <16 x i1> poison, i1 true, i32 0
926 %m = shufflevector <16 x i1> %head, <16 x i1> poison, <16 x i32> zeroinitializer
927 %v = call <16 x i32> @llvm.vp.and.v16i32(<16 x i32> %va, <16 x i32> %vb, <16 x i1> %m, i32 %evl)
931 define <16 x i32> @vand_vi_v16i32(<16 x i32> %va, <16 x i1> %m, i32 zeroext %evl) {
932 ; CHECK-LABEL: vand_vi_v16i32:
934 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
935 ; CHECK-NEXT: vand.vi v8, v8, 4, v0.t
937 %elt.head = insertelement <16 x i32> poison, i32 4, i32 0
938 %vb = shufflevector <16 x i32> %elt.head, <16 x i32> poison, <16 x i32> zeroinitializer
939 %v = call <16 x i32> @llvm.vp.and.v16i32(<16 x i32> %va, <16 x i32> %vb, <16 x i1> %m, i32 %evl)
943 define <16 x i32> @vand_vi_v16i32_unmasked(<16 x i32> %va, i32 zeroext %evl) {
944 ; CHECK-LABEL: vand_vi_v16i32_unmasked:
946 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
947 ; CHECK-NEXT: vand.vi v8, v8, 4
949 %elt.head = insertelement <16 x i32> poison, i32 4, i32 0
950 %vb = shufflevector <16 x i32> %elt.head, <16 x i32> poison, <16 x i32> zeroinitializer
951 %head = insertelement <16 x i1> poison, i1 true, i32 0
952 %m = shufflevector <16 x i1> %head, <16 x i1> poison, <16 x i32> zeroinitializer
953 %v = call <16 x i32> @llvm.vp.and.v16i32(<16 x i32> %va, <16 x i32> %vb, <16 x i1> %m, i32 %evl)
957 declare <2 x i64> @llvm.vp.and.v2i64(<2 x i64>, <2 x i64>, <2 x i1>, i32)
959 define <2 x i64> @vand_vv_v2i64(<2 x i64> %va, <2 x i64> %b, <2 x i1> %m, i32 zeroext %evl) {
960 ; CHECK-LABEL: vand_vv_v2i64:
962 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
963 ; CHECK-NEXT: vand.vv v8, v8, v9, v0.t
965 %v = call <2 x i64> @llvm.vp.and.v2i64(<2 x i64> %va, <2 x i64> %b, <2 x i1> %m, i32 %evl)
969 define <2 x i64> @vand_vv_v2i64_unmasked(<2 x i64> %va, <2 x i64> %b, i32 zeroext %evl) {
970 ; CHECK-LABEL: vand_vv_v2i64_unmasked:
972 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
973 ; CHECK-NEXT: vand.vv v8, v8, v9
975 %head = insertelement <2 x i1> poison, i1 true, i32 0
976 %m = shufflevector <2 x i1> %head, <2 x i1> poison, <2 x i32> zeroinitializer
977 %v = call <2 x i64> @llvm.vp.and.v2i64(<2 x i64> %va, <2 x i64> %b, <2 x i1> %m, i32 %evl)
981 define <2 x i64> @vand_vx_v2i64(<2 x i64> %va, i64 %b, <2 x i1> %m, i32 zeroext %evl) {
982 ; RV32-LABEL: vand_vx_v2i64:
984 ; RV32-NEXT: addi sp, sp, -16
985 ; RV32-NEXT: .cfi_def_cfa_offset 16
986 ; RV32-NEXT: sw a1, 12(sp)
987 ; RV32-NEXT: sw a0, 8(sp)
988 ; RV32-NEXT: addi a0, sp, 8
989 ; RV32-NEXT: vsetivli zero, 2, e64, m1, ta, ma
990 ; RV32-NEXT: vlse64.v v9, (a0), zero
991 ; RV32-NEXT: vsetvli zero, a2, e64, m1, ta, ma
992 ; RV32-NEXT: vand.vv v8, v8, v9, v0.t
993 ; RV32-NEXT: addi sp, sp, 16
996 ; RV64-LABEL: vand_vx_v2i64:
998 ; RV64-NEXT: vsetvli zero, a1, e64, m1, ta, ma
999 ; RV64-NEXT: vand.vx v8, v8, a0, v0.t
1001 %elt.head = insertelement <2 x i64> poison, i64 %b, i32 0
1002 %vb = shufflevector <2 x i64> %elt.head, <2 x i64> poison, <2 x i32> zeroinitializer
1003 %v = call <2 x i64> @llvm.vp.and.v2i64(<2 x i64> %va, <2 x i64> %vb, <2 x i1> %m, i32 %evl)
1007 define <2 x i64> @vand_vx_v2i64_unmasked(<2 x i64> %va, i64 %b, i32 zeroext %evl) {
1008 ; RV32-LABEL: vand_vx_v2i64_unmasked:
1010 ; RV32-NEXT: addi sp, sp, -16
1011 ; RV32-NEXT: .cfi_def_cfa_offset 16
1012 ; RV32-NEXT: sw a1, 12(sp)
1013 ; RV32-NEXT: sw a0, 8(sp)
1014 ; RV32-NEXT: addi a0, sp, 8
1015 ; RV32-NEXT: vsetivli zero, 2, e64, m1, ta, ma
1016 ; RV32-NEXT: vlse64.v v9, (a0), zero
1017 ; RV32-NEXT: vsetvli zero, a2, e64, m1, ta, ma
1018 ; RV32-NEXT: vand.vv v8, v8, v9
1019 ; RV32-NEXT: addi sp, sp, 16
1022 ; RV64-LABEL: vand_vx_v2i64_unmasked:
1024 ; RV64-NEXT: vsetvli zero, a1, e64, m1, ta, ma
1025 ; RV64-NEXT: vand.vx v8, v8, a0
1027 %elt.head = insertelement <2 x i64> poison, i64 %b, i32 0
1028 %vb = shufflevector <2 x i64> %elt.head, <2 x i64> poison, <2 x i32> zeroinitializer
1029 %head = insertelement <2 x i1> poison, i1 true, i32 0
1030 %m = shufflevector <2 x i1> %head, <2 x i1> poison, <2 x i32> zeroinitializer
1031 %v = call <2 x i64> @llvm.vp.and.v2i64(<2 x i64> %va, <2 x i64> %vb, <2 x i1> %m, i32 %evl)
1035 define <2 x i64> @vand_vi_v2i64(<2 x i64> %va, <2 x i1> %m, i32 zeroext %evl) {
1036 ; CHECK-LABEL: vand_vi_v2i64:
1038 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
1039 ; CHECK-NEXT: vand.vi v8, v8, 4, v0.t
1041 %elt.head = insertelement <2 x i64> poison, i64 4, i32 0
1042 %vb = shufflevector <2 x i64> %elt.head, <2 x i64> poison, <2 x i32> zeroinitializer
1043 %v = call <2 x i64> @llvm.vp.and.v2i64(<2 x i64> %va, <2 x i64> %vb, <2 x i1> %m, i32 %evl)
1047 define <2 x i64> @vand_vi_v2i64_unmasked(<2 x i64> %va, i32 zeroext %evl) {
1048 ; CHECK-LABEL: vand_vi_v2i64_unmasked:
1050 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
1051 ; CHECK-NEXT: vand.vi v8, v8, 4
1053 %elt.head = insertelement <2 x i64> poison, i64 4, i32 0
1054 %vb = shufflevector <2 x i64> %elt.head, <2 x i64> poison, <2 x i32> zeroinitializer
1055 %head = insertelement <2 x i1> poison, i1 true, i32 0
1056 %m = shufflevector <2 x i1> %head, <2 x i1> poison, <2 x i32> zeroinitializer
1057 %v = call <2 x i64> @llvm.vp.and.v2i64(<2 x i64> %va, <2 x i64> %vb, <2 x i1> %m, i32 %evl)
1061 declare <4 x i64> @llvm.vp.and.v4i64(<4 x i64>, <4 x i64>, <4 x i1>, i32)
1063 define <4 x i64> @vand_vv_v4i64(<4 x i64> %va, <4 x i64> %b, <4 x i1> %m, i32 zeroext %evl) {
1064 ; CHECK-LABEL: vand_vv_v4i64:
1066 ; CHECK-NEXT: vsetvli zero, a0, e64, m2, ta, ma
1067 ; CHECK-NEXT: vand.vv v8, v8, v10, v0.t
1069 %v = call <4 x i64> @llvm.vp.and.v4i64(<4 x i64> %va, <4 x i64> %b, <4 x i1> %m, i32 %evl)
1073 define <4 x i64> @vand_vv_v4i64_unmasked(<4 x i64> %va, <4 x i64> %b, i32 zeroext %evl) {
1074 ; CHECK-LABEL: vand_vv_v4i64_unmasked:
1076 ; CHECK-NEXT: vsetvli zero, a0, e64, m2, ta, ma
1077 ; CHECK-NEXT: vand.vv v8, v8, v10
1079 %head = insertelement <4 x i1> poison, i1 true, i32 0
1080 %m = shufflevector <4 x i1> %head, <4 x i1> poison, <4 x i32> zeroinitializer
1081 %v = call <4 x i64> @llvm.vp.and.v4i64(<4 x i64> %va, <4 x i64> %b, <4 x i1> %m, i32 %evl)
1085 define <4 x i64> @vand_vx_v4i64(<4 x i64> %va, i64 %b, <4 x i1> %m, i32 zeroext %evl) {
1086 ; RV32-LABEL: vand_vx_v4i64:
1088 ; RV32-NEXT: addi sp, sp, -16
1089 ; RV32-NEXT: .cfi_def_cfa_offset 16
1090 ; RV32-NEXT: sw a1, 12(sp)
1091 ; RV32-NEXT: sw a0, 8(sp)
1092 ; RV32-NEXT: addi a0, sp, 8
1093 ; RV32-NEXT: vsetivli zero, 4, e64, m2, ta, ma
1094 ; RV32-NEXT: vlse64.v v10, (a0), zero
1095 ; RV32-NEXT: vsetvli zero, a2, e64, m2, ta, ma
1096 ; RV32-NEXT: vand.vv v8, v8, v10, v0.t
1097 ; RV32-NEXT: addi sp, sp, 16
1100 ; RV64-LABEL: vand_vx_v4i64:
1102 ; RV64-NEXT: vsetvli zero, a1, e64, m2, ta, ma
1103 ; RV64-NEXT: vand.vx v8, v8, a0, v0.t
1105 %elt.head = insertelement <4 x i64> poison, i64 %b, i32 0
1106 %vb = shufflevector <4 x i64> %elt.head, <4 x i64> poison, <4 x i32> zeroinitializer
1107 %v = call <4 x i64> @llvm.vp.and.v4i64(<4 x i64> %va, <4 x i64> %vb, <4 x i1> %m, i32 %evl)
1111 define <4 x i64> @vand_vx_v4i64_unmasked(<4 x i64> %va, i64 %b, i32 zeroext %evl) {
1112 ; RV32-LABEL: vand_vx_v4i64_unmasked:
1114 ; RV32-NEXT: addi sp, sp, -16
1115 ; RV32-NEXT: .cfi_def_cfa_offset 16
1116 ; RV32-NEXT: sw a1, 12(sp)
1117 ; RV32-NEXT: sw a0, 8(sp)
1118 ; RV32-NEXT: addi a0, sp, 8
1119 ; RV32-NEXT: vsetivli zero, 4, e64, m2, ta, ma
1120 ; RV32-NEXT: vlse64.v v10, (a0), zero
1121 ; RV32-NEXT: vsetvli zero, a2, e64, m2, ta, ma
1122 ; RV32-NEXT: vand.vv v8, v8, v10
1123 ; RV32-NEXT: addi sp, sp, 16
1126 ; RV64-LABEL: vand_vx_v4i64_unmasked:
1128 ; RV64-NEXT: vsetvli zero, a1, e64, m2, ta, ma
1129 ; RV64-NEXT: vand.vx v8, v8, a0
1131 %elt.head = insertelement <4 x i64> poison, i64 %b, i32 0
1132 %vb = shufflevector <4 x i64> %elt.head, <4 x i64> poison, <4 x i32> zeroinitializer
1133 %head = insertelement <4 x i1> poison, i1 true, i32 0
1134 %m = shufflevector <4 x i1> %head, <4 x i1> poison, <4 x i32> zeroinitializer
1135 %v = call <4 x i64> @llvm.vp.and.v4i64(<4 x i64> %va, <4 x i64> %vb, <4 x i1> %m, i32 %evl)
1139 define <4 x i64> @vand_vi_v4i64(<4 x i64> %va, <4 x i1> %m, i32 zeroext %evl) {
1140 ; CHECK-LABEL: vand_vi_v4i64:
1142 ; CHECK-NEXT: vsetvli zero, a0, e64, m2, ta, ma
1143 ; CHECK-NEXT: vand.vi v8, v8, 4, v0.t
1145 %elt.head = insertelement <4 x i64> poison, i64 4, i32 0
1146 %vb = shufflevector <4 x i64> %elt.head, <4 x i64> poison, <4 x i32> zeroinitializer
1147 %v = call <4 x i64> @llvm.vp.and.v4i64(<4 x i64> %va, <4 x i64> %vb, <4 x i1> %m, i32 %evl)
1151 define <4 x i64> @vand_vi_v4i64_unmasked(<4 x i64> %va, i32 zeroext %evl) {
1152 ; CHECK-LABEL: vand_vi_v4i64_unmasked:
1154 ; CHECK-NEXT: vsetvli zero, a0, e64, m2, ta, ma
1155 ; CHECK-NEXT: vand.vi v8, v8, 4
1157 %elt.head = insertelement <4 x i64> poison, i64 4, i32 0
1158 %vb = shufflevector <4 x i64> %elt.head, <4 x i64> poison, <4 x i32> zeroinitializer
1159 %head = insertelement <4 x i1> poison, i1 true, i32 0
1160 %m = shufflevector <4 x i1> %head, <4 x i1> poison, <4 x i32> zeroinitializer
1161 %v = call <4 x i64> @llvm.vp.and.v4i64(<4 x i64> %va, <4 x i64> %vb, <4 x i1> %m, i32 %evl)
1165 declare <8 x i64> @llvm.vp.and.v8i64(<8 x i64>, <8 x i64>, <8 x i1>, i32)
1167 define <8 x i64> @vand_vv_v8i64(<8 x i64> %va, <8 x i64> %b, <8 x i1> %m, i32 zeroext %evl) {
1168 ; CHECK-LABEL: vand_vv_v8i64:
1170 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1171 ; CHECK-NEXT: vand.vv v8, v8, v12, v0.t
1173 %v = call <8 x i64> @llvm.vp.and.v8i64(<8 x i64> %va, <8 x i64> %b, <8 x i1> %m, i32 %evl)
1177 define <8 x i64> @vand_vv_v8i64_unmasked(<8 x i64> %va, <8 x i64> %b, i32 zeroext %evl) {
1178 ; CHECK-LABEL: vand_vv_v8i64_unmasked:
1180 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1181 ; CHECK-NEXT: vand.vv v8, v8, v12
1183 %head = insertelement <8 x i1> poison, i1 true, i32 0
1184 %m = shufflevector <8 x i1> %head, <8 x i1> poison, <8 x i32> zeroinitializer
1185 %v = call <8 x i64> @llvm.vp.and.v8i64(<8 x i64> %va, <8 x i64> %b, <8 x i1> %m, i32 %evl)
1189 define <8 x i64> @vand_vx_v8i64(<8 x i64> %va, i64 %b, <8 x i1> %m, i32 zeroext %evl) {
1190 ; RV32-LABEL: vand_vx_v8i64:
1192 ; RV32-NEXT: addi sp, sp, -16
1193 ; RV32-NEXT: .cfi_def_cfa_offset 16
1194 ; RV32-NEXT: sw a1, 12(sp)
1195 ; RV32-NEXT: sw a0, 8(sp)
1196 ; RV32-NEXT: addi a0, sp, 8
1197 ; RV32-NEXT: vsetivli zero, 8, e64, m4, ta, ma
1198 ; RV32-NEXT: vlse64.v v12, (a0), zero
1199 ; RV32-NEXT: vsetvli zero, a2, e64, m4, ta, ma
1200 ; RV32-NEXT: vand.vv v8, v8, v12, v0.t
1201 ; RV32-NEXT: addi sp, sp, 16
1204 ; RV64-LABEL: vand_vx_v8i64:
1206 ; RV64-NEXT: vsetvli zero, a1, e64, m4, ta, ma
1207 ; RV64-NEXT: vand.vx v8, v8, a0, v0.t
1209 %elt.head = insertelement <8 x i64> poison, i64 %b, i32 0
1210 %vb = shufflevector <8 x i64> %elt.head, <8 x i64> poison, <8 x i32> zeroinitializer
1211 %v = call <8 x i64> @llvm.vp.and.v8i64(<8 x i64> %va, <8 x i64> %vb, <8 x i1> %m, i32 %evl)
1215 define <8 x i64> @vand_vx_v8i64_unmasked(<8 x i64> %va, i64 %b, i32 zeroext %evl) {
1216 ; RV32-LABEL: vand_vx_v8i64_unmasked:
1218 ; RV32-NEXT: addi sp, sp, -16
1219 ; RV32-NEXT: .cfi_def_cfa_offset 16
1220 ; RV32-NEXT: sw a1, 12(sp)
1221 ; RV32-NEXT: sw a0, 8(sp)
1222 ; RV32-NEXT: addi a0, sp, 8
1223 ; RV32-NEXT: vsetivli zero, 8, e64, m4, ta, ma
1224 ; RV32-NEXT: vlse64.v v12, (a0), zero
1225 ; RV32-NEXT: vsetvli zero, a2, e64, m4, ta, ma
1226 ; RV32-NEXT: vand.vv v8, v8, v12
1227 ; RV32-NEXT: addi sp, sp, 16
1230 ; RV64-LABEL: vand_vx_v8i64_unmasked:
1232 ; RV64-NEXT: vsetvli zero, a1, e64, m4, ta, ma
1233 ; RV64-NEXT: vand.vx v8, v8, a0
1235 %elt.head = insertelement <8 x i64> poison, i64 %b, i32 0
1236 %vb = shufflevector <8 x i64> %elt.head, <8 x i64> poison, <8 x i32> zeroinitializer
1237 %head = insertelement <8 x i1> poison, i1 true, i32 0
1238 %m = shufflevector <8 x i1> %head, <8 x i1> poison, <8 x i32> zeroinitializer
1239 %v = call <8 x i64> @llvm.vp.and.v8i64(<8 x i64> %va, <8 x i64> %vb, <8 x i1> %m, i32 %evl)
1243 define <8 x i64> @vand_vi_v8i64(<8 x i64> %va, <8 x i1> %m, i32 zeroext %evl) {
1244 ; CHECK-LABEL: vand_vi_v8i64:
1246 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1247 ; CHECK-NEXT: vand.vi v8, v8, 4, v0.t
1249 %elt.head = insertelement <8 x i64> poison, i64 4, i32 0
1250 %vb = shufflevector <8 x i64> %elt.head, <8 x i64> poison, <8 x i32> zeroinitializer
1251 %v = call <8 x i64> @llvm.vp.and.v8i64(<8 x i64> %va, <8 x i64> %vb, <8 x i1> %m, i32 %evl)
1255 define <8 x i64> @vand_vi_v8i64_unmasked(<8 x i64> %va, i32 zeroext %evl) {
1256 ; CHECK-LABEL: vand_vi_v8i64_unmasked:
1258 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1259 ; CHECK-NEXT: vand.vi v8, v8, 4
1261 %elt.head = insertelement <8 x i64> poison, i64 4, i32 0
1262 %vb = shufflevector <8 x i64> %elt.head, <8 x i64> poison, <8 x i32> zeroinitializer
1263 %head = insertelement <8 x i1> poison, i1 true, i32 0
1264 %m = shufflevector <8 x i1> %head, <8 x i1> poison, <8 x i32> zeroinitializer
1265 %v = call <8 x i64> @llvm.vp.and.v8i64(<8 x i64> %va, <8 x i64> %vb, <8 x i1> %m, i32 %evl)
1269 declare <11 x i64> @llvm.vp.and.v11i64(<11 x i64>, <11 x i64>, <11 x i1>, i32)
1271 define <11 x i64> @vand_vv_v11i64(<11 x i64> %va, <11 x i64> %b, <11 x i1> %m, i32 zeroext %evl) {
1272 ; CHECK-LABEL: vand_vv_v11i64:
1274 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
1275 ; CHECK-NEXT: vand.vv v8, v8, v16, v0.t
1277 %v = call <11 x i64> @llvm.vp.and.v11i64(<11 x i64> %va, <11 x i64> %b, <11 x i1> %m, i32 %evl)
1281 define <11 x i64> @vand_vv_v11i64_unmasked(<11 x i64> %va, <11 x i64> %b, i32 zeroext %evl) {
1282 ; CHECK-LABEL: vand_vv_v11i64_unmasked:
1284 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
1285 ; CHECK-NEXT: vand.vv v8, v8, v16
1287 %head = insertelement <11 x i1> poison, i1 true, i32 0
1288 %m = shufflevector <11 x i1> %head, <11 x i1> poison, <11 x i32> zeroinitializer
1289 %v = call <11 x i64> @llvm.vp.and.v11i64(<11 x i64> %va, <11 x i64> %b, <11 x i1> %m, i32 %evl)
1293 define <11 x i64> @vand_vx_v11i64(<11 x i64> %va, i64 %b, <11 x i1> %m, i32 zeroext %evl) {
1294 ; RV32-LABEL: vand_vx_v11i64:
1296 ; RV32-NEXT: vmv1r.v v16, v0
1297 ; RV32-NEXT: li a3, 32
1298 ; RV32-NEXT: vsetvli zero, a3, e32, m8, ta, ma
1299 ; RV32-NEXT: lui a3, 341
1300 ; RV32-NEXT: addi a3, a3, 1365
1301 ; RV32-NEXT: vmv.s.x v0, a3
1302 ; RV32-NEXT: vmv.v.x v24, a1
1303 ; RV32-NEXT: vmerge.vxm v24, v24, a0, v0
1304 ; RV32-NEXT: vsetvli zero, a2, e64, m8, ta, ma
1305 ; RV32-NEXT: vmv1r.v v0, v16
1306 ; RV32-NEXT: vand.vv v8, v8, v24, v0.t
1309 ; RV64-LABEL: vand_vx_v11i64:
1311 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
1312 ; RV64-NEXT: vand.vx v8, v8, a0, v0.t
1314 %elt.head = insertelement <11 x i64> poison, i64 %b, i32 0
1315 %vb = shufflevector <11 x i64> %elt.head, <11 x i64> poison, <11 x i32> zeroinitializer
1316 %v = call <11 x i64> @llvm.vp.and.v11i64(<11 x i64> %va, <11 x i64> %vb, <11 x i1> %m, i32 %evl)
1320 define <11 x i64> @vand_vx_v11i64_unmasked(<11 x i64> %va, i64 %b, i32 zeroext %evl) {
1321 ; RV32-LABEL: vand_vx_v11i64_unmasked:
1323 ; RV32-NEXT: li a3, 32
1324 ; RV32-NEXT: vsetvli zero, a3, e32, m8, ta, ma
1325 ; RV32-NEXT: lui a3, 341
1326 ; RV32-NEXT: addi a3, a3, 1365
1327 ; RV32-NEXT: vmv.s.x v0, a3
1328 ; RV32-NEXT: vmv.v.x v16, a1
1329 ; RV32-NEXT: vmerge.vxm v16, v16, a0, v0
1330 ; RV32-NEXT: vsetvli zero, a2, e64, m8, ta, ma
1331 ; RV32-NEXT: vand.vv v8, v8, v16
1334 ; RV64-LABEL: vand_vx_v11i64_unmasked:
1336 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
1337 ; RV64-NEXT: vand.vx v8, v8, a0
1339 %elt.head = insertelement <11 x i64> poison, i64 %b, i32 0
1340 %vb = shufflevector <11 x i64> %elt.head, <11 x i64> poison, <11 x i32> zeroinitializer
1341 %head = insertelement <11 x i1> poison, i1 true, i32 0
1342 %m = shufflevector <11 x i1> %head, <11 x i1> poison, <11 x i32> zeroinitializer
1343 %v = call <11 x i64> @llvm.vp.and.v11i64(<11 x i64> %va, <11 x i64> %vb, <11 x i1> %m, i32 %evl)
1347 define <11 x i64> @vand_vi_v11i64(<11 x i64> %va, <11 x i1> %m, i32 zeroext %evl) {
1348 ; CHECK-LABEL: vand_vi_v11i64:
1350 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
1351 ; CHECK-NEXT: vand.vi v8, v8, 4, v0.t
1353 %elt.head = insertelement <11 x i64> poison, i64 4, i32 0
1354 %vb = shufflevector <11 x i64> %elt.head, <11 x i64> poison, <11 x i32> zeroinitializer
1355 %v = call <11 x i64> @llvm.vp.and.v11i64(<11 x i64> %va, <11 x i64> %vb, <11 x i1> %m, i32 %evl)
1359 define <11 x i64> @vand_vi_v11i64_unmasked(<11 x i64> %va, i32 zeroext %evl) {
1360 ; CHECK-LABEL: vand_vi_v11i64_unmasked:
1362 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
1363 ; CHECK-NEXT: vand.vi v8, v8, 4
1365 %elt.head = insertelement <11 x i64> poison, i64 4, i32 0
1366 %vb = shufflevector <11 x i64> %elt.head, <11 x i64> poison, <11 x i32> zeroinitializer
1367 %head = insertelement <11 x i1> poison, i1 true, i32 0
1368 %m = shufflevector <11 x i1> %head, <11 x i1> poison, <11 x i32> zeroinitializer
1369 %v = call <11 x i64> @llvm.vp.and.v11i64(<11 x i64> %va, <11 x i64> %vb, <11 x i1> %m, i32 %evl)
1373 declare <16 x i64> @llvm.vp.and.v16i64(<16 x i64>, <16 x i64>, <16 x i1>, i32)
1375 define <16 x i64> @vand_vv_v16i64(<16 x i64> %va, <16 x i64> %b, <16 x i1> %m, i32 zeroext %evl) {
1376 ; CHECK-LABEL: vand_vv_v16i64:
1378 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
1379 ; CHECK-NEXT: vand.vv v8, v8, v16, v0.t
1381 %v = call <16 x i64> @llvm.vp.and.v16i64(<16 x i64> %va, <16 x i64> %b, <16 x i1> %m, i32 %evl)
1385 define <16 x i64> @vand_vv_v16i64_unmasked(<16 x i64> %va, <16 x i64> %b, i32 zeroext %evl) {
1386 ; CHECK-LABEL: vand_vv_v16i64_unmasked:
1388 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
1389 ; CHECK-NEXT: vand.vv v8, v8, v16
1391 %head = insertelement <16 x i1> poison, i1 true, i32 0
1392 %m = shufflevector <16 x i1> %head, <16 x i1> poison, <16 x i32> zeroinitializer
1393 %v = call <16 x i64> @llvm.vp.and.v16i64(<16 x i64> %va, <16 x i64> %b, <16 x i1> %m, i32 %evl)
1397 define <16 x i64> @vand_vx_v16i64(<16 x i64> %va, i64 %b, <16 x i1> %m, i32 zeroext %evl) {
1398 ; RV32-LABEL: vand_vx_v16i64:
1400 ; RV32-NEXT: addi sp, sp, -16
1401 ; RV32-NEXT: .cfi_def_cfa_offset 16
1402 ; RV32-NEXT: sw a1, 12(sp)
1403 ; RV32-NEXT: sw a0, 8(sp)
1404 ; RV32-NEXT: addi a0, sp, 8
1405 ; RV32-NEXT: vsetivli zero, 16, e64, m8, ta, ma
1406 ; RV32-NEXT: vlse64.v v16, (a0), zero
1407 ; RV32-NEXT: vsetvli zero, a2, e64, m8, ta, ma
1408 ; RV32-NEXT: vand.vv v8, v8, v16, v0.t
1409 ; RV32-NEXT: addi sp, sp, 16
1412 ; RV64-LABEL: vand_vx_v16i64:
1414 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
1415 ; RV64-NEXT: vand.vx v8, v8, a0, v0.t
1417 %elt.head = insertelement <16 x i64> poison, i64 %b, i32 0
1418 %vb = shufflevector <16 x i64> %elt.head, <16 x i64> poison, <16 x i32> zeroinitializer
1419 %v = call <16 x i64> @llvm.vp.and.v16i64(<16 x i64> %va, <16 x i64> %vb, <16 x i1> %m, i32 %evl)
1423 define <16 x i64> @vand_vx_v16i64_unmasked(<16 x i64> %va, i64 %b, i32 zeroext %evl) {
1424 ; RV32-LABEL: vand_vx_v16i64_unmasked:
1426 ; RV32-NEXT: addi sp, sp, -16
1427 ; RV32-NEXT: .cfi_def_cfa_offset 16
1428 ; RV32-NEXT: sw a1, 12(sp)
1429 ; RV32-NEXT: sw a0, 8(sp)
1430 ; RV32-NEXT: addi a0, sp, 8
1431 ; RV32-NEXT: vsetivli zero, 16, e64, m8, ta, ma
1432 ; RV32-NEXT: vlse64.v v16, (a0), zero
1433 ; RV32-NEXT: vsetvli zero, a2, e64, m8, ta, ma
1434 ; RV32-NEXT: vand.vv v8, v8, v16
1435 ; RV32-NEXT: addi sp, sp, 16
1438 ; RV64-LABEL: vand_vx_v16i64_unmasked:
1440 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
1441 ; RV64-NEXT: vand.vx v8, v8, a0
1443 %elt.head = insertelement <16 x i64> poison, i64 %b, i32 0
1444 %vb = shufflevector <16 x i64> %elt.head, <16 x i64> poison, <16 x i32> zeroinitializer
1445 %head = insertelement <16 x i1> poison, i1 true, i32 0
1446 %m = shufflevector <16 x i1> %head, <16 x i1> poison, <16 x i32> zeroinitializer
1447 %v = call <16 x i64> @llvm.vp.and.v16i64(<16 x i64> %va, <16 x i64> %vb, <16 x i1> %m, i32 %evl)
1451 define <16 x i64> @vand_vi_v16i64(<16 x i64> %va, <16 x i1> %m, i32 zeroext %evl) {
1452 ; CHECK-LABEL: vand_vi_v16i64:
1454 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
1455 ; CHECK-NEXT: vand.vi v8, v8, 4, v0.t
1457 %elt.head = insertelement <16 x i64> poison, i64 4, i32 0
1458 %vb = shufflevector <16 x i64> %elt.head, <16 x i64> poison, <16 x i32> zeroinitializer
1459 %v = call <16 x i64> @llvm.vp.and.v16i64(<16 x i64> %va, <16 x i64> %vb, <16 x i1> %m, i32 %evl)
1463 define <16 x i64> @vand_vi_v16i64_unmasked(<16 x i64> %va, i32 zeroext %evl) {
1464 ; CHECK-LABEL: vand_vi_v16i64_unmasked:
1466 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
1467 ; CHECK-NEXT: vand.vi v8, v8, 4
1469 %elt.head = insertelement <16 x i64> poison, i64 4, i32 0
1470 %vb = shufflevector <16 x i64> %elt.head, <16 x i64> poison, <16 x i32> zeroinitializer
1471 %head = insertelement <16 x i1> poison, i1 true, i32 0
1472 %m = shufflevector <16 x i1> %head, <16 x i1> poison, <16 x i32> zeroinitializer
1473 %v = call <16 x i64> @llvm.vp.and.v16i64(<16 x i64> %va, <16 x i64> %vb, <16 x i1> %m, i32 %evl)