1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=riscv32 -mattr=+v,+m -verify-machineinstrs < %s \
3 ; RUN: | FileCheck %s --check-prefixes=CHECK,RV32
4 ; RUN: llc -mtriple=riscv64 -mattr=+v,+m -verify-machineinstrs < %s \
5 ; RUN: | FileCheck %s --check-prefixes=CHECK,RV64
7 ; FIXME: We're missing canonicalizations of ISD::VP_SETCC equivalent to those
8 ; for ISD::SETCC, e.g., splats aren't moved to the RHS.
10 declare <8 x i1> @llvm.vp.icmp.v8i7(<8 x i7>, <8 x i7>, metadata, <8 x i1>, i32)
12 define <8 x i1> @icmp_eq_vv_v8i7(<8 x i7> %va, <8 x i7> %vb, <8 x i1> %m, i32 zeroext %evl) {
13 ; CHECK-LABEL: icmp_eq_vv_v8i7:
15 ; CHECK-NEXT: li a1, 127
16 ; CHECK-NEXT: vsetivli zero, 8, e8, mf2, ta, ma
17 ; CHECK-NEXT: vand.vx v9, v9, a1
18 ; CHECK-NEXT: vand.vx v8, v8, a1
19 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
20 ; CHECK-NEXT: vmseq.vv v0, v8, v9, v0.t
22 %v = call <8 x i1> @llvm.vp.icmp.v8i7(<8 x i7> %va, <8 x i7> %vb, metadata !"eq", <8 x i1> %m, i32 %evl)
26 define <8 x i1> @icmp_eq_vx_v8i7(<8 x i7> %va, i7 %b, <8 x i1> %m, i32 zeroext %evl) {
27 ; CHECK-LABEL: icmp_eq_vx_v8i7:
29 ; CHECK-NEXT: li a2, 127
30 ; CHECK-NEXT: vsetivli zero, 8, e8, mf2, ta, ma
31 ; CHECK-NEXT: vand.vx v8, v8, a2
32 ; CHECK-NEXT: vmv.v.x v9, a0
33 ; CHECK-NEXT: vand.vx v9, v9, a2
34 ; CHECK-NEXT: vsetvli zero, a1, e8, mf2, ta, ma
35 ; CHECK-NEXT: vmseq.vv v0, v8, v9, v0.t
37 %elt.head = insertelement <8 x i7> poison, i7 %b, i32 0
38 %vb = shufflevector <8 x i7> %elt.head, <8 x i7> poison, <8 x i32> zeroinitializer
39 %v = call <8 x i1> @llvm.vp.icmp.v8i7(<8 x i7> %va, <8 x i7> %vb, metadata !"eq", <8 x i1> %m, i32 %evl)
43 define <8 x i1> @icmp_eq_vx_swap_v8i7(<8 x i7> %va, i7 %b, <8 x i1> %m, i32 zeroext %evl) {
44 ; CHECK-LABEL: icmp_eq_vx_swap_v8i7:
46 ; CHECK-NEXT: li a2, 127
47 ; CHECK-NEXT: vsetivli zero, 8, e8, mf2, ta, ma
48 ; CHECK-NEXT: vand.vx v8, v8, a2
49 ; CHECK-NEXT: vmv.v.x v9, a0
50 ; CHECK-NEXT: vand.vx v9, v9, a2
51 ; CHECK-NEXT: vsetvli zero, a1, e8, mf2, ta, ma
52 ; CHECK-NEXT: vmseq.vv v0, v9, v8, v0.t
54 %elt.head = insertelement <8 x i7> poison, i7 %b, i32 0
55 %vb = shufflevector <8 x i7> %elt.head, <8 x i7> poison, <8 x i32> zeroinitializer
56 %v = call <8 x i1> @llvm.vp.icmp.v8i7(<8 x i7> %vb, <8 x i7> %va, metadata !"eq", <8 x i1> %m, i32 %evl)
60 declare <5 x i1> @llvm.vp.icmp.v5i8(<5 x i8>, <5 x i8>, metadata, <5 x i1>, i32)
62 define <5 x i1> @icmp_eq_vv_v5i8(<5 x i8> %va, <5 x i8> %vb, <5 x i1> %m, i32 zeroext %evl) {
63 ; CHECK-LABEL: icmp_eq_vv_v5i8:
65 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
66 ; CHECK-NEXT: vmseq.vv v0, v8, v9, v0.t
68 %v = call <5 x i1> @llvm.vp.icmp.v5i8(<5 x i8> %va, <5 x i8> %vb, metadata !"eq", <5 x i1> %m, i32 %evl)
72 define <5 x i1> @icmp_eq_vx_v5i8(<5 x i8> %va, i8 %b, <5 x i1> %m, i32 zeroext %evl) {
73 ; CHECK-LABEL: icmp_eq_vx_v5i8:
75 ; CHECK-NEXT: vsetvli zero, a1, e8, mf2, ta, ma
76 ; CHECK-NEXT: vmseq.vx v0, v8, a0, v0.t
78 %elt.head = insertelement <5 x i8> poison, i8 %b, i32 0
79 %vb = shufflevector <5 x i8> %elt.head, <5 x i8> poison, <5 x i32> zeroinitializer
80 %v = call <5 x i1> @llvm.vp.icmp.v5i8(<5 x i8> %va, <5 x i8> %vb, metadata !"eq", <5 x i1> %m, i32 %evl)
84 define <5 x i1> @icmp_eq_vx_swap_v5i8(<5 x i8> %va, i8 %b, <5 x i1> %m, i32 zeroext %evl) {
85 ; CHECK-LABEL: icmp_eq_vx_swap_v5i8:
87 ; CHECK-NEXT: vsetvli zero, a1, e8, mf2, ta, ma
88 ; CHECK-NEXT: vmseq.vx v0, v8, a0, v0.t
90 %elt.head = insertelement <5 x i8> poison, i8 %b, i32 0
91 %vb = shufflevector <5 x i8> %elt.head, <5 x i8> poison, <5 x i32> zeroinitializer
92 %v = call <5 x i1> @llvm.vp.icmp.v5i8(<5 x i8> %vb, <5 x i8> %va, metadata !"eq", <5 x i1> %m, i32 %evl)
96 declare <8 x i1> @llvm.vp.icmp.v8i8(<8 x i8>, <8 x i8>, metadata, <8 x i1>, i32)
98 define <8 x i1> @icmp_eq_vv_v8i8(<8 x i8> %va, <8 x i8> %vb, <8 x i1> %m, i32 zeroext %evl) {
99 ; CHECK-LABEL: icmp_eq_vv_v8i8:
101 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
102 ; CHECK-NEXT: vmseq.vv v0, v8, v9, v0.t
104 %v = call <8 x i1> @llvm.vp.icmp.v8i8(<8 x i8> %va, <8 x i8> %vb, metadata !"eq", <8 x i1> %m, i32 %evl)
108 define <8 x i1> @icmp_eq_vx_v8i8(<8 x i8> %va, i8 %b, <8 x i1> %m, i32 zeroext %evl) {
109 ; CHECK-LABEL: icmp_eq_vx_v8i8:
111 ; CHECK-NEXT: vsetvli zero, a1, e8, mf2, ta, ma
112 ; CHECK-NEXT: vmseq.vx v0, v8, a0, v0.t
114 %elt.head = insertelement <8 x i8> poison, i8 %b, i32 0
115 %vb = shufflevector <8 x i8> %elt.head, <8 x i8> poison, <8 x i32> zeroinitializer
116 %v = call <8 x i1> @llvm.vp.icmp.v8i8(<8 x i8> %va, <8 x i8> %vb, metadata !"eq", <8 x i1> %m, i32 %evl)
120 define <8 x i1> @icmp_eq_vx_swap_v8i8(<8 x i8> %va, i8 %b, <8 x i1> %m, i32 zeroext %evl) {
121 ; CHECK-LABEL: icmp_eq_vx_swap_v8i8:
123 ; CHECK-NEXT: vsetvli zero, a1, e8, mf2, ta, ma
124 ; CHECK-NEXT: vmseq.vx v0, v8, a0, v0.t
126 %elt.head = insertelement <8 x i8> poison, i8 %b, i32 0
127 %vb = shufflevector <8 x i8> %elt.head, <8 x i8> poison, <8 x i32> zeroinitializer
128 %v = call <8 x i1> @llvm.vp.icmp.v8i8(<8 x i8> %vb, <8 x i8> %va, metadata !"eq", <8 x i1> %m, i32 %evl)
132 define <8 x i1> @icmp_eq_vi_v8i8(<8 x i8> %va, <8 x i1> %m, i32 zeroext %evl) {
133 ; CHECK-LABEL: icmp_eq_vi_v8i8:
135 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
136 ; CHECK-NEXT: vmseq.vi v0, v8, 4, v0.t
138 %v = call <8 x i1> @llvm.vp.icmp.v8i8(<8 x i8> %va, <8 x i8> splat (i8 4), metadata !"eq", <8 x i1> %m, i32 %evl)
142 define <8 x i1> @icmp_eq_vi_swap_v8i8(<8 x i8> %va, <8 x i1> %m, i32 zeroext %evl) {
143 ; CHECK-LABEL: icmp_eq_vi_swap_v8i8:
145 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
146 ; CHECK-NEXT: vmseq.vi v0, v8, 4, v0.t
148 %v = call <8 x i1> @llvm.vp.icmp.v8i8(<8 x i8> splat (i8 4), <8 x i8> %va, metadata !"eq", <8 x i1> %m, i32 %evl)
152 define <8 x i1> @icmp_ne_vv_v8i8(<8 x i8> %va, <8 x i8> %vb, <8 x i1> %m, i32 zeroext %evl) {
153 ; CHECK-LABEL: icmp_ne_vv_v8i8:
155 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
156 ; CHECK-NEXT: vmsne.vv v0, v8, v9, v0.t
158 %v = call <8 x i1> @llvm.vp.icmp.v8i8(<8 x i8> %va, <8 x i8> %vb, metadata !"ne", <8 x i1> %m, i32 %evl)
162 define <8 x i1> @icmp_ne_vx_v8i8(<8 x i8> %va, i8 %b, <8 x i1> %m, i32 zeroext %evl) {
163 ; CHECK-LABEL: icmp_ne_vx_v8i8:
165 ; CHECK-NEXT: vsetvli zero, a1, e8, mf2, ta, ma
166 ; CHECK-NEXT: vmsne.vx v0, v8, a0, v0.t
168 %elt.head = insertelement <8 x i8> poison, i8 %b, i32 0
169 %vb = shufflevector <8 x i8> %elt.head, <8 x i8> poison, <8 x i32> zeroinitializer
170 %v = call <8 x i1> @llvm.vp.icmp.v8i8(<8 x i8> %va, <8 x i8> %vb, metadata !"ne", <8 x i1> %m, i32 %evl)
174 define <8 x i1> @icmp_ne_vx_swap_v8i8(<8 x i8> %va, i8 %b, <8 x i1> %m, i32 zeroext %evl) {
175 ; CHECK-LABEL: icmp_ne_vx_swap_v8i8:
177 ; CHECK-NEXT: vsetvli zero, a1, e8, mf2, ta, ma
178 ; CHECK-NEXT: vmsne.vx v0, v8, a0, v0.t
180 %elt.head = insertelement <8 x i8> poison, i8 %b, i32 0
181 %vb = shufflevector <8 x i8> %elt.head, <8 x i8> poison, <8 x i32> zeroinitializer
182 %v = call <8 x i1> @llvm.vp.icmp.v8i8(<8 x i8> %vb, <8 x i8> %va, metadata !"ne", <8 x i1> %m, i32 %evl)
186 define <8 x i1> @icmp_ne_vi_v8i8(<8 x i8> %va, <8 x i1> %m, i32 zeroext %evl) {
187 ; CHECK-LABEL: icmp_ne_vi_v8i8:
189 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
190 ; CHECK-NEXT: vmsne.vi v0, v8, 4, v0.t
192 %v = call <8 x i1> @llvm.vp.icmp.v8i8(<8 x i8> %va, <8 x i8> splat (i8 4), metadata !"ne", <8 x i1> %m, i32 %evl)
196 define <8 x i1> @icmp_ne_vi_swap_v8i8(<8 x i8> %va, <8 x i1> %m, i32 zeroext %evl) {
197 ; CHECK-LABEL: icmp_ne_vi_swap_v8i8:
199 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
200 ; CHECK-NEXT: vmsne.vi v0, v8, 4, v0.t
202 %v = call <8 x i1> @llvm.vp.icmp.v8i8(<8 x i8> splat (i8 4), <8 x i8> %va, metadata !"ne", <8 x i1> %m, i32 %evl)
206 define <8 x i1> @icmp_ugt_vv_v8i8(<8 x i8> %va, <8 x i8> %vb, <8 x i1> %m, i32 zeroext %evl) {
207 ; CHECK-LABEL: icmp_ugt_vv_v8i8:
209 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
210 ; CHECK-NEXT: vmsltu.vv v0, v9, v8, v0.t
212 %v = call <8 x i1> @llvm.vp.icmp.v8i8(<8 x i8> %va, <8 x i8> %vb, metadata !"ugt", <8 x i1> %m, i32 %evl)
216 define <8 x i1> @icmp_ugt_vx_v8i8(<8 x i8> %va, i8 %b, <8 x i1> %m, i32 zeroext %evl) {
217 ; CHECK-LABEL: icmp_ugt_vx_v8i8:
219 ; CHECK-NEXT: vsetvli zero, a1, e8, mf2, ta, ma
220 ; CHECK-NEXT: vmsgtu.vx v0, v8, a0, v0.t
222 %elt.head = insertelement <8 x i8> poison, i8 %b, i32 0
223 %vb = shufflevector <8 x i8> %elt.head, <8 x i8> poison, <8 x i32> zeroinitializer
224 %v = call <8 x i1> @llvm.vp.icmp.v8i8(<8 x i8> %va, <8 x i8> %vb, metadata !"ugt", <8 x i1> %m, i32 %evl)
228 define <8 x i1> @icmp_ugt_vx_swap_v8i8(<8 x i8> %va, i8 %b, <8 x i1> %m, i32 zeroext %evl) {
229 ; CHECK-LABEL: icmp_ugt_vx_swap_v8i8:
231 ; CHECK-NEXT: vsetvli zero, a1, e8, mf2, ta, ma
232 ; CHECK-NEXT: vmsltu.vx v0, v8, a0, v0.t
234 %elt.head = insertelement <8 x i8> poison, i8 %b, i32 0
235 %vb = shufflevector <8 x i8> %elt.head, <8 x i8> poison, <8 x i32> zeroinitializer
236 %v = call <8 x i1> @llvm.vp.icmp.v8i8(<8 x i8> %vb, <8 x i8> %va, metadata !"ugt", <8 x i1> %m, i32 %evl)
240 define <8 x i1> @icmp_ugt_vi_v8i8(<8 x i8> %va, <8 x i1> %m, i32 zeroext %evl) {
241 ; CHECK-LABEL: icmp_ugt_vi_v8i8:
243 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
244 ; CHECK-NEXT: vmsgtu.vi v0, v8, 4, v0.t
246 %v = call <8 x i1> @llvm.vp.icmp.v8i8(<8 x i8> %va, <8 x i8> splat (i8 4), metadata !"ugt", <8 x i1> %m, i32 %evl)
250 define <8 x i1> @icmp_ugt_vi_swap_v8i8(<8 x i8> %va, <8 x i1> %m, i32 zeroext %evl) {
251 ; CHECK-LABEL: icmp_ugt_vi_swap_v8i8:
253 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
254 ; CHECK-NEXT: vmsleu.vi v0, v8, 3, v0.t
256 %v = call <8 x i1> @llvm.vp.icmp.v8i8(<8 x i8> splat (i8 4), <8 x i8> %va, metadata !"ugt", <8 x i1> %m, i32 %evl)
260 define <8 x i1> @icmp_uge_vv_v8i8(<8 x i8> %va, <8 x i8> %vb, <8 x i1> %m, i32 zeroext %evl) {
261 ; CHECK-LABEL: icmp_uge_vv_v8i8:
263 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
264 ; CHECK-NEXT: vmsleu.vv v0, v9, v8, v0.t
266 %v = call <8 x i1> @llvm.vp.icmp.v8i8(<8 x i8> %va, <8 x i8> %vb, metadata !"uge", <8 x i1> %m, i32 %evl)
270 define <8 x i1> @icmp_uge_vx_v8i8(<8 x i8> %va, i8 %b, <8 x i1> %m, i32 zeroext %evl) {
271 ; CHECK-LABEL: icmp_uge_vx_v8i8:
273 ; CHECK-NEXT: vsetivli zero, 8, e8, mf2, ta, ma
274 ; CHECK-NEXT: vmv.v.x v9, a0
275 ; CHECK-NEXT: vsetvli zero, a1, e8, mf2, ta, ma
276 ; CHECK-NEXT: vmsleu.vv v0, v9, v8, v0.t
278 %elt.head = insertelement <8 x i8> poison, i8 %b, i32 0
279 %vb = shufflevector <8 x i8> %elt.head, <8 x i8> poison, <8 x i32> zeroinitializer
280 %v = call <8 x i1> @llvm.vp.icmp.v8i8(<8 x i8> %va, <8 x i8> %vb, metadata !"uge", <8 x i1> %m, i32 %evl)
284 define <8 x i1> @icmp_uge_vx_swap_v8i8(<8 x i8> %va, i8 %b, <8 x i1> %m, i32 zeroext %evl) {
285 ; CHECK-LABEL: icmp_uge_vx_swap_v8i8:
287 ; CHECK-NEXT: vsetvli zero, a1, e8, mf2, ta, ma
288 ; CHECK-NEXT: vmsleu.vx v0, v8, a0, v0.t
290 %elt.head = insertelement <8 x i8> poison, i8 %b, i32 0
291 %vb = shufflevector <8 x i8> %elt.head, <8 x i8> poison, <8 x i32> zeroinitializer
292 %v = call <8 x i1> @llvm.vp.icmp.v8i8(<8 x i8> %vb, <8 x i8> %va, metadata !"uge", <8 x i1> %m, i32 %evl)
296 define <8 x i1> @icmp_uge_vi_v8i8(<8 x i8> %va, <8 x i1> %m, i32 zeroext %evl) {
297 ; CHECK-LABEL: icmp_uge_vi_v8i8:
299 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
300 ; CHECK-NEXT: vmsgtu.vi v0, v8, 3, v0.t
302 %v = call <8 x i1> @llvm.vp.icmp.v8i8(<8 x i8> %va, <8 x i8> splat (i8 4), metadata !"uge", <8 x i1> %m, i32 %evl)
306 define <8 x i1> @icmp_uge_vi_swap_v8i8(<8 x i8> %va, <8 x i1> %m, i32 zeroext %evl) {
307 ; CHECK-LABEL: icmp_uge_vi_swap_v8i8:
309 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
310 ; CHECK-NEXT: vmsleu.vi v0, v8, 4, v0.t
312 %v = call <8 x i1> @llvm.vp.icmp.v8i8(<8 x i8> splat (i8 4), <8 x i8> %va, metadata !"uge", <8 x i1> %m, i32 %evl)
316 define <8 x i1> @icmp_ult_vv_v8i8(<8 x i8> %va, <8 x i8> %vb, <8 x i1> %m, i32 zeroext %evl) {
317 ; CHECK-LABEL: icmp_ult_vv_v8i8:
319 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
320 ; CHECK-NEXT: vmsltu.vv v0, v8, v9, v0.t
322 %v = call <8 x i1> @llvm.vp.icmp.v8i8(<8 x i8> %va, <8 x i8> %vb, metadata !"ult", <8 x i1> %m, i32 %evl)
326 define <8 x i1> @icmp_ult_vx_v8i8(<8 x i8> %va, i8 %b, <8 x i1> %m, i32 zeroext %evl) {
327 ; CHECK-LABEL: icmp_ult_vx_v8i8:
329 ; CHECK-NEXT: vsetvli zero, a1, e8, mf2, ta, ma
330 ; CHECK-NEXT: vmsltu.vx v0, v8, a0, v0.t
332 %elt.head = insertelement <8 x i8> poison, i8 %b, i32 0
333 %vb = shufflevector <8 x i8> %elt.head, <8 x i8> poison, <8 x i32> zeroinitializer
334 %v = call <8 x i1> @llvm.vp.icmp.v8i8(<8 x i8> %va, <8 x i8> %vb, metadata !"ult", <8 x i1> %m, i32 %evl)
338 define <8 x i1> @icmp_ult_vx_swap_v8i8(<8 x i8> %va, i8 %b, <8 x i1> %m, i32 zeroext %evl) {
339 ; CHECK-LABEL: icmp_ult_vx_swap_v8i8:
341 ; CHECK-NEXT: vsetvli zero, a1, e8, mf2, ta, ma
342 ; CHECK-NEXT: vmsgtu.vx v0, v8, a0, v0.t
344 %elt.head = insertelement <8 x i8> poison, i8 %b, i32 0
345 %vb = shufflevector <8 x i8> %elt.head, <8 x i8> poison, <8 x i32> zeroinitializer
346 %v = call <8 x i1> @llvm.vp.icmp.v8i8(<8 x i8> %vb, <8 x i8> %va, metadata !"ult", <8 x i1> %m, i32 %evl)
350 define <8 x i1> @icmp_ult_vi_v8i8(<8 x i8> %va, <8 x i1> %m, i32 zeroext %evl) {
351 ; CHECK-LABEL: icmp_ult_vi_v8i8:
353 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
354 ; CHECK-NEXT: vmsleu.vi v0, v8, 3, v0.t
356 %v = call <8 x i1> @llvm.vp.icmp.v8i8(<8 x i8> %va, <8 x i8> splat (i8 4), metadata !"ult", <8 x i1> %m, i32 %evl)
360 define <8 x i1> @icmp_ult_vi_swap_v8i8(<8 x i8> %va, <8 x i1> %m, i32 zeroext %evl) {
361 ; CHECK-LABEL: icmp_ult_vi_swap_v8i8:
363 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
364 ; CHECK-NEXT: vmsgtu.vi v0, v8, 4, v0.t
366 %v = call <8 x i1> @llvm.vp.icmp.v8i8(<8 x i8> splat (i8 4), <8 x i8> %va, metadata !"ult", <8 x i1> %m, i32 %evl)
370 define <8 x i1> @icmp_sgt_vv_v8i8(<8 x i8> %va, <8 x i8> %vb, <8 x i1> %m, i32 zeroext %evl) {
371 ; CHECK-LABEL: icmp_sgt_vv_v8i8:
373 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
374 ; CHECK-NEXT: vmslt.vv v0, v9, v8, v0.t
376 %v = call <8 x i1> @llvm.vp.icmp.v8i8(<8 x i8> %va, <8 x i8> %vb, metadata !"sgt", <8 x i1> %m, i32 %evl)
380 define <8 x i1> @icmp_sgt_vx_v8i8(<8 x i8> %va, i8 %b, <8 x i1> %m, i32 zeroext %evl) {
381 ; CHECK-LABEL: icmp_sgt_vx_v8i8:
383 ; CHECK-NEXT: vsetvli zero, a1, e8, mf2, ta, ma
384 ; CHECK-NEXT: vmsgt.vx v0, v8, a0, v0.t
386 %elt.head = insertelement <8 x i8> poison, i8 %b, i32 0
387 %vb = shufflevector <8 x i8> %elt.head, <8 x i8> poison, <8 x i32> zeroinitializer
388 %v = call <8 x i1> @llvm.vp.icmp.v8i8(<8 x i8> %va, <8 x i8> %vb, metadata !"sgt", <8 x i1> %m, i32 %evl)
392 define <8 x i1> @icmp_sgt_vx_swap_v8i8(<8 x i8> %va, i8 %b, <8 x i1> %m, i32 zeroext %evl) {
393 ; CHECK-LABEL: icmp_sgt_vx_swap_v8i8:
395 ; CHECK-NEXT: vsetvli zero, a1, e8, mf2, ta, ma
396 ; CHECK-NEXT: vmslt.vx v0, v8, a0, v0.t
398 %elt.head = insertelement <8 x i8> poison, i8 %b, i32 0
399 %vb = shufflevector <8 x i8> %elt.head, <8 x i8> poison, <8 x i32> zeroinitializer
400 %v = call <8 x i1> @llvm.vp.icmp.v8i8(<8 x i8> %vb, <8 x i8> %va, metadata !"sgt", <8 x i1> %m, i32 %evl)
404 define <8 x i1> @icmp_sgt_vi_v8i8(<8 x i8> %va, <8 x i1> %m, i32 zeroext %evl) {
405 ; CHECK-LABEL: icmp_sgt_vi_v8i8:
407 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
408 ; CHECK-NEXT: vmsgt.vi v0, v8, 4, v0.t
410 %v = call <8 x i1> @llvm.vp.icmp.v8i8(<8 x i8> %va, <8 x i8> splat (i8 4), metadata !"sgt", <8 x i1> %m, i32 %evl)
414 define <8 x i1> @icmp_sgt_vi_swap_v8i8(<8 x i8> %va, <8 x i1> %m, i32 zeroext %evl) {
415 ; CHECK-LABEL: icmp_sgt_vi_swap_v8i8:
417 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
418 ; CHECK-NEXT: vmsle.vi v0, v8, 3, v0.t
420 %v = call <8 x i1> @llvm.vp.icmp.v8i8(<8 x i8> splat (i8 4), <8 x i8> %va, metadata !"sgt", <8 x i1> %m, i32 %evl)
424 define <8 x i1> @icmp_sge_vv_v8i8(<8 x i8> %va, <8 x i8> %vb, <8 x i1> %m, i32 zeroext %evl) {
425 ; CHECK-LABEL: icmp_sge_vv_v8i8:
427 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
428 ; CHECK-NEXT: vmsle.vv v0, v9, v8, v0.t
430 %v = call <8 x i1> @llvm.vp.icmp.v8i8(<8 x i8> %va, <8 x i8> %vb, metadata !"sge", <8 x i1> %m, i32 %evl)
434 define <8 x i1> @icmp_sge_vx_v8i8(<8 x i8> %va, i8 %b, <8 x i1> %m, i32 zeroext %evl) {
435 ; CHECK-LABEL: icmp_sge_vx_v8i8:
437 ; CHECK-NEXT: vsetivli zero, 8, e8, mf2, ta, ma
438 ; CHECK-NEXT: vmv.v.x v9, a0
439 ; CHECK-NEXT: vsetvli zero, a1, e8, mf2, ta, ma
440 ; CHECK-NEXT: vmsle.vv v0, v9, v8, v0.t
442 %elt.head = insertelement <8 x i8> poison, i8 %b, i32 0
443 %vb = shufflevector <8 x i8> %elt.head, <8 x i8> poison, <8 x i32> zeroinitializer
444 %v = call <8 x i1> @llvm.vp.icmp.v8i8(<8 x i8> %va, <8 x i8> %vb, metadata !"sge", <8 x i1> %m, i32 %evl)
448 define <8 x i1> @icmp_sge_vx_swap_v8i8(<8 x i8> %va, i8 %b, <8 x i1> %m, i32 zeroext %evl) {
449 ; CHECK-LABEL: icmp_sge_vx_swap_v8i8:
451 ; CHECK-NEXT: vsetvli zero, a1, e8, mf2, ta, ma
452 ; CHECK-NEXT: vmsle.vx v0, v8, a0, v0.t
454 %elt.head = insertelement <8 x i8> poison, i8 %b, i32 0
455 %vb = shufflevector <8 x i8> %elt.head, <8 x i8> poison, <8 x i32> zeroinitializer
456 %v = call <8 x i1> @llvm.vp.icmp.v8i8(<8 x i8> %vb, <8 x i8> %va, metadata !"sge", <8 x i1> %m, i32 %evl)
460 define <8 x i1> @icmp_sge_vi_v8i8(<8 x i8> %va, <8 x i1> %m, i32 zeroext %evl) {
461 ; CHECK-LABEL: icmp_sge_vi_v8i8:
463 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
464 ; CHECK-NEXT: vmsgt.vi v0, v8, 3, v0.t
466 %v = call <8 x i1> @llvm.vp.icmp.v8i8(<8 x i8> %va, <8 x i8> splat (i8 4), metadata !"sge", <8 x i1> %m, i32 %evl)
470 define <8 x i1> @icmp_sge_vi_swap_v8i8(<8 x i8> %va, <8 x i1> %m, i32 zeroext %evl) {
471 ; CHECK-LABEL: icmp_sge_vi_swap_v8i8:
473 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
474 ; CHECK-NEXT: vmsle.vi v0, v8, 4, v0.t
476 %v = call <8 x i1> @llvm.vp.icmp.v8i8(<8 x i8> splat (i8 4), <8 x i8> %va, metadata !"sge", <8 x i1> %m, i32 %evl)
480 define <8 x i1> @icmp_slt_vv_v8i8(<8 x i8> %va, <8 x i8> %vb, <8 x i1> %m, i32 zeroext %evl) {
481 ; CHECK-LABEL: icmp_slt_vv_v8i8:
483 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
484 ; CHECK-NEXT: vmslt.vv v0, v8, v9, v0.t
486 %v = call <8 x i1> @llvm.vp.icmp.v8i8(<8 x i8> %va, <8 x i8> %vb, metadata !"slt", <8 x i1> %m, i32 %evl)
490 define <8 x i1> @icmp_slt_vx_v8i8(<8 x i8> %va, i8 %b, <8 x i1> %m, i32 zeroext %evl) {
491 ; CHECK-LABEL: icmp_slt_vx_v8i8:
493 ; CHECK-NEXT: vsetvli zero, a1, e8, mf2, ta, ma
494 ; CHECK-NEXT: vmslt.vx v0, v8, a0, v0.t
496 %elt.head = insertelement <8 x i8> poison, i8 %b, i32 0
497 %vb = shufflevector <8 x i8> %elt.head, <8 x i8> poison, <8 x i32> zeroinitializer
498 %v = call <8 x i1> @llvm.vp.icmp.v8i8(<8 x i8> %va, <8 x i8> %vb, metadata !"slt", <8 x i1> %m, i32 %evl)
502 define <8 x i1> @icmp_slt_vx_swap_v8i8(<8 x i8> %va, i8 %b, <8 x i1> %m, i32 zeroext %evl) {
503 ; CHECK-LABEL: icmp_slt_vx_swap_v8i8:
505 ; CHECK-NEXT: vsetvli zero, a1, e8, mf2, ta, ma
506 ; CHECK-NEXT: vmsgt.vx v0, v8, a0, v0.t
508 %elt.head = insertelement <8 x i8> poison, i8 %b, i32 0
509 %vb = shufflevector <8 x i8> %elt.head, <8 x i8> poison, <8 x i32> zeroinitializer
510 %v = call <8 x i1> @llvm.vp.icmp.v8i8(<8 x i8> %vb, <8 x i8> %va, metadata !"slt", <8 x i1> %m, i32 %evl)
514 define <8 x i1> @icmp_slt_vi_v8i8(<8 x i8> %va, <8 x i1> %m, i32 zeroext %evl) {
515 ; CHECK-LABEL: icmp_slt_vi_v8i8:
517 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
518 ; CHECK-NEXT: vmsle.vi v0, v8, 3, v0.t
520 %v = call <8 x i1> @llvm.vp.icmp.v8i8(<8 x i8> %va, <8 x i8> splat (i8 4), metadata !"slt", <8 x i1> %m, i32 %evl)
524 define <8 x i1> @icmp_slt_vi_swap_v8i8(<8 x i8> %va, <8 x i1> %m, i32 zeroext %evl) {
525 ; CHECK-LABEL: icmp_slt_vi_swap_v8i8:
527 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
528 ; CHECK-NEXT: vmsgt.vi v0, v8, 4, v0.t
530 %v = call <8 x i1> @llvm.vp.icmp.v8i8(<8 x i8> splat (i8 4), <8 x i8> %va, metadata !"slt", <8 x i1> %m, i32 %evl)
534 define <8 x i1> @icmp_sle_vv_v8i8(<8 x i8> %va, <8 x i8> %vb, <8 x i1> %m, i32 zeroext %evl) {
535 ; CHECK-LABEL: icmp_sle_vv_v8i8:
537 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
538 ; CHECK-NEXT: vmsle.vv v0, v8, v9, v0.t
540 %v = call <8 x i1> @llvm.vp.icmp.v8i8(<8 x i8> %va, <8 x i8> %vb, metadata !"sle", <8 x i1> %m, i32 %evl)
544 define <8 x i1> @icmp_sle_vx_v8i8(<8 x i8> %va, i8 %b, <8 x i1> %m, i32 zeroext %evl) {
545 ; CHECK-LABEL: icmp_sle_vx_v8i8:
547 ; CHECK-NEXT: vsetvli zero, a1, e8, mf2, ta, ma
548 ; CHECK-NEXT: vmsle.vx v0, v8, a0, v0.t
550 %elt.head = insertelement <8 x i8> poison, i8 %b, i32 0
551 %vb = shufflevector <8 x i8> %elt.head, <8 x i8> poison, <8 x i32> zeroinitializer
552 %v = call <8 x i1> @llvm.vp.icmp.v8i8(<8 x i8> %va, <8 x i8> %vb, metadata !"sle", <8 x i1> %m, i32 %evl)
556 define <8 x i1> @icmp_sle_vx_swap_v8i8(<8 x i8> %va, i8 %b, <8 x i1> %m, i32 zeroext %evl) {
557 ; CHECK-LABEL: icmp_sle_vx_swap_v8i8:
559 ; CHECK-NEXT: vsetivli zero, 8, e8, mf2, ta, ma
560 ; CHECK-NEXT: vmv.v.x v9, a0
561 ; CHECK-NEXT: vsetvli zero, a1, e8, mf2, ta, ma
562 ; CHECK-NEXT: vmsle.vv v0, v9, v8, v0.t
564 %elt.head = insertelement <8 x i8> poison, i8 %b, i32 0
565 %vb = shufflevector <8 x i8> %elt.head, <8 x i8> poison, <8 x i32> zeroinitializer
566 %v = call <8 x i1> @llvm.vp.icmp.v8i8(<8 x i8> %vb, <8 x i8> %va, metadata !"sle", <8 x i1> %m, i32 %evl)
570 define <8 x i1> @icmp_sle_vi_v8i8(<8 x i8> %va, <8 x i1> %m, i32 zeroext %evl) {
571 ; CHECK-LABEL: icmp_sle_vi_v8i8:
573 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
574 ; CHECK-NEXT: vmsle.vi v0, v8, 4, v0.t
576 %v = call <8 x i1> @llvm.vp.icmp.v8i8(<8 x i8> %va, <8 x i8> splat (i8 4), metadata !"sle", <8 x i1> %m, i32 %evl)
580 define <8 x i1> @icmp_sle_vi_swap_v8i8(<8 x i8> %va, <8 x i1> %m, i32 zeroext %evl) {
581 ; CHECK-LABEL: icmp_sle_vi_swap_v8i8:
583 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
584 ; CHECK-NEXT: vmsgt.vi v0, v8, 3, v0.t
586 %v = call <8 x i1> @llvm.vp.icmp.v8i8(<8 x i8> splat (i8 4), <8 x i8> %va, metadata !"sle", <8 x i1> %m, i32 %evl)
590 declare <256 x i1> @llvm.vp.icmp.v256i8(<256 x i8>, <256 x i8>, metadata, <256 x i1>, i32)
592 define <256 x i1> @icmp_eq_vv_v256i8(<256 x i8> %va, <256 x i8> %vb, <256 x i1> %m, i32 zeroext %evl) {
593 ; CHECK-LABEL: icmp_eq_vv_v256i8:
595 ; CHECK-NEXT: addi sp, sp, -16
596 ; CHECK-NEXT: .cfi_def_cfa_offset 16
597 ; CHECK-NEXT: csrr a1, vlenb
598 ; CHECK-NEXT: slli a1, a1, 4
599 ; CHECK-NEXT: sub sp, sp, a1
600 ; CHECK-NEXT: .cfi_escape 0x0f, 0x0d, 0x72, 0x00, 0x11, 0x10, 0x22, 0x11, 0x10, 0x92, 0xa2, 0x38, 0x00, 0x1e, 0x22 # sp + 16 + 16 * vlenb
601 ; CHECK-NEXT: vmv1r.v v7, v0
602 ; CHECK-NEXT: csrr a1, vlenb
603 ; CHECK-NEXT: slli a1, a1, 3
604 ; CHECK-NEXT: add a1, sp, a1
605 ; CHECK-NEXT: addi a1, a1, 16
606 ; CHECK-NEXT: vs8r.v v8, (a1) # Unknown-size Folded Spill
607 ; CHECK-NEXT: li a1, 128
608 ; CHECK-NEXT: vsetvli zero, a1, e8, m8, ta, ma
609 ; CHECK-NEXT: vlm.v v0, (a2)
610 ; CHECK-NEXT: addi a2, a0, 128
611 ; CHECK-NEXT: vle8.v v8, (a2)
612 ; CHECK-NEXT: addi a2, a3, -128
613 ; CHECK-NEXT: sltu a4, a3, a2
614 ; CHECK-NEXT: vle8.v v24, (a0)
615 ; CHECK-NEXT: addi a0, sp, 16
616 ; CHECK-NEXT: vs8r.v v24, (a0) # Unknown-size Folded Spill
617 ; CHECK-NEXT: addi a4, a4, -1
618 ; CHECK-NEXT: and a2, a4, a2
619 ; CHECK-NEXT: vsetvli zero, a2, e8, m8, ta, ma
620 ; CHECK-NEXT: vmseq.vv v6, v16, v8, v0.t
621 ; CHECK-NEXT: bltu a3, a1, .LBB51_2
622 ; CHECK-NEXT: # %bb.1:
623 ; CHECK-NEXT: li a3, 128
624 ; CHECK-NEXT: .LBB51_2:
625 ; CHECK-NEXT: vmv1r.v v0, v7
626 ; CHECK-NEXT: csrr a0, vlenb
627 ; CHECK-NEXT: slli a0, a0, 3
628 ; CHECK-NEXT: add a0, sp, a0
629 ; CHECK-NEXT: addi a0, a0, 16
630 ; CHECK-NEXT: vl8r.v v8, (a0) # Unknown-size Folded Reload
631 ; CHECK-NEXT: addi a0, sp, 16
632 ; CHECK-NEXT: vl8r.v v24, (a0) # Unknown-size Folded Reload
633 ; CHECK-NEXT: vsetvli zero, a3, e8, m8, ta, ma
634 ; CHECK-NEXT: vmseq.vv v16, v8, v24, v0.t
635 ; CHECK-NEXT: vmv1r.v v0, v16
636 ; CHECK-NEXT: vmv1r.v v8, v6
637 ; CHECK-NEXT: csrr a0, vlenb
638 ; CHECK-NEXT: slli a0, a0, 4
639 ; CHECK-NEXT: add sp, sp, a0
640 ; CHECK-NEXT: addi sp, sp, 16
642 %v = call <256 x i1> @llvm.vp.icmp.v256i8(<256 x i8> %va, <256 x i8> %vb, metadata !"eq", <256 x i1> %m, i32 %evl)
646 define <256 x i1> @icmp_eq_vx_v256i8(<256 x i8> %va, i8 %b, <256 x i1> %m, i32 zeroext %evl) {
647 ; CHECK-LABEL: icmp_eq_vx_v256i8:
649 ; CHECK-NEXT: vmv1r.v v24, v0
650 ; CHECK-NEXT: li a3, 128
651 ; CHECK-NEXT: vsetvli zero, a3, e8, m8, ta, ma
652 ; CHECK-NEXT: vlm.v v0, (a1)
653 ; CHECK-NEXT: addi a1, a2, -128
654 ; CHECK-NEXT: sltu a4, a2, a1
655 ; CHECK-NEXT: addi a4, a4, -1
656 ; CHECK-NEXT: and a1, a4, a1
657 ; CHECK-NEXT: vsetvli zero, a1, e8, m8, ta, ma
658 ; CHECK-NEXT: vmseq.vx v25, v16, a0, v0.t
659 ; CHECK-NEXT: bltu a2, a3, .LBB52_2
660 ; CHECK-NEXT: # %bb.1:
661 ; CHECK-NEXT: li a2, 128
662 ; CHECK-NEXT: .LBB52_2:
663 ; CHECK-NEXT: vmv1r.v v0, v24
664 ; CHECK-NEXT: vsetvli zero, a2, e8, m8, ta, ma
665 ; CHECK-NEXT: vmseq.vx v16, v8, a0, v0.t
666 ; CHECK-NEXT: vmv1r.v v0, v16
667 ; CHECK-NEXT: vmv1r.v v8, v25
669 %elt.head = insertelement <256 x i8> poison, i8 %b, i32 0
670 %vb = shufflevector <256 x i8> %elt.head, <256 x i8> poison, <256 x i32> zeroinitializer
671 %v = call <256 x i1> @llvm.vp.icmp.v256i8(<256 x i8> %va, <256 x i8> %vb, metadata !"eq", <256 x i1> %m, i32 %evl)
675 define <256 x i1> @icmp_eq_vx_swap_v256i8(<256 x i8> %va, i8 %b, <256 x i1> %m, i32 zeroext %evl) {
676 ; CHECK-LABEL: icmp_eq_vx_swap_v256i8:
678 ; CHECK-NEXT: vmv1r.v v24, v0
679 ; CHECK-NEXT: li a3, 128
680 ; CHECK-NEXT: vsetvli zero, a3, e8, m8, ta, ma
681 ; CHECK-NEXT: vlm.v v0, (a1)
682 ; CHECK-NEXT: addi a1, a2, -128
683 ; CHECK-NEXT: sltu a4, a2, a1
684 ; CHECK-NEXT: addi a4, a4, -1
685 ; CHECK-NEXT: and a1, a4, a1
686 ; CHECK-NEXT: vsetvli zero, a1, e8, m8, ta, ma
687 ; CHECK-NEXT: vmseq.vx v25, v16, a0, v0.t
688 ; CHECK-NEXT: bltu a2, a3, .LBB53_2
689 ; CHECK-NEXT: # %bb.1:
690 ; CHECK-NEXT: li a2, 128
691 ; CHECK-NEXT: .LBB53_2:
692 ; CHECK-NEXT: vmv1r.v v0, v24
693 ; CHECK-NEXT: vsetvli zero, a2, e8, m8, ta, ma
694 ; CHECK-NEXT: vmseq.vx v16, v8, a0, v0.t
695 ; CHECK-NEXT: vmv1r.v v0, v16
696 ; CHECK-NEXT: vmv1r.v v8, v25
698 %elt.head = insertelement <256 x i8> poison, i8 %b, i32 0
699 %vb = shufflevector <256 x i8> %elt.head, <256 x i8> poison, <256 x i32> zeroinitializer
700 %v = call <256 x i1> @llvm.vp.icmp.v256i8(<256 x i8> %vb, <256 x i8> %va, metadata !"eq", <256 x i1> %m, i32 %evl)
704 declare <8 x i1> @llvm.vp.icmp.v8i32(<8 x i32>, <8 x i32>, metadata, <8 x i1>, i32)
706 define <8 x i1> @icmp_eq_vv_v8i32(<8 x i32> %va, <8 x i32> %vb, <8 x i1> %m, i32 zeroext %evl) {
707 ; CHECK-LABEL: icmp_eq_vv_v8i32:
709 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
710 ; CHECK-NEXT: vmseq.vv v12, v8, v10, v0.t
711 ; CHECK-NEXT: vmv1r.v v0, v12
713 %v = call <8 x i1> @llvm.vp.icmp.v8i32(<8 x i32> %va, <8 x i32> %vb, metadata !"eq", <8 x i1> %m, i32 %evl)
717 define <8 x i1> @icmp_eq_vx_v8i32(<8 x i32> %va, i32 %b, <8 x i1> %m, i32 zeroext %evl) {
718 ; CHECK-LABEL: icmp_eq_vx_v8i32:
720 ; CHECK-NEXT: vsetvli zero, a1, e32, m2, ta, ma
721 ; CHECK-NEXT: vmseq.vx v10, v8, a0, v0.t
722 ; CHECK-NEXT: vmv1r.v v0, v10
724 %elt.head = insertelement <8 x i32> poison, i32 %b, i32 0
725 %vb = shufflevector <8 x i32> %elt.head, <8 x i32> poison, <8 x i32> zeroinitializer
726 %v = call <8 x i1> @llvm.vp.icmp.v8i32(<8 x i32> %va, <8 x i32> %vb, metadata !"eq", <8 x i1> %m, i32 %evl)
730 define <8 x i1> @icmp_eq_vx_swap_v8i32(<8 x i32> %va, i32 %b, <8 x i1> %m, i32 zeroext %evl) {
731 ; CHECK-LABEL: icmp_eq_vx_swap_v8i32:
733 ; CHECK-NEXT: vsetvli zero, a1, e32, m2, ta, ma
734 ; CHECK-NEXT: vmseq.vx v10, v8, a0, v0.t
735 ; CHECK-NEXT: vmv1r.v v0, v10
737 %elt.head = insertelement <8 x i32> poison, i32 %b, i32 0
738 %vb = shufflevector <8 x i32> %elt.head, <8 x i32> poison, <8 x i32> zeroinitializer
739 %v = call <8 x i1> @llvm.vp.icmp.v8i32(<8 x i32> %vb, <8 x i32> %va, metadata !"eq", <8 x i1> %m, i32 %evl)
743 define <8 x i1> @icmp_eq_vi_v8i32(<8 x i32> %va, <8 x i1> %m, i32 zeroext %evl) {
744 ; CHECK-LABEL: icmp_eq_vi_v8i32:
746 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
747 ; CHECK-NEXT: vmseq.vi v10, v8, 4, v0.t
748 ; CHECK-NEXT: vmv1r.v v0, v10
750 %v = call <8 x i1> @llvm.vp.icmp.v8i32(<8 x i32> %va, <8 x i32> splat (i32 4), metadata !"eq", <8 x i1> %m, i32 %evl)
754 define <8 x i1> @icmp_eq_vi_swap_v8i32(<8 x i32> %va, <8 x i1> %m, i32 zeroext %evl) {
755 ; CHECK-LABEL: icmp_eq_vi_swap_v8i32:
757 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
758 ; CHECK-NEXT: vmseq.vi v10, v8, 4, v0.t
759 ; CHECK-NEXT: vmv1r.v v0, v10
761 %v = call <8 x i1> @llvm.vp.icmp.v8i32(<8 x i32> splat (i32 4), <8 x i32> %va, metadata !"eq", <8 x i1> %m, i32 %evl)
765 define <8 x i1> @icmp_ne_vv_v8i32(<8 x i32> %va, <8 x i32> %vb, <8 x i1> %m, i32 zeroext %evl) {
766 ; CHECK-LABEL: icmp_ne_vv_v8i32:
768 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
769 ; CHECK-NEXT: vmsne.vv v12, v8, v10, v0.t
770 ; CHECK-NEXT: vmv1r.v v0, v12
772 %v = call <8 x i1> @llvm.vp.icmp.v8i32(<8 x i32> %va, <8 x i32> %vb, metadata !"ne", <8 x i1> %m, i32 %evl)
776 define <8 x i1> @icmp_ne_vx_v8i32(<8 x i32> %va, i32 %b, <8 x i1> %m, i32 zeroext %evl) {
777 ; CHECK-LABEL: icmp_ne_vx_v8i32:
779 ; CHECK-NEXT: vsetvli zero, a1, e32, m2, ta, ma
780 ; CHECK-NEXT: vmsne.vx v10, v8, a0, v0.t
781 ; CHECK-NEXT: vmv1r.v v0, v10
783 %elt.head = insertelement <8 x i32> poison, i32 %b, i32 0
784 %vb = shufflevector <8 x i32> %elt.head, <8 x i32> poison, <8 x i32> zeroinitializer
785 %v = call <8 x i1> @llvm.vp.icmp.v8i32(<8 x i32> %va, <8 x i32> %vb, metadata !"ne", <8 x i1> %m, i32 %evl)
789 define <8 x i1> @icmp_ne_vx_swap_v8i32(<8 x i32> %va, i32 %b, <8 x i1> %m, i32 zeroext %evl) {
790 ; CHECK-LABEL: icmp_ne_vx_swap_v8i32:
792 ; CHECK-NEXT: vsetvli zero, a1, e32, m2, ta, ma
793 ; CHECK-NEXT: vmsne.vx v10, v8, a0, v0.t
794 ; CHECK-NEXT: vmv1r.v v0, v10
796 %elt.head = insertelement <8 x i32> poison, i32 %b, i32 0
797 %vb = shufflevector <8 x i32> %elt.head, <8 x i32> poison, <8 x i32> zeroinitializer
798 %v = call <8 x i1> @llvm.vp.icmp.v8i32(<8 x i32> %vb, <8 x i32> %va, metadata !"ne", <8 x i1> %m, i32 %evl)
802 define <8 x i1> @icmp_ne_vi_v8i32(<8 x i32> %va, <8 x i1> %m, i32 zeroext %evl) {
803 ; CHECK-LABEL: icmp_ne_vi_v8i32:
805 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
806 ; CHECK-NEXT: vmsne.vi v10, v8, 4, v0.t
807 ; CHECK-NEXT: vmv1r.v v0, v10
809 %v = call <8 x i1> @llvm.vp.icmp.v8i32(<8 x i32> %va, <8 x i32> splat (i32 4), metadata !"ne", <8 x i1> %m, i32 %evl)
813 define <8 x i1> @icmp_ne_vi_swap_v8i32(<8 x i32> %va, <8 x i1> %m, i32 zeroext %evl) {
814 ; CHECK-LABEL: icmp_ne_vi_swap_v8i32:
816 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
817 ; CHECK-NEXT: vmsne.vi v10, v8, 4, v0.t
818 ; CHECK-NEXT: vmv1r.v v0, v10
820 %v = call <8 x i1> @llvm.vp.icmp.v8i32(<8 x i32> splat (i32 4), <8 x i32> %va, metadata !"ne", <8 x i1> %m, i32 %evl)
824 define <8 x i1> @icmp_ugt_vv_v8i32(<8 x i32> %va, <8 x i32> %vb, <8 x i1> %m, i32 zeroext %evl) {
825 ; CHECK-LABEL: icmp_ugt_vv_v8i32:
827 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
828 ; CHECK-NEXT: vmsltu.vv v12, v10, v8, v0.t
829 ; CHECK-NEXT: vmv1r.v v0, v12
831 %v = call <8 x i1> @llvm.vp.icmp.v8i32(<8 x i32> %va, <8 x i32> %vb, metadata !"ugt", <8 x i1> %m, i32 %evl)
835 define <8 x i1> @icmp_ugt_vx_v8i32(<8 x i32> %va, i32 %b, <8 x i1> %m, i32 zeroext %evl) {
836 ; CHECK-LABEL: icmp_ugt_vx_v8i32:
838 ; CHECK-NEXT: vsetvli zero, a1, e32, m2, ta, ma
839 ; CHECK-NEXT: vmsgtu.vx v10, v8, a0, v0.t
840 ; CHECK-NEXT: vmv1r.v v0, v10
842 %elt.head = insertelement <8 x i32> poison, i32 %b, i32 0
843 %vb = shufflevector <8 x i32> %elt.head, <8 x i32> poison, <8 x i32> zeroinitializer
844 %v = call <8 x i1> @llvm.vp.icmp.v8i32(<8 x i32> %va, <8 x i32> %vb, metadata !"ugt", <8 x i1> %m, i32 %evl)
848 define <8 x i1> @icmp_ugt_vx_swap_v8i32(<8 x i32> %va, i32 %b, <8 x i1> %m, i32 zeroext %evl) {
849 ; CHECK-LABEL: icmp_ugt_vx_swap_v8i32:
851 ; CHECK-NEXT: vsetvli zero, a1, e32, m2, ta, ma
852 ; CHECK-NEXT: vmsltu.vx v10, v8, a0, v0.t
853 ; CHECK-NEXT: vmv1r.v v0, v10
855 %elt.head = insertelement <8 x i32> poison, i32 %b, i32 0
856 %vb = shufflevector <8 x i32> %elt.head, <8 x i32> poison, <8 x i32> zeroinitializer
857 %v = call <8 x i1> @llvm.vp.icmp.v8i32(<8 x i32> %vb, <8 x i32> %va, metadata !"ugt", <8 x i1> %m, i32 %evl)
861 define <8 x i1> @icmp_ugt_vi_v8i32(<8 x i32> %va, <8 x i1> %m, i32 zeroext %evl) {
862 ; CHECK-LABEL: icmp_ugt_vi_v8i32:
864 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
865 ; CHECK-NEXT: vmsgtu.vi v10, v8, 4, v0.t
866 ; CHECK-NEXT: vmv1r.v v0, v10
868 %v = call <8 x i1> @llvm.vp.icmp.v8i32(<8 x i32> %va, <8 x i32> splat (i32 4), metadata !"ugt", <8 x i1> %m, i32 %evl)
872 define <8 x i1> @icmp_ugt_vi_swap_v8i32(<8 x i32> %va, <8 x i1> %m, i32 zeroext %evl) {
873 ; CHECK-LABEL: icmp_ugt_vi_swap_v8i32:
875 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
876 ; CHECK-NEXT: vmsleu.vi v10, v8, 3, v0.t
877 ; CHECK-NEXT: vmv1r.v v0, v10
879 %v = call <8 x i1> @llvm.vp.icmp.v8i32(<8 x i32> splat (i32 4), <8 x i32> %va, metadata !"ugt", <8 x i1> %m, i32 %evl)
883 define <8 x i1> @icmp_uge_vv_v8i32(<8 x i32> %va, <8 x i32> %vb, <8 x i1> %m, i32 zeroext %evl) {
884 ; CHECK-LABEL: icmp_uge_vv_v8i32:
886 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
887 ; CHECK-NEXT: vmsleu.vv v12, v10, v8, v0.t
888 ; CHECK-NEXT: vmv1r.v v0, v12
890 %v = call <8 x i1> @llvm.vp.icmp.v8i32(<8 x i32> %va, <8 x i32> %vb, metadata !"uge", <8 x i1> %m, i32 %evl)
894 define <8 x i1> @icmp_uge_vx_v8i32(<8 x i32> %va, i32 %b, <8 x i1> %m, i32 zeroext %evl) {
895 ; CHECK-LABEL: icmp_uge_vx_v8i32:
897 ; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, ma
898 ; CHECK-NEXT: vmv.v.x v12, a0
899 ; CHECK-NEXT: vsetvli zero, a1, e32, m2, ta, ma
900 ; CHECK-NEXT: vmsleu.vv v10, v12, v8, v0.t
901 ; CHECK-NEXT: vmv1r.v v0, v10
903 %elt.head = insertelement <8 x i32> poison, i32 %b, i32 0
904 %vb = shufflevector <8 x i32> %elt.head, <8 x i32> poison, <8 x i32> zeroinitializer
905 %v = call <8 x i1> @llvm.vp.icmp.v8i32(<8 x i32> %va, <8 x i32> %vb, metadata !"uge", <8 x i1> %m, i32 %evl)
909 define <8 x i1> @icmp_uge_vx_swap_v8i32(<8 x i32> %va, i32 %b, <8 x i1> %m, i32 zeroext %evl) {
910 ; CHECK-LABEL: icmp_uge_vx_swap_v8i32:
912 ; CHECK-NEXT: vsetvli zero, a1, e32, m2, ta, ma
913 ; CHECK-NEXT: vmsleu.vx v10, v8, a0, v0.t
914 ; CHECK-NEXT: vmv1r.v v0, v10
916 %elt.head = insertelement <8 x i32> poison, i32 %b, i32 0
917 %vb = shufflevector <8 x i32> %elt.head, <8 x i32> poison, <8 x i32> zeroinitializer
918 %v = call <8 x i1> @llvm.vp.icmp.v8i32(<8 x i32> %vb, <8 x i32> %va, metadata !"uge", <8 x i1> %m, i32 %evl)
922 define <8 x i1> @icmp_uge_vi_v8i32(<8 x i32> %va, <8 x i1> %m, i32 zeroext %evl) {
923 ; CHECK-LABEL: icmp_uge_vi_v8i32:
925 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
926 ; CHECK-NEXT: vmsgtu.vi v10, v8, 3, v0.t
927 ; CHECK-NEXT: vmv1r.v v0, v10
929 %v = call <8 x i1> @llvm.vp.icmp.v8i32(<8 x i32> %va, <8 x i32> splat (i32 4), metadata !"uge", <8 x i1> %m, i32 %evl)
933 define <8 x i1> @icmp_uge_vi_swap_v8i32(<8 x i32> %va, <8 x i1> %m, i32 zeroext %evl) {
934 ; CHECK-LABEL: icmp_uge_vi_swap_v8i32:
936 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
937 ; CHECK-NEXT: vmsleu.vi v10, v8, 4, v0.t
938 ; CHECK-NEXT: vmv1r.v v0, v10
940 %v = call <8 x i1> @llvm.vp.icmp.v8i32(<8 x i32> splat (i32 4), <8 x i32> %va, metadata !"uge", <8 x i1> %m, i32 %evl)
944 define <8 x i1> @icmp_ult_vv_v8i32(<8 x i32> %va, <8 x i32> %vb, <8 x i1> %m, i32 zeroext %evl) {
945 ; CHECK-LABEL: icmp_ult_vv_v8i32:
947 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
948 ; CHECK-NEXT: vmsltu.vv v12, v8, v10, v0.t
949 ; CHECK-NEXT: vmv1r.v v0, v12
951 %v = call <8 x i1> @llvm.vp.icmp.v8i32(<8 x i32> %va, <8 x i32> %vb, metadata !"ult", <8 x i1> %m, i32 %evl)
955 define <8 x i1> @icmp_ult_vx_v8i32(<8 x i32> %va, i32 %b, <8 x i1> %m, i32 zeroext %evl) {
956 ; CHECK-LABEL: icmp_ult_vx_v8i32:
958 ; CHECK-NEXT: vsetvli zero, a1, e32, m2, ta, ma
959 ; CHECK-NEXT: vmsltu.vx v10, v8, a0, v0.t
960 ; CHECK-NEXT: vmv1r.v v0, v10
962 %elt.head = insertelement <8 x i32> poison, i32 %b, i32 0
963 %vb = shufflevector <8 x i32> %elt.head, <8 x i32> poison, <8 x i32> zeroinitializer
964 %v = call <8 x i1> @llvm.vp.icmp.v8i32(<8 x i32> %va, <8 x i32> %vb, metadata !"ult", <8 x i1> %m, i32 %evl)
968 define <8 x i1> @icmp_ult_vx_swap_v8i32(<8 x i32> %va, i32 %b, <8 x i1> %m, i32 zeroext %evl) {
969 ; CHECK-LABEL: icmp_ult_vx_swap_v8i32:
971 ; CHECK-NEXT: vsetvli zero, a1, e32, m2, ta, ma
972 ; CHECK-NEXT: vmsgtu.vx v10, v8, a0, v0.t
973 ; CHECK-NEXT: vmv1r.v v0, v10
975 %elt.head = insertelement <8 x i32> poison, i32 %b, i32 0
976 %vb = shufflevector <8 x i32> %elt.head, <8 x i32> poison, <8 x i32> zeroinitializer
977 %v = call <8 x i1> @llvm.vp.icmp.v8i32(<8 x i32> %vb, <8 x i32> %va, metadata !"ult", <8 x i1> %m, i32 %evl)
981 define <8 x i1> @icmp_ult_vi_v8i32(<8 x i32> %va, <8 x i1> %m, i32 zeroext %evl) {
982 ; CHECK-LABEL: icmp_ult_vi_v8i32:
984 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
985 ; CHECK-NEXT: vmsleu.vi v10, v8, 3, v0.t
986 ; CHECK-NEXT: vmv1r.v v0, v10
988 %v = call <8 x i1> @llvm.vp.icmp.v8i32(<8 x i32> %va, <8 x i32> splat (i32 4), metadata !"ult", <8 x i1> %m, i32 %evl)
992 define <8 x i1> @icmp_ult_vi_swap_v8i32(<8 x i32> %va, <8 x i1> %m, i32 zeroext %evl) {
993 ; CHECK-LABEL: icmp_ult_vi_swap_v8i32:
995 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
996 ; CHECK-NEXT: vmsgtu.vi v10, v8, 4, v0.t
997 ; CHECK-NEXT: vmv1r.v v0, v10
999 %v = call <8 x i1> @llvm.vp.icmp.v8i32(<8 x i32> splat (i32 4), <8 x i32> %va, metadata !"ult", <8 x i1> %m, i32 %evl)
1003 define <8 x i1> @icmp_sgt_vv_v8i32(<8 x i32> %va, <8 x i32> %vb, <8 x i1> %m, i32 zeroext %evl) {
1004 ; CHECK-LABEL: icmp_sgt_vv_v8i32:
1006 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
1007 ; CHECK-NEXT: vmslt.vv v12, v10, v8, v0.t
1008 ; CHECK-NEXT: vmv1r.v v0, v12
1010 %v = call <8 x i1> @llvm.vp.icmp.v8i32(<8 x i32> %va, <8 x i32> %vb, metadata !"sgt", <8 x i1> %m, i32 %evl)
1014 define <8 x i1> @icmp_sgt_vx_v8i32(<8 x i32> %va, i32 %b, <8 x i1> %m, i32 zeroext %evl) {
1015 ; CHECK-LABEL: icmp_sgt_vx_v8i32:
1017 ; CHECK-NEXT: vsetvli zero, a1, e32, m2, ta, ma
1018 ; CHECK-NEXT: vmsgt.vx v10, v8, a0, v0.t
1019 ; CHECK-NEXT: vmv1r.v v0, v10
1021 %elt.head = insertelement <8 x i32> poison, i32 %b, i32 0
1022 %vb = shufflevector <8 x i32> %elt.head, <8 x i32> poison, <8 x i32> zeroinitializer
1023 %v = call <8 x i1> @llvm.vp.icmp.v8i32(<8 x i32> %va, <8 x i32> %vb, metadata !"sgt", <8 x i1> %m, i32 %evl)
1027 define <8 x i1> @icmp_sgt_vx_swap_v8i32(<8 x i32> %va, i32 %b, <8 x i1> %m, i32 zeroext %evl) {
1028 ; CHECK-LABEL: icmp_sgt_vx_swap_v8i32:
1030 ; CHECK-NEXT: vsetvli zero, a1, e32, m2, ta, ma
1031 ; CHECK-NEXT: vmslt.vx v10, v8, a0, v0.t
1032 ; CHECK-NEXT: vmv1r.v v0, v10
1034 %elt.head = insertelement <8 x i32> poison, i32 %b, i32 0
1035 %vb = shufflevector <8 x i32> %elt.head, <8 x i32> poison, <8 x i32> zeroinitializer
1036 %v = call <8 x i1> @llvm.vp.icmp.v8i32(<8 x i32> %vb, <8 x i32> %va, metadata !"sgt", <8 x i1> %m, i32 %evl)
1040 define <8 x i1> @icmp_sgt_vi_v8i32(<8 x i32> %va, <8 x i1> %m, i32 zeroext %evl) {
1041 ; CHECK-LABEL: icmp_sgt_vi_v8i32:
1043 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
1044 ; CHECK-NEXT: vmsgt.vi v10, v8, 4, v0.t
1045 ; CHECK-NEXT: vmv1r.v v0, v10
1047 %v = call <8 x i1> @llvm.vp.icmp.v8i32(<8 x i32> %va, <8 x i32> splat (i32 4), metadata !"sgt", <8 x i1> %m, i32 %evl)
1051 define <8 x i1> @icmp_sgt_vi_swap_v8i32(<8 x i32> %va, <8 x i1> %m, i32 zeroext %evl) {
1052 ; CHECK-LABEL: icmp_sgt_vi_swap_v8i32:
1054 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
1055 ; CHECK-NEXT: vmsle.vi v10, v8, 3, v0.t
1056 ; CHECK-NEXT: vmv1r.v v0, v10
1058 %v = call <8 x i1> @llvm.vp.icmp.v8i32(<8 x i32> splat (i32 4), <8 x i32> %va, metadata !"sgt", <8 x i1> %m, i32 %evl)
1062 define <8 x i1> @icmp_sge_vv_v8i32(<8 x i32> %va, <8 x i32> %vb, <8 x i1> %m, i32 zeroext %evl) {
1063 ; CHECK-LABEL: icmp_sge_vv_v8i32:
1065 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
1066 ; CHECK-NEXT: vmsle.vv v12, v10, v8, v0.t
1067 ; CHECK-NEXT: vmv1r.v v0, v12
1069 %v = call <8 x i1> @llvm.vp.icmp.v8i32(<8 x i32> %va, <8 x i32> %vb, metadata !"sge", <8 x i1> %m, i32 %evl)
1073 define <8 x i1> @icmp_sge_vx_v8i32(<8 x i32> %va, i32 %b, <8 x i1> %m, i32 zeroext %evl) {
1074 ; CHECK-LABEL: icmp_sge_vx_v8i32:
1076 ; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, ma
1077 ; CHECK-NEXT: vmv.v.x v12, a0
1078 ; CHECK-NEXT: vsetvli zero, a1, e32, m2, ta, ma
1079 ; CHECK-NEXT: vmsle.vv v10, v12, v8, v0.t
1080 ; CHECK-NEXT: vmv1r.v v0, v10
1082 %elt.head = insertelement <8 x i32> poison, i32 %b, i32 0
1083 %vb = shufflevector <8 x i32> %elt.head, <8 x i32> poison, <8 x i32> zeroinitializer
1084 %v = call <8 x i1> @llvm.vp.icmp.v8i32(<8 x i32> %va, <8 x i32> %vb, metadata !"sge", <8 x i1> %m, i32 %evl)
1088 define <8 x i1> @icmp_sge_vx_swap_v8i32(<8 x i32> %va, i32 %b, <8 x i1> %m, i32 zeroext %evl) {
1089 ; CHECK-LABEL: icmp_sge_vx_swap_v8i32:
1091 ; CHECK-NEXT: vsetvli zero, a1, e32, m2, ta, ma
1092 ; CHECK-NEXT: vmsle.vx v10, v8, a0, v0.t
1093 ; CHECK-NEXT: vmv1r.v v0, v10
1095 %elt.head = insertelement <8 x i32> poison, i32 %b, i32 0
1096 %vb = shufflevector <8 x i32> %elt.head, <8 x i32> poison, <8 x i32> zeroinitializer
1097 %v = call <8 x i1> @llvm.vp.icmp.v8i32(<8 x i32> %vb, <8 x i32> %va, metadata !"sge", <8 x i1> %m, i32 %evl)
1101 define <8 x i1> @icmp_sge_vi_v8i32(<8 x i32> %va, <8 x i1> %m, i32 zeroext %evl) {
1102 ; CHECK-LABEL: icmp_sge_vi_v8i32:
1104 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
1105 ; CHECK-NEXT: vmsgt.vi v10, v8, 3, v0.t
1106 ; CHECK-NEXT: vmv1r.v v0, v10
1108 %v = call <8 x i1> @llvm.vp.icmp.v8i32(<8 x i32> %va, <8 x i32> splat (i32 4), metadata !"sge", <8 x i1> %m, i32 %evl)
1112 define <8 x i1> @icmp_sge_vi_swap_v8i32(<8 x i32> %va, <8 x i1> %m, i32 zeroext %evl) {
1113 ; CHECK-LABEL: icmp_sge_vi_swap_v8i32:
1115 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
1116 ; CHECK-NEXT: vmsle.vi v10, v8, 4, v0.t
1117 ; CHECK-NEXT: vmv1r.v v0, v10
1119 %v = call <8 x i1> @llvm.vp.icmp.v8i32(<8 x i32> splat (i32 4), <8 x i32> %va, metadata !"sge", <8 x i1> %m, i32 %evl)
1123 define <8 x i1> @icmp_slt_vv_v8i32(<8 x i32> %va, <8 x i32> %vb, <8 x i1> %m, i32 zeroext %evl) {
1124 ; CHECK-LABEL: icmp_slt_vv_v8i32:
1126 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
1127 ; CHECK-NEXT: vmslt.vv v12, v8, v10, v0.t
1128 ; CHECK-NEXT: vmv1r.v v0, v12
1130 %v = call <8 x i1> @llvm.vp.icmp.v8i32(<8 x i32> %va, <8 x i32> %vb, metadata !"slt", <8 x i1> %m, i32 %evl)
1134 define <8 x i1> @icmp_slt_vx_v8i32(<8 x i32> %va, i32 %b, <8 x i1> %m, i32 zeroext %evl) {
1135 ; CHECK-LABEL: icmp_slt_vx_v8i32:
1137 ; CHECK-NEXT: vsetvli zero, a1, e32, m2, ta, ma
1138 ; CHECK-NEXT: vmslt.vx v10, v8, a0, v0.t
1139 ; CHECK-NEXT: vmv1r.v v0, v10
1141 %elt.head = insertelement <8 x i32> poison, i32 %b, i32 0
1142 %vb = shufflevector <8 x i32> %elt.head, <8 x i32> poison, <8 x i32> zeroinitializer
1143 %v = call <8 x i1> @llvm.vp.icmp.v8i32(<8 x i32> %va, <8 x i32> %vb, metadata !"slt", <8 x i1> %m, i32 %evl)
1147 define <8 x i1> @icmp_slt_vx_swap_v8i32(<8 x i32> %va, i32 %b, <8 x i1> %m, i32 zeroext %evl) {
1148 ; CHECK-LABEL: icmp_slt_vx_swap_v8i32:
1150 ; CHECK-NEXT: vsetvli zero, a1, e32, m2, ta, ma
1151 ; CHECK-NEXT: vmsgt.vx v10, v8, a0, v0.t
1152 ; CHECK-NEXT: vmv1r.v v0, v10
1154 %elt.head = insertelement <8 x i32> poison, i32 %b, i32 0
1155 %vb = shufflevector <8 x i32> %elt.head, <8 x i32> poison, <8 x i32> zeroinitializer
1156 %v = call <8 x i1> @llvm.vp.icmp.v8i32(<8 x i32> %vb, <8 x i32> %va, metadata !"slt", <8 x i1> %m, i32 %evl)
1160 define <8 x i1> @icmp_slt_vi_v8i32(<8 x i32> %va, <8 x i1> %m, i32 zeroext %evl) {
1161 ; CHECK-LABEL: icmp_slt_vi_v8i32:
1163 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
1164 ; CHECK-NEXT: vmsle.vi v10, v8, 3, v0.t
1165 ; CHECK-NEXT: vmv1r.v v0, v10
1167 %v = call <8 x i1> @llvm.vp.icmp.v8i32(<8 x i32> %va, <8 x i32> splat (i32 4), metadata !"slt", <8 x i1> %m, i32 %evl)
1171 define <8 x i1> @icmp_slt_vi_swap_v8i32(<8 x i32> %va, <8 x i1> %m, i32 zeroext %evl) {
1172 ; CHECK-LABEL: icmp_slt_vi_swap_v8i32:
1174 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
1175 ; CHECK-NEXT: vmsgt.vi v10, v8, 4, v0.t
1176 ; CHECK-NEXT: vmv1r.v v0, v10
1178 %v = call <8 x i1> @llvm.vp.icmp.v8i32(<8 x i32> splat (i32 4), <8 x i32> %va, metadata !"slt", <8 x i1> %m, i32 %evl)
1182 define <8 x i1> @icmp_sle_vv_v8i32(<8 x i32> %va, <8 x i32> %vb, <8 x i1> %m, i32 zeroext %evl) {
1183 ; CHECK-LABEL: icmp_sle_vv_v8i32:
1185 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
1186 ; CHECK-NEXT: vmsle.vv v12, v8, v10, v0.t
1187 ; CHECK-NEXT: vmv1r.v v0, v12
1189 %v = call <8 x i1> @llvm.vp.icmp.v8i32(<8 x i32> %va, <8 x i32> %vb, metadata !"sle", <8 x i1> %m, i32 %evl)
1193 define <8 x i1> @icmp_sle_vx_v8i32(<8 x i32> %va, i32 %b, <8 x i1> %m, i32 zeroext %evl) {
1194 ; CHECK-LABEL: icmp_sle_vx_v8i32:
1196 ; CHECK-NEXT: vsetvli zero, a1, e32, m2, ta, ma
1197 ; CHECK-NEXT: vmsle.vx v10, v8, a0, v0.t
1198 ; CHECK-NEXT: vmv1r.v v0, v10
1200 %elt.head = insertelement <8 x i32> poison, i32 %b, i32 0
1201 %vb = shufflevector <8 x i32> %elt.head, <8 x i32> poison, <8 x i32> zeroinitializer
1202 %v = call <8 x i1> @llvm.vp.icmp.v8i32(<8 x i32> %va, <8 x i32> %vb, metadata !"sle", <8 x i1> %m, i32 %evl)
1206 define <8 x i1> @icmp_sle_vx_swap_v8i32(<8 x i32> %va, i32 %b, <8 x i1> %m, i32 zeroext %evl) {
1207 ; CHECK-LABEL: icmp_sle_vx_swap_v8i32:
1209 ; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, ma
1210 ; CHECK-NEXT: vmv.v.x v12, a0
1211 ; CHECK-NEXT: vsetvli zero, a1, e32, m2, ta, ma
1212 ; CHECK-NEXT: vmsle.vv v10, v12, v8, v0.t
1213 ; CHECK-NEXT: vmv1r.v v0, v10
1215 %elt.head = insertelement <8 x i32> poison, i32 %b, i32 0
1216 %vb = shufflevector <8 x i32> %elt.head, <8 x i32> poison, <8 x i32> zeroinitializer
1217 %v = call <8 x i1> @llvm.vp.icmp.v8i32(<8 x i32> %vb, <8 x i32> %va, metadata !"sle", <8 x i1> %m, i32 %evl)
1221 define <8 x i1> @icmp_sle_vi_v8i32(<8 x i32> %va, <8 x i1> %m, i32 zeroext %evl) {
1222 ; CHECK-LABEL: icmp_sle_vi_v8i32:
1224 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
1225 ; CHECK-NEXT: vmsle.vi v10, v8, 4, v0.t
1226 ; CHECK-NEXT: vmv1r.v v0, v10
1228 %v = call <8 x i1> @llvm.vp.icmp.v8i32(<8 x i32> %va, <8 x i32> splat (i32 4), metadata !"sle", <8 x i1> %m, i32 %evl)
1232 define <8 x i1> @icmp_sle_vi_swap_v8i32(<8 x i32> %va, <8 x i1> %m, i32 zeroext %evl) {
1233 ; CHECK-LABEL: icmp_sle_vi_swap_v8i32:
1235 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
1236 ; CHECK-NEXT: vmsgt.vi v10, v8, 3, v0.t
1237 ; CHECK-NEXT: vmv1r.v v0, v10
1239 %v = call <8 x i1> @llvm.vp.icmp.v8i32(<8 x i32> splat (i32 4), <8 x i32> %va, metadata !"sle", <8 x i1> %m, i32 %evl)
1243 declare <64 x i1> @llvm.vp.icmp.v64i32(<64 x i32>, <64 x i32>, metadata, <64 x i1>, i32)
1245 define <64 x i1> @icmp_eq_vv_v64i32(<64 x i32> %va, <64 x i32> %vb, <64 x i1> %m, i32 zeroext %evl) {
1246 ; CHECK-LABEL: icmp_eq_vv_v64i32:
1248 ; CHECK-NEXT: addi sp, sp, -16
1249 ; CHECK-NEXT: .cfi_def_cfa_offset 16
1250 ; CHECK-NEXT: csrr a1, vlenb
1251 ; CHECK-NEXT: slli a1, a1, 4
1252 ; CHECK-NEXT: sub sp, sp, a1
1253 ; CHECK-NEXT: .cfi_escape 0x0f, 0x0d, 0x72, 0x00, 0x11, 0x10, 0x22, 0x11, 0x10, 0x92, 0xa2, 0x38, 0x00, 0x1e, 0x22 # sp + 16 + 16 * vlenb
1254 ; CHECK-NEXT: addi a1, a0, 128
1255 ; CHECK-NEXT: li a3, 32
1256 ; CHECK-NEXT: vsetvli zero, a3, e32, m8, ta, ma
1257 ; CHECK-NEXT: vle32.v v24, (a1)
1258 ; CHECK-NEXT: csrr a1, vlenb
1259 ; CHECK-NEXT: slli a1, a1, 3
1260 ; CHECK-NEXT: add a1, sp, a1
1261 ; CHECK-NEXT: addi a1, a1, 16
1262 ; CHECK-NEXT: vs8r.v v24, (a1) # Unknown-size Folded Spill
1263 ; CHECK-NEXT: vle32.v v24, (a0)
1264 ; CHECK-NEXT: addi a0, sp, 16
1265 ; CHECK-NEXT: vs8r.v v24, (a0) # Unknown-size Folded Spill
1266 ; CHECK-NEXT: vsetivli zero, 4, e8, mf2, ta, ma
1267 ; CHECK-NEXT: vslidedown.vi v6, v0, 4
1268 ; CHECK-NEXT: mv a0, a2
1269 ; CHECK-NEXT: bltu a2, a3, .LBB99_2
1270 ; CHECK-NEXT: # %bb.1:
1271 ; CHECK-NEXT: li a0, 32
1272 ; CHECK-NEXT: .LBB99_2:
1273 ; CHECK-NEXT: addi a1, sp, 16
1274 ; CHECK-NEXT: vl8r.v v24, (a1) # Unknown-size Folded Reload
1275 ; CHECK-NEXT: vsetvli zero, a0, e32, m8, ta, ma
1276 ; CHECK-NEXT: vmseq.vv v7, v8, v24, v0.t
1277 ; CHECK-NEXT: addi a0, a2, -32
1278 ; CHECK-NEXT: sltu a1, a2, a0
1279 ; CHECK-NEXT: addi a1, a1, -1
1280 ; CHECK-NEXT: and a0, a1, a0
1281 ; CHECK-NEXT: vmv1r.v v0, v6
1282 ; CHECK-NEXT: csrr a1, vlenb
1283 ; CHECK-NEXT: slli a1, a1, 3
1284 ; CHECK-NEXT: add a1, sp, a1
1285 ; CHECK-NEXT: addi a1, a1, 16
1286 ; CHECK-NEXT: vl8r.v v24, (a1) # Unknown-size Folded Reload
1287 ; CHECK-NEXT: vsetvli zero, a0, e32, m8, ta, ma
1288 ; CHECK-NEXT: vmseq.vv v8, v16, v24, v0.t
1289 ; CHECK-NEXT: vsetivli zero, 8, e8, mf2, ta, ma
1290 ; CHECK-NEXT: vslideup.vi v7, v8, 4
1291 ; CHECK-NEXT: vmv1r.v v0, v7
1292 ; CHECK-NEXT: csrr a0, vlenb
1293 ; CHECK-NEXT: slli a0, a0, 4
1294 ; CHECK-NEXT: add sp, sp, a0
1295 ; CHECK-NEXT: addi sp, sp, 16
1297 %v = call <64 x i1> @llvm.vp.icmp.v64i32(<64 x i32> %va, <64 x i32> %vb, metadata !"eq", <64 x i1> %m, i32 %evl)
1301 define <64 x i1> @icmp_eq_vx_v64i32(<64 x i32> %va, i32 %b, <64 x i1> %m, i32 zeroext %evl) {
1302 ; CHECK-LABEL: icmp_eq_vx_v64i32:
1304 ; CHECK-NEXT: li a3, 32
1305 ; CHECK-NEXT: vsetivli zero, 4, e8, mf2, ta, ma
1306 ; CHECK-NEXT: vslidedown.vi v24, v0, 4
1307 ; CHECK-NEXT: mv a2, a1
1308 ; CHECK-NEXT: bltu a1, a3, .LBB100_2
1309 ; CHECK-NEXT: # %bb.1:
1310 ; CHECK-NEXT: li a2, 32
1311 ; CHECK-NEXT: .LBB100_2:
1312 ; CHECK-NEXT: vsetvli zero, a2, e32, m8, ta, ma
1313 ; CHECK-NEXT: vmseq.vx v25, v8, a0, v0.t
1314 ; CHECK-NEXT: addi a2, a1, -32
1315 ; CHECK-NEXT: sltu a1, a1, a2
1316 ; CHECK-NEXT: addi a1, a1, -1
1317 ; CHECK-NEXT: and a1, a1, a2
1318 ; CHECK-NEXT: vmv1r.v v0, v24
1319 ; CHECK-NEXT: vsetvli zero, a1, e32, m8, ta, ma
1320 ; CHECK-NEXT: vmseq.vx v8, v16, a0, v0.t
1321 ; CHECK-NEXT: vsetivli zero, 8, e8, mf2, ta, ma
1322 ; CHECK-NEXT: vslideup.vi v25, v8, 4
1323 ; CHECK-NEXT: vmv1r.v v0, v25
1325 %elt.head = insertelement <64 x i32> poison, i32 %b, i32 0
1326 %vb = shufflevector <64 x i32> %elt.head, <64 x i32> poison, <64 x i32> zeroinitializer
1327 %v = call <64 x i1> @llvm.vp.icmp.v64i32(<64 x i32> %va, <64 x i32> %vb, metadata !"eq", <64 x i1> %m, i32 %evl)
1331 define <64 x i1> @icmp_eq_vx_swap_v64i32(<64 x i32> %va, i32 %b, <64 x i1> %m, i32 zeroext %evl) {
1332 ; CHECK-LABEL: icmp_eq_vx_swap_v64i32:
1334 ; CHECK-NEXT: li a3, 32
1335 ; CHECK-NEXT: vsetivli zero, 4, e8, mf2, ta, ma
1336 ; CHECK-NEXT: vslidedown.vi v24, v0, 4
1337 ; CHECK-NEXT: mv a2, a1
1338 ; CHECK-NEXT: bltu a1, a3, .LBB101_2
1339 ; CHECK-NEXT: # %bb.1:
1340 ; CHECK-NEXT: li a2, 32
1341 ; CHECK-NEXT: .LBB101_2:
1342 ; CHECK-NEXT: vsetvli zero, a2, e32, m8, ta, ma
1343 ; CHECK-NEXT: vmseq.vx v25, v8, a0, v0.t
1344 ; CHECK-NEXT: addi a2, a1, -32
1345 ; CHECK-NEXT: sltu a1, a1, a2
1346 ; CHECK-NEXT: addi a1, a1, -1
1347 ; CHECK-NEXT: and a1, a1, a2
1348 ; CHECK-NEXT: vmv1r.v v0, v24
1349 ; CHECK-NEXT: vsetvli zero, a1, e32, m8, ta, ma
1350 ; CHECK-NEXT: vmseq.vx v8, v16, a0, v0.t
1351 ; CHECK-NEXT: vsetivli zero, 8, e8, mf2, ta, ma
1352 ; CHECK-NEXT: vslideup.vi v25, v8, 4
1353 ; CHECK-NEXT: vmv1r.v v0, v25
1355 %elt.head = insertelement <64 x i32> poison, i32 %b, i32 0
1356 %vb = shufflevector <64 x i32> %elt.head, <64 x i32> poison, <64 x i32> zeroinitializer
1357 %v = call <64 x i1> @llvm.vp.icmp.v64i32(<64 x i32> %vb, <64 x i32> %va, metadata !"eq", <64 x i1> %m, i32 %evl)
1361 declare <8 x i1> @llvm.vp.icmp.v8i64(<8 x i64>, <8 x i64>, metadata, <8 x i1>, i32)
1363 define <8 x i1> @icmp_eq_vv_v8i64(<8 x i64> %va, <8 x i64> %vb, <8 x i1> %m, i32 zeroext %evl) {
1364 ; CHECK-LABEL: icmp_eq_vv_v8i64:
1366 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1367 ; CHECK-NEXT: vmseq.vv v16, v8, v12, v0.t
1368 ; CHECK-NEXT: vmv1r.v v0, v16
1370 %v = call <8 x i1> @llvm.vp.icmp.v8i64(<8 x i64> %va, <8 x i64> %vb, metadata !"eq", <8 x i1> %m, i32 %evl)
1374 define <8 x i1> @icmp_eq_vx_v8i64(<8 x i64> %va, i64 %b, <8 x i1> %m, i32 zeroext %evl) {
1375 ; RV32-LABEL: icmp_eq_vx_v8i64:
1377 ; RV32-NEXT: addi sp, sp, -16
1378 ; RV32-NEXT: .cfi_def_cfa_offset 16
1379 ; RV32-NEXT: sw a1, 12(sp)
1380 ; RV32-NEXT: sw a0, 8(sp)
1381 ; RV32-NEXT: addi a0, sp, 8
1382 ; RV32-NEXT: vsetivli zero, 8, e64, m4, ta, ma
1383 ; RV32-NEXT: vlse64.v v16, (a0), zero
1384 ; RV32-NEXT: vsetvli zero, a2, e64, m4, ta, ma
1385 ; RV32-NEXT: vmseq.vv v12, v8, v16, v0.t
1386 ; RV32-NEXT: vmv1r.v v0, v12
1387 ; RV32-NEXT: addi sp, sp, 16
1390 ; RV64-LABEL: icmp_eq_vx_v8i64:
1392 ; RV64-NEXT: vsetvli zero, a1, e64, m4, ta, ma
1393 ; RV64-NEXT: vmseq.vx v12, v8, a0, v0.t
1394 ; RV64-NEXT: vmv1r.v v0, v12
1396 %elt.head = insertelement <8 x i64> poison, i64 %b, i32 0
1397 %vb = shufflevector <8 x i64> %elt.head, <8 x i64> poison, <8 x i32> zeroinitializer
1398 %v = call <8 x i1> @llvm.vp.icmp.v8i64(<8 x i64> %va, <8 x i64> %vb, metadata !"eq", <8 x i1> %m, i32 %evl)
1402 define <8 x i1> @icmp_eq_vx_swap_v8i64(<8 x i64> %va, i64 %b, <8 x i1> %m, i32 zeroext %evl) {
1403 ; RV32-LABEL: icmp_eq_vx_swap_v8i64:
1405 ; RV32-NEXT: addi sp, sp, -16
1406 ; RV32-NEXT: .cfi_def_cfa_offset 16
1407 ; RV32-NEXT: sw a1, 12(sp)
1408 ; RV32-NEXT: sw a0, 8(sp)
1409 ; RV32-NEXT: addi a0, sp, 8
1410 ; RV32-NEXT: vsetivli zero, 8, e64, m4, ta, ma
1411 ; RV32-NEXT: vlse64.v v16, (a0), zero
1412 ; RV32-NEXT: vsetvli zero, a2, e64, m4, ta, ma
1413 ; RV32-NEXT: vmseq.vv v12, v16, v8, v0.t
1414 ; RV32-NEXT: vmv1r.v v0, v12
1415 ; RV32-NEXT: addi sp, sp, 16
1418 ; RV64-LABEL: icmp_eq_vx_swap_v8i64:
1420 ; RV64-NEXT: vsetvli zero, a1, e64, m4, ta, ma
1421 ; RV64-NEXT: vmseq.vx v12, v8, a0, v0.t
1422 ; RV64-NEXT: vmv1r.v v0, v12
1424 %elt.head = insertelement <8 x i64> poison, i64 %b, i32 0
1425 %vb = shufflevector <8 x i64> %elt.head, <8 x i64> poison, <8 x i32> zeroinitializer
1426 %v = call <8 x i1> @llvm.vp.icmp.v8i64(<8 x i64> %vb, <8 x i64> %va, metadata !"eq", <8 x i1> %m, i32 %evl)
1430 define <8 x i1> @icmp_eq_vi_v8i64(<8 x i64> %va, <8 x i1> %m, i32 zeroext %evl) {
1431 ; CHECK-LABEL: icmp_eq_vi_v8i64:
1433 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1434 ; CHECK-NEXT: vmseq.vi v12, v8, 4, v0.t
1435 ; CHECK-NEXT: vmv1r.v v0, v12
1437 %v = call <8 x i1> @llvm.vp.icmp.v8i64(<8 x i64> %va, <8 x i64> splat (i64 4), metadata !"eq", <8 x i1> %m, i32 %evl)
1441 define <8 x i1> @icmp_eq_vi_swap_v8i64(<8 x i64> %va, <8 x i1> %m, i32 zeroext %evl) {
1442 ; CHECK-LABEL: icmp_eq_vi_swap_v8i64:
1444 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1445 ; CHECK-NEXT: vmseq.vi v12, v8, 4, v0.t
1446 ; CHECK-NEXT: vmv1r.v v0, v12
1448 %v = call <8 x i1> @llvm.vp.icmp.v8i64(<8 x i64> splat (i64 4), <8 x i64> %va, metadata !"eq", <8 x i1> %m, i32 %evl)
1452 define <8 x i1> @icmp_ne_vv_v8i64(<8 x i64> %va, <8 x i64> %vb, <8 x i1> %m, i32 zeroext %evl) {
1453 ; CHECK-LABEL: icmp_ne_vv_v8i64:
1455 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1456 ; CHECK-NEXT: vmsne.vv v16, v8, v12, v0.t
1457 ; CHECK-NEXT: vmv1r.v v0, v16
1459 %v = call <8 x i1> @llvm.vp.icmp.v8i64(<8 x i64> %va, <8 x i64> %vb, metadata !"ne", <8 x i1> %m, i32 %evl)
1463 define <8 x i1> @icmp_ne_vx_v8i64(<8 x i64> %va, i64 %b, <8 x i1> %m, i32 zeroext %evl) {
1464 ; RV32-LABEL: icmp_ne_vx_v8i64:
1466 ; RV32-NEXT: addi sp, sp, -16
1467 ; RV32-NEXT: .cfi_def_cfa_offset 16
1468 ; RV32-NEXT: sw a1, 12(sp)
1469 ; RV32-NEXT: sw a0, 8(sp)
1470 ; RV32-NEXT: addi a0, sp, 8
1471 ; RV32-NEXT: vsetivli zero, 8, e64, m4, ta, ma
1472 ; RV32-NEXT: vlse64.v v16, (a0), zero
1473 ; RV32-NEXT: vsetvli zero, a2, e64, m4, ta, ma
1474 ; RV32-NEXT: vmsne.vv v12, v8, v16, v0.t
1475 ; RV32-NEXT: vmv1r.v v0, v12
1476 ; RV32-NEXT: addi sp, sp, 16
1479 ; RV64-LABEL: icmp_ne_vx_v8i64:
1481 ; RV64-NEXT: vsetvli zero, a1, e64, m4, ta, ma
1482 ; RV64-NEXT: vmsne.vx v12, v8, a0, v0.t
1483 ; RV64-NEXT: vmv1r.v v0, v12
1485 %elt.head = insertelement <8 x i64> poison, i64 %b, i32 0
1486 %vb = shufflevector <8 x i64> %elt.head, <8 x i64> poison, <8 x i32> zeroinitializer
1487 %v = call <8 x i1> @llvm.vp.icmp.v8i64(<8 x i64> %va, <8 x i64> %vb, metadata !"ne", <8 x i1> %m, i32 %evl)
1491 define <8 x i1> @icmp_ne_vx_swap_v8i64(<8 x i64> %va, i64 %b, <8 x i1> %m, i32 zeroext %evl) {
1492 ; RV32-LABEL: icmp_ne_vx_swap_v8i64:
1494 ; RV32-NEXT: addi sp, sp, -16
1495 ; RV32-NEXT: .cfi_def_cfa_offset 16
1496 ; RV32-NEXT: sw a1, 12(sp)
1497 ; RV32-NEXT: sw a0, 8(sp)
1498 ; RV32-NEXT: addi a0, sp, 8
1499 ; RV32-NEXT: vsetivli zero, 8, e64, m4, ta, ma
1500 ; RV32-NEXT: vlse64.v v16, (a0), zero
1501 ; RV32-NEXT: vsetvli zero, a2, e64, m4, ta, ma
1502 ; RV32-NEXT: vmsne.vv v12, v16, v8, v0.t
1503 ; RV32-NEXT: vmv1r.v v0, v12
1504 ; RV32-NEXT: addi sp, sp, 16
1507 ; RV64-LABEL: icmp_ne_vx_swap_v8i64:
1509 ; RV64-NEXT: vsetvli zero, a1, e64, m4, ta, ma
1510 ; RV64-NEXT: vmsne.vx v12, v8, a0, v0.t
1511 ; RV64-NEXT: vmv1r.v v0, v12
1513 %elt.head = insertelement <8 x i64> poison, i64 %b, i32 0
1514 %vb = shufflevector <8 x i64> %elt.head, <8 x i64> poison, <8 x i32> zeroinitializer
1515 %v = call <8 x i1> @llvm.vp.icmp.v8i64(<8 x i64> %vb, <8 x i64> %va, metadata !"ne", <8 x i1> %m, i32 %evl)
1519 define <8 x i1> @icmp_ne_vi_v8i64(<8 x i64> %va, <8 x i1> %m, i32 zeroext %evl) {
1520 ; CHECK-LABEL: icmp_ne_vi_v8i64:
1522 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1523 ; CHECK-NEXT: vmsne.vi v12, v8, 4, v0.t
1524 ; CHECK-NEXT: vmv1r.v v0, v12
1526 %v = call <8 x i1> @llvm.vp.icmp.v8i64(<8 x i64> %va, <8 x i64> splat (i64 4), metadata !"ne", <8 x i1> %m, i32 %evl)
1530 define <8 x i1> @icmp_ne_vi_swap_v8i64(<8 x i64> %va, <8 x i1> %m, i32 zeroext %evl) {
1531 ; CHECK-LABEL: icmp_ne_vi_swap_v8i64:
1533 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1534 ; CHECK-NEXT: vmsne.vi v12, v8, 4, v0.t
1535 ; CHECK-NEXT: vmv1r.v v0, v12
1537 %v = call <8 x i1> @llvm.vp.icmp.v8i64(<8 x i64> splat (i64 4), <8 x i64> %va, metadata !"ne", <8 x i1> %m, i32 %evl)
1541 define <8 x i1> @icmp_ugt_vv_v8i64(<8 x i64> %va, <8 x i64> %vb, <8 x i1> %m, i32 zeroext %evl) {
1542 ; CHECK-LABEL: icmp_ugt_vv_v8i64:
1544 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1545 ; CHECK-NEXT: vmsltu.vv v16, v12, v8, v0.t
1546 ; CHECK-NEXT: vmv1r.v v0, v16
1548 %v = call <8 x i1> @llvm.vp.icmp.v8i64(<8 x i64> %va, <8 x i64> %vb, metadata !"ugt", <8 x i1> %m, i32 %evl)
1552 define <8 x i1> @icmp_ugt_vx_v8i64(<8 x i64> %va, i64 %b, <8 x i1> %m, i32 zeroext %evl) {
1553 ; RV32-LABEL: icmp_ugt_vx_v8i64:
1555 ; RV32-NEXT: addi sp, sp, -16
1556 ; RV32-NEXT: .cfi_def_cfa_offset 16
1557 ; RV32-NEXT: sw a1, 12(sp)
1558 ; RV32-NEXT: sw a0, 8(sp)
1559 ; RV32-NEXT: addi a0, sp, 8
1560 ; RV32-NEXT: vsetivli zero, 8, e64, m4, ta, ma
1561 ; RV32-NEXT: vlse64.v v16, (a0), zero
1562 ; RV32-NEXT: vsetvli zero, a2, e64, m4, ta, ma
1563 ; RV32-NEXT: vmsltu.vv v12, v16, v8, v0.t
1564 ; RV32-NEXT: vmv1r.v v0, v12
1565 ; RV32-NEXT: addi sp, sp, 16
1568 ; RV64-LABEL: icmp_ugt_vx_v8i64:
1570 ; RV64-NEXT: vsetvli zero, a1, e64, m4, ta, ma
1571 ; RV64-NEXT: vmsgtu.vx v12, v8, a0, v0.t
1572 ; RV64-NEXT: vmv1r.v v0, v12
1574 %elt.head = insertelement <8 x i64> poison, i64 %b, i32 0
1575 %vb = shufflevector <8 x i64> %elt.head, <8 x i64> poison, <8 x i32> zeroinitializer
1576 %v = call <8 x i1> @llvm.vp.icmp.v8i64(<8 x i64> %va, <8 x i64> %vb, metadata !"ugt", <8 x i1> %m, i32 %evl)
1580 define <8 x i1> @icmp_ugt_vx_swap_v8i64(<8 x i64> %va, i64 %b, <8 x i1> %m, i32 zeroext %evl) {
1581 ; RV32-LABEL: icmp_ugt_vx_swap_v8i64:
1583 ; RV32-NEXT: addi sp, sp, -16
1584 ; RV32-NEXT: .cfi_def_cfa_offset 16
1585 ; RV32-NEXT: sw a1, 12(sp)
1586 ; RV32-NEXT: sw a0, 8(sp)
1587 ; RV32-NEXT: addi a0, sp, 8
1588 ; RV32-NEXT: vsetivli zero, 8, e64, m4, ta, ma
1589 ; RV32-NEXT: vlse64.v v16, (a0), zero
1590 ; RV32-NEXT: vsetvli zero, a2, e64, m4, ta, ma
1591 ; RV32-NEXT: vmsltu.vv v12, v8, v16, v0.t
1592 ; RV32-NEXT: vmv1r.v v0, v12
1593 ; RV32-NEXT: addi sp, sp, 16
1596 ; RV64-LABEL: icmp_ugt_vx_swap_v8i64:
1598 ; RV64-NEXT: vsetvli zero, a1, e64, m4, ta, ma
1599 ; RV64-NEXT: vmsltu.vx v12, v8, a0, v0.t
1600 ; RV64-NEXT: vmv1r.v v0, v12
1602 %elt.head = insertelement <8 x i64> poison, i64 %b, i32 0
1603 %vb = shufflevector <8 x i64> %elt.head, <8 x i64> poison, <8 x i32> zeroinitializer
1604 %v = call <8 x i1> @llvm.vp.icmp.v8i64(<8 x i64> %vb, <8 x i64> %va, metadata !"ugt", <8 x i1> %m, i32 %evl)
1608 define <8 x i1> @icmp_ugt_vi_v8i64(<8 x i64> %va, <8 x i1> %m, i32 zeroext %evl) {
1609 ; CHECK-LABEL: icmp_ugt_vi_v8i64:
1611 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1612 ; CHECK-NEXT: vmsgtu.vi v12, v8, 4, v0.t
1613 ; CHECK-NEXT: vmv1r.v v0, v12
1615 %v = call <8 x i1> @llvm.vp.icmp.v8i64(<8 x i64> %va, <8 x i64> splat (i64 4), metadata !"ugt", <8 x i1> %m, i32 %evl)
1619 define <8 x i1> @icmp_ugt_vi_swap_v8i64(<8 x i64> %va, <8 x i1> %m, i32 zeroext %evl) {
1620 ; CHECK-LABEL: icmp_ugt_vi_swap_v8i64:
1622 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1623 ; CHECK-NEXT: vmsleu.vi v12, v8, 3, v0.t
1624 ; CHECK-NEXT: vmv1r.v v0, v12
1626 %v = call <8 x i1> @llvm.vp.icmp.v8i64(<8 x i64> splat (i64 4), <8 x i64> %va, metadata !"ugt", <8 x i1> %m, i32 %evl)
1630 define <8 x i1> @icmp_uge_vv_v8i64(<8 x i64> %va, <8 x i64> %vb, <8 x i1> %m, i32 zeroext %evl) {
1631 ; CHECK-LABEL: icmp_uge_vv_v8i64:
1633 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1634 ; CHECK-NEXT: vmsleu.vv v16, v12, v8, v0.t
1635 ; CHECK-NEXT: vmv1r.v v0, v16
1637 %v = call <8 x i1> @llvm.vp.icmp.v8i64(<8 x i64> %va, <8 x i64> %vb, metadata !"uge", <8 x i1> %m, i32 %evl)
1641 define <8 x i1> @icmp_uge_vx_v8i64(<8 x i64> %va, i64 %b, <8 x i1> %m, i32 zeroext %evl) {
1642 ; RV32-LABEL: icmp_uge_vx_v8i64:
1644 ; RV32-NEXT: addi sp, sp, -16
1645 ; RV32-NEXT: .cfi_def_cfa_offset 16
1646 ; RV32-NEXT: sw a1, 12(sp)
1647 ; RV32-NEXT: sw a0, 8(sp)
1648 ; RV32-NEXT: addi a0, sp, 8
1649 ; RV32-NEXT: vsetivli zero, 8, e64, m4, ta, ma
1650 ; RV32-NEXT: vlse64.v v16, (a0), zero
1651 ; RV32-NEXT: vsetvli zero, a2, e64, m4, ta, ma
1652 ; RV32-NEXT: vmsleu.vv v12, v16, v8, v0.t
1653 ; RV32-NEXT: vmv1r.v v0, v12
1654 ; RV32-NEXT: addi sp, sp, 16
1657 ; RV64-LABEL: icmp_uge_vx_v8i64:
1659 ; RV64-NEXT: vsetivli zero, 8, e64, m4, ta, ma
1660 ; RV64-NEXT: vmv.v.x v16, a0
1661 ; RV64-NEXT: vsetvli zero, a1, e64, m4, ta, ma
1662 ; RV64-NEXT: vmsleu.vv v12, v16, v8, v0.t
1663 ; RV64-NEXT: vmv1r.v v0, v12
1665 %elt.head = insertelement <8 x i64> poison, i64 %b, i32 0
1666 %vb = shufflevector <8 x i64> %elt.head, <8 x i64> poison, <8 x i32> zeroinitializer
1667 %v = call <8 x i1> @llvm.vp.icmp.v8i64(<8 x i64> %va, <8 x i64> %vb, metadata !"uge", <8 x i1> %m, i32 %evl)
1671 define <8 x i1> @icmp_uge_vx_swap_v8i64(<8 x i64> %va, i64 %b, <8 x i1> %m, i32 zeroext %evl) {
1672 ; RV32-LABEL: icmp_uge_vx_swap_v8i64:
1674 ; RV32-NEXT: addi sp, sp, -16
1675 ; RV32-NEXT: .cfi_def_cfa_offset 16
1676 ; RV32-NEXT: sw a1, 12(sp)
1677 ; RV32-NEXT: sw a0, 8(sp)
1678 ; RV32-NEXT: addi a0, sp, 8
1679 ; RV32-NEXT: vsetivli zero, 8, e64, m4, ta, ma
1680 ; RV32-NEXT: vlse64.v v16, (a0), zero
1681 ; RV32-NEXT: vsetvli zero, a2, e64, m4, ta, ma
1682 ; RV32-NEXT: vmsleu.vv v12, v8, v16, v0.t
1683 ; RV32-NEXT: vmv1r.v v0, v12
1684 ; RV32-NEXT: addi sp, sp, 16
1687 ; RV64-LABEL: icmp_uge_vx_swap_v8i64:
1689 ; RV64-NEXT: vsetvli zero, a1, e64, m4, ta, ma
1690 ; RV64-NEXT: vmsleu.vx v12, v8, a0, v0.t
1691 ; RV64-NEXT: vmv1r.v v0, v12
1693 %elt.head = insertelement <8 x i64> poison, i64 %b, i32 0
1694 %vb = shufflevector <8 x i64> %elt.head, <8 x i64> poison, <8 x i32> zeroinitializer
1695 %v = call <8 x i1> @llvm.vp.icmp.v8i64(<8 x i64> %vb, <8 x i64> %va, metadata !"uge", <8 x i1> %m, i32 %evl)
1699 define <8 x i1> @icmp_uge_vi_v8i64(<8 x i64> %va, <8 x i1> %m, i32 zeroext %evl) {
1700 ; CHECK-LABEL: icmp_uge_vi_v8i64:
1702 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1703 ; CHECK-NEXT: vmsgtu.vi v12, v8, 3, v0.t
1704 ; CHECK-NEXT: vmv1r.v v0, v12
1706 %v = call <8 x i1> @llvm.vp.icmp.v8i64(<8 x i64> %va, <8 x i64> splat (i64 4), metadata !"uge", <8 x i1> %m, i32 %evl)
1710 define <8 x i1> @icmp_uge_vi_swap_v8i64(<8 x i64> %va, <8 x i1> %m, i32 zeroext %evl) {
1711 ; CHECK-LABEL: icmp_uge_vi_swap_v8i64:
1713 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1714 ; CHECK-NEXT: vmsleu.vi v12, v8, 4, v0.t
1715 ; CHECK-NEXT: vmv1r.v v0, v12
1717 %v = call <8 x i1> @llvm.vp.icmp.v8i64(<8 x i64> splat (i64 4), <8 x i64> %va, metadata !"uge", <8 x i1> %m, i32 %evl)
1721 define <8 x i1> @icmp_ult_vv_v8i64(<8 x i64> %va, <8 x i64> %vb, <8 x i1> %m, i32 zeroext %evl) {
1722 ; CHECK-LABEL: icmp_ult_vv_v8i64:
1724 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1725 ; CHECK-NEXT: vmsltu.vv v16, v8, v12, v0.t
1726 ; CHECK-NEXT: vmv1r.v v0, v16
1728 %v = call <8 x i1> @llvm.vp.icmp.v8i64(<8 x i64> %va, <8 x i64> %vb, metadata !"ult", <8 x i1> %m, i32 %evl)
1732 define <8 x i1> @icmp_ult_vx_v8i64(<8 x i64> %va, i64 %b, <8 x i1> %m, i32 zeroext %evl) {
1733 ; RV32-LABEL: icmp_ult_vx_v8i64:
1735 ; RV32-NEXT: addi sp, sp, -16
1736 ; RV32-NEXT: .cfi_def_cfa_offset 16
1737 ; RV32-NEXT: sw a1, 12(sp)
1738 ; RV32-NEXT: sw a0, 8(sp)
1739 ; RV32-NEXT: addi a0, sp, 8
1740 ; RV32-NEXT: vsetivli zero, 8, e64, m4, ta, ma
1741 ; RV32-NEXT: vlse64.v v16, (a0), zero
1742 ; RV32-NEXT: vsetvli zero, a2, e64, m4, ta, ma
1743 ; RV32-NEXT: vmsltu.vv v12, v8, v16, v0.t
1744 ; RV32-NEXT: vmv1r.v v0, v12
1745 ; RV32-NEXT: addi sp, sp, 16
1748 ; RV64-LABEL: icmp_ult_vx_v8i64:
1750 ; RV64-NEXT: vsetvli zero, a1, e64, m4, ta, ma
1751 ; RV64-NEXT: vmsltu.vx v12, v8, a0, v0.t
1752 ; RV64-NEXT: vmv1r.v v0, v12
1754 %elt.head = insertelement <8 x i64> poison, i64 %b, i32 0
1755 %vb = shufflevector <8 x i64> %elt.head, <8 x i64> poison, <8 x i32> zeroinitializer
1756 %v = call <8 x i1> @llvm.vp.icmp.v8i64(<8 x i64> %va, <8 x i64> %vb, metadata !"ult", <8 x i1> %m, i32 %evl)
1760 define <8 x i1> @icmp_ult_vx_swap_v8i64(<8 x i64> %va, i64 %b, <8 x i1> %m, i32 zeroext %evl) {
1761 ; RV32-LABEL: icmp_ult_vx_swap_v8i64:
1763 ; RV32-NEXT: addi sp, sp, -16
1764 ; RV32-NEXT: .cfi_def_cfa_offset 16
1765 ; RV32-NEXT: sw a1, 12(sp)
1766 ; RV32-NEXT: sw a0, 8(sp)
1767 ; RV32-NEXT: addi a0, sp, 8
1768 ; RV32-NEXT: vsetivli zero, 8, e64, m4, ta, ma
1769 ; RV32-NEXT: vlse64.v v16, (a0), zero
1770 ; RV32-NEXT: vsetvli zero, a2, e64, m4, ta, ma
1771 ; RV32-NEXT: vmsltu.vv v12, v16, v8, v0.t
1772 ; RV32-NEXT: vmv1r.v v0, v12
1773 ; RV32-NEXT: addi sp, sp, 16
1776 ; RV64-LABEL: icmp_ult_vx_swap_v8i64:
1778 ; RV64-NEXT: vsetvli zero, a1, e64, m4, ta, ma
1779 ; RV64-NEXT: vmsgtu.vx v12, v8, a0, v0.t
1780 ; RV64-NEXT: vmv1r.v v0, v12
1782 %elt.head = insertelement <8 x i64> poison, i64 %b, i32 0
1783 %vb = shufflevector <8 x i64> %elt.head, <8 x i64> poison, <8 x i32> zeroinitializer
1784 %v = call <8 x i1> @llvm.vp.icmp.v8i64(<8 x i64> %vb, <8 x i64> %va, metadata !"ult", <8 x i1> %m, i32 %evl)
1788 define <8 x i1> @icmp_ult_vi_v8i64(<8 x i64> %va, <8 x i1> %m, i32 zeroext %evl) {
1789 ; CHECK-LABEL: icmp_ult_vi_v8i64:
1791 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1792 ; CHECK-NEXT: vmsleu.vi v12, v8, 3, v0.t
1793 ; CHECK-NEXT: vmv1r.v v0, v12
1795 %v = call <8 x i1> @llvm.vp.icmp.v8i64(<8 x i64> %va, <8 x i64> splat (i64 4), metadata !"ult", <8 x i1> %m, i32 %evl)
1799 define <8 x i1> @icmp_ult_vi_swap_v8i64(<8 x i64> %va, <8 x i1> %m, i32 zeroext %evl) {
1800 ; CHECK-LABEL: icmp_ult_vi_swap_v8i64:
1802 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1803 ; CHECK-NEXT: vmsgtu.vi v12, v8, 4, v0.t
1804 ; CHECK-NEXT: vmv1r.v v0, v12
1806 %v = call <8 x i1> @llvm.vp.icmp.v8i64(<8 x i64> splat (i64 4), <8 x i64> %va, metadata !"ult", <8 x i1> %m, i32 %evl)
1810 define <8 x i1> @icmp_sgt_vv_v8i64(<8 x i64> %va, <8 x i64> %vb, <8 x i1> %m, i32 zeroext %evl) {
1811 ; CHECK-LABEL: icmp_sgt_vv_v8i64:
1813 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1814 ; CHECK-NEXT: vmslt.vv v16, v12, v8, v0.t
1815 ; CHECK-NEXT: vmv1r.v v0, v16
1817 %v = call <8 x i1> @llvm.vp.icmp.v8i64(<8 x i64> %va, <8 x i64> %vb, metadata !"sgt", <8 x i1> %m, i32 %evl)
1821 define <8 x i1> @icmp_sgt_vx_v8i64(<8 x i64> %va, i64 %b, <8 x i1> %m, i32 zeroext %evl) {
1822 ; RV32-LABEL: icmp_sgt_vx_v8i64:
1824 ; RV32-NEXT: addi sp, sp, -16
1825 ; RV32-NEXT: .cfi_def_cfa_offset 16
1826 ; RV32-NEXT: sw a1, 12(sp)
1827 ; RV32-NEXT: sw a0, 8(sp)
1828 ; RV32-NEXT: addi a0, sp, 8
1829 ; RV32-NEXT: vsetivli zero, 8, e64, m4, ta, ma
1830 ; RV32-NEXT: vlse64.v v16, (a0), zero
1831 ; RV32-NEXT: vsetvli zero, a2, e64, m4, ta, ma
1832 ; RV32-NEXT: vmslt.vv v12, v16, v8, v0.t
1833 ; RV32-NEXT: vmv1r.v v0, v12
1834 ; RV32-NEXT: addi sp, sp, 16
1837 ; RV64-LABEL: icmp_sgt_vx_v8i64:
1839 ; RV64-NEXT: vsetvli zero, a1, e64, m4, ta, ma
1840 ; RV64-NEXT: vmsgt.vx v12, v8, a0, v0.t
1841 ; RV64-NEXT: vmv1r.v v0, v12
1843 %elt.head = insertelement <8 x i64> poison, i64 %b, i32 0
1844 %vb = shufflevector <8 x i64> %elt.head, <8 x i64> poison, <8 x i32> zeroinitializer
1845 %v = call <8 x i1> @llvm.vp.icmp.v8i64(<8 x i64> %va, <8 x i64> %vb, metadata !"sgt", <8 x i1> %m, i32 %evl)
1849 define <8 x i1> @icmp_sgt_vx_swap_v8i64(<8 x i64> %va, i64 %b, <8 x i1> %m, i32 zeroext %evl) {
1850 ; RV32-LABEL: icmp_sgt_vx_swap_v8i64:
1852 ; RV32-NEXT: addi sp, sp, -16
1853 ; RV32-NEXT: .cfi_def_cfa_offset 16
1854 ; RV32-NEXT: sw a1, 12(sp)
1855 ; RV32-NEXT: sw a0, 8(sp)
1856 ; RV32-NEXT: addi a0, sp, 8
1857 ; RV32-NEXT: vsetivli zero, 8, e64, m4, ta, ma
1858 ; RV32-NEXT: vlse64.v v16, (a0), zero
1859 ; RV32-NEXT: vsetvli zero, a2, e64, m4, ta, ma
1860 ; RV32-NEXT: vmslt.vv v12, v8, v16, v0.t
1861 ; RV32-NEXT: vmv1r.v v0, v12
1862 ; RV32-NEXT: addi sp, sp, 16
1865 ; RV64-LABEL: icmp_sgt_vx_swap_v8i64:
1867 ; RV64-NEXT: vsetvli zero, a1, e64, m4, ta, ma
1868 ; RV64-NEXT: vmslt.vx v12, v8, a0, v0.t
1869 ; RV64-NEXT: vmv1r.v v0, v12
1871 %elt.head = insertelement <8 x i64> poison, i64 %b, i32 0
1872 %vb = shufflevector <8 x i64> %elt.head, <8 x i64> poison, <8 x i32> zeroinitializer
1873 %v = call <8 x i1> @llvm.vp.icmp.v8i64(<8 x i64> %vb, <8 x i64> %va, metadata !"sgt", <8 x i1> %m, i32 %evl)
1877 define <8 x i1> @icmp_sgt_vi_v8i64(<8 x i64> %va, <8 x i1> %m, i32 zeroext %evl) {
1878 ; CHECK-LABEL: icmp_sgt_vi_v8i64:
1880 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1881 ; CHECK-NEXT: vmsgt.vi v12, v8, 4, v0.t
1882 ; CHECK-NEXT: vmv1r.v v0, v12
1884 %v = call <8 x i1> @llvm.vp.icmp.v8i64(<8 x i64> %va, <8 x i64> splat (i64 4), metadata !"sgt", <8 x i1> %m, i32 %evl)
1888 define <8 x i1> @icmp_sgt_vi_swap_v8i64(<8 x i64> %va, <8 x i1> %m, i32 zeroext %evl) {
1889 ; CHECK-LABEL: icmp_sgt_vi_swap_v8i64:
1891 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1892 ; CHECK-NEXT: vmsle.vi v12, v8, 3, v0.t
1893 ; CHECK-NEXT: vmv1r.v v0, v12
1895 %v = call <8 x i1> @llvm.vp.icmp.v8i64(<8 x i64> splat (i64 4), <8 x i64> %va, metadata !"sgt", <8 x i1> %m, i32 %evl)
1899 define <8 x i1> @icmp_sge_vv_v8i64(<8 x i64> %va, <8 x i64> %vb, <8 x i1> %m, i32 zeroext %evl) {
1900 ; CHECK-LABEL: icmp_sge_vv_v8i64:
1902 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1903 ; CHECK-NEXT: vmsle.vv v16, v12, v8, v0.t
1904 ; CHECK-NEXT: vmv1r.v v0, v16
1906 %v = call <8 x i1> @llvm.vp.icmp.v8i64(<8 x i64> %va, <8 x i64> %vb, metadata !"sge", <8 x i1> %m, i32 %evl)
1910 define <8 x i1> @icmp_sge_vx_v8i64(<8 x i64> %va, i64 %b, <8 x i1> %m, i32 zeroext %evl) {
1911 ; RV32-LABEL: icmp_sge_vx_v8i64:
1913 ; RV32-NEXT: addi sp, sp, -16
1914 ; RV32-NEXT: .cfi_def_cfa_offset 16
1915 ; RV32-NEXT: sw a1, 12(sp)
1916 ; RV32-NEXT: sw a0, 8(sp)
1917 ; RV32-NEXT: addi a0, sp, 8
1918 ; RV32-NEXT: vsetivli zero, 8, e64, m4, ta, ma
1919 ; RV32-NEXT: vlse64.v v16, (a0), zero
1920 ; RV32-NEXT: vsetvli zero, a2, e64, m4, ta, ma
1921 ; RV32-NEXT: vmsle.vv v12, v16, v8, v0.t
1922 ; RV32-NEXT: vmv1r.v v0, v12
1923 ; RV32-NEXT: addi sp, sp, 16
1926 ; RV64-LABEL: icmp_sge_vx_v8i64:
1928 ; RV64-NEXT: vsetivli zero, 8, e64, m4, ta, ma
1929 ; RV64-NEXT: vmv.v.x v16, a0
1930 ; RV64-NEXT: vsetvli zero, a1, e64, m4, ta, ma
1931 ; RV64-NEXT: vmsle.vv v12, v16, v8, v0.t
1932 ; RV64-NEXT: vmv1r.v v0, v12
1934 %elt.head = insertelement <8 x i64> poison, i64 %b, i32 0
1935 %vb = shufflevector <8 x i64> %elt.head, <8 x i64> poison, <8 x i32> zeroinitializer
1936 %v = call <8 x i1> @llvm.vp.icmp.v8i64(<8 x i64> %va, <8 x i64> %vb, metadata !"sge", <8 x i1> %m, i32 %evl)
1940 define <8 x i1> @icmp_sge_vx_swap_v8i64(<8 x i64> %va, i64 %b, <8 x i1> %m, i32 zeroext %evl) {
1941 ; RV32-LABEL: icmp_sge_vx_swap_v8i64:
1943 ; RV32-NEXT: addi sp, sp, -16
1944 ; RV32-NEXT: .cfi_def_cfa_offset 16
1945 ; RV32-NEXT: sw a1, 12(sp)
1946 ; RV32-NEXT: sw a0, 8(sp)
1947 ; RV32-NEXT: addi a0, sp, 8
1948 ; RV32-NEXT: vsetivli zero, 8, e64, m4, ta, ma
1949 ; RV32-NEXT: vlse64.v v16, (a0), zero
1950 ; RV32-NEXT: vsetvli zero, a2, e64, m4, ta, ma
1951 ; RV32-NEXT: vmsle.vv v12, v8, v16, v0.t
1952 ; RV32-NEXT: vmv1r.v v0, v12
1953 ; RV32-NEXT: addi sp, sp, 16
1956 ; RV64-LABEL: icmp_sge_vx_swap_v8i64:
1958 ; RV64-NEXT: vsetvli zero, a1, e64, m4, ta, ma
1959 ; RV64-NEXT: vmsle.vx v12, v8, a0, v0.t
1960 ; RV64-NEXT: vmv1r.v v0, v12
1962 %elt.head = insertelement <8 x i64> poison, i64 %b, i32 0
1963 %vb = shufflevector <8 x i64> %elt.head, <8 x i64> poison, <8 x i32> zeroinitializer
1964 %v = call <8 x i1> @llvm.vp.icmp.v8i64(<8 x i64> %vb, <8 x i64> %va, metadata !"sge", <8 x i1> %m, i32 %evl)
1968 define <8 x i1> @icmp_sge_vi_v8i64(<8 x i64> %va, <8 x i1> %m, i32 zeroext %evl) {
1969 ; CHECK-LABEL: icmp_sge_vi_v8i64:
1971 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1972 ; CHECK-NEXT: vmsgt.vi v12, v8, 3, v0.t
1973 ; CHECK-NEXT: vmv1r.v v0, v12
1975 %v = call <8 x i1> @llvm.vp.icmp.v8i64(<8 x i64> %va, <8 x i64> splat (i64 4), metadata !"sge", <8 x i1> %m, i32 %evl)
1979 define <8 x i1> @icmp_sge_vi_swap_v8i64(<8 x i64> %va, <8 x i1> %m, i32 zeroext %evl) {
1980 ; CHECK-LABEL: icmp_sge_vi_swap_v8i64:
1982 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1983 ; CHECK-NEXT: vmsle.vi v12, v8, 4, v0.t
1984 ; CHECK-NEXT: vmv1r.v v0, v12
1986 %v = call <8 x i1> @llvm.vp.icmp.v8i64(<8 x i64> splat (i64 4), <8 x i64> %va, metadata !"sge", <8 x i1> %m, i32 %evl)
1990 define <8 x i1> @icmp_slt_vv_v8i64(<8 x i64> %va, <8 x i64> %vb, <8 x i1> %m, i32 zeroext %evl) {
1991 ; CHECK-LABEL: icmp_slt_vv_v8i64:
1993 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1994 ; CHECK-NEXT: vmslt.vv v16, v8, v12, v0.t
1995 ; CHECK-NEXT: vmv1r.v v0, v16
1997 %v = call <8 x i1> @llvm.vp.icmp.v8i64(<8 x i64> %va, <8 x i64> %vb, metadata !"slt", <8 x i1> %m, i32 %evl)
2001 define <8 x i1> @icmp_slt_vx_v8i64(<8 x i64> %va, i64 %b, <8 x i1> %m, i32 zeroext %evl) {
2002 ; RV32-LABEL: icmp_slt_vx_v8i64:
2004 ; RV32-NEXT: addi sp, sp, -16
2005 ; RV32-NEXT: .cfi_def_cfa_offset 16
2006 ; RV32-NEXT: sw a1, 12(sp)
2007 ; RV32-NEXT: sw a0, 8(sp)
2008 ; RV32-NEXT: addi a0, sp, 8
2009 ; RV32-NEXT: vsetivli zero, 8, e64, m4, ta, ma
2010 ; RV32-NEXT: vlse64.v v16, (a0), zero
2011 ; RV32-NEXT: vsetvli zero, a2, e64, m4, ta, ma
2012 ; RV32-NEXT: vmslt.vv v12, v8, v16, v0.t
2013 ; RV32-NEXT: vmv1r.v v0, v12
2014 ; RV32-NEXT: addi sp, sp, 16
2017 ; RV64-LABEL: icmp_slt_vx_v8i64:
2019 ; RV64-NEXT: vsetvli zero, a1, e64, m4, ta, ma
2020 ; RV64-NEXT: vmslt.vx v12, v8, a0, v0.t
2021 ; RV64-NEXT: vmv1r.v v0, v12
2023 %elt.head = insertelement <8 x i64> poison, i64 %b, i32 0
2024 %vb = shufflevector <8 x i64> %elt.head, <8 x i64> poison, <8 x i32> zeroinitializer
2025 %v = call <8 x i1> @llvm.vp.icmp.v8i64(<8 x i64> %va, <8 x i64> %vb, metadata !"slt", <8 x i1> %m, i32 %evl)
2029 define <8 x i1> @icmp_slt_vx_swap_v8i64(<8 x i64> %va, i64 %b, <8 x i1> %m, i32 zeroext %evl) {
2030 ; RV32-LABEL: icmp_slt_vx_swap_v8i64:
2032 ; RV32-NEXT: addi sp, sp, -16
2033 ; RV32-NEXT: .cfi_def_cfa_offset 16
2034 ; RV32-NEXT: sw a1, 12(sp)
2035 ; RV32-NEXT: sw a0, 8(sp)
2036 ; RV32-NEXT: addi a0, sp, 8
2037 ; RV32-NEXT: vsetivli zero, 8, e64, m4, ta, ma
2038 ; RV32-NEXT: vlse64.v v16, (a0), zero
2039 ; RV32-NEXT: vsetvli zero, a2, e64, m4, ta, ma
2040 ; RV32-NEXT: vmslt.vv v12, v16, v8, v0.t
2041 ; RV32-NEXT: vmv1r.v v0, v12
2042 ; RV32-NEXT: addi sp, sp, 16
2045 ; RV64-LABEL: icmp_slt_vx_swap_v8i64:
2047 ; RV64-NEXT: vsetvli zero, a1, e64, m4, ta, ma
2048 ; RV64-NEXT: vmsgt.vx v12, v8, a0, v0.t
2049 ; RV64-NEXT: vmv1r.v v0, v12
2051 %elt.head = insertelement <8 x i64> poison, i64 %b, i32 0
2052 %vb = shufflevector <8 x i64> %elt.head, <8 x i64> poison, <8 x i32> zeroinitializer
2053 %v = call <8 x i1> @llvm.vp.icmp.v8i64(<8 x i64> %vb, <8 x i64> %va, metadata !"slt", <8 x i1> %m, i32 %evl)
2057 define <8 x i1> @icmp_slt_vi_v8i64(<8 x i64> %va, <8 x i1> %m, i32 zeroext %evl) {
2058 ; CHECK-LABEL: icmp_slt_vi_v8i64:
2060 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
2061 ; CHECK-NEXT: vmsle.vi v12, v8, 3, v0.t
2062 ; CHECK-NEXT: vmv1r.v v0, v12
2064 %v = call <8 x i1> @llvm.vp.icmp.v8i64(<8 x i64> %va, <8 x i64> splat (i64 4), metadata !"slt", <8 x i1> %m, i32 %evl)
2068 define <8 x i1> @icmp_slt_vi_swap_v8i64(<8 x i64> %va, <8 x i1> %m, i32 zeroext %evl) {
2069 ; CHECK-LABEL: icmp_slt_vi_swap_v8i64:
2071 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
2072 ; CHECK-NEXT: vmsgt.vi v12, v8, 4, v0.t
2073 ; CHECK-NEXT: vmv1r.v v0, v12
2075 %v = call <8 x i1> @llvm.vp.icmp.v8i64(<8 x i64> splat (i64 4), <8 x i64> %va, metadata !"slt", <8 x i1> %m, i32 %evl)
2079 define <8 x i1> @icmp_sle_vv_v8i64(<8 x i64> %va, <8 x i64> %vb, <8 x i1> %m, i32 zeroext %evl) {
2080 ; CHECK-LABEL: icmp_sle_vv_v8i64:
2082 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
2083 ; CHECK-NEXT: vmsle.vv v16, v8, v12, v0.t
2084 ; CHECK-NEXT: vmv1r.v v0, v16
2086 %v = call <8 x i1> @llvm.vp.icmp.v8i64(<8 x i64> %va, <8 x i64> %vb, metadata !"sle", <8 x i1> %m, i32 %evl)
2090 define <8 x i1> @icmp_sle_vx_v8i64(<8 x i64> %va, i64 %b, <8 x i1> %m, i32 zeroext %evl) {
2091 ; RV32-LABEL: icmp_sle_vx_v8i64:
2093 ; RV32-NEXT: addi sp, sp, -16
2094 ; RV32-NEXT: .cfi_def_cfa_offset 16
2095 ; RV32-NEXT: sw a1, 12(sp)
2096 ; RV32-NEXT: sw a0, 8(sp)
2097 ; RV32-NEXT: addi a0, sp, 8
2098 ; RV32-NEXT: vsetivli zero, 8, e64, m4, ta, ma
2099 ; RV32-NEXT: vlse64.v v16, (a0), zero
2100 ; RV32-NEXT: vsetvli zero, a2, e64, m4, ta, ma
2101 ; RV32-NEXT: vmsle.vv v12, v8, v16, v0.t
2102 ; RV32-NEXT: vmv1r.v v0, v12
2103 ; RV32-NEXT: addi sp, sp, 16
2106 ; RV64-LABEL: icmp_sle_vx_v8i64:
2108 ; RV64-NEXT: vsetvli zero, a1, e64, m4, ta, ma
2109 ; RV64-NEXT: vmsle.vx v12, v8, a0, v0.t
2110 ; RV64-NEXT: vmv1r.v v0, v12
2112 %elt.head = insertelement <8 x i64> poison, i64 %b, i32 0
2113 %vb = shufflevector <8 x i64> %elt.head, <8 x i64> poison, <8 x i32> zeroinitializer
2114 %v = call <8 x i1> @llvm.vp.icmp.v8i64(<8 x i64> %va, <8 x i64> %vb, metadata !"sle", <8 x i1> %m, i32 %evl)
2118 define <8 x i1> @icmp_sle_vx_swap_v8i64(<8 x i64> %va, i64 %b, <8 x i1> %m, i32 zeroext %evl) {
2119 ; RV32-LABEL: icmp_sle_vx_swap_v8i64:
2121 ; RV32-NEXT: addi sp, sp, -16
2122 ; RV32-NEXT: .cfi_def_cfa_offset 16
2123 ; RV32-NEXT: sw a1, 12(sp)
2124 ; RV32-NEXT: sw a0, 8(sp)
2125 ; RV32-NEXT: addi a0, sp, 8
2126 ; RV32-NEXT: vsetivli zero, 8, e64, m4, ta, ma
2127 ; RV32-NEXT: vlse64.v v16, (a0), zero
2128 ; RV32-NEXT: vsetvli zero, a2, e64, m4, ta, ma
2129 ; RV32-NEXT: vmsle.vv v12, v16, v8, v0.t
2130 ; RV32-NEXT: vmv1r.v v0, v12
2131 ; RV32-NEXT: addi sp, sp, 16
2134 ; RV64-LABEL: icmp_sle_vx_swap_v8i64:
2136 ; RV64-NEXT: vsetivli zero, 8, e64, m4, ta, ma
2137 ; RV64-NEXT: vmv.v.x v16, a0
2138 ; RV64-NEXT: vsetvli zero, a1, e64, m4, ta, ma
2139 ; RV64-NEXT: vmsle.vv v12, v16, v8, v0.t
2140 ; RV64-NEXT: vmv1r.v v0, v12
2142 %elt.head = insertelement <8 x i64> poison, i64 %b, i32 0
2143 %vb = shufflevector <8 x i64> %elt.head, <8 x i64> poison, <8 x i32> zeroinitializer
2144 %v = call <8 x i1> @llvm.vp.icmp.v8i64(<8 x i64> %vb, <8 x i64> %va, metadata !"sle", <8 x i1> %m, i32 %evl)
2148 define <8 x i1> @icmp_sle_vi_v8i64(<8 x i64> %va, <8 x i1> %m, i32 zeroext %evl) {
2149 ; CHECK-LABEL: icmp_sle_vi_v8i64:
2151 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
2152 ; CHECK-NEXT: vmsle.vi v12, v8, 4, v0.t
2153 ; CHECK-NEXT: vmv1r.v v0, v12
2155 %v = call <8 x i1> @llvm.vp.icmp.v8i64(<8 x i64> %va, <8 x i64> splat (i64 4), metadata !"sle", <8 x i1> %m, i32 %evl)
2159 define <8 x i1> @icmp_sle_vi_swap_v8i64(<8 x i64> %va, <8 x i1> %m, i32 zeroext %evl) {
2160 ; CHECK-LABEL: icmp_sle_vi_swap_v8i64:
2162 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
2163 ; CHECK-NEXT: vmsgt.vi v12, v8, 3, v0.t
2164 ; CHECK-NEXT: vmv1r.v v0, v12
2166 %v = call <8 x i1> @llvm.vp.icmp.v8i64(<8 x i64> splat (i64 4), <8 x i64> %va, metadata !"sle", <8 x i1> %m, i32 %evl)