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 %elt.head = insertelement <8 x i8> poison, i8 4, i32 0
139 %vb = shufflevector <8 x i8> %elt.head, <8 x i8> poison, <8 x i32> zeroinitializer
140 %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)
144 define <8 x i1> @icmp_eq_vi_swap_v8i8(<8 x i8> %va, <8 x i1> %m, i32 zeroext %evl) {
145 ; CHECK-LABEL: icmp_eq_vi_swap_v8i8:
147 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
148 ; CHECK-NEXT: vmseq.vi v0, v8, 4, v0.t
150 %elt.head = insertelement <8 x i8> poison, i8 4, i32 0
151 %vb = shufflevector <8 x i8> %elt.head, <8 x i8> poison, <8 x i32> zeroinitializer
152 %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)
156 define <8 x i1> @icmp_ne_vv_v8i8(<8 x i8> %va, <8 x i8> %vb, <8 x i1> %m, i32 zeroext %evl) {
157 ; CHECK-LABEL: icmp_ne_vv_v8i8:
159 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
160 ; CHECK-NEXT: vmsne.vv v0, v8, v9, v0.t
162 %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)
166 define <8 x i1> @icmp_ne_vx_v8i8(<8 x i8> %va, i8 %b, <8 x i1> %m, i32 zeroext %evl) {
167 ; CHECK-LABEL: icmp_ne_vx_v8i8:
169 ; CHECK-NEXT: vsetvli zero, a1, e8, mf2, ta, ma
170 ; CHECK-NEXT: vmsne.vx v0, v8, a0, v0.t
172 %elt.head = insertelement <8 x i8> poison, i8 %b, i32 0
173 %vb = shufflevector <8 x i8> %elt.head, <8 x i8> poison, <8 x i32> zeroinitializer
174 %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)
178 define <8 x i1> @icmp_ne_vx_swap_v8i8(<8 x i8> %va, i8 %b, <8 x i1> %m, i32 zeroext %evl) {
179 ; CHECK-LABEL: icmp_ne_vx_swap_v8i8:
181 ; CHECK-NEXT: vsetvli zero, a1, e8, mf2, ta, ma
182 ; CHECK-NEXT: vmsne.vx v0, v8, a0, v0.t
184 %elt.head = insertelement <8 x i8> poison, i8 %b, i32 0
185 %vb = shufflevector <8 x i8> %elt.head, <8 x i8> poison, <8 x i32> zeroinitializer
186 %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)
190 define <8 x i1> @icmp_ne_vi_v8i8(<8 x i8> %va, <8 x i1> %m, i32 zeroext %evl) {
191 ; CHECK-LABEL: icmp_ne_vi_v8i8:
193 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
194 ; CHECK-NEXT: vmsne.vi v0, v8, 4, v0.t
196 %elt.head = insertelement <8 x i8> poison, i8 4, i32 0
197 %vb = shufflevector <8 x i8> %elt.head, <8 x i8> poison, <8 x i32> zeroinitializer
198 %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)
202 define <8 x i1> @icmp_ne_vi_swap_v8i8(<8 x i8> %va, <8 x i1> %m, i32 zeroext %evl) {
203 ; CHECK-LABEL: icmp_ne_vi_swap_v8i8:
205 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
206 ; CHECK-NEXT: vmsne.vi v0, v8, 4, v0.t
208 %elt.head = insertelement <8 x i8> poison, i8 4, i32 0
209 %vb = shufflevector <8 x i8> %elt.head, <8 x i8> poison, <8 x i32> zeroinitializer
210 %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)
214 define <8 x i1> @icmp_ugt_vv_v8i8(<8 x i8> %va, <8 x i8> %vb, <8 x i1> %m, i32 zeroext %evl) {
215 ; CHECK-LABEL: icmp_ugt_vv_v8i8:
217 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
218 ; CHECK-NEXT: vmsltu.vv v0, v9, v8, v0.t
220 %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)
224 define <8 x i1> @icmp_ugt_vx_v8i8(<8 x i8> %va, i8 %b, <8 x i1> %m, i32 zeroext %evl) {
225 ; CHECK-LABEL: icmp_ugt_vx_v8i8:
227 ; CHECK-NEXT: vsetvli zero, a1, e8, mf2, ta, ma
228 ; CHECK-NEXT: vmsgtu.vx v0, v8, a0, v0.t
230 %elt.head = insertelement <8 x i8> poison, i8 %b, i32 0
231 %vb = shufflevector <8 x i8> %elt.head, <8 x i8> poison, <8 x i32> zeroinitializer
232 %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)
236 define <8 x i1> @icmp_ugt_vx_swap_v8i8(<8 x i8> %va, i8 %b, <8 x i1> %m, i32 zeroext %evl) {
237 ; CHECK-LABEL: icmp_ugt_vx_swap_v8i8:
239 ; CHECK-NEXT: vsetvli zero, a1, e8, mf2, ta, ma
240 ; CHECK-NEXT: vmsltu.vx v0, v8, a0, v0.t
242 %elt.head = insertelement <8 x i8> poison, i8 %b, i32 0
243 %vb = shufflevector <8 x i8> %elt.head, <8 x i8> poison, <8 x i32> zeroinitializer
244 %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)
248 define <8 x i1> @icmp_ugt_vi_v8i8(<8 x i8> %va, <8 x i1> %m, i32 zeroext %evl) {
249 ; CHECK-LABEL: icmp_ugt_vi_v8i8:
251 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
252 ; CHECK-NEXT: vmsgtu.vi v0, v8, 4, v0.t
254 %elt.head = insertelement <8 x i8> poison, i8 4, i32 0
255 %vb = shufflevector <8 x i8> %elt.head, <8 x i8> poison, <8 x i32> zeroinitializer
256 %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)
260 define <8 x i1> @icmp_ugt_vi_swap_v8i8(<8 x i8> %va, <8 x i1> %m, i32 zeroext %evl) {
261 ; CHECK-LABEL: icmp_ugt_vi_swap_v8i8:
263 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
264 ; CHECK-NEXT: vmsleu.vi v0, v8, 3, v0.t
266 %elt.head = insertelement <8 x i8> poison, i8 4, i32 0
267 %vb = shufflevector <8 x i8> %elt.head, <8 x i8> poison, <8 x i32> zeroinitializer
268 %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)
272 define <8 x i1> @icmp_uge_vv_v8i8(<8 x i8> %va, <8 x i8> %vb, <8 x i1> %m, i32 zeroext %evl) {
273 ; CHECK-LABEL: icmp_uge_vv_v8i8:
275 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
276 ; CHECK-NEXT: vmsleu.vv v0, v9, v8, v0.t
278 %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)
282 define <8 x i1> @icmp_uge_vx_v8i8(<8 x i8> %va, i8 %b, <8 x i1> %m, i32 zeroext %evl) {
283 ; CHECK-LABEL: icmp_uge_vx_v8i8:
285 ; CHECK-NEXT: vsetivli zero, 8, e8, mf2, ta, ma
286 ; CHECK-NEXT: vmv.v.x v9, a0
287 ; CHECK-NEXT: vsetvli zero, a1, e8, mf2, ta, ma
288 ; CHECK-NEXT: vmsleu.vv v0, v9, v8, 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> %va, <8 x i8> %vb, metadata !"uge", <8 x i1> %m, i32 %evl)
296 define <8 x i1> @icmp_uge_vx_swap_v8i8(<8 x i8> %va, i8 %b, <8 x i1> %m, i32 zeroext %evl) {
297 ; CHECK-LABEL: icmp_uge_vx_swap_v8i8:
299 ; CHECK-NEXT: vsetvli zero, a1, e8, mf2, ta, ma
300 ; CHECK-NEXT: vmsleu.vx v0, v8, a0, v0.t
302 %elt.head = insertelement <8 x i8> poison, i8 %b, i32 0
303 %vb = shufflevector <8 x i8> %elt.head, <8 x i8> poison, <8 x i32> zeroinitializer
304 %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)
308 define <8 x i1> @icmp_uge_vi_v8i8(<8 x i8> %va, <8 x i1> %m, i32 zeroext %evl) {
309 ; CHECK-LABEL: icmp_uge_vi_v8i8:
311 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
312 ; CHECK-NEXT: vmsgtu.vi v0, v8, 3, v0.t
314 %elt.head = insertelement <8 x i8> poison, i8 4, i32 0
315 %vb = shufflevector <8 x i8> %elt.head, <8 x i8> poison, <8 x i32> zeroinitializer
316 %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)
320 define <8 x i1> @icmp_uge_vi_swap_v8i8(<8 x i8> %va, <8 x i1> %m, i32 zeroext %evl) {
321 ; CHECK-LABEL: icmp_uge_vi_swap_v8i8:
323 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
324 ; CHECK-NEXT: vmsleu.vi v0, v8, 4, v0.t
326 %elt.head = insertelement <8 x i8> poison, i8 4, i32 0
327 %vb = shufflevector <8 x i8> %elt.head, <8 x i8> poison, <8 x i32> zeroinitializer
328 %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)
332 define <8 x i1> @icmp_ult_vv_v8i8(<8 x i8> %va, <8 x i8> %vb, <8 x i1> %m, i32 zeroext %evl) {
333 ; CHECK-LABEL: icmp_ult_vv_v8i8:
335 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
336 ; CHECK-NEXT: vmsltu.vv v0, v8, v9, v0.t
338 %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)
342 define <8 x i1> @icmp_ult_vx_v8i8(<8 x i8> %va, i8 %b, <8 x i1> %m, i32 zeroext %evl) {
343 ; CHECK-LABEL: icmp_ult_vx_v8i8:
345 ; CHECK-NEXT: vsetvli zero, a1, e8, mf2, ta, ma
346 ; CHECK-NEXT: vmsltu.vx v0, v8, a0, v0.t
348 %elt.head = insertelement <8 x i8> poison, i8 %b, i32 0
349 %vb = shufflevector <8 x i8> %elt.head, <8 x i8> poison, <8 x i32> zeroinitializer
350 %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)
354 define <8 x i1> @icmp_ult_vx_swap_v8i8(<8 x i8> %va, i8 %b, <8 x i1> %m, i32 zeroext %evl) {
355 ; CHECK-LABEL: icmp_ult_vx_swap_v8i8:
357 ; CHECK-NEXT: vsetvli zero, a1, e8, mf2, ta, ma
358 ; CHECK-NEXT: vmsgtu.vx v0, v8, a0, v0.t
360 %elt.head = insertelement <8 x i8> poison, i8 %b, i32 0
361 %vb = shufflevector <8 x i8> %elt.head, <8 x i8> poison, <8 x i32> zeroinitializer
362 %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)
366 define <8 x i1> @icmp_ult_vi_v8i8(<8 x i8> %va, <8 x i1> %m, i32 zeroext %evl) {
367 ; CHECK-LABEL: icmp_ult_vi_v8i8:
369 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
370 ; CHECK-NEXT: vmsleu.vi v0, v8, 3, v0.t
372 %elt.head = insertelement <8 x i8> poison, i8 4, i32 0
373 %vb = shufflevector <8 x i8> %elt.head, <8 x i8> poison, <8 x i32> zeroinitializer
374 %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)
378 define <8 x i1> @icmp_ult_vi_swap_v8i8(<8 x i8> %va, <8 x i1> %m, i32 zeroext %evl) {
379 ; CHECK-LABEL: icmp_ult_vi_swap_v8i8:
381 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
382 ; CHECK-NEXT: vmsgtu.vi v0, v8, 4, v0.t
384 %elt.head = insertelement <8 x i8> poison, i8 4, i32 0
385 %vb = shufflevector <8 x i8> %elt.head, <8 x i8> poison, <8 x i32> zeroinitializer
386 %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)
390 define <8 x i1> @icmp_sgt_vv_v8i8(<8 x i8> %va, <8 x i8> %vb, <8 x i1> %m, i32 zeroext %evl) {
391 ; CHECK-LABEL: icmp_sgt_vv_v8i8:
393 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
394 ; CHECK-NEXT: vmslt.vv v0, v9, v8, v0.t
396 %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)
400 define <8 x i1> @icmp_sgt_vx_v8i8(<8 x i8> %va, i8 %b, <8 x i1> %m, i32 zeroext %evl) {
401 ; CHECK-LABEL: icmp_sgt_vx_v8i8:
403 ; CHECK-NEXT: vsetvli zero, a1, e8, mf2, ta, ma
404 ; CHECK-NEXT: vmsgt.vx v0, v8, a0, v0.t
406 %elt.head = insertelement <8 x i8> poison, i8 %b, i32 0
407 %vb = shufflevector <8 x i8> %elt.head, <8 x i8> poison, <8 x i32> zeroinitializer
408 %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)
412 define <8 x i1> @icmp_sgt_vx_swap_v8i8(<8 x i8> %va, i8 %b, <8 x i1> %m, i32 zeroext %evl) {
413 ; CHECK-LABEL: icmp_sgt_vx_swap_v8i8:
415 ; CHECK-NEXT: vsetvli zero, a1, e8, mf2, ta, ma
416 ; CHECK-NEXT: vmslt.vx v0, v8, a0, v0.t
418 %elt.head = insertelement <8 x i8> poison, i8 %b, i32 0
419 %vb = shufflevector <8 x i8> %elt.head, <8 x i8> poison, <8 x i32> zeroinitializer
420 %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)
424 define <8 x i1> @icmp_sgt_vi_v8i8(<8 x i8> %va, <8 x i1> %m, i32 zeroext %evl) {
425 ; CHECK-LABEL: icmp_sgt_vi_v8i8:
427 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
428 ; CHECK-NEXT: vmsgt.vi v0, v8, 4, v0.t
430 %elt.head = insertelement <8 x i8> poison, i8 4, i32 0
431 %vb = shufflevector <8 x i8> %elt.head, <8 x i8> poison, <8 x i32> zeroinitializer
432 %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)
436 define <8 x i1> @icmp_sgt_vi_swap_v8i8(<8 x i8> %va, <8 x i1> %m, i32 zeroext %evl) {
437 ; CHECK-LABEL: icmp_sgt_vi_swap_v8i8:
439 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
440 ; CHECK-NEXT: vmsle.vi v0, v8, 3, v0.t
442 %elt.head = insertelement <8 x i8> poison, i8 4, 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> %vb, <8 x i8> %va, metadata !"sgt", <8 x i1> %m, i32 %evl)
448 define <8 x i1> @icmp_sge_vv_v8i8(<8 x i8> %va, <8 x i8> %vb, <8 x i1> %m, i32 zeroext %evl) {
449 ; CHECK-LABEL: icmp_sge_vv_v8i8:
451 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
452 ; CHECK-NEXT: vmsle.vv v0, v9, v8, v0.t
454 %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)
458 define <8 x i1> @icmp_sge_vx_v8i8(<8 x i8> %va, i8 %b, <8 x i1> %m, i32 zeroext %evl) {
459 ; CHECK-LABEL: icmp_sge_vx_v8i8:
461 ; CHECK-NEXT: vsetivli zero, 8, e8, mf2, ta, ma
462 ; CHECK-NEXT: vmv.v.x v9, a0
463 ; CHECK-NEXT: vsetvli zero, a1, e8, mf2, ta, ma
464 ; CHECK-NEXT: vmsle.vv v0, v9, v8, v0.t
466 %elt.head = insertelement <8 x i8> poison, i8 %b, i32 0
467 %vb = shufflevector <8 x i8> %elt.head, <8 x i8> poison, <8 x i32> zeroinitializer
468 %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)
472 define <8 x i1> @icmp_sge_vx_swap_v8i8(<8 x i8> %va, i8 %b, <8 x i1> %m, i32 zeroext %evl) {
473 ; CHECK-LABEL: icmp_sge_vx_swap_v8i8:
475 ; CHECK-NEXT: vsetvli zero, a1, e8, mf2, ta, ma
476 ; CHECK-NEXT: vmsle.vx v0, v8, a0, v0.t
478 %elt.head = insertelement <8 x i8> poison, i8 %b, i32 0
479 %vb = shufflevector <8 x i8> %elt.head, <8 x i8> poison, <8 x i32> zeroinitializer
480 %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)
484 define <8 x i1> @icmp_sge_vi_v8i8(<8 x i8> %va, <8 x i1> %m, i32 zeroext %evl) {
485 ; CHECK-LABEL: icmp_sge_vi_v8i8:
487 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
488 ; CHECK-NEXT: vmsgt.vi v0, v8, 3, v0.t
490 %elt.head = insertelement <8 x i8> poison, i8 4, i32 0
491 %vb = shufflevector <8 x i8> %elt.head, <8 x i8> poison, <8 x i32> zeroinitializer
492 %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)
496 define <8 x i1> @icmp_sge_vi_swap_v8i8(<8 x i8> %va, <8 x i1> %m, i32 zeroext %evl) {
497 ; CHECK-LABEL: icmp_sge_vi_swap_v8i8:
499 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
500 ; CHECK-NEXT: vmsle.vi v0, v8, 4, v0.t
502 %elt.head = insertelement <8 x i8> poison, i8 4, i32 0
503 %vb = shufflevector <8 x i8> %elt.head, <8 x i8> poison, <8 x i32> zeroinitializer
504 %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)
508 define <8 x i1> @icmp_slt_vv_v8i8(<8 x i8> %va, <8 x i8> %vb, <8 x i1> %m, i32 zeroext %evl) {
509 ; CHECK-LABEL: icmp_slt_vv_v8i8:
511 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
512 ; CHECK-NEXT: vmslt.vv v0, v8, v9, v0.t
514 %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)
518 define <8 x i1> @icmp_slt_vx_v8i8(<8 x i8> %va, i8 %b, <8 x i1> %m, i32 zeroext %evl) {
519 ; CHECK-LABEL: icmp_slt_vx_v8i8:
521 ; CHECK-NEXT: vsetvli zero, a1, e8, mf2, ta, ma
522 ; CHECK-NEXT: vmslt.vx v0, v8, a0, v0.t
524 %elt.head = insertelement <8 x i8> poison, i8 %b, i32 0
525 %vb = shufflevector <8 x i8> %elt.head, <8 x i8> poison, <8 x i32> zeroinitializer
526 %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)
530 define <8 x i1> @icmp_slt_vx_swap_v8i8(<8 x i8> %va, i8 %b, <8 x i1> %m, i32 zeroext %evl) {
531 ; CHECK-LABEL: icmp_slt_vx_swap_v8i8:
533 ; CHECK-NEXT: vsetvli zero, a1, e8, mf2, ta, ma
534 ; CHECK-NEXT: vmsgt.vx v0, v8, a0, v0.t
536 %elt.head = insertelement <8 x i8> poison, i8 %b, i32 0
537 %vb = shufflevector <8 x i8> %elt.head, <8 x i8> poison, <8 x i32> zeroinitializer
538 %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)
542 define <8 x i1> @icmp_slt_vi_v8i8(<8 x i8> %va, <8 x i1> %m, i32 zeroext %evl) {
543 ; CHECK-LABEL: icmp_slt_vi_v8i8:
545 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
546 ; CHECK-NEXT: vmsle.vi v0, v8, 3, v0.t
548 %elt.head = insertelement <8 x i8> poison, i8 4, i32 0
549 %vb = shufflevector <8 x i8> %elt.head, <8 x i8> poison, <8 x i32> zeroinitializer
550 %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)
554 define <8 x i1> @icmp_slt_vi_swap_v8i8(<8 x i8> %va, <8 x i1> %m, i32 zeroext %evl) {
555 ; CHECK-LABEL: icmp_slt_vi_swap_v8i8:
557 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
558 ; CHECK-NEXT: vmsgt.vi v0, v8, 4, v0.t
560 %elt.head = insertelement <8 x i8> poison, i8 4, i32 0
561 %vb = shufflevector <8 x i8> %elt.head, <8 x i8> poison, <8 x i32> zeroinitializer
562 %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)
566 define <8 x i1> @icmp_sle_vv_v8i8(<8 x i8> %va, <8 x i8> %vb, <8 x i1> %m, i32 zeroext %evl) {
567 ; CHECK-LABEL: icmp_sle_vv_v8i8:
569 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
570 ; CHECK-NEXT: vmsle.vv v0, v8, v9, v0.t
572 %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)
576 define <8 x i1> @icmp_sle_vx_v8i8(<8 x i8> %va, i8 %b, <8 x i1> %m, i32 zeroext %evl) {
577 ; CHECK-LABEL: icmp_sle_vx_v8i8:
579 ; CHECK-NEXT: vsetvli zero, a1, e8, mf2, ta, ma
580 ; CHECK-NEXT: vmsle.vx v0, v8, a0, v0.t
582 %elt.head = insertelement <8 x i8> poison, i8 %b, i32 0
583 %vb = shufflevector <8 x i8> %elt.head, <8 x i8> poison, <8 x i32> zeroinitializer
584 %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)
588 define <8 x i1> @icmp_sle_vx_swap_v8i8(<8 x i8> %va, i8 %b, <8 x i1> %m, i32 zeroext %evl) {
589 ; CHECK-LABEL: icmp_sle_vx_swap_v8i8:
591 ; CHECK-NEXT: vsetivli zero, 8, e8, mf2, ta, ma
592 ; CHECK-NEXT: vmv.v.x v9, a0
593 ; CHECK-NEXT: vsetvli zero, a1, e8, mf2, ta, ma
594 ; CHECK-NEXT: vmsle.vv v0, v9, v8, v0.t
596 %elt.head = insertelement <8 x i8> poison, i8 %b, i32 0
597 %vb = shufflevector <8 x i8> %elt.head, <8 x i8> poison, <8 x i32> zeroinitializer
598 %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)
602 define <8 x i1> @icmp_sle_vi_v8i8(<8 x i8> %va, <8 x i1> %m, i32 zeroext %evl) {
603 ; CHECK-LABEL: icmp_sle_vi_v8i8:
605 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
606 ; CHECK-NEXT: vmsle.vi v0, v8, 4, v0.t
608 %elt.head = insertelement <8 x i8> poison, i8 4, i32 0
609 %vb = shufflevector <8 x i8> %elt.head, <8 x i8> poison, <8 x i32> zeroinitializer
610 %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)
614 define <8 x i1> @icmp_sle_vi_swap_v8i8(<8 x i8> %va, <8 x i1> %m, i32 zeroext %evl) {
615 ; CHECK-LABEL: icmp_sle_vi_swap_v8i8:
617 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
618 ; CHECK-NEXT: vmsgt.vi v0, v8, 3, v0.t
620 %elt.head = insertelement <8 x i8> poison, i8 4, i32 0
621 %vb = shufflevector <8 x i8> %elt.head, <8 x i8> poison, <8 x i32> zeroinitializer
622 %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)
626 declare <256 x i1> @llvm.vp.icmp.v256i8(<256 x i8>, <256 x i8>, metadata, <256 x i1>, i32)
628 define <256 x i1> @icmp_eq_vv_v256i8(<256 x i8> %va, <256 x i8> %vb, <256 x i1> %m, i32 zeroext %evl) {
629 ; CHECK-LABEL: icmp_eq_vv_v256i8:
631 ; CHECK-NEXT: addi sp, sp, -16
632 ; CHECK-NEXT: .cfi_def_cfa_offset 16
633 ; CHECK-NEXT: csrr a1, vlenb
634 ; CHECK-NEXT: slli a1, a1, 4
635 ; CHECK-NEXT: sub sp, sp, a1
636 ; CHECK-NEXT: .cfi_escape 0x0f, 0x0d, 0x72, 0x00, 0x11, 0x10, 0x22, 0x11, 0x10, 0x92, 0xa2, 0x38, 0x00, 0x1e, 0x22 # sp + 16 + 16 * vlenb
637 ; CHECK-NEXT: vmv1r.v v1, v0
638 ; CHECK-NEXT: csrr a1, vlenb
639 ; CHECK-NEXT: slli a1, a1, 3
640 ; CHECK-NEXT: add a1, sp, a1
641 ; CHECK-NEXT: addi a1, a1, 16
642 ; CHECK-NEXT: vs8r.v v8, (a1) # Unknown-size Folded Spill
643 ; CHECK-NEXT: li a1, 128
644 ; CHECK-NEXT: vsetvli zero, a1, e8, m8, ta, ma
645 ; CHECK-NEXT: vlm.v v0, (a2)
646 ; CHECK-NEXT: addi a2, a0, 128
647 ; CHECK-NEXT: vle8.v v8, (a2)
648 ; CHECK-NEXT: addi a2, a3, -128
649 ; CHECK-NEXT: sltu a4, a3, a2
650 ; CHECK-NEXT: addi a4, a4, -1
651 ; CHECK-NEXT: vle8.v v24, (a0)
652 ; CHECK-NEXT: addi a0, sp, 16
653 ; CHECK-NEXT: vs8r.v v24, (a0) # Unknown-size Folded Spill
654 ; CHECK-NEXT: and a2, a4, a2
655 ; CHECK-NEXT: vsetvli zero, a2, e8, m8, ta, ma
656 ; CHECK-NEXT: vmseq.vv v2, v16, v8, v0.t
657 ; CHECK-NEXT: bltu a3, a1, .LBB51_2
658 ; CHECK-NEXT: # %bb.1:
659 ; CHECK-NEXT: li a3, 128
660 ; CHECK-NEXT: .LBB51_2:
661 ; CHECK-NEXT: vsetvli zero, a3, e8, m8, ta, ma
662 ; CHECK-NEXT: vmv1r.v v0, v1
663 ; CHECK-NEXT: csrr a0, vlenb
664 ; CHECK-NEXT: slli a0, a0, 3
665 ; CHECK-NEXT: add a0, sp, a0
666 ; CHECK-NEXT: addi a0, a0, 16
667 ; CHECK-NEXT: vl8r.v v8, (a0) # Unknown-size Folded Reload
668 ; CHECK-NEXT: addi a0, sp, 16
669 ; CHECK-NEXT: vl8r.v v24, (a0) # Unknown-size Folded Reload
670 ; CHECK-NEXT: vmseq.vv v16, v8, v24, v0.t
671 ; CHECK-NEXT: vmv1r.v v0, v16
672 ; CHECK-NEXT: vmv1r.v v8, v2
673 ; CHECK-NEXT: csrr a0, vlenb
674 ; CHECK-NEXT: slli a0, a0, 4
675 ; CHECK-NEXT: add sp, sp, a0
676 ; CHECK-NEXT: addi sp, sp, 16
678 %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)
682 define <256 x i1> @icmp_eq_vx_v256i8(<256 x i8> %va, i8 %b, <256 x i1> %m, i32 zeroext %evl) {
683 ; CHECK-LABEL: icmp_eq_vx_v256i8:
685 ; CHECK-NEXT: vmv1r.v v24, v0
686 ; CHECK-NEXT: li a3, 128
687 ; CHECK-NEXT: vsetvli zero, a3, e8, m8, ta, ma
688 ; CHECK-NEXT: vlm.v v0, (a1)
689 ; CHECK-NEXT: addi a1, a2, -128
690 ; CHECK-NEXT: sltu a4, a2, a1
691 ; CHECK-NEXT: addi a4, a4, -1
692 ; CHECK-NEXT: and a1, a4, a1
693 ; CHECK-NEXT: vsetvli zero, a1, e8, m8, ta, ma
694 ; CHECK-NEXT: vmseq.vx v25, v16, a0, v0.t
695 ; CHECK-NEXT: bltu a2, a3, .LBB52_2
696 ; CHECK-NEXT: # %bb.1:
697 ; CHECK-NEXT: li a2, 128
698 ; CHECK-NEXT: .LBB52_2:
699 ; CHECK-NEXT: vsetvli zero, a2, e8, m8, ta, ma
700 ; CHECK-NEXT: vmv1r.v v0, v24
701 ; CHECK-NEXT: vmseq.vx v16, v8, a0, v0.t
702 ; CHECK-NEXT: vmv1r.v v0, v16
703 ; CHECK-NEXT: vmv1r.v v8, v25
705 %elt.head = insertelement <256 x i8> poison, i8 %b, i32 0
706 %vb = shufflevector <256 x i8> %elt.head, <256 x i8> poison, <256 x i32> zeroinitializer
707 %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)
711 define <256 x i1> @icmp_eq_vx_swap_v256i8(<256 x i8> %va, i8 %b, <256 x i1> %m, i32 zeroext %evl) {
712 ; CHECK-LABEL: icmp_eq_vx_swap_v256i8:
714 ; CHECK-NEXT: vmv1r.v v24, v0
715 ; CHECK-NEXT: li a3, 128
716 ; CHECK-NEXT: vsetvli zero, a3, e8, m8, ta, ma
717 ; CHECK-NEXT: vlm.v v0, (a1)
718 ; CHECK-NEXT: addi a1, a2, -128
719 ; CHECK-NEXT: sltu a4, a2, a1
720 ; CHECK-NEXT: addi a4, a4, -1
721 ; CHECK-NEXT: and a1, a4, a1
722 ; CHECK-NEXT: vsetvli zero, a1, e8, m8, ta, ma
723 ; CHECK-NEXT: vmseq.vx v25, v16, a0, v0.t
724 ; CHECK-NEXT: bltu a2, a3, .LBB53_2
725 ; CHECK-NEXT: # %bb.1:
726 ; CHECK-NEXT: li a2, 128
727 ; CHECK-NEXT: .LBB53_2:
728 ; CHECK-NEXT: vsetvli zero, a2, e8, m8, ta, ma
729 ; CHECK-NEXT: vmv1r.v v0, v24
730 ; CHECK-NEXT: vmseq.vx v16, v8, a0, v0.t
731 ; CHECK-NEXT: vmv1r.v v0, v16
732 ; CHECK-NEXT: vmv1r.v v8, v25
734 %elt.head = insertelement <256 x i8> poison, i8 %b, i32 0
735 %vb = shufflevector <256 x i8> %elt.head, <256 x i8> poison, <256 x i32> zeroinitializer
736 %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)
740 declare <8 x i1> @llvm.vp.icmp.v8i32(<8 x i32>, <8 x i32>, metadata, <8 x i1>, i32)
742 define <8 x i1> @icmp_eq_vv_v8i32(<8 x i32> %va, <8 x i32> %vb, <8 x i1> %m, i32 zeroext %evl) {
743 ; CHECK-LABEL: icmp_eq_vv_v8i32:
745 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
746 ; CHECK-NEXT: vmseq.vv v12, v8, v10, v0.t
747 ; CHECK-NEXT: vmv1r.v v0, v12
749 %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)
753 define <8 x i1> @icmp_eq_vx_v8i32(<8 x i32> %va, i32 %b, <8 x i1> %m, i32 zeroext %evl) {
754 ; CHECK-LABEL: icmp_eq_vx_v8i32:
756 ; CHECK-NEXT: vsetvli zero, a1, e32, m2, ta, ma
757 ; CHECK-NEXT: vmseq.vx v10, v8, a0, v0.t
758 ; CHECK-NEXT: vmv1r.v v0, v10
760 %elt.head = insertelement <8 x i32> poison, i32 %b, i32 0
761 %vb = shufflevector <8 x i32> %elt.head, <8 x i32> poison, <8 x i32> zeroinitializer
762 %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)
766 define <8 x i1> @icmp_eq_vx_swap_v8i32(<8 x i32> %va, i32 %b, <8 x i1> %m, i32 zeroext %evl) {
767 ; CHECK-LABEL: icmp_eq_vx_swap_v8i32:
769 ; CHECK-NEXT: vsetvli zero, a1, e32, m2, ta, ma
770 ; CHECK-NEXT: vmseq.vx v10, v8, a0, v0.t
771 ; CHECK-NEXT: vmv1r.v v0, v10
773 %elt.head = insertelement <8 x i32> poison, i32 %b, i32 0
774 %vb = shufflevector <8 x i32> %elt.head, <8 x i32> poison, <8 x i32> zeroinitializer
775 %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)
779 define <8 x i1> @icmp_eq_vi_v8i32(<8 x i32> %va, <8 x i1> %m, i32 zeroext %evl) {
780 ; CHECK-LABEL: icmp_eq_vi_v8i32:
782 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
783 ; CHECK-NEXT: vmseq.vi v10, v8, 4, v0.t
784 ; CHECK-NEXT: vmv1r.v v0, v10
786 %elt.head = insertelement <8 x i32> poison, i32 4, i32 0
787 %vb = shufflevector <8 x i32> %elt.head, <8 x i32> poison, <8 x i32> zeroinitializer
788 %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)
792 define <8 x i1> @icmp_eq_vi_swap_v8i32(<8 x i32> %va, <8 x i1> %m, i32 zeroext %evl) {
793 ; CHECK-LABEL: icmp_eq_vi_swap_v8i32:
795 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
796 ; CHECK-NEXT: vmseq.vi v10, v8, 4, v0.t
797 ; CHECK-NEXT: vmv1r.v v0, v10
799 %elt.head = insertelement <8 x i32> poison, i32 4, i32 0
800 %vb = shufflevector <8 x i32> %elt.head, <8 x i32> poison, <8 x i32> zeroinitializer
801 %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)
805 define <8 x i1> @icmp_ne_vv_v8i32(<8 x i32> %va, <8 x i32> %vb, <8 x i1> %m, i32 zeroext %evl) {
806 ; CHECK-LABEL: icmp_ne_vv_v8i32:
808 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
809 ; CHECK-NEXT: vmsne.vv v12, v8, v10, v0.t
810 ; CHECK-NEXT: vmv1r.v v0, v12
812 %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)
816 define <8 x i1> @icmp_ne_vx_v8i32(<8 x i32> %va, i32 %b, <8 x i1> %m, i32 zeroext %evl) {
817 ; CHECK-LABEL: icmp_ne_vx_v8i32:
819 ; CHECK-NEXT: vsetvli zero, a1, e32, m2, ta, ma
820 ; CHECK-NEXT: vmsne.vx v10, v8, a0, v0.t
821 ; CHECK-NEXT: vmv1r.v v0, v10
823 %elt.head = insertelement <8 x i32> poison, i32 %b, i32 0
824 %vb = shufflevector <8 x i32> %elt.head, <8 x i32> poison, <8 x i32> zeroinitializer
825 %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)
829 define <8 x i1> @icmp_ne_vx_swap_v8i32(<8 x i32> %va, i32 %b, <8 x i1> %m, i32 zeroext %evl) {
830 ; CHECK-LABEL: icmp_ne_vx_swap_v8i32:
832 ; CHECK-NEXT: vsetvli zero, a1, e32, m2, ta, ma
833 ; CHECK-NEXT: vmsne.vx v10, v8, a0, v0.t
834 ; CHECK-NEXT: vmv1r.v v0, v10
836 %elt.head = insertelement <8 x i32> poison, i32 %b, i32 0
837 %vb = shufflevector <8 x i32> %elt.head, <8 x i32> poison, <8 x i32> zeroinitializer
838 %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)
842 define <8 x i1> @icmp_ne_vi_v8i32(<8 x i32> %va, <8 x i1> %m, i32 zeroext %evl) {
843 ; CHECK-LABEL: icmp_ne_vi_v8i32:
845 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
846 ; CHECK-NEXT: vmsne.vi v10, v8, 4, v0.t
847 ; CHECK-NEXT: vmv1r.v v0, v10
849 %elt.head = insertelement <8 x i32> poison, i32 4, i32 0
850 %vb = shufflevector <8 x i32> %elt.head, <8 x i32> poison, <8 x i32> zeroinitializer
851 %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)
855 define <8 x i1> @icmp_ne_vi_swap_v8i32(<8 x i32> %va, <8 x i1> %m, i32 zeroext %evl) {
856 ; CHECK-LABEL: icmp_ne_vi_swap_v8i32:
858 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
859 ; CHECK-NEXT: vmsne.vi v10, v8, 4, v0.t
860 ; CHECK-NEXT: vmv1r.v v0, v10
862 %elt.head = insertelement <8 x i32> poison, i32 4, i32 0
863 %vb = shufflevector <8 x i32> %elt.head, <8 x i32> poison, <8 x i32> zeroinitializer
864 %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)
868 define <8 x i1> @icmp_ugt_vv_v8i32(<8 x i32> %va, <8 x i32> %vb, <8 x i1> %m, i32 zeroext %evl) {
869 ; CHECK-LABEL: icmp_ugt_vv_v8i32:
871 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
872 ; CHECK-NEXT: vmsltu.vv v12, v10, v8, v0.t
873 ; CHECK-NEXT: vmv1r.v v0, v12
875 %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)
879 define <8 x i1> @icmp_ugt_vx_v8i32(<8 x i32> %va, i32 %b, <8 x i1> %m, i32 zeroext %evl) {
880 ; CHECK-LABEL: icmp_ugt_vx_v8i32:
882 ; CHECK-NEXT: vsetvli zero, a1, e32, m2, ta, ma
883 ; CHECK-NEXT: vmsgtu.vx v10, v8, a0, v0.t
884 ; CHECK-NEXT: vmv1r.v v0, v10
886 %elt.head = insertelement <8 x i32> poison, i32 %b, i32 0
887 %vb = shufflevector <8 x i32> %elt.head, <8 x i32> poison, <8 x i32> zeroinitializer
888 %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)
892 define <8 x i1> @icmp_ugt_vx_swap_v8i32(<8 x i32> %va, i32 %b, <8 x i1> %m, i32 zeroext %evl) {
893 ; CHECK-LABEL: icmp_ugt_vx_swap_v8i32:
895 ; CHECK-NEXT: vsetvli zero, a1, e32, m2, ta, ma
896 ; CHECK-NEXT: vmsltu.vx v10, v8, a0, v0.t
897 ; CHECK-NEXT: vmv1r.v v0, v10
899 %elt.head = insertelement <8 x i32> poison, i32 %b, i32 0
900 %vb = shufflevector <8 x i32> %elt.head, <8 x i32> poison, <8 x i32> zeroinitializer
901 %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)
905 define <8 x i1> @icmp_ugt_vi_v8i32(<8 x i32> %va, <8 x i1> %m, i32 zeroext %evl) {
906 ; CHECK-LABEL: icmp_ugt_vi_v8i32:
908 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
909 ; CHECK-NEXT: vmsgtu.vi v10, v8, 4, v0.t
910 ; CHECK-NEXT: vmv1r.v v0, v10
912 %elt.head = insertelement <8 x i32> poison, i32 4, i32 0
913 %vb = shufflevector <8 x i32> %elt.head, <8 x i32> poison, <8 x i32> zeroinitializer
914 %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)
918 define <8 x i1> @icmp_ugt_vi_swap_v8i32(<8 x i32> %va, <8 x i1> %m, i32 zeroext %evl) {
919 ; CHECK-LABEL: icmp_ugt_vi_swap_v8i32:
921 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
922 ; CHECK-NEXT: vmsleu.vi v10, v8, 3, v0.t
923 ; CHECK-NEXT: vmv1r.v v0, v10
925 %elt.head = insertelement <8 x i32> poison, i32 4, i32 0
926 %vb = shufflevector <8 x i32> %elt.head, <8 x i32> poison, <8 x i32> zeroinitializer
927 %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)
931 define <8 x i1> @icmp_uge_vv_v8i32(<8 x i32> %va, <8 x i32> %vb, <8 x i1> %m, i32 zeroext %evl) {
932 ; CHECK-LABEL: icmp_uge_vv_v8i32:
934 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
935 ; CHECK-NEXT: vmsleu.vv v12, v10, v8, v0.t
936 ; CHECK-NEXT: vmv1r.v v0, v12
938 %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)
942 define <8 x i1> @icmp_uge_vx_v8i32(<8 x i32> %va, i32 %b, <8 x i1> %m, i32 zeroext %evl) {
943 ; CHECK-LABEL: icmp_uge_vx_v8i32:
945 ; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, ma
946 ; CHECK-NEXT: vmv.v.x v12, a0
947 ; CHECK-NEXT: vsetvli zero, a1, e32, m2, ta, ma
948 ; CHECK-NEXT: vmsleu.vv v10, v12, v8, v0.t
949 ; CHECK-NEXT: vmv1r.v v0, v10
951 %elt.head = insertelement <8 x i32> poison, i32 %b, i32 0
952 %vb = shufflevector <8 x i32> %elt.head, <8 x i32> poison, <8 x i32> zeroinitializer
953 %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)
957 define <8 x i1> @icmp_uge_vx_swap_v8i32(<8 x i32> %va, i32 %b, <8 x i1> %m, i32 zeroext %evl) {
958 ; CHECK-LABEL: icmp_uge_vx_swap_v8i32:
960 ; CHECK-NEXT: vsetvli zero, a1, e32, m2, ta, ma
961 ; CHECK-NEXT: vmsleu.vx v10, v8, a0, v0.t
962 ; CHECK-NEXT: vmv1r.v v0, v10
964 %elt.head = insertelement <8 x i32> poison, i32 %b, i32 0
965 %vb = shufflevector <8 x i32> %elt.head, <8 x i32> poison, <8 x i32> zeroinitializer
966 %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)
970 define <8 x i1> @icmp_uge_vi_v8i32(<8 x i32> %va, <8 x i1> %m, i32 zeroext %evl) {
971 ; CHECK-LABEL: icmp_uge_vi_v8i32:
973 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
974 ; CHECK-NEXT: vmsgtu.vi v10, v8, 3, v0.t
975 ; CHECK-NEXT: vmv1r.v v0, v10
977 %elt.head = insertelement <8 x i32> poison, i32 4, i32 0
978 %vb = shufflevector <8 x i32> %elt.head, <8 x i32> poison, <8 x i32> zeroinitializer
979 %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)
983 define <8 x i1> @icmp_uge_vi_swap_v8i32(<8 x i32> %va, <8 x i1> %m, i32 zeroext %evl) {
984 ; CHECK-LABEL: icmp_uge_vi_swap_v8i32:
986 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
987 ; CHECK-NEXT: vmsleu.vi v10, v8, 4, v0.t
988 ; CHECK-NEXT: vmv1r.v v0, v10
990 %elt.head = insertelement <8 x i32> poison, i32 4, i32 0
991 %vb = shufflevector <8 x i32> %elt.head, <8 x i32> poison, <8 x i32> zeroinitializer
992 %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)
996 define <8 x i1> @icmp_ult_vv_v8i32(<8 x i32> %va, <8 x i32> %vb, <8 x i1> %m, i32 zeroext %evl) {
997 ; CHECK-LABEL: icmp_ult_vv_v8i32:
999 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
1000 ; CHECK-NEXT: vmsltu.vv v12, v8, v10, v0.t
1001 ; CHECK-NEXT: vmv1r.v v0, v12
1003 %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)
1007 define <8 x i1> @icmp_ult_vx_v8i32(<8 x i32> %va, i32 %b, <8 x i1> %m, i32 zeroext %evl) {
1008 ; CHECK-LABEL: icmp_ult_vx_v8i32:
1010 ; CHECK-NEXT: vsetvli zero, a1, e32, m2, ta, ma
1011 ; CHECK-NEXT: vmsltu.vx v10, v8, a0, v0.t
1012 ; CHECK-NEXT: vmv1r.v v0, v10
1014 %elt.head = insertelement <8 x i32> poison, i32 %b, i32 0
1015 %vb = shufflevector <8 x i32> %elt.head, <8 x i32> poison, <8 x i32> zeroinitializer
1016 %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)
1020 define <8 x i1> @icmp_ult_vx_swap_v8i32(<8 x i32> %va, i32 %b, <8 x i1> %m, i32 zeroext %evl) {
1021 ; CHECK-LABEL: icmp_ult_vx_swap_v8i32:
1023 ; CHECK-NEXT: vsetvli zero, a1, e32, m2, ta, ma
1024 ; CHECK-NEXT: vmsgtu.vx v10, v8, a0, v0.t
1025 ; CHECK-NEXT: vmv1r.v v0, v10
1027 %elt.head = insertelement <8 x i32> poison, i32 %b, i32 0
1028 %vb = shufflevector <8 x i32> %elt.head, <8 x i32> poison, <8 x i32> zeroinitializer
1029 %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)
1033 define <8 x i1> @icmp_ult_vi_v8i32(<8 x i32> %va, <8 x i1> %m, i32 zeroext %evl) {
1034 ; CHECK-LABEL: icmp_ult_vi_v8i32:
1036 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
1037 ; CHECK-NEXT: vmsleu.vi v10, v8, 3, v0.t
1038 ; CHECK-NEXT: vmv1r.v v0, v10
1040 %elt.head = insertelement <8 x i32> poison, i32 4, i32 0
1041 %vb = shufflevector <8 x i32> %elt.head, <8 x i32> poison, <8 x i32> zeroinitializer
1042 %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)
1046 define <8 x i1> @icmp_ult_vi_swap_v8i32(<8 x i32> %va, <8 x i1> %m, i32 zeroext %evl) {
1047 ; CHECK-LABEL: icmp_ult_vi_swap_v8i32:
1049 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
1050 ; CHECK-NEXT: vmsgtu.vi v10, v8, 4, v0.t
1051 ; CHECK-NEXT: vmv1r.v v0, v10
1053 %elt.head = insertelement <8 x i32> poison, i32 4, i32 0
1054 %vb = shufflevector <8 x i32> %elt.head, <8 x i32> poison, <8 x i32> zeroinitializer
1055 %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)
1059 define <8 x i1> @icmp_sgt_vv_v8i32(<8 x i32> %va, <8 x i32> %vb, <8 x i1> %m, i32 zeroext %evl) {
1060 ; CHECK-LABEL: icmp_sgt_vv_v8i32:
1062 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
1063 ; CHECK-NEXT: vmslt.vv v12, v10, v8, v0.t
1064 ; CHECK-NEXT: vmv1r.v v0, v12
1066 %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)
1070 define <8 x i1> @icmp_sgt_vx_v8i32(<8 x i32> %va, i32 %b, <8 x i1> %m, i32 zeroext %evl) {
1071 ; CHECK-LABEL: icmp_sgt_vx_v8i32:
1073 ; CHECK-NEXT: vsetvli zero, a1, e32, m2, ta, ma
1074 ; CHECK-NEXT: vmsgt.vx v10, v8, a0, v0.t
1075 ; CHECK-NEXT: vmv1r.v v0, v10
1077 %elt.head = insertelement <8 x i32> poison, i32 %b, i32 0
1078 %vb = shufflevector <8 x i32> %elt.head, <8 x i32> poison, <8 x i32> zeroinitializer
1079 %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)
1083 define <8 x i1> @icmp_sgt_vx_swap_v8i32(<8 x i32> %va, i32 %b, <8 x i1> %m, i32 zeroext %evl) {
1084 ; CHECK-LABEL: icmp_sgt_vx_swap_v8i32:
1086 ; CHECK-NEXT: vsetvli zero, a1, e32, m2, ta, ma
1087 ; CHECK-NEXT: vmslt.vx v10, v8, a0, v0.t
1088 ; CHECK-NEXT: vmv1r.v v0, v10
1090 %elt.head = insertelement <8 x i32> poison, i32 %b, i32 0
1091 %vb = shufflevector <8 x i32> %elt.head, <8 x i32> poison, <8 x i32> zeroinitializer
1092 %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)
1096 define <8 x i1> @icmp_sgt_vi_v8i32(<8 x i32> %va, <8 x i1> %m, i32 zeroext %evl) {
1097 ; CHECK-LABEL: icmp_sgt_vi_v8i32:
1099 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
1100 ; CHECK-NEXT: vmsgt.vi v10, v8, 4, v0.t
1101 ; CHECK-NEXT: vmv1r.v v0, v10
1103 %elt.head = insertelement <8 x i32> poison, i32 4, i32 0
1104 %vb = shufflevector <8 x i32> %elt.head, <8 x i32> poison, <8 x i32> zeroinitializer
1105 %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)
1109 define <8 x i1> @icmp_sgt_vi_swap_v8i32(<8 x i32> %va, <8 x i1> %m, i32 zeroext %evl) {
1110 ; CHECK-LABEL: icmp_sgt_vi_swap_v8i32:
1112 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
1113 ; CHECK-NEXT: vmsle.vi v10, v8, 3, v0.t
1114 ; CHECK-NEXT: vmv1r.v v0, v10
1116 %elt.head = insertelement <8 x i32> poison, i32 4, i32 0
1117 %vb = shufflevector <8 x i32> %elt.head, <8 x i32> poison, <8 x i32> zeroinitializer
1118 %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)
1122 define <8 x i1> @icmp_sge_vv_v8i32(<8 x i32> %va, <8 x i32> %vb, <8 x i1> %m, i32 zeroext %evl) {
1123 ; CHECK-LABEL: icmp_sge_vv_v8i32:
1125 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
1126 ; CHECK-NEXT: vmsle.vv v12, v10, v8, v0.t
1127 ; CHECK-NEXT: vmv1r.v v0, v12
1129 %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)
1133 define <8 x i1> @icmp_sge_vx_v8i32(<8 x i32> %va, i32 %b, <8 x i1> %m, i32 zeroext %evl) {
1134 ; CHECK-LABEL: icmp_sge_vx_v8i32:
1136 ; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, ma
1137 ; CHECK-NEXT: vmv.v.x v12, a0
1138 ; CHECK-NEXT: vsetvli zero, a1, e32, m2, ta, ma
1139 ; CHECK-NEXT: vmsle.vv v10, v12, v8, v0.t
1140 ; CHECK-NEXT: vmv1r.v v0, v10
1142 %elt.head = insertelement <8 x i32> poison, i32 %b, i32 0
1143 %vb = shufflevector <8 x i32> %elt.head, <8 x i32> poison, <8 x i32> zeroinitializer
1144 %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)
1148 define <8 x i1> @icmp_sge_vx_swap_v8i32(<8 x i32> %va, i32 %b, <8 x i1> %m, i32 zeroext %evl) {
1149 ; CHECK-LABEL: icmp_sge_vx_swap_v8i32:
1151 ; CHECK-NEXT: vsetvli zero, a1, e32, m2, ta, ma
1152 ; CHECK-NEXT: vmsle.vx v10, v8, a0, v0.t
1153 ; CHECK-NEXT: vmv1r.v v0, v10
1155 %elt.head = insertelement <8 x i32> poison, i32 %b, i32 0
1156 %vb = shufflevector <8 x i32> %elt.head, <8 x i32> poison, <8 x i32> zeroinitializer
1157 %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)
1161 define <8 x i1> @icmp_sge_vi_v8i32(<8 x i32> %va, <8 x i1> %m, i32 zeroext %evl) {
1162 ; CHECK-LABEL: icmp_sge_vi_v8i32:
1164 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
1165 ; CHECK-NEXT: vmsgt.vi v10, v8, 3, v0.t
1166 ; CHECK-NEXT: vmv1r.v v0, v10
1168 %elt.head = insertelement <8 x i32> poison, i32 4, i32 0
1169 %vb = shufflevector <8 x i32> %elt.head, <8 x i32> poison, <8 x i32> zeroinitializer
1170 %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)
1174 define <8 x i1> @icmp_sge_vi_swap_v8i32(<8 x i32> %va, <8 x i1> %m, i32 zeroext %evl) {
1175 ; CHECK-LABEL: icmp_sge_vi_swap_v8i32:
1177 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
1178 ; CHECK-NEXT: vmsle.vi v10, v8, 4, v0.t
1179 ; CHECK-NEXT: vmv1r.v v0, v10
1181 %elt.head = insertelement <8 x i32> poison, i32 4, i32 0
1182 %vb = shufflevector <8 x i32> %elt.head, <8 x i32> poison, <8 x i32> zeroinitializer
1183 %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)
1187 define <8 x i1> @icmp_slt_vv_v8i32(<8 x i32> %va, <8 x i32> %vb, <8 x i1> %m, i32 zeroext %evl) {
1188 ; CHECK-LABEL: icmp_slt_vv_v8i32:
1190 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
1191 ; CHECK-NEXT: vmslt.vv v12, v8, v10, v0.t
1192 ; CHECK-NEXT: vmv1r.v v0, v12
1194 %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)
1198 define <8 x i1> @icmp_slt_vx_v8i32(<8 x i32> %va, i32 %b, <8 x i1> %m, i32 zeroext %evl) {
1199 ; CHECK-LABEL: icmp_slt_vx_v8i32:
1201 ; CHECK-NEXT: vsetvli zero, a1, e32, m2, ta, ma
1202 ; CHECK-NEXT: vmslt.vx v10, v8, a0, v0.t
1203 ; CHECK-NEXT: vmv1r.v v0, v10
1205 %elt.head = insertelement <8 x i32> poison, i32 %b, i32 0
1206 %vb = shufflevector <8 x i32> %elt.head, <8 x i32> poison, <8 x i32> zeroinitializer
1207 %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)
1211 define <8 x i1> @icmp_slt_vx_swap_v8i32(<8 x i32> %va, i32 %b, <8 x i1> %m, i32 zeroext %evl) {
1212 ; CHECK-LABEL: icmp_slt_vx_swap_v8i32:
1214 ; CHECK-NEXT: vsetvli zero, a1, e32, m2, ta, ma
1215 ; CHECK-NEXT: vmsgt.vx v10, v8, a0, v0.t
1216 ; CHECK-NEXT: vmv1r.v v0, v10
1218 %elt.head = insertelement <8 x i32> poison, i32 %b, i32 0
1219 %vb = shufflevector <8 x i32> %elt.head, <8 x i32> poison, <8 x i32> zeroinitializer
1220 %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)
1224 define <8 x i1> @icmp_slt_vi_v8i32(<8 x i32> %va, <8 x i1> %m, i32 zeroext %evl) {
1225 ; CHECK-LABEL: icmp_slt_vi_v8i32:
1227 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
1228 ; CHECK-NEXT: vmsle.vi v10, v8, 3, v0.t
1229 ; CHECK-NEXT: vmv1r.v v0, v10
1231 %elt.head = insertelement <8 x i32> poison, i32 4, i32 0
1232 %vb = shufflevector <8 x i32> %elt.head, <8 x i32> poison, <8 x i32> zeroinitializer
1233 %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)
1237 define <8 x i1> @icmp_slt_vi_swap_v8i32(<8 x i32> %va, <8 x i1> %m, i32 zeroext %evl) {
1238 ; CHECK-LABEL: icmp_slt_vi_swap_v8i32:
1240 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
1241 ; CHECK-NEXT: vmsgt.vi v10, v8, 4, v0.t
1242 ; CHECK-NEXT: vmv1r.v v0, v10
1244 %elt.head = insertelement <8 x i32> poison, i32 4, i32 0
1245 %vb = shufflevector <8 x i32> %elt.head, <8 x i32> poison, <8 x i32> zeroinitializer
1246 %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)
1250 define <8 x i1> @icmp_sle_vv_v8i32(<8 x i32> %va, <8 x i32> %vb, <8 x i1> %m, i32 zeroext %evl) {
1251 ; CHECK-LABEL: icmp_sle_vv_v8i32:
1253 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
1254 ; CHECK-NEXT: vmsle.vv v12, v8, v10, v0.t
1255 ; CHECK-NEXT: vmv1r.v v0, v12
1257 %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)
1261 define <8 x i1> @icmp_sle_vx_v8i32(<8 x i32> %va, i32 %b, <8 x i1> %m, i32 zeroext %evl) {
1262 ; CHECK-LABEL: icmp_sle_vx_v8i32:
1264 ; CHECK-NEXT: vsetvli zero, a1, e32, m2, ta, ma
1265 ; CHECK-NEXT: vmsle.vx v10, v8, a0, v0.t
1266 ; CHECK-NEXT: vmv1r.v v0, v10
1268 %elt.head = insertelement <8 x i32> poison, i32 %b, i32 0
1269 %vb = shufflevector <8 x i32> %elt.head, <8 x i32> poison, <8 x i32> zeroinitializer
1270 %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)
1274 define <8 x i1> @icmp_sle_vx_swap_v8i32(<8 x i32> %va, i32 %b, <8 x i1> %m, i32 zeroext %evl) {
1275 ; CHECK-LABEL: icmp_sle_vx_swap_v8i32:
1277 ; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, ma
1278 ; CHECK-NEXT: vmv.v.x v12, a0
1279 ; CHECK-NEXT: vsetvli zero, a1, e32, m2, ta, ma
1280 ; CHECK-NEXT: vmsle.vv v10, v12, v8, v0.t
1281 ; CHECK-NEXT: vmv1r.v v0, v10
1283 %elt.head = insertelement <8 x i32> poison, i32 %b, i32 0
1284 %vb = shufflevector <8 x i32> %elt.head, <8 x i32> poison, <8 x i32> zeroinitializer
1285 %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)
1289 define <8 x i1> @icmp_sle_vi_v8i32(<8 x i32> %va, <8 x i1> %m, i32 zeroext %evl) {
1290 ; CHECK-LABEL: icmp_sle_vi_v8i32:
1292 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
1293 ; CHECK-NEXT: vmsle.vi v10, v8, 4, v0.t
1294 ; CHECK-NEXT: vmv1r.v v0, v10
1296 %elt.head = insertelement <8 x i32> poison, i32 4, i32 0
1297 %vb = shufflevector <8 x i32> %elt.head, <8 x i32> poison, <8 x i32> zeroinitializer
1298 %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)
1302 define <8 x i1> @icmp_sle_vi_swap_v8i32(<8 x i32> %va, <8 x i1> %m, i32 zeroext %evl) {
1303 ; CHECK-LABEL: icmp_sle_vi_swap_v8i32:
1305 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
1306 ; CHECK-NEXT: vmsgt.vi v10, v8, 3, v0.t
1307 ; CHECK-NEXT: vmv1r.v v0, v10
1309 %elt.head = insertelement <8 x i32> poison, i32 4, i32 0
1310 %vb = shufflevector <8 x i32> %elt.head, <8 x i32> poison, <8 x i32> zeroinitializer
1311 %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)
1315 declare <64 x i1> @llvm.vp.icmp.v64i32(<64 x i32>, <64 x i32>, metadata, <64 x i1>, i32)
1317 define <64 x i1> @icmp_eq_vv_v64i32(<64 x i32> %va, <64 x i32> %vb, <64 x i1> %m, i32 zeroext %evl) {
1318 ; RV32-LABEL: icmp_eq_vv_v64i32:
1320 ; RV32-NEXT: addi sp, sp, -16
1321 ; RV32-NEXT: .cfi_def_cfa_offset 16
1322 ; RV32-NEXT: csrr a1, vlenb
1323 ; RV32-NEXT: slli a1, a1, 4
1324 ; RV32-NEXT: sub sp, sp, a1
1325 ; RV32-NEXT: .cfi_escape 0x0f, 0x0d, 0x72, 0x00, 0x11, 0x10, 0x22, 0x11, 0x10, 0x92, 0xa2, 0x38, 0x00, 0x1e, 0x22 # sp + 16 + 16 * vlenb
1326 ; RV32-NEXT: addi a1, a0, 128
1327 ; RV32-NEXT: li a3, 32
1328 ; RV32-NEXT: vsetvli zero, a3, e32, m8, ta, ma
1329 ; RV32-NEXT: vle32.v v24, (a1)
1330 ; RV32-NEXT: csrr a1, vlenb
1331 ; RV32-NEXT: slli a1, a1, 3
1332 ; RV32-NEXT: add a1, sp, a1
1333 ; RV32-NEXT: addi a1, a1, 16
1334 ; RV32-NEXT: vs8r.v v24, (a1) # Unknown-size Folded Spill
1335 ; RV32-NEXT: vle32.v v24, (a0)
1336 ; RV32-NEXT: addi a0, sp, 16
1337 ; RV32-NEXT: vs8r.v v24, (a0) # Unknown-size Folded Spill
1338 ; RV32-NEXT: vsetivli zero, 4, e8, mf2, ta, ma
1339 ; RV32-NEXT: vslidedown.vi v1, v0, 4
1340 ; RV32-NEXT: mv a0, a2
1341 ; RV32-NEXT: bltu a2, a3, .LBB99_2
1342 ; RV32-NEXT: # %bb.1:
1343 ; RV32-NEXT: li a0, 32
1344 ; RV32-NEXT: .LBB99_2:
1345 ; RV32-NEXT: vsetvli zero, a0, e32, m8, ta, ma
1346 ; RV32-NEXT: addi a0, sp, 16
1347 ; RV32-NEXT: vl8r.v v24, (a0) # Unknown-size Folded Reload
1348 ; RV32-NEXT: vmseq.vv v2, v8, v24, v0.t
1349 ; RV32-NEXT: addi a0, a2, -32
1350 ; RV32-NEXT: sltu a1, a2, a0
1351 ; RV32-NEXT: addi a1, a1, -1
1352 ; RV32-NEXT: and a0, a1, a0
1353 ; RV32-NEXT: vsetvli zero, a0, e32, m8, ta, ma
1354 ; RV32-NEXT: vmv1r.v v0, v1
1355 ; RV32-NEXT: csrr a0, vlenb
1356 ; RV32-NEXT: slli a0, a0, 3
1357 ; RV32-NEXT: add a0, sp, a0
1358 ; RV32-NEXT: addi a0, a0, 16
1359 ; RV32-NEXT: vl8r.v v8, (a0) # Unknown-size Folded Reload
1360 ; RV32-NEXT: vmseq.vv v24, v16, v8, v0.t
1361 ; RV32-NEXT: vsetivli zero, 8, e8, mf2, ta, ma
1362 ; RV32-NEXT: vslideup.vi v2, v24, 4
1363 ; RV32-NEXT: vmv1r.v v0, v2
1364 ; RV32-NEXT: csrr a0, vlenb
1365 ; RV32-NEXT: slli a0, a0, 4
1366 ; RV32-NEXT: add sp, sp, a0
1367 ; RV32-NEXT: addi sp, sp, 16
1370 ; RV64-LABEL: icmp_eq_vv_v64i32:
1372 ; RV64-NEXT: addi sp, sp, -16
1373 ; RV64-NEXT: .cfi_def_cfa_offset 16
1374 ; RV64-NEXT: csrr a1, vlenb
1375 ; RV64-NEXT: slli a1, a1, 4
1376 ; RV64-NEXT: sub sp, sp, a1
1377 ; RV64-NEXT: .cfi_escape 0x0f, 0x0d, 0x72, 0x00, 0x11, 0x10, 0x22, 0x11, 0x10, 0x92, 0xa2, 0x38, 0x00, 0x1e, 0x22 # sp + 16 + 16 * vlenb
1378 ; RV64-NEXT: addi a1, a0, 128
1379 ; RV64-NEXT: li a3, 32
1380 ; RV64-NEXT: vsetvli zero, a3, e32, m8, ta, ma
1381 ; RV64-NEXT: vle32.v v24, (a1)
1382 ; RV64-NEXT: csrr a1, vlenb
1383 ; RV64-NEXT: slli a1, a1, 3
1384 ; RV64-NEXT: add a1, sp, a1
1385 ; RV64-NEXT: addi a1, a1, 16
1386 ; RV64-NEXT: vs8r.v v24, (a1) # Unknown-size Folded Spill
1387 ; RV64-NEXT: vle32.v v24, (a0)
1388 ; RV64-NEXT: addi a0, sp, 16
1389 ; RV64-NEXT: vs8r.v v24, (a0) # Unknown-size Folded Spill
1390 ; RV64-NEXT: vsetivli zero, 4, e8, mf2, ta, ma
1391 ; RV64-NEXT: mv a0, a2
1392 ; RV64-NEXT: vslidedown.vi v1, v0, 4
1393 ; RV64-NEXT: bltu a2, a3, .LBB99_2
1394 ; RV64-NEXT: # %bb.1:
1395 ; RV64-NEXT: li a0, 32
1396 ; RV64-NEXT: .LBB99_2:
1397 ; RV64-NEXT: vsetvli zero, a0, e32, m8, ta, ma
1398 ; RV64-NEXT: addi a0, sp, 16
1399 ; RV64-NEXT: vl8r.v v24, (a0) # Unknown-size Folded Reload
1400 ; RV64-NEXT: vmseq.vv v2, v8, v24, v0.t
1401 ; RV64-NEXT: addi a0, a2, -32
1402 ; RV64-NEXT: sltu a1, a2, a0
1403 ; RV64-NEXT: addi a1, a1, -1
1404 ; RV64-NEXT: and a0, a1, a0
1405 ; RV64-NEXT: vsetvli zero, a0, e32, m8, ta, ma
1406 ; RV64-NEXT: vmv1r.v v0, v1
1407 ; RV64-NEXT: csrr a0, vlenb
1408 ; RV64-NEXT: slli a0, a0, 3
1409 ; RV64-NEXT: add a0, sp, a0
1410 ; RV64-NEXT: addi a0, a0, 16
1411 ; RV64-NEXT: vl8r.v v8, (a0) # Unknown-size Folded Reload
1412 ; RV64-NEXT: vmseq.vv v24, v16, v8, v0.t
1413 ; RV64-NEXT: vsetivli zero, 8, e8, mf2, ta, ma
1414 ; RV64-NEXT: vslideup.vi v2, v24, 4
1415 ; RV64-NEXT: vmv1r.v v0, v2
1416 ; RV64-NEXT: csrr a0, vlenb
1417 ; RV64-NEXT: slli a0, a0, 4
1418 ; RV64-NEXT: add sp, sp, a0
1419 ; RV64-NEXT: addi sp, sp, 16
1421 %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)
1425 define <64 x i1> @icmp_eq_vx_v64i32(<64 x i32> %va, i32 %b, <64 x i1> %m, i32 zeroext %evl) {
1426 ; CHECK-LABEL: icmp_eq_vx_v64i32:
1428 ; CHECK-NEXT: vsetivli zero, 4, e8, mf2, ta, ma
1429 ; CHECK-NEXT: li a3, 32
1430 ; CHECK-NEXT: vslidedown.vi v24, v0, 4
1431 ; CHECK-NEXT: mv a2, a1
1432 ; CHECK-NEXT: bltu a1, a3, .LBB100_2
1433 ; CHECK-NEXT: # %bb.1:
1434 ; CHECK-NEXT: li a2, 32
1435 ; CHECK-NEXT: .LBB100_2:
1436 ; CHECK-NEXT: vsetvli zero, a2, e32, m8, ta, ma
1437 ; CHECK-NEXT: vmseq.vx v25, v8, a0, v0.t
1438 ; CHECK-NEXT: addi a2, a1, -32
1439 ; CHECK-NEXT: sltu a1, a1, a2
1440 ; CHECK-NEXT: addi a1, a1, -1
1441 ; CHECK-NEXT: and a1, a1, a2
1442 ; CHECK-NEXT: vsetvli zero, a1, e32, m8, ta, ma
1443 ; CHECK-NEXT: vmv1r.v v0, v24
1444 ; CHECK-NEXT: vmseq.vx v8, v16, a0, v0.t
1445 ; CHECK-NEXT: vsetivli zero, 8, e8, mf2, ta, ma
1446 ; CHECK-NEXT: vslideup.vi v25, v8, 4
1447 ; CHECK-NEXT: vmv1r.v v0, v25
1449 %elt.head = insertelement <64 x i32> poison, i32 %b, i32 0
1450 %vb = shufflevector <64 x i32> %elt.head, <64 x i32> poison, <64 x i32> zeroinitializer
1451 %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)
1455 define <64 x i1> @icmp_eq_vx_swap_v64i32(<64 x i32> %va, i32 %b, <64 x i1> %m, i32 zeroext %evl) {
1456 ; CHECK-LABEL: icmp_eq_vx_swap_v64i32:
1458 ; CHECK-NEXT: vsetivli zero, 4, e8, mf2, ta, ma
1459 ; CHECK-NEXT: li a3, 32
1460 ; CHECK-NEXT: vslidedown.vi v24, v0, 4
1461 ; CHECK-NEXT: mv a2, a1
1462 ; CHECK-NEXT: bltu a1, a3, .LBB101_2
1463 ; CHECK-NEXT: # %bb.1:
1464 ; CHECK-NEXT: li a2, 32
1465 ; CHECK-NEXT: .LBB101_2:
1466 ; CHECK-NEXT: vsetvli zero, a2, e32, m8, ta, ma
1467 ; CHECK-NEXT: vmseq.vx v25, v8, a0, v0.t
1468 ; CHECK-NEXT: addi a2, a1, -32
1469 ; CHECK-NEXT: sltu a1, a1, a2
1470 ; CHECK-NEXT: addi a1, a1, -1
1471 ; CHECK-NEXT: and a1, a1, a2
1472 ; CHECK-NEXT: vsetvli zero, a1, e32, m8, ta, ma
1473 ; CHECK-NEXT: vmv1r.v v0, v24
1474 ; CHECK-NEXT: vmseq.vx v8, v16, a0, v0.t
1475 ; CHECK-NEXT: vsetivli zero, 8, e8, mf2, ta, ma
1476 ; CHECK-NEXT: vslideup.vi v25, v8, 4
1477 ; CHECK-NEXT: vmv1r.v v0, v25
1479 %elt.head = insertelement <64 x i32> poison, i32 %b, i32 0
1480 %vb = shufflevector <64 x i32> %elt.head, <64 x i32> poison, <64 x i32> zeroinitializer
1481 %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)
1485 declare <8 x i1> @llvm.vp.icmp.v8i64(<8 x i64>, <8 x i64>, metadata, <8 x i1>, i32)
1487 define <8 x i1> @icmp_eq_vv_v8i64(<8 x i64> %va, <8 x i64> %vb, <8 x i1> %m, i32 zeroext %evl) {
1488 ; CHECK-LABEL: icmp_eq_vv_v8i64:
1490 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1491 ; CHECK-NEXT: vmseq.vv v16, v8, v12, v0.t
1492 ; CHECK-NEXT: vmv1r.v v0, v16
1494 %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)
1498 define <8 x i1> @icmp_eq_vx_v8i64(<8 x i64> %va, i64 %b, <8 x i1> %m, i32 zeroext %evl) {
1499 ; RV32-LABEL: icmp_eq_vx_v8i64:
1501 ; RV32-NEXT: addi sp, sp, -16
1502 ; RV32-NEXT: .cfi_def_cfa_offset 16
1503 ; RV32-NEXT: sw a1, 12(sp)
1504 ; RV32-NEXT: sw a0, 8(sp)
1505 ; RV32-NEXT: addi a0, sp, 8
1506 ; RV32-NEXT: vsetivli zero, 8, e64, m4, ta, ma
1507 ; RV32-NEXT: vlse64.v v16, (a0), zero
1508 ; RV32-NEXT: vsetvli zero, a2, e64, m4, ta, ma
1509 ; RV32-NEXT: vmseq.vv v12, v8, v16, v0.t
1510 ; RV32-NEXT: vmv1r.v v0, v12
1511 ; RV32-NEXT: addi sp, sp, 16
1514 ; RV64-LABEL: icmp_eq_vx_v8i64:
1516 ; RV64-NEXT: vsetvli zero, a1, e64, m4, ta, ma
1517 ; RV64-NEXT: vmseq.vx v12, v8, a0, v0.t
1518 ; RV64-NEXT: vmv1r.v v0, v12
1520 %elt.head = insertelement <8 x i64> poison, i64 %b, i32 0
1521 %vb = shufflevector <8 x i64> %elt.head, <8 x i64> poison, <8 x i32> zeroinitializer
1522 %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)
1526 define <8 x i1> @icmp_eq_vx_swap_v8i64(<8 x i64> %va, i64 %b, <8 x i1> %m, i32 zeroext %evl) {
1527 ; RV32-LABEL: icmp_eq_vx_swap_v8i64:
1529 ; RV32-NEXT: addi sp, sp, -16
1530 ; RV32-NEXT: .cfi_def_cfa_offset 16
1531 ; RV32-NEXT: sw a1, 12(sp)
1532 ; RV32-NEXT: sw a0, 8(sp)
1533 ; RV32-NEXT: addi a0, sp, 8
1534 ; RV32-NEXT: vsetivli zero, 8, e64, m4, ta, ma
1535 ; RV32-NEXT: vlse64.v v16, (a0), zero
1536 ; RV32-NEXT: vsetvli zero, a2, e64, m4, ta, ma
1537 ; RV32-NEXT: vmseq.vv v12, v16, v8, v0.t
1538 ; RV32-NEXT: vmv1r.v v0, v12
1539 ; RV32-NEXT: addi sp, sp, 16
1542 ; RV64-LABEL: icmp_eq_vx_swap_v8i64:
1544 ; RV64-NEXT: vsetvli zero, a1, e64, m4, ta, ma
1545 ; RV64-NEXT: vmseq.vx v12, v8, a0, v0.t
1546 ; RV64-NEXT: vmv1r.v v0, v12
1548 %elt.head = insertelement <8 x i64> poison, i64 %b, i32 0
1549 %vb = shufflevector <8 x i64> %elt.head, <8 x i64> poison, <8 x i32> zeroinitializer
1550 %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)
1554 define <8 x i1> @icmp_eq_vi_v8i64(<8 x i64> %va, <8 x i1> %m, i32 zeroext %evl) {
1555 ; CHECK-LABEL: icmp_eq_vi_v8i64:
1557 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1558 ; CHECK-NEXT: vmseq.vi v12, v8, 4, v0.t
1559 ; CHECK-NEXT: vmv1r.v v0, v12
1561 %elt.head = insertelement <8 x i64> poison, i64 4, i32 0
1562 %vb = shufflevector <8 x i64> %elt.head, <8 x i64> poison, <8 x i32> zeroinitializer
1563 %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)
1567 define <8 x i1> @icmp_eq_vi_swap_v8i64(<8 x i64> %va, <8 x i1> %m, i32 zeroext %evl) {
1568 ; CHECK-LABEL: icmp_eq_vi_swap_v8i64:
1570 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1571 ; CHECK-NEXT: vmseq.vi v12, v8, 4, v0.t
1572 ; CHECK-NEXT: vmv1r.v v0, v12
1574 %elt.head = insertelement <8 x i64> poison, i64 4, 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> %vb, <8 x i64> %va, metadata !"eq", <8 x i1> %m, i32 %evl)
1580 define <8 x i1> @icmp_ne_vv_v8i64(<8 x i64> %va, <8 x i64> %vb, <8 x i1> %m, i32 zeroext %evl) {
1581 ; CHECK-LABEL: icmp_ne_vv_v8i64:
1583 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1584 ; CHECK-NEXT: vmsne.vv v16, v8, v12, v0.t
1585 ; CHECK-NEXT: vmv1r.v v0, v16
1587 %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)
1591 define <8 x i1> @icmp_ne_vx_v8i64(<8 x i64> %va, i64 %b, <8 x i1> %m, i32 zeroext %evl) {
1592 ; RV32-LABEL: icmp_ne_vx_v8i64:
1594 ; RV32-NEXT: addi sp, sp, -16
1595 ; RV32-NEXT: .cfi_def_cfa_offset 16
1596 ; RV32-NEXT: sw a1, 12(sp)
1597 ; RV32-NEXT: sw a0, 8(sp)
1598 ; RV32-NEXT: addi a0, sp, 8
1599 ; RV32-NEXT: vsetivli zero, 8, e64, m4, ta, ma
1600 ; RV32-NEXT: vlse64.v v16, (a0), zero
1601 ; RV32-NEXT: vsetvli zero, a2, e64, m4, ta, ma
1602 ; RV32-NEXT: vmsne.vv v12, v8, v16, v0.t
1603 ; RV32-NEXT: vmv1r.v v0, v12
1604 ; RV32-NEXT: addi sp, sp, 16
1607 ; RV64-LABEL: icmp_ne_vx_v8i64:
1609 ; RV64-NEXT: vsetvli zero, a1, e64, m4, ta, ma
1610 ; RV64-NEXT: vmsne.vx v12, v8, a0, v0.t
1611 ; RV64-NEXT: vmv1r.v v0, v12
1613 %elt.head = insertelement <8 x i64> poison, i64 %b, i32 0
1614 %vb = shufflevector <8 x i64> %elt.head, <8 x i64> poison, <8 x i32> zeroinitializer
1615 %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)
1619 define <8 x i1> @icmp_ne_vx_swap_v8i64(<8 x i64> %va, i64 %b, <8 x i1> %m, i32 zeroext %evl) {
1620 ; RV32-LABEL: icmp_ne_vx_swap_v8i64:
1622 ; RV32-NEXT: addi sp, sp, -16
1623 ; RV32-NEXT: .cfi_def_cfa_offset 16
1624 ; RV32-NEXT: sw a1, 12(sp)
1625 ; RV32-NEXT: sw a0, 8(sp)
1626 ; RV32-NEXT: addi a0, sp, 8
1627 ; RV32-NEXT: vsetivli zero, 8, e64, m4, ta, ma
1628 ; RV32-NEXT: vlse64.v v16, (a0), zero
1629 ; RV32-NEXT: vsetvli zero, a2, e64, m4, ta, ma
1630 ; RV32-NEXT: vmsne.vv v12, v16, v8, v0.t
1631 ; RV32-NEXT: vmv1r.v v0, v12
1632 ; RV32-NEXT: addi sp, sp, 16
1635 ; RV64-LABEL: icmp_ne_vx_swap_v8i64:
1637 ; RV64-NEXT: vsetvli zero, a1, e64, m4, ta, ma
1638 ; RV64-NEXT: vmsne.vx v12, v8, a0, v0.t
1639 ; RV64-NEXT: vmv1r.v v0, v12
1641 %elt.head = insertelement <8 x i64> poison, i64 %b, i32 0
1642 %vb = shufflevector <8 x i64> %elt.head, <8 x i64> poison, <8 x i32> zeroinitializer
1643 %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)
1647 define <8 x i1> @icmp_ne_vi_v8i64(<8 x i64> %va, <8 x i1> %m, i32 zeroext %evl) {
1648 ; CHECK-LABEL: icmp_ne_vi_v8i64:
1650 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1651 ; CHECK-NEXT: vmsne.vi v12, v8, 4, v0.t
1652 ; CHECK-NEXT: vmv1r.v v0, v12
1654 %elt.head = insertelement <8 x i64> poison, i64 4, i32 0
1655 %vb = shufflevector <8 x i64> %elt.head, <8 x i64> poison, <8 x i32> zeroinitializer
1656 %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)
1660 define <8 x i1> @icmp_ne_vi_swap_v8i64(<8 x i64> %va, <8 x i1> %m, i32 zeroext %evl) {
1661 ; CHECK-LABEL: icmp_ne_vi_swap_v8i64:
1663 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1664 ; CHECK-NEXT: vmsne.vi v12, v8, 4, v0.t
1665 ; CHECK-NEXT: vmv1r.v v0, v12
1667 %elt.head = insertelement <8 x i64> poison, i64 4, i32 0
1668 %vb = shufflevector <8 x i64> %elt.head, <8 x i64> poison, <8 x i32> zeroinitializer
1669 %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)
1673 define <8 x i1> @icmp_ugt_vv_v8i64(<8 x i64> %va, <8 x i64> %vb, <8 x i1> %m, i32 zeroext %evl) {
1674 ; CHECK-LABEL: icmp_ugt_vv_v8i64:
1676 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1677 ; CHECK-NEXT: vmsltu.vv v16, v12, v8, v0.t
1678 ; CHECK-NEXT: vmv1r.v v0, v16
1680 %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)
1684 define <8 x i1> @icmp_ugt_vx_v8i64(<8 x i64> %va, i64 %b, <8 x i1> %m, i32 zeroext %evl) {
1685 ; RV32-LABEL: icmp_ugt_vx_v8i64:
1687 ; RV32-NEXT: addi sp, sp, -16
1688 ; RV32-NEXT: .cfi_def_cfa_offset 16
1689 ; RV32-NEXT: sw a1, 12(sp)
1690 ; RV32-NEXT: sw a0, 8(sp)
1691 ; RV32-NEXT: addi a0, sp, 8
1692 ; RV32-NEXT: vsetivli zero, 8, e64, m4, ta, ma
1693 ; RV32-NEXT: vlse64.v v16, (a0), zero
1694 ; RV32-NEXT: vsetvli zero, a2, e64, m4, ta, ma
1695 ; RV32-NEXT: vmsltu.vv v12, v16, v8, v0.t
1696 ; RV32-NEXT: vmv1r.v v0, v12
1697 ; RV32-NEXT: addi sp, sp, 16
1700 ; RV64-LABEL: icmp_ugt_vx_v8i64:
1702 ; RV64-NEXT: vsetvli zero, a1, e64, m4, ta, ma
1703 ; RV64-NEXT: vmsgtu.vx v12, v8, a0, v0.t
1704 ; RV64-NEXT: vmv1r.v v0, v12
1706 %elt.head = insertelement <8 x i64> poison, i64 %b, i32 0
1707 %vb = shufflevector <8 x i64> %elt.head, <8 x i64> poison, <8 x i32> zeroinitializer
1708 %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)
1712 define <8 x i1> @icmp_ugt_vx_swap_v8i64(<8 x i64> %va, i64 %b, <8 x i1> %m, i32 zeroext %evl) {
1713 ; RV32-LABEL: icmp_ugt_vx_swap_v8i64:
1715 ; RV32-NEXT: addi sp, sp, -16
1716 ; RV32-NEXT: .cfi_def_cfa_offset 16
1717 ; RV32-NEXT: sw a1, 12(sp)
1718 ; RV32-NEXT: sw a0, 8(sp)
1719 ; RV32-NEXT: addi a0, sp, 8
1720 ; RV32-NEXT: vsetivli zero, 8, e64, m4, ta, ma
1721 ; RV32-NEXT: vlse64.v v16, (a0), zero
1722 ; RV32-NEXT: vsetvli zero, a2, e64, m4, ta, ma
1723 ; RV32-NEXT: vmsltu.vv v12, v8, v16, v0.t
1724 ; RV32-NEXT: vmv1r.v v0, v12
1725 ; RV32-NEXT: addi sp, sp, 16
1728 ; RV64-LABEL: icmp_ugt_vx_swap_v8i64:
1730 ; RV64-NEXT: vsetvli zero, a1, e64, m4, ta, ma
1731 ; RV64-NEXT: vmsltu.vx v12, v8, a0, v0.t
1732 ; RV64-NEXT: vmv1r.v v0, v12
1734 %elt.head = insertelement <8 x i64> poison, i64 %b, i32 0
1735 %vb = shufflevector <8 x i64> %elt.head, <8 x i64> poison, <8 x i32> zeroinitializer
1736 %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)
1740 define <8 x i1> @icmp_ugt_vi_v8i64(<8 x i64> %va, <8 x i1> %m, i32 zeroext %evl) {
1741 ; CHECK-LABEL: icmp_ugt_vi_v8i64:
1743 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1744 ; CHECK-NEXT: vmsgtu.vi v12, v8, 4, v0.t
1745 ; CHECK-NEXT: vmv1r.v v0, v12
1747 %elt.head = insertelement <8 x i64> poison, i64 4, i32 0
1748 %vb = shufflevector <8 x i64> %elt.head, <8 x i64> poison, <8 x i32> zeroinitializer
1749 %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)
1753 define <8 x i1> @icmp_ugt_vi_swap_v8i64(<8 x i64> %va, <8 x i1> %m, i32 zeroext %evl) {
1754 ; CHECK-LABEL: icmp_ugt_vi_swap_v8i64:
1756 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1757 ; CHECK-NEXT: vmsleu.vi v12, v8, 3, v0.t
1758 ; CHECK-NEXT: vmv1r.v v0, v12
1760 %elt.head = insertelement <8 x i64> poison, i64 4, i32 0
1761 %vb = shufflevector <8 x i64> %elt.head, <8 x i64> poison, <8 x i32> zeroinitializer
1762 %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)
1766 define <8 x i1> @icmp_uge_vv_v8i64(<8 x i64> %va, <8 x i64> %vb, <8 x i1> %m, i32 zeroext %evl) {
1767 ; CHECK-LABEL: icmp_uge_vv_v8i64:
1769 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1770 ; CHECK-NEXT: vmsleu.vv v16, v12, v8, v0.t
1771 ; CHECK-NEXT: vmv1r.v v0, v16
1773 %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)
1777 define <8 x i1> @icmp_uge_vx_v8i64(<8 x i64> %va, i64 %b, <8 x i1> %m, i32 zeroext %evl) {
1778 ; RV32-LABEL: icmp_uge_vx_v8i64:
1780 ; RV32-NEXT: addi sp, sp, -16
1781 ; RV32-NEXT: .cfi_def_cfa_offset 16
1782 ; RV32-NEXT: sw a1, 12(sp)
1783 ; RV32-NEXT: sw a0, 8(sp)
1784 ; RV32-NEXT: addi a0, sp, 8
1785 ; RV32-NEXT: vsetivli zero, 8, e64, m4, ta, ma
1786 ; RV32-NEXT: vlse64.v v16, (a0), zero
1787 ; RV32-NEXT: vsetvli zero, a2, e64, m4, ta, ma
1788 ; RV32-NEXT: vmsleu.vv v12, v16, v8, v0.t
1789 ; RV32-NEXT: vmv1r.v v0, v12
1790 ; RV32-NEXT: addi sp, sp, 16
1793 ; RV64-LABEL: icmp_uge_vx_v8i64:
1795 ; RV64-NEXT: vsetivli zero, 8, e64, m4, ta, ma
1796 ; RV64-NEXT: vmv.v.x v16, a0
1797 ; RV64-NEXT: vsetvli zero, a1, e64, m4, ta, ma
1798 ; RV64-NEXT: vmsleu.vv v12, v16, v8, v0.t
1799 ; RV64-NEXT: vmv1r.v v0, v12
1801 %elt.head = insertelement <8 x i64> poison, i64 %b, i32 0
1802 %vb = shufflevector <8 x i64> %elt.head, <8 x i64> poison, <8 x i32> zeroinitializer
1803 %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)
1807 define <8 x i1> @icmp_uge_vx_swap_v8i64(<8 x i64> %va, i64 %b, <8 x i1> %m, i32 zeroext %evl) {
1808 ; RV32-LABEL: icmp_uge_vx_swap_v8i64:
1810 ; RV32-NEXT: addi sp, sp, -16
1811 ; RV32-NEXT: .cfi_def_cfa_offset 16
1812 ; RV32-NEXT: sw a1, 12(sp)
1813 ; RV32-NEXT: sw a0, 8(sp)
1814 ; RV32-NEXT: addi a0, sp, 8
1815 ; RV32-NEXT: vsetivli zero, 8, e64, m4, ta, ma
1816 ; RV32-NEXT: vlse64.v v16, (a0), zero
1817 ; RV32-NEXT: vsetvli zero, a2, e64, m4, ta, ma
1818 ; RV32-NEXT: vmsleu.vv v12, v8, v16, v0.t
1819 ; RV32-NEXT: vmv1r.v v0, v12
1820 ; RV32-NEXT: addi sp, sp, 16
1823 ; RV64-LABEL: icmp_uge_vx_swap_v8i64:
1825 ; RV64-NEXT: vsetvli zero, a1, e64, m4, ta, ma
1826 ; RV64-NEXT: vmsleu.vx v12, v8, a0, v0.t
1827 ; RV64-NEXT: vmv1r.v v0, v12
1829 %elt.head = insertelement <8 x i64> poison, i64 %b, i32 0
1830 %vb = shufflevector <8 x i64> %elt.head, <8 x i64> poison, <8 x i32> zeroinitializer
1831 %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)
1835 define <8 x i1> @icmp_uge_vi_v8i64(<8 x i64> %va, <8 x i1> %m, i32 zeroext %evl) {
1836 ; CHECK-LABEL: icmp_uge_vi_v8i64:
1838 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1839 ; CHECK-NEXT: vmsgtu.vi v12, v8, 3, v0.t
1840 ; CHECK-NEXT: vmv1r.v v0, v12
1842 %elt.head = insertelement <8 x i64> poison, i64 4, i32 0
1843 %vb = shufflevector <8 x i64> %elt.head, <8 x i64> poison, <8 x i32> zeroinitializer
1844 %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)
1848 define <8 x i1> @icmp_uge_vi_swap_v8i64(<8 x i64> %va, <8 x i1> %m, i32 zeroext %evl) {
1849 ; CHECK-LABEL: icmp_uge_vi_swap_v8i64:
1851 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1852 ; CHECK-NEXT: vmsleu.vi v12, v8, 4, v0.t
1853 ; CHECK-NEXT: vmv1r.v v0, v12
1855 %elt.head = insertelement <8 x i64> poison, i64 4, i32 0
1856 %vb = shufflevector <8 x i64> %elt.head, <8 x i64> poison, <8 x i32> zeroinitializer
1857 %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)
1861 define <8 x i1> @icmp_ult_vv_v8i64(<8 x i64> %va, <8 x i64> %vb, <8 x i1> %m, i32 zeroext %evl) {
1862 ; CHECK-LABEL: icmp_ult_vv_v8i64:
1864 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1865 ; CHECK-NEXT: vmsltu.vv v16, v8, v12, v0.t
1866 ; CHECK-NEXT: vmv1r.v v0, v16
1868 %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)
1872 define <8 x i1> @icmp_ult_vx_v8i64(<8 x i64> %va, i64 %b, <8 x i1> %m, i32 zeroext %evl) {
1873 ; RV32-LABEL: icmp_ult_vx_v8i64:
1875 ; RV32-NEXT: addi sp, sp, -16
1876 ; RV32-NEXT: .cfi_def_cfa_offset 16
1877 ; RV32-NEXT: sw a1, 12(sp)
1878 ; RV32-NEXT: sw a0, 8(sp)
1879 ; RV32-NEXT: addi a0, sp, 8
1880 ; RV32-NEXT: vsetivli zero, 8, e64, m4, ta, ma
1881 ; RV32-NEXT: vlse64.v v16, (a0), zero
1882 ; RV32-NEXT: vsetvli zero, a2, e64, m4, ta, ma
1883 ; RV32-NEXT: vmsltu.vv v12, v8, v16, v0.t
1884 ; RV32-NEXT: vmv1r.v v0, v12
1885 ; RV32-NEXT: addi sp, sp, 16
1888 ; RV64-LABEL: icmp_ult_vx_v8i64:
1890 ; RV64-NEXT: vsetvli zero, a1, e64, m4, ta, ma
1891 ; RV64-NEXT: vmsltu.vx v12, v8, a0, v0.t
1892 ; RV64-NEXT: vmv1r.v v0, v12
1894 %elt.head = insertelement <8 x i64> poison, i64 %b, i32 0
1895 %vb = shufflevector <8 x i64> %elt.head, <8 x i64> poison, <8 x i32> zeroinitializer
1896 %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)
1900 define <8 x i1> @icmp_ult_vx_swap_v8i64(<8 x i64> %va, i64 %b, <8 x i1> %m, i32 zeroext %evl) {
1901 ; RV32-LABEL: icmp_ult_vx_swap_v8i64:
1903 ; RV32-NEXT: addi sp, sp, -16
1904 ; RV32-NEXT: .cfi_def_cfa_offset 16
1905 ; RV32-NEXT: sw a1, 12(sp)
1906 ; RV32-NEXT: sw a0, 8(sp)
1907 ; RV32-NEXT: addi a0, sp, 8
1908 ; RV32-NEXT: vsetivli zero, 8, e64, m4, ta, ma
1909 ; RV32-NEXT: vlse64.v v16, (a0), zero
1910 ; RV32-NEXT: vsetvli zero, a2, e64, m4, ta, ma
1911 ; RV32-NEXT: vmsltu.vv v12, v16, v8, v0.t
1912 ; RV32-NEXT: vmv1r.v v0, v12
1913 ; RV32-NEXT: addi sp, sp, 16
1916 ; RV64-LABEL: icmp_ult_vx_swap_v8i64:
1918 ; RV64-NEXT: vsetvli zero, a1, e64, m4, ta, ma
1919 ; RV64-NEXT: vmsgtu.vx v12, v8, a0, v0.t
1920 ; RV64-NEXT: vmv1r.v v0, v12
1922 %elt.head = insertelement <8 x i64> poison, i64 %b, i32 0
1923 %vb = shufflevector <8 x i64> %elt.head, <8 x i64> poison, <8 x i32> zeroinitializer
1924 %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)
1928 define <8 x i1> @icmp_ult_vi_v8i64(<8 x i64> %va, <8 x i1> %m, i32 zeroext %evl) {
1929 ; CHECK-LABEL: icmp_ult_vi_v8i64:
1931 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1932 ; CHECK-NEXT: vmsleu.vi v12, v8, 3, v0.t
1933 ; CHECK-NEXT: vmv1r.v v0, v12
1935 %elt.head = insertelement <8 x i64> poison, i64 4, i32 0
1936 %vb = shufflevector <8 x i64> %elt.head, <8 x i64> poison, <8 x i32> zeroinitializer
1937 %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)
1941 define <8 x i1> @icmp_ult_vi_swap_v8i64(<8 x i64> %va, <8 x i1> %m, i32 zeroext %evl) {
1942 ; CHECK-LABEL: icmp_ult_vi_swap_v8i64:
1944 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1945 ; CHECK-NEXT: vmsgtu.vi v12, v8, 4, v0.t
1946 ; CHECK-NEXT: vmv1r.v v0, v12
1948 %elt.head = insertelement <8 x i64> poison, i64 4, i32 0
1949 %vb = shufflevector <8 x i64> %elt.head, <8 x i64> poison, <8 x i32> zeroinitializer
1950 %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)
1954 define <8 x i1> @icmp_sgt_vv_v8i64(<8 x i64> %va, <8 x i64> %vb, <8 x i1> %m, i32 zeroext %evl) {
1955 ; CHECK-LABEL: icmp_sgt_vv_v8i64:
1957 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1958 ; CHECK-NEXT: vmslt.vv v16, v12, v8, v0.t
1959 ; CHECK-NEXT: vmv1r.v v0, v16
1961 %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)
1965 define <8 x i1> @icmp_sgt_vx_v8i64(<8 x i64> %va, i64 %b, <8 x i1> %m, i32 zeroext %evl) {
1966 ; RV32-LABEL: icmp_sgt_vx_v8i64:
1968 ; RV32-NEXT: addi sp, sp, -16
1969 ; RV32-NEXT: .cfi_def_cfa_offset 16
1970 ; RV32-NEXT: sw a1, 12(sp)
1971 ; RV32-NEXT: sw a0, 8(sp)
1972 ; RV32-NEXT: addi a0, sp, 8
1973 ; RV32-NEXT: vsetivli zero, 8, e64, m4, ta, ma
1974 ; RV32-NEXT: vlse64.v v16, (a0), zero
1975 ; RV32-NEXT: vsetvli zero, a2, e64, m4, ta, ma
1976 ; RV32-NEXT: vmslt.vv v12, v16, v8, v0.t
1977 ; RV32-NEXT: vmv1r.v v0, v12
1978 ; RV32-NEXT: addi sp, sp, 16
1981 ; RV64-LABEL: icmp_sgt_vx_v8i64:
1983 ; RV64-NEXT: vsetvli zero, a1, e64, m4, ta, ma
1984 ; RV64-NEXT: vmsgt.vx v12, v8, a0, v0.t
1985 ; RV64-NEXT: vmv1r.v v0, v12
1987 %elt.head = insertelement <8 x i64> poison, i64 %b, i32 0
1988 %vb = shufflevector <8 x i64> %elt.head, <8 x i64> poison, <8 x i32> zeroinitializer
1989 %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)
1993 define <8 x i1> @icmp_sgt_vx_swap_v8i64(<8 x i64> %va, i64 %b, <8 x i1> %m, i32 zeroext %evl) {
1994 ; RV32-LABEL: icmp_sgt_vx_swap_v8i64:
1996 ; RV32-NEXT: addi sp, sp, -16
1997 ; RV32-NEXT: .cfi_def_cfa_offset 16
1998 ; RV32-NEXT: sw a1, 12(sp)
1999 ; RV32-NEXT: sw a0, 8(sp)
2000 ; RV32-NEXT: addi a0, sp, 8
2001 ; RV32-NEXT: vsetivli zero, 8, e64, m4, ta, ma
2002 ; RV32-NEXT: vlse64.v v16, (a0), zero
2003 ; RV32-NEXT: vsetvli zero, a2, e64, m4, ta, ma
2004 ; RV32-NEXT: vmslt.vv v12, v8, v16, v0.t
2005 ; RV32-NEXT: vmv1r.v v0, v12
2006 ; RV32-NEXT: addi sp, sp, 16
2009 ; RV64-LABEL: icmp_sgt_vx_swap_v8i64:
2011 ; RV64-NEXT: vsetvli zero, a1, e64, m4, ta, ma
2012 ; RV64-NEXT: vmslt.vx v12, v8, a0, v0.t
2013 ; RV64-NEXT: vmv1r.v v0, v12
2015 %elt.head = insertelement <8 x i64> poison, i64 %b, i32 0
2016 %vb = shufflevector <8 x i64> %elt.head, <8 x i64> poison, <8 x i32> zeroinitializer
2017 %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)
2021 define <8 x i1> @icmp_sgt_vi_v8i64(<8 x i64> %va, <8 x i1> %m, i32 zeroext %evl) {
2022 ; CHECK-LABEL: icmp_sgt_vi_v8i64:
2024 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
2025 ; CHECK-NEXT: vmsgt.vi v12, v8, 4, v0.t
2026 ; CHECK-NEXT: vmv1r.v v0, v12
2028 %elt.head = insertelement <8 x i64> poison, i64 4, i32 0
2029 %vb = shufflevector <8 x i64> %elt.head, <8 x i64> poison, <8 x i32> zeroinitializer
2030 %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)
2034 define <8 x i1> @icmp_sgt_vi_swap_v8i64(<8 x i64> %va, <8 x i1> %m, i32 zeroext %evl) {
2035 ; CHECK-LABEL: icmp_sgt_vi_swap_v8i64:
2037 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
2038 ; CHECK-NEXT: vmsle.vi v12, v8, 3, v0.t
2039 ; CHECK-NEXT: vmv1r.v v0, v12
2041 %elt.head = insertelement <8 x i64> poison, i64 4, i32 0
2042 %vb = shufflevector <8 x i64> %elt.head, <8 x i64> poison, <8 x i32> zeroinitializer
2043 %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)
2047 define <8 x i1> @icmp_sge_vv_v8i64(<8 x i64> %va, <8 x i64> %vb, <8 x i1> %m, i32 zeroext %evl) {
2048 ; CHECK-LABEL: icmp_sge_vv_v8i64:
2050 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
2051 ; CHECK-NEXT: vmsle.vv v16, v12, v8, v0.t
2052 ; CHECK-NEXT: vmv1r.v v0, v16
2054 %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)
2058 define <8 x i1> @icmp_sge_vx_v8i64(<8 x i64> %va, i64 %b, <8 x i1> %m, i32 zeroext %evl) {
2059 ; RV32-LABEL: icmp_sge_vx_v8i64:
2061 ; RV32-NEXT: addi sp, sp, -16
2062 ; RV32-NEXT: .cfi_def_cfa_offset 16
2063 ; RV32-NEXT: sw a1, 12(sp)
2064 ; RV32-NEXT: sw a0, 8(sp)
2065 ; RV32-NEXT: addi a0, sp, 8
2066 ; RV32-NEXT: vsetivli zero, 8, e64, m4, ta, ma
2067 ; RV32-NEXT: vlse64.v v16, (a0), zero
2068 ; RV32-NEXT: vsetvli zero, a2, e64, m4, ta, ma
2069 ; RV32-NEXT: vmsle.vv v12, v16, v8, v0.t
2070 ; RV32-NEXT: vmv1r.v v0, v12
2071 ; RV32-NEXT: addi sp, sp, 16
2074 ; RV64-LABEL: icmp_sge_vx_v8i64:
2076 ; RV64-NEXT: vsetivli zero, 8, e64, m4, ta, ma
2077 ; RV64-NEXT: vmv.v.x v16, a0
2078 ; RV64-NEXT: vsetvli zero, a1, e64, m4, ta, ma
2079 ; RV64-NEXT: vmsle.vv v12, v16, v8, v0.t
2080 ; RV64-NEXT: vmv1r.v v0, v12
2082 %elt.head = insertelement <8 x i64> poison, i64 %b, i32 0
2083 %vb = shufflevector <8 x i64> %elt.head, <8 x i64> poison, <8 x i32> zeroinitializer
2084 %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)
2088 define <8 x i1> @icmp_sge_vx_swap_v8i64(<8 x i64> %va, i64 %b, <8 x i1> %m, i32 zeroext %evl) {
2089 ; RV32-LABEL: icmp_sge_vx_swap_v8i64:
2091 ; RV32-NEXT: addi sp, sp, -16
2092 ; RV32-NEXT: .cfi_def_cfa_offset 16
2093 ; RV32-NEXT: sw a1, 12(sp)
2094 ; RV32-NEXT: sw a0, 8(sp)
2095 ; RV32-NEXT: addi a0, sp, 8
2096 ; RV32-NEXT: vsetivli zero, 8, e64, m4, ta, ma
2097 ; RV32-NEXT: vlse64.v v16, (a0), zero
2098 ; RV32-NEXT: vsetvli zero, a2, e64, m4, ta, ma
2099 ; RV32-NEXT: vmsle.vv v12, v8, v16, v0.t
2100 ; RV32-NEXT: vmv1r.v v0, v12
2101 ; RV32-NEXT: addi sp, sp, 16
2104 ; RV64-LABEL: icmp_sge_vx_swap_v8i64:
2106 ; RV64-NEXT: vsetvli zero, a1, e64, m4, ta, ma
2107 ; RV64-NEXT: vmsle.vx v12, v8, a0, v0.t
2108 ; RV64-NEXT: vmv1r.v v0, v12
2110 %elt.head = insertelement <8 x i64> poison, i64 %b, i32 0
2111 %vb = shufflevector <8 x i64> %elt.head, <8 x i64> poison, <8 x i32> zeroinitializer
2112 %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)
2116 define <8 x i1> @icmp_sge_vi_v8i64(<8 x i64> %va, <8 x i1> %m, i32 zeroext %evl) {
2117 ; CHECK-LABEL: icmp_sge_vi_v8i64:
2119 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
2120 ; CHECK-NEXT: vmsgt.vi v12, v8, 3, v0.t
2121 ; CHECK-NEXT: vmv1r.v v0, v12
2123 %elt.head = insertelement <8 x i64> poison, i64 4, i32 0
2124 %vb = shufflevector <8 x i64> %elt.head, <8 x i64> poison, <8 x i32> zeroinitializer
2125 %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)
2129 define <8 x i1> @icmp_sge_vi_swap_v8i64(<8 x i64> %va, <8 x i1> %m, i32 zeroext %evl) {
2130 ; CHECK-LABEL: icmp_sge_vi_swap_v8i64:
2132 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
2133 ; CHECK-NEXT: vmsle.vi v12, v8, 4, v0.t
2134 ; CHECK-NEXT: vmv1r.v v0, v12
2136 %elt.head = insertelement <8 x i64> poison, i64 4, i32 0
2137 %vb = shufflevector <8 x i64> %elt.head, <8 x i64> poison, <8 x i32> zeroinitializer
2138 %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)
2142 define <8 x i1> @icmp_slt_vv_v8i64(<8 x i64> %va, <8 x i64> %vb, <8 x i1> %m, i32 zeroext %evl) {
2143 ; CHECK-LABEL: icmp_slt_vv_v8i64:
2145 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
2146 ; CHECK-NEXT: vmslt.vv v16, v8, v12, v0.t
2147 ; CHECK-NEXT: vmv1r.v v0, v16
2149 %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)
2153 define <8 x i1> @icmp_slt_vx_v8i64(<8 x i64> %va, i64 %b, <8 x i1> %m, i32 zeroext %evl) {
2154 ; RV32-LABEL: icmp_slt_vx_v8i64:
2156 ; RV32-NEXT: addi sp, sp, -16
2157 ; RV32-NEXT: .cfi_def_cfa_offset 16
2158 ; RV32-NEXT: sw a1, 12(sp)
2159 ; RV32-NEXT: sw a0, 8(sp)
2160 ; RV32-NEXT: addi a0, sp, 8
2161 ; RV32-NEXT: vsetivli zero, 8, e64, m4, ta, ma
2162 ; RV32-NEXT: vlse64.v v16, (a0), zero
2163 ; RV32-NEXT: vsetvli zero, a2, e64, m4, ta, ma
2164 ; RV32-NEXT: vmslt.vv v12, v8, v16, v0.t
2165 ; RV32-NEXT: vmv1r.v v0, v12
2166 ; RV32-NEXT: addi sp, sp, 16
2169 ; RV64-LABEL: icmp_slt_vx_v8i64:
2171 ; RV64-NEXT: vsetvli zero, a1, e64, m4, ta, ma
2172 ; RV64-NEXT: vmslt.vx v12, v8, a0, v0.t
2173 ; RV64-NEXT: vmv1r.v v0, v12
2175 %elt.head = insertelement <8 x i64> poison, i64 %b, i32 0
2176 %vb = shufflevector <8 x i64> %elt.head, <8 x i64> poison, <8 x i32> zeroinitializer
2177 %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)
2181 define <8 x i1> @icmp_slt_vx_swap_v8i64(<8 x i64> %va, i64 %b, <8 x i1> %m, i32 zeroext %evl) {
2182 ; RV32-LABEL: icmp_slt_vx_swap_v8i64:
2184 ; RV32-NEXT: addi sp, sp, -16
2185 ; RV32-NEXT: .cfi_def_cfa_offset 16
2186 ; RV32-NEXT: sw a1, 12(sp)
2187 ; RV32-NEXT: sw a0, 8(sp)
2188 ; RV32-NEXT: addi a0, sp, 8
2189 ; RV32-NEXT: vsetivli zero, 8, e64, m4, ta, ma
2190 ; RV32-NEXT: vlse64.v v16, (a0), zero
2191 ; RV32-NEXT: vsetvli zero, a2, e64, m4, ta, ma
2192 ; RV32-NEXT: vmslt.vv v12, v16, v8, v0.t
2193 ; RV32-NEXT: vmv1r.v v0, v12
2194 ; RV32-NEXT: addi sp, sp, 16
2197 ; RV64-LABEL: icmp_slt_vx_swap_v8i64:
2199 ; RV64-NEXT: vsetvli zero, a1, e64, m4, ta, ma
2200 ; RV64-NEXT: vmsgt.vx v12, v8, a0, v0.t
2201 ; RV64-NEXT: vmv1r.v v0, v12
2203 %elt.head = insertelement <8 x i64> poison, i64 %b, i32 0
2204 %vb = shufflevector <8 x i64> %elt.head, <8 x i64> poison, <8 x i32> zeroinitializer
2205 %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)
2209 define <8 x i1> @icmp_slt_vi_v8i64(<8 x i64> %va, <8 x i1> %m, i32 zeroext %evl) {
2210 ; CHECK-LABEL: icmp_slt_vi_v8i64:
2212 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
2213 ; CHECK-NEXT: vmsle.vi v12, v8, 3, v0.t
2214 ; CHECK-NEXT: vmv1r.v v0, v12
2216 %elt.head = insertelement <8 x i64> poison, i64 4, i32 0
2217 %vb = shufflevector <8 x i64> %elt.head, <8 x i64> poison, <8 x i32> zeroinitializer
2218 %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)
2222 define <8 x i1> @icmp_slt_vi_swap_v8i64(<8 x i64> %va, <8 x i1> %m, i32 zeroext %evl) {
2223 ; CHECK-LABEL: icmp_slt_vi_swap_v8i64:
2225 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
2226 ; CHECK-NEXT: vmsgt.vi v12, v8, 4, v0.t
2227 ; CHECK-NEXT: vmv1r.v v0, v12
2229 %elt.head = insertelement <8 x i64> poison, i64 4, i32 0
2230 %vb = shufflevector <8 x i64> %elt.head, <8 x i64> poison, <8 x i32> zeroinitializer
2231 %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)
2235 define <8 x i1> @icmp_sle_vv_v8i64(<8 x i64> %va, <8 x i64> %vb, <8 x i1> %m, i32 zeroext %evl) {
2236 ; CHECK-LABEL: icmp_sle_vv_v8i64:
2238 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
2239 ; CHECK-NEXT: vmsle.vv v16, v8, v12, v0.t
2240 ; CHECK-NEXT: vmv1r.v v0, v16
2242 %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)
2246 define <8 x i1> @icmp_sle_vx_v8i64(<8 x i64> %va, i64 %b, <8 x i1> %m, i32 zeroext %evl) {
2247 ; RV32-LABEL: icmp_sle_vx_v8i64:
2249 ; RV32-NEXT: addi sp, sp, -16
2250 ; RV32-NEXT: .cfi_def_cfa_offset 16
2251 ; RV32-NEXT: sw a1, 12(sp)
2252 ; RV32-NEXT: sw a0, 8(sp)
2253 ; RV32-NEXT: addi a0, sp, 8
2254 ; RV32-NEXT: vsetivli zero, 8, e64, m4, ta, ma
2255 ; RV32-NEXT: vlse64.v v16, (a0), zero
2256 ; RV32-NEXT: vsetvli zero, a2, e64, m4, ta, ma
2257 ; RV32-NEXT: vmsle.vv v12, v8, v16, v0.t
2258 ; RV32-NEXT: vmv1r.v v0, v12
2259 ; RV32-NEXT: addi sp, sp, 16
2262 ; RV64-LABEL: icmp_sle_vx_v8i64:
2264 ; RV64-NEXT: vsetvli zero, a1, e64, m4, ta, ma
2265 ; RV64-NEXT: vmsle.vx v12, v8, a0, v0.t
2266 ; RV64-NEXT: vmv1r.v v0, v12
2268 %elt.head = insertelement <8 x i64> poison, i64 %b, i32 0
2269 %vb = shufflevector <8 x i64> %elt.head, <8 x i64> poison, <8 x i32> zeroinitializer
2270 %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)
2274 define <8 x i1> @icmp_sle_vx_swap_v8i64(<8 x i64> %va, i64 %b, <8 x i1> %m, i32 zeroext %evl) {
2275 ; RV32-LABEL: icmp_sle_vx_swap_v8i64:
2277 ; RV32-NEXT: addi sp, sp, -16
2278 ; RV32-NEXT: .cfi_def_cfa_offset 16
2279 ; RV32-NEXT: sw a1, 12(sp)
2280 ; RV32-NEXT: sw a0, 8(sp)
2281 ; RV32-NEXT: addi a0, sp, 8
2282 ; RV32-NEXT: vsetivli zero, 8, e64, m4, ta, ma
2283 ; RV32-NEXT: vlse64.v v16, (a0), zero
2284 ; RV32-NEXT: vsetvli zero, a2, e64, m4, ta, ma
2285 ; RV32-NEXT: vmsle.vv v12, v16, v8, v0.t
2286 ; RV32-NEXT: vmv1r.v v0, v12
2287 ; RV32-NEXT: addi sp, sp, 16
2290 ; RV64-LABEL: icmp_sle_vx_swap_v8i64:
2292 ; RV64-NEXT: vsetivli zero, 8, e64, m4, ta, ma
2293 ; RV64-NEXT: vmv.v.x v16, a0
2294 ; RV64-NEXT: vsetvli zero, a1, e64, m4, ta, ma
2295 ; RV64-NEXT: vmsle.vv v12, v16, v8, v0.t
2296 ; RV64-NEXT: vmv1r.v v0, v12
2298 %elt.head = insertelement <8 x i64> poison, i64 %b, i32 0
2299 %vb = shufflevector <8 x i64> %elt.head, <8 x i64> poison, <8 x i32> zeroinitializer
2300 %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)
2304 define <8 x i1> @icmp_sle_vi_v8i64(<8 x i64> %va, <8 x i1> %m, i32 zeroext %evl) {
2305 ; CHECK-LABEL: icmp_sle_vi_v8i64:
2307 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
2308 ; CHECK-NEXT: vmsle.vi v12, v8, 4, v0.t
2309 ; CHECK-NEXT: vmv1r.v v0, v12
2311 %elt.head = insertelement <8 x i64> poison, i64 4, i32 0
2312 %vb = shufflevector <8 x i64> %elt.head, <8 x i64> poison, <8 x i32> zeroinitializer
2313 %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)
2317 define <8 x i1> @icmp_sle_vi_swap_v8i64(<8 x i64> %va, <8 x i1> %m, i32 zeroext %evl) {
2318 ; CHECK-LABEL: icmp_sle_vi_swap_v8i64:
2320 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
2321 ; CHECK-NEXT: vmsgt.vi v12, v8, 3, v0.t
2322 ; CHECK-NEXT: vmv1r.v v0, v12
2324 %elt.head = insertelement <8 x i64> poison, i64 4, i32 0
2325 %vb = shufflevector <8 x i64> %elt.head, <8 x i64> poison, <8 x i32> zeroinitializer
2326 %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)