1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: sed 's/iXLen/i32/g' %s | llc -mtriple=riscv32 -mattr=+m,+v \
3 ; RUN: -verify-machineinstrs | FileCheck %s --check-prefixes=CHECK,RV32
4 ; RUN: sed 's/iXLen/i64/g' %s | llc -mtriple=riscv64 -mattr=+m,+v \
5 ; RUN: -verify-machineinstrs | FileCheck %s --check-prefixes=CHECK,RV64
7 define <vscale x 3 x i1> @icmp_eq_vv_nxv3i8(<vscale x 3 x i8> %va, <vscale x 3 x i8> %vb) {
8 ; CHECK-LABEL: icmp_eq_vv_nxv3i8:
10 ; CHECK-NEXT: vsetvli a0, zero, e8, mf2, ta, ma
11 ; CHECK-NEXT: vmseq.vv v0, v8, v9
13 %vc = icmp eq <vscale x 3 x i8> %va, %vb
14 ret <vscale x 3 x i1> %vc
17 define <vscale x 3 x i1> @icmp_eq_vx_nxv3i8(<vscale x 3 x i8> %va, i8 %b) {
18 ; CHECK-LABEL: icmp_eq_vx_nxv3i8:
20 ; CHECK-NEXT: vsetvli a1, zero, e8, mf2, ta, ma
21 ; CHECK-NEXT: vmseq.vx v0, v8, a0
23 %head = insertelement <vscale x 3 x i8> poison, i8 %b, i32 0
24 %splat = shufflevector <vscale x 3 x i8> %head, <vscale x 3 x i8> poison, <vscale x 3 x i32> zeroinitializer
25 %vc = icmp eq <vscale x 3 x i8> %va, %splat
26 ret <vscale x 3 x i1> %vc
29 define <vscale x 3 x i1> @icmp_eq_xv_nxv3i8(<vscale x 3 x i8> %va, i8 %b) {
30 ; CHECK-LABEL: icmp_eq_xv_nxv3i8:
32 ; CHECK-NEXT: vsetvli a1, zero, e8, mf2, ta, ma
33 ; CHECK-NEXT: vmseq.vx v0, v8, a0
35 %head = insertelement <vscale x 3 x i8> poison, i8 %b, i32 0
36 %splat = shufflevector <vscale x 3 x i8> %head, <vscale x 3 x i8> poison, <vscale x 3 x i32> zeroinitializer
37 %vc = icmp eq <vscale x 3 x i8> %splat, %va
38 ret <vscale x 3 x i1> %vc
41 define <vscale x 8 x i1> @icmp_eq_vv_nxv8i8(<vscale x 8 x i8> %va, <vscale x 8 x i8> %vb) {
42 ; CHECK-LABEL: icmp_eq_vv_nxv8i8:
44 ; CHECK-NEXT: vsetvli a0, zero, e8, m1, ta, ma
45 ; CHECK-NEXT: vmseq.vv v0, v8, v9
47 %vc = icmp eq <vscale x 8 x i8> %va, %vb
48 ret <vscale x 8 x i1> %vc
51 define <vscale x 8 x i1> @icmp_eq_vx_nxv8i8(<vscale x 8 x i8> %va, i8 %b) {
52 ; CHECK-LABEL: icmp_eq_vx_nxv8i8:
54 ; CHECK-NEXT: vsetvli a1, zero, e8, m1, ta, ma
55 ; CHECK-NEXT: vmseq.vx v0, v8, a0
57 %head = insertelement <vscale x 8 x i8> poison, i8 %b, i32 0
58 %splat = shufflevector <vscale x 8 x i8> %head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
59 %vc = icmp eq <vscale x 8 x i8> %va, %splat
60 ret <vscale x 8 x i1> %vc
63 define <vscale x 8 x i1> @icmp_eq_xv_nxv8i8(<vscale x 8 x i8> %va, i8 %b) {
64 ; CHECK-LABEL: icmp_eq_xv_nxv8i8:
66 ; CHECK-NEXT: vsetvli a1, zero, e8, m1, ta, ma
67 ; CHECK-NEXT: vmseq.vx v0, v8, a0
69 %head = insertelement <vscale x 8 x i8> poison, i8 %b, i32 0
70 %splat = shufflevector <vscale x 8 x i8> %head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
71 %vc = icmp eq <vscale x 8 x i8> %splat, %va
72 ret <vscale x 8 x i1> %vc
75 define <vscale x 8 x i1> @icmp_eq_vi_nxv8i8_0(<vscale x 8 x i8> %va) {
76 ; CHECK-LABEL: icmp_eq_vi_nxv8i8_0:
78 ; CHECK-NEXT: vsetvli a0, zero, e8, m1, ta, ma
79 ; CHECK-NEXT: vmseq.vi v0, v8, 0
81 %head = insertelement <vscale x 8 x i8> poison, i8 0, i32 0
82 %splat = shufflevector <vscale x 8 x i8> %head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
83 %vc = icmp eq <vscale x 8 x i8> %va, %splat
84 ret <vscale x 8 x i1> %vc
87 define <vscale x 8 x i1> @icmp_eq_vi_nxv8i8_1(<vscale x 8 x i8> %va) {
88 ; CHECK-LABEL: icmp_eq_vi_nxv8i8_1:
90 ; CHECK-NEXT: vsetvli a0, zero, e8, m1, ta, ma
91 ; CHECK-NEXT: vmseq.vi v0, v8, 5
93 %head = insertelement <vscale x 8 x i8> poison, i8 5, i32 0
94 %splat = shufflevector <vscale x 8 x i8> %head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
95 %vc = icmp eq <vscale x 8 x i8> %va, %splat
96 ret <vscale x 8 x i1> %vc
99 define <vscale x 8 x i1> @icmp_eq_iv_nxv8i8_1(<vscale x 8 x i8> %va) {
100 ; CHECK-LABEL: icmp_eq_iv_nxv8i8_1:
102 ; CHECK-NEXT: vsetvli a0, zero, e8, m1, ta, ma
103 ; CHECK-NEXT: vmseq.vi v0, v8, 5
105 %head = insertelement <vscale x 8 x i8> poison, i8 5, i32 0
106 %splat = shufflevector <vscale x 8 x i8> %head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
107 %vc = icmp eq <vscale x 8 x i8> %splat, %va
108 ret <vscale x 8 x i1> %vc
111 define <vscale x 8 x i1> @icmp_ne_vv_nxv8i8(<vscale x 8 x i8> %va, <vscale x 8 x i8> %vb) {
112 ; CHECK-LABEL: icmp_ne_vv_nxv8i8:
114 ; CHECK-NEXT: vsetvli a0, zero, e8, m1, ta, ma
115 ; CHECK-NEXT: vmsne.vv v0, v8, v9
117 %vc = icmp ne <vscale x 8 x i8> %va, %vb
118 ret <vscale x 8 x i1> %vc
121 define <vscale x 8 x i1> @icmp_ne_vx_nxv8i8(<vscale x 8 x i8> %va, i8 %b) {
122 ; CHECK-LABEL: icmp_ne_vx_nxv8i8:
124 ; CHECK-NEXT: vsetvli a1, zero, e8, m1, ta, ma
125 ; CHECK-NEXT: vmsne.vx v0, v8, a0
127 %head = insertelement <vscale x 8 x i8> poison, i8 %b, i32 0
128 %splat = shufflevector <vscale x 8 x i8> %head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
129 %vc = icmp ne <vscale x 8 x i8> %va, %splat
130 ret <vscale x 8 x i1> %vc
133 define <vscale x 8 x i1> @icmp_ne_xv_nxv8i8(<vscale x 8 x i8> %va, i8 %b) {
134 ; CHECK-LABEL: icmp_ne_xv_nxv8i8:
136 ; CHECK-NEXT: vsetvli a1, zero, e8, m1, ta, ma
137 ; CHECK-NEXT: vmsne.vx v0, v8, a0
139 %head = insertelement <vscale x 8 x i8> poison, i8 %b, i32 0
140 %splat = shufflevector <vscale x 8 x i8> %head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
141 %vc = icmp ne <vscale x 8 x i8> %splat, %va
142 ret <vscale x 8 x i1> %vc
145 define <vscale x 8 x i1> @icmp_ne_vi_nxv8i8_0(<vscale x 8 x i8> %va) {
146 ; CHECK-LABEL: icmp_ne_vi_nxv8i8_0:
148 ; CHECK-NEXT: vsetvli a0, zero, e8, m1, ta, ma
149 ; CHECK-NEXT: vmsne.vi v0, v8, 5
151 %head = insertelement <vscale x 8 x i8> poison, i8 5, i32 0
152 %splat = shufflevector <vscale x 8 x i8> %head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
153 %vc = icmp ne <vscale x 8 x i8> %va, %splat
154 ret <vscale x 8 x i1> %vc
157 define <vscale x 8 x i1> @icmp_ugt_vv_nxv8i8(<vscale x 8 x i8> %va, <vscale x 8 x i8> %vb) {
158 ; CHECK-LABEL: icmp_ugt_vv_nxv8i8:
160 ; CHECK-NEXT: vsetvli a0, zero, e8, m1, ta, ma
161 ; CHECK-NEXT: vmsltu.vv v0, v9, v8
163 %vc = icmp ugt <vscale x 8 x i8> %va, %vb
164 ret <vscale x 8 x i1> %vc
167 define <vscale x 8 x i1> @icmp_ugt_vx_nxv8i8(<vscale x 8 x i8> %va, i8 %b) {
168 ; CHECK-LABEL: icmp_ugt_vx_nxv8i8:
170 ; CHECK-NEXT: vsetvli a1, zero, e8, m1, ta, ma
171 ; CHECK-NEXT: vmsgtu.vx v0, v8, a0
173 %head = insertelement <vscale x 8 x i8> poison, i8 %b, i32 0
174 %splat = shufflevector <vscale x 8 x i8> %head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
175 %vc = icmp ugt <vscale x 8 x i8> %va, %splat
176 ret <vscale x 8 x i1> %vc
179 define <vscale x 8 x i1> @icmp_ugt_xv_nxv8i8(<vscale x 8 x i8> %va, i8 %b) {
180 ; CHECK-LABEL: icmp_ugt_xv_nxv8i8:
182 ; CHECK-NEXT: vsetvli a1, zero, e8, m1, ta, ma
183 ; CHECK-NEXT: vmsltu.vx v0, v8, a0
185 %head = insertelement <vscale x 8 x i8> poison, i8 %b, i32 0
186 %splat = shufflevector <vscale x 8 x i8> %head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
187 %vc = icmp ugt <vscale x 8 x i8> %splat, %va
188 ret <vscale x 8 x i1> %vc
191 define <vscale x 8 x i1> @icmp_ugt_vi_nxv8i8_0(<vscale x 8 x i8> %va) {
192 ; CHECK-LABEL: icmp_ugt_vi_nxv8i8_0:
194 ; CHECK-NEXT: vsetvli a0, zero, e8, m1, ta, ma
195 ; CHECK-NEXT: vmsgtu.vi v0, v8, 5
197 %head = insertelement <vscale x 8 x i8> poison, i8 5, i32 0
198 %splat = shufflevector <vscale x 8 x i8> %head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
199 %vc = icmp ugt <vscale x 8 x i8> %va, %splat
200 ret <vscale x 8 x i1> %vc
203 define <vscale x 8 x i1> @icmp_uge_vv_nxv8i8(<vscale x 8 x i8> %va, <vscale x 8 x i8> %vb) {
204 ; CHECK-LABEL: icmp_uge_vv_nxv8i8:
206 ; CHECK-NEXT: vsetvli a0, zero, e8, m1, ta, ma
207 ; CHECK-NEXT: vmsleu.vv v0, v9, v8
209 %vc = icmp uge <vscale x 8 x i8> %va, %vb
210 ret <vscale x 8 x i1> %vc
213 define <vscale x 8 x i1> @icmp_uge_vx_nxv8i8(<vscale x 8 x i8> %va, i8 %b) {
214 ; CHECK-LABEL: icmp_uge_vx_nxv8i8:
216 ; CHECK-NEXT: vsetvli a1, zero, e8, m1, ta, ma
217 ; CHECK-NEXT: vmv.v.x v9, a0
218 ; CHECK-NEXT: vmsleu.vv v0, v9, v8
220 %head = insertelement <vscale x 8 x i8> poison, i8 %b, i32 0
221 %splat = shufflevector <vscale x 8 x i8> %head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
222 %vc = icmp uge <vscale x 8 x i8> %va, %splat
223 ret <vscale x 8 x i1> %vc
226 define <vscale x 8 x i1> @icmp_uge_xv_nxv8i8(<vscale x 8 x i8> %va, i8 %b) {
227 ; CHECK-LABEL: icmp_uge_xv_nxv8i8:
229 ; CHECK-NEXT: vsetvli a1, zero, e8, m1, ta, ma
230 ; CHECK-NEXT: vmsleu.vx v0, v8, a0
232 %head = insertelement <vscale x 8 x i8> poison, i8 %b, i32 0
233 %splat = shufflevector <vscale x 8 x i8> %head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
234 %vc = icmp uge <vscale x 8 x i8> %splat, %va
235 ret <vscale x 8 x i1> %vc
238 define <vscale x 8 x i1> @icmp_uge_vi_nxv8i8_0(<vscale x 8 x i8> %va) {
239 ; CHECK-LABEL: icmp_uge_vi_nxv8i8_0:
241 ; CHECK-NEXT: vsetvli a0, zero, e8, m1, ta, ma
242 ; CHECK-NEXT: vmv.v.i v9, -16
243 ; CHECK-NEXT: vmsleu.vv v0, v9, v8
245 %head = insertelement <vscale x 8 x i8> poison, i8 -16, i32 0
246 %splat = shufflevector <vscale x 8 x i8> %head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
247 %vc = icmp uge <vscale x 8 x i8> %va, %splat
248 ret <vscale x 8 x i1> %vc
251 define <vscale x 8 x i1> @icmp_uge_vi_nxv8i8_1(<vscale x 8 x i8> %va) {
252 ; CHECK-LABEL: icmp_uge_vi_nxv8i8_1:
254 ; CHECK-NEXT: vsetvli a0, zero, e8, m1, ta, ma
255 ; CHECK-NEXT: vmsgtu.vi v0, v8, 14
257 %head = insertelement <vscale x 8 x i8> poison, i8 15, i32 0
258 %splat = shufflevector <vscale x 8 x i8> %head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
259 %vc = icmp uge <vscale x 8 x i8> %va, %splat
260 ret <vscale x 8 x i1> %vc
263 define <vscale x 8 x i1> @icmp_uge_iv_nxv8i8_1(<vscale x 8 x i8> %va) {
264 ; CHECK-LABEL: icmp_uge_iv_nxv8i8_1:
266 ; CHECK-NEXT: vsetvli a0, zero, e8, m1, ta, ma
267 ; CHECK-NEXT: vmsleu.vi v0, v8, 15
269 %head = insertelement <vscale x 8 x i8> poison, i8 15, i32 0
270 %splat = shufflevector <vscale x 8 x i8> %head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
271 %vc = icmp uge <vscale x 8 x i8> %splat, %va
272 ret <vscale x 8 x i1> %vc
275 define <vscale x 8 x i1> @icmp_uge_vi_nxv8i8_2(<vscale x 8 x i8> %va) {
276 ; CHECK-LABEL: icmp_uge_vi_nxv8i8_2:
278 ; CHECK-NEXT: vsetvli a0, zero, e8, m1, ta, ma
279 ; CHECK-NEXT: vmset.m v0
281 %head = insertelement <vscale x 8 x i8> poison, i8 0, i32 0
282 %splat = shufflevector <vscale x 8 x i8> %head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
283 %vc = icmp uge <vscale x 8 x i8> %va, %splat
284 ret <vscale x 8 x i1> %vc
287 define <vscale x 8 x i1> @icmp_uge_vi_nxv8i8_3(<vscale x 8 x i8> %va) {
288 ; CHECK-LABEL: icmp_uge_vi_nxv8i8_3:
290 ; CHECK-NEXT: vsetvli a0, zero, e8, m1, ta, ma
291 ; CHECK-NEXT: vmsgtu.vi v0, v8, 0
293 %head = insertelement <vscale x 8 x i8> poison, i8 1, i32 0
294 %splat = shufflevector <vscale x 8 x i8> %head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
295 %vc = icmp uge <vscale x 8 x i8> %va, %splat
296 ret <vscale x 8 x i1> %vc
299 define <vscale x 8 x i1> @icmp_uge_vi_nxv8i8_4(<vscale x 8 x i8> %va) {
300 ; CHECK-LABEL: icmp_uge_vi_nxv8i8_4:
302 ; CHECK-NEXT: vsetvli a0, zero, e8, m1, ta, ma
303 ; CHECK-NEXT: vmsgtu.vi v0, v8, -16
305 %head = insertelement <vscale x 8 x i8> poison, i8 -15, i32 0
306 %splat = shufflevector <vscale x 8 x i8> %head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
307 %vc = icmp uge <vscale x 8 x i8> %va, %splat
308 ret <vscale x 8 x i1> %vc
311 define <vscale x 8 x i1> @icmp_uge_vi_nxv8i8_5(<vscale x 8 x i8> %va) {
312 ; CHECK-LABEL: icmp_uge_vi_nxv8i8_5:
314 ; CHECK-NEXT: vsetvli a0, zero, e8, m1, ta, ma
315 ; CHECK-NEXT: vmsgtu.vi v0, v8, 15
317 %head = insertelement <vscale x 8 x i8> poison, i8 16, i32 0
318 %splat = shufflevector <vscale x 8 x i8> %head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
319 %vc = icmp uge <vscale x 8 x i8> %va, %splat
320 ret <vscale x 8 x i1> %vc
323 ; Test that we don't optimize uge x, 0 -> ugt x, -1
324 define <vscale x 8 x i1> @icmp_uge_vi_nxv8i8_6(<vscale x 8 x i8> %va, iXLen %vl) {
325 ; CHECK-LABEL: icmp_uge_vi_nxv8i8_6:
327 ; CHECK-NEXT: vsetvli zero, a0, e8, m1, ta, ma
328 ; CHECK-NEXT: vmv.v.i v9, 0
329 ; CHECK-NEXT: vsetvli a0, zero, e8, m1, ta, ma
330 ; CHECK-NEXT: vmsleu.vv v0, v9, v8
332 %splat = call <vscale x 8 x i8> @llvm.riscv.vmv.v.x.nxv8i8.iXLen(<vscale x 8 x i8> undef, i8 0, iXLen %vl)
333 %vc = icmp uge <vscale x 8 x i8> %va, %splat
334 ret <vscale x 8 x i1> %vc
337 define <vscale x 8 x i1> @icmp_ult_vv_nxv8i8(<vscale x 8 x i8> %va, <vscale x 8 x i8> %vb) {
338 ; CHECK-LABEL: icmp_ult_vv_nxv8i8:
340 ; CHECK-NEXT: vsetvli a0, zero, e8, m1, ta, ma
341 ; CHECK-NEXT: vmsltu.vv v0, v8, v9
343 %vc = icmp ult <vscale x 8 x i8> %va, %vb
344 ret <vscale x 8 x i1> %vc
347 define <vscale x 8 x i1> @icmp_ult_vx_nxv8i8(<vscale x 8 x i8> %va, i8 %b) {
348 ; CHECK-LABEL: icmp_ult_vx_nxv8i8:
350 ; CHECK-NEXT: vsetvli a1, zero, e8, m1, ta, ma
351 ; CHECK-NEXT: vmsltu.vx v0, v8, a0
353 %head = insertelement <vscale x 8 x i8> poison, i8 %b, i32 0
354 %splat = shufflevector <vscale x 8 x i8> %head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
355 %vc = icmp ult <vscale x 8 x i8> %va, %splat
356 ret <vscale x 8 x i1> %vc
359 define <vscale x 8 x i1> @icmp_ult_xv_nxv8i8(<vscale x 8 x i8> %va, i8 %b) {
360 ; CHECK-LABEL: icmp_ult_xv_nxv8i8:
362 ; CHECK-NEXT: vsetvli a1, zero, e8, m1, ta, ma
363 ; CHECK-NEXT: vmsgtu.vx v0, v8, a0
365 %head = insertelement <vscale x 8 x i8> poison, i8 %b, i32 0
366 %splat = shufflevector <vscale x 8 x i8> %head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
367 %vc = icmp ult <vscale x 8 x i8> %splat, %va
368 ret <vscale x 8 x i1> %vc
371 define <vscale x 8 x i1> @icmp_ult_vi_nxv8i8_0(<vscale x 8 x i8> %va) {
372 ; CHECK-LABEL: icmp_ult_vi_nxv8i8_0:
374 ; CHECK-NEXT: li a0, -16
375 ; CHECK-NEXT: vsetvli a1, zero, e8, m1, ta, ma
376 ; CHECK-NEXT: vmsltu.vx v0, v8, a0
378 %head = insertelement <vscale x 8 x i8> poison, i8 -16, i32 0
379 %splat = shufflevector <vscale x 8 x i8> %head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
380 %vc = icmp ult <vscale x 8 x i8> %va, %splat
381 ret <vscale x 8 x i1> %vc
384 define <vscale x 8 x i1> @icmp_ult_vi_nxv8i8_1(<vscale x 8 x i8> %va) {
385 ; CHECK-LABEL: icmp_ult_vi_nxv8i8_1:
387 ; CHECK-NEXT: vsetvli a0, zero, e8, m1, ta, ma
388 ; CHECK-NEXT: vmsleu.vi v0, v8, -16
390 %head = insertelement <vscale x 8 x i8> poison, i8 -15, i32 0
391 %splat = shufflevector <vscale x 8 x i8> %head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
392 %vc = icmp ult <vscale x 8 x i8> %va, %splat
393 ret <vscale x 8 x i1> %vc
396 define <vscale x 8 x i1> @icmp_ult_iv_nxv8i8_1(<vscale x 8 x i8> %va) {
397 ; CHECK-LABEL: icmp_ult_iv_nxv8i8_1:
399 ; CHECK-NEXT: vsetvli a0, zero, e8, m1, ta, ma
400 ; CHECK-NEXT: vmsgtu.vi v0, v8, -15
402 %head = insertelement <vscale x 8 x i8> poison, i8 -15, i32 0
403 %splat = shufflevector <vscale x 8 x i8> %head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
404 %vc = icmp ult <vscale x 8 x i8> %splat, %va
405 ret <vscale x 8 x i1> %vc
408 define <vscale x 8 x i1> @icmp_ult_vi_nxv8i8_2(<vscale x 8 x i8> %va) {
409 ; CHECK-LABEL: icmp_ult_vi_nxv8i8_2:
411 ; CHECK-NEXT: vsetvli a0, zero, e8, m1, ta, ma
412 ; CHECK-NEXT: vmclr.m v0
414 %head = insertelement <vscale x 8 x i8> poison, i8 0, i32 0
415 %splat = shufflevector <vscale x 8 x i8> %head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
416 %vc = icmp ult <vscale x 8 x i8> %va, %splat
417 ret <vscale x 8 x i1> %vc
420 define <vscale x 8 x i1> @icmp_ult_vi_nxv8i8_3(<vscale x 8 x i8> %va) {
421 ; CHECK-LABEL: icmp_ult_vi_nxv8i8_3:
423 ; CHECK-NEXT: vsetvli a0, zero, e8, m1, ta, ma
424 ; CHECK-NEXT: vmseq.vi v0, v8, 0
426 %head = insertelement <vscale x 8 x i8> poison, i8 1, i32 0
427 %splat = shufflevector <vscale x 8 x i8> %head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
428 %vc = icmp ult <vscale x 8 x i8> %va, %splat
429 ret <vscale x 8 x i1> %vc
432 define <vscale x 8 x i1> @icmp_ult_vi_nxv8i8_4(<vscale x 8 x i8> %va) {
433 ; CHECK-LABEL: icmp_ult_vi_nxv8i8_4:
435 ; CHECK-NEXT: vsetvli a0, zero, e8, m1, ta, ma
436 ; CHECK-NEXT: vmsleu.vi v0, v8, 15
438 %head = insertelement <vscale x 8 x i8> poison, i8 16, i32 0
439 %splat = shufflevector <vscale x 8 x i8> %head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
440 %vc = icmp ult <vscale x 8 x i8> %va, %splat
441 ret <vscale x 8 x i1> %vc
444 declare <vscale x 8 x i8> @llvm.riscv.vmv.v.x.nxv8i8.iXLen(<vscale x 8 x i8>, i8, iXLen);
446 ; Test that we don't optimize ult x, 0 -> ule x, -1
447 define <vscale x 8 x i1> @icmp_ult_vi_nxv8i8_5(<vscale x 8 x i8> %va, iXLen %vl) {
448 ; CHECK-LABEL: icmp_ult_vi_nxv8i8_5:
450 ; CHECK-NEXT: vsetvli a0, zero, e8, m1, ta, ma
451 ; CHECK-NEXT: vmsltu.vx v0, v8, zero
453 %splat = call <vscale x 8 x i8> @llvm.riscv.vmv.v.x.nxv8i8.iXLen(<vscale x 8 x i8> undef, i8 0, iXLen %vl)
454 %vc = icmp ult <vscale x 8 x i8> %va, %splat
455 ret <vscale x 8 x i1> %vc
458 define <vscale x 8 x i1> @icmp_ule_vv_nxv8i8(<vscale x 8 x i8> %va, <vscale x 8 x i8> %vb) {
459 ; CHECK-LABEL: icmp_ule_vv_nxv8i8:
461 ; CHECK-NEXT: vsetvli a0, zero, e8, m1, ta, ma
462 ; CHECK-NEXT: vmsleu.vv v0, v8, v9
464 %vc = icmp ule <vscale x 8 x i8> %va, %vb
465 ret <vscale x 8 x i1> %vc
468 define <vscale x 8 x i1> @icmp_ule_vx_nxv8i8(<vscale x 8 x i8> %va, i8 %b) {
469 ; CHECK-LABEL: icmp_ule_vx_nxv8i8:
471 ; CHECK-NEXT: vsetvli a1, zero, e8, m1, ta, ma
472 ; CHECK-NEXT: vmsleu.vx v0, v8, a0
474 %head = insertelement <vscale x 8 x i8> poison, i8 %b, i32 0
475 %splat = shufflevector <vscale x 8 x i8> %head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
476 %vc = icmp ule <vscale x 8 x i8> %va, %splat
477 ret <vscale x 8 x i1> %vc
480 define <vscale x 8 x i1> @icmp_ule_xv_nxv8i8(<vscale x 8 x i8> %va, i8 %b) {
481 ; CHECK-LABEL: icmp_ule_xv_nxv8i8:
483 ; CHECK-NEXT: vsetvli a1, zero, e8, m1, ta, ma
484 ; CHECK-NEXT: vmv.v.x v9, a0
485 ; CHECK-NEXT: vmsleu.vv v0, v9, v8
487 %head = insertelement <vscale x 8 x i8> poison, i8 %b, i32 0
488 %splat = shufflevector <vscale x 8 x i8> %head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
489 %vc = icmp ule <vscale x 8 x i8> %splat, %va
490 ret <vscale x 8 x i1> %vc
493 define <vscale x 8 x i1> @icmp_ule_vi_nxv8i8_0(<vscale x 8 x i8> %va) {
494 ; CHECK-LABEL: icmp_ule_vi_nxv8i8_0:
496 ; CHECK-NEXT: vsetvli a0, zero, e8, m1, ta, ma
497 ; CHECK-NEXT: vmsleu.vi v0, v8, 5
499 %head = insertelement <vscale x 8 x i8> poison, i8 5, i32 0
500 %splat = shufflevector <vscale x 8 x i8> %head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
501 %vc = icmp ule <vscale x 8 x i8> %va, %splat
502 ret <vscale x 8 x i1> %vc
505 define <vscale x 8 x i1> @icmp_sgt_vv_nxv8i8(<vscale x 8 x i8> %va, <vscale x 8 x i8> %vb) {
506 ; CHECK-LABEL: icmp_sgt_vv_nxv8i8:
508 ; CHECK-NEXT: vsetvli a0, zero, e8, m1, ta, ma
509 ; CHECK-NEXT: vmslt.vv v0, v9, v8
511 %vc = icmp sgt <vscale x 8 x i8> %va, %vb
512 ret <vscale x 8 x i1> %vc
515 define <vscale x 8 x i1> @icmp_sgt_vx_nxv8i8(<vscale x 8 x i8> %va, i8 %b) {
516 ; CHECK-LABEL: icmp_sgt_vx_nxv8i8:
518 ; CHECK-NEXT: vsetvli a1, zero, e8, m1, ta, ma
519 ; CHECK-NEXT: vmsgt.vx v0, v8, a0
521 %head = insertelement <vscale x 8 x i8> poison, i8 %b, i32 0
522 %splat = shufflevector <vscale x 8 x i8> %head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
523 %vc = icmp sgt <vscale x 8 x i8> %va, %splat
524 ret <vscale x 8 x i1> %vc
527 define <vscale x 8 x i1> @icmp_sgt_xv_nxv8i8(<vscale x 8 x i8> %va, i8 %b) {
528 ; CHECK-LABEL: icmp_sgt_xv_nxv8i8:
530 ; CHECK-NEXT: vsetvli a1, zero, e8, m1, ta, ma
531 ; CHECK-NEXT: vmslt.vx v0, v8, a0
533 %head = insertelement <vscale x 8 x i8> poison, i8 %b, i32 0
534 %splat = shufflevector <vscale x 8 x i8> %head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
535 %vc = icmp sgt <vscale x 8 x i8> %splat, %va
536 ret <vscale x 8 x i1> %vc
539 define <vscale x 8 x i1> @icmp_sgt_vi_nxv8i8_0(<vscale x 8 x i8> %va) {
540 ; CHECK-LABEL: icmp_sgt_vi_nxv8i8_0:
542 ; CHECK-NEXT: vsetvli a0, zero, e8, m1, ta, ma
543 ; CHECK-NEXT: vmsgt.vi v0, v8, 5
545 %head = insertelement <vscale x 8 x i8> poison, i8 5, i32 0
546 %splat = shufflevector <vscale x 8 x i8> %head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
547 %vc = icmp sgt <vscale x 8 x i8> %va, %splat
548 ret <vscale x 8 x i1> %vc
551 define <vscale x 8 x i1> @icmp_sge_vv_nxv8i8(<vscale x 8 x i8> %va, <vscale x 8 x i8> %vb) {
552 ; CHECK-LABEL: icmp_sge_vv_nxv8i8:
554 ; CHECK-NEXT: vsetvli a0, zero, e8, m1, ta, ma
555 ; CHECK-NEXT: vmsle.vv v0, v9, v8
557 %vc = icmp sge <vscale x 8 x i8> %va, %vb
558 ret <vscale x 8 x i1> %vc
561 define <vscale x 8 x i1> @icmp_sge_vx_nxv8i8(<vscale x 8 x i8> %va, i8 %b) {
562 ; CHECK-LABEL: icmp_sge_vx_nxv8i8:
564 ; CHECK-NEXT: vsetvli a1, zero, e8, m1, ta, ma
565 ; CHECK-NEXT: vmv.v.x v9, a0
566 ; CHECK-NEXT: vmsle.vv v0, v9, v8
568 %head = insertelement <vscale x 8 x i8> poison, i8 %b, i32 0
569 %splat = shufflevector <vscale x 8 x i8> %head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
570 %vc = icmp sge <vscale x 8 x i8> %va, %splat
571 ret <vscale x 8 x i1> %vc
574 define <vscale x 8 x i1> @icmp_sge_xv_nxv8i8(<vscale x 8 x i8> %va, i8 %b) {
575 ; CHECK-LABEL: icmp_sge_xv_nxv8i8:
577 ; CHECK-NEXT: vsetvli a1, zero, e8, m1, ta, ma
578 ; CHECK-NEXT: vmsle.vx v0, v8, a0
580 %head = insertelement <vscale x 8 x i8> poison, i8 %b, i32 0
581 %splat = shufflevector <vscale x 8 x i8> %head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
582 %vc = icmp sge <vscale x 8 x i8> %splat, %va
583 ret <vscale x 8 x i1> %vc
586 define <vscale x 8 x i1> @icmp_sge_vi_nxv8i8_0(<vscale x 8 x i8> %va) {
587 ; CHECK-LABEL: icmp_sge_vi_nxv8i8_0:
589 ; CHECK-NEXT: vsetvli a0, zero, e8, m1, ta, ma
590 ; CHECK-NEXT: vmv.v.i v9, -16
591 ; CHECK-NEXT: vmsle.vv v0, v9, v8
593 %head = insertelement <vscale x 8 x i8> poison, i8 -16, i32 0
594 %splat = shufflevector <vscale x 8 x i8> %head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
595 %vc = icmp sge <vscale x 8 x i8> %va, %splat
596 ret <vscale x 8 x i1> %vc
599 define <vscale x 8 x i1> @icmp_sge_vi_nxv8i8_1(<vscale x 8 x i8> %va) {
600 ; CHECK-LABEL: icmp_sge_vi_nxv8i8_1:
602 ; CHECK-NEXT: vsetvli a0, zero, e8, m1, ta, ma
603 ; CHECK-NEXT: vmsgt.vi v0, v8, -16
605 %head = insertelement <vscale x 8 x i8> poison, i8 -15, i32 0
606 %splat = shufflevector <vscale x 8 x i8> %head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
607 %vc = icmp sge <vscale x 8 x i8> %va, %splat
608 ret <vscale x 8 x i1> %vc
611 define <vscale x 8 x i1> @icmp_sge_iv_nxv8i8_1(<vscale x 8 x i8> %va) {
612 ; CHECK-LABEL: icmp_sge_iv_nxv8i8_1:
614 ; CHECK-NEXT: vsetvli a0, zero, e8, m1, ta, ma
615 ; CHECK-NEXT: vmsle.vi v0, v8, -15
617 %head = insertelement <vscale x 8 x i8> poison, i8 -15, i32 0
618 %splat = shufflevector <vscale x 8 x i8> %head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
619 %vc = icmp sge <vscale x 8 x i8> %splat, %va
620 ret <vscale x 8 x i1> %vc
623 define <vscale x 8 x i1> @icmp_sge_vi_nxv8i8_2(<vscale x 8 x i8> %va) {
624 ; CHECK-LABEL: icmp_sge_vi_nxv8i8_2:
626 ; CHECK-NEXT: vsetvli a0, zero, e8, m1, ta, ma
627 ; CHECK-NEXT: vmsgt.vi v0, v8, -1
629 %head = insertelement <vscale x 8 x i8> poison, i8 0, i32 0
630 %splat = shufflevector <vscale x 8 x i8> %head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
631 %vc = icmp sge <vscale x 8 x i8> %va, %splat
632 ret <vscale x 8 x i1> %vc
635 define <vscale x 8 x i1> @icmp_sge_vi_nxv8i8_3(<vscale x 8 x i8> %va) {
636 ; CHECK-LABEL: icmp_sge_vi_nxv8i8_3:
638 ; CHECK-NEXT: vsetvli a0, zero, e8, m1, ta, ma
639 ; CHECK-NEXT: vmsgt.vi v0, v8, 15
641 %head = insertelement <vscale x 8 x i8> poison, i8 16, i32 0
642 %splat = shufflevector <vscale x 8 x i8> %head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
643 %vc = icmp sge <vscale x 8 x i8> %va, %splat
644 ret <vscale x 8 x i1> %vc
647 define <vscale x 8 x i1> @icmp_slt_vv_nxv8i8(<vscale x 8 x i8> %va, <vscale x 8 x i8> %vb) {
648 ; CHECK-LABEL: icmp_slt_vv_nxv8i8:
650 ; CHECK-NEXT: vsetvli a0, zero, e8, m1, ta, ma
651 ; CHECK-NEXT: vmslt.vv v0, v8, v9
653 %vc = icmp slt <vscale x 8 x i8> %va, %vb
654 ret <vscale x 8 x i1> %vc
657 define <vscale x 8 x i1> @icmp_slt_vx_nxv8i8(<vscale x 8 x i8> %va, i8 %b) {
658 ; CHECK-LABEL: icmp_slt_vx_nxv8i8:
660 ; CHECK-NEXT: vsetvli a1, zero, e8, m1, ta, ma
661 ; CHECK-NEXT: vmslt.vx v0, v8, a0
663 %head = insertelement <vscale x 8 x i8> poison, i8 %b, i32 0
664 %splat = shufflevector <vscale x 8 x i8> %head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
665 %vc = icmp slt <vscale x 8 x i8> %va, %splat
666 ret <vscale x 8 x i1> %vc
669 define <vscale x 8 x i1> @icmp_slt_xv_nxv8i8(<vscale x 8 x i8> %va, i8 %b) {
670 ; CHECK-LABEL: icmp_slt_xv_nxv8i8:
672 ; CHECK-NEXT: vsetvli a1, zero, e8, m1, ta, ma
673 ; CHECK-NEXT: vmsgt.vx v0, v8, a0
675 %head = insertelement <vscale x 8 x i8> poison, i8 %b, i32 0
676 %splat = shufflevector <vscale x 8 x i8> %head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
677 %vc = icmp slt <vscale x 8 x i8> %splat, %va
678 ret <vscale x 8 x i1> %vc
681 define <vscale x 8 x i1> @icmp_slt_vi_nxv8i8_0(<vscale x 8 x i8> %va) {
682 ; CHECK-LABEL: icmp_slt_vi_nxv8i8_0:
684 ; CHECK-NEXT: li a0, -16
685 ; CHECK-NEXT: vsetvli a1, zero, e8, m1, ta, ma
686 ; CHECK-NEXT: vmslt.vx v0, v8, a0
688 %head = insertelement <vscale x 8 x i8> poison, i8 -16, i32 0
689 %splat = shufflevector <vscale x 8 x i8> %head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
690 %vc = icmp slt <vscale x 8 x i8> %va, %splat
691 ret <vscale x 8 x i1> %vc
694 define <vscale x 8 x i1> @icmp_slt_vi_nxv8i8_1(<vscale x 8 x i8> %va) {
695 ; CHECK-LABEL: icmp_slt_vi_nxv8i8_1:
697 ; CHECK-NEXT: vsetvli a0, zero, e8, m1, ta, ma
698 ; CHECK-NEXT: vmsle.vi v0, v8, -16
700 %head = insertelement <vscale x 8 x i8> poison, i8 -15, i32 0
701 %splat = shufflevector <vscale x 8 x i8> %head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
702 %vc = icmp slt <vscale x 8 x i8> %va, %splat
703 ret <vscale x 8 x i1> %vc
706 define <vscale x 8 x i1> @icmp_slt_iv_nxv8i8_1(<vscale x 8 x i8> %va) {
707 ; CHECK-LABEL: icmp_slt_iv_nxv8i8_1:
709 ; CHECK-NEXT: vsetvli a0, zero, e8, m1, ta, ma
710 ; CHECK-NEXT: vmsgt.vi v0, v8, -15
712 %head = insertelement <vscale x 8 x i8> poison, i8 -15, i32 0
713 %splat = shufflevector <vscale x 8 x i8> %head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
714 %vc = icmp slt <vscale x 8 x i8> %splat, %va
715 ret <vscale x 8 x i1> %vc
718 define <vscale x 8 x i1> @icmp_slt_vi_nxv8i8_2(<vscale x 8 x i8> %va) {
719 ; CHECK-LABEL: icmp_slt_vi_nxv8i8_2:
721 ; CHECK-NEXT: vsetvli a0, zero, e8, m1, ta, ma
722 ; CHECK-NEXT: vmsle.vi v0, v8, -1
724 %head = insertelement <vscale x 8 x i8> poison, i8 0, i32 0
725 %splat = shufflevector <vscale x 8 x i8> %head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
726 %vc = icmp slt <vscale x 8 x i8> %va, %splat
727 ret <vscale x 8 x i1> %vc
730 define <vscale x 8 x i1> @icmp_slt_vi_nxv8i8_3(<vscale x 8 x i8> %va) {
731 ; CHECK-LABEL: icmp_slt_vi_nxv8i8_3:
733 ; CHECK-NEXT: vsetvli a0, zero, e8, m1, ta, ma
734 ; CHECK-NEXT: vmsle.vi v0, v8, 15
736 %head = insertelement <vscale x 8 x i8> poison, i8 16, i32 0
737 %splat = shufflevector <vscale x 8 x i8> %head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
738 %vc = icmp slt <vscale x 8 x i8> %va, %splat
739 ret <vscale x 8 x i1> %vc
742 define <vscale x 8 x i1> @icmp_sle_vv_nxv8i8(<vscale x 8 x i8> %va, <vscale x 8 x i8> %vb) {
743 ; CHECK-LABEL: icmp_sle_vv_nxv8i8:
745 ; CHECK-NEXT: vsetvli a0, zero, e8, m1, ta, ma
746 ; CHECK-NEXT: vmsle.vv v0, v8, v9
748 %vc = icmp sle <vscale x 8 x i8> %va, %vb
749 ret <vscale x 8 x i1> %vc
752 define <vscale x 8 x i1> @icmp_sle_vx_nxv8i8(<vscale x 8 x i8> %va, i8 %b) {
753 ; CHECK-LABEL: icmp_sle_vx_nxv8i8:
755 ; CHECK-NEXT: vsetvli a1, zero, e8, m1, ta, ma
756 ; CHECK-NEXT: vmsle.vx v0, v8, a0
758 %head = insertelement <vscale x 8 x i8> poison, i8 %b, i32 0
759 %splat = shufflevector <vscale x 8 x i8> %head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
760 %vc = icmp sle <vscale x 8 x i8> %va, %splat
761 ret <vscale x 8 x i1> %vc
764 define <vscale x 8 x i1> @icmp_sle_xv_nxv8i8(<vscale x 8 x i8> %va, i8 %b) {
765 ; CHECK-LABEL: icmp_sle_xv_nxv8i8:
767 ; CHECK-NEXT: vsetvli a1, zero, e8, m1, ta, ma
768 ; CHECK-NEXT: vmv.v.x v9, a0
769 ; CHECK-NEXT: vmsle.vv v0, v9, v8
771 %head = insertelement <vscale x 8 x i8> poison, i8 %b, i32 0
772 %splat = shufflevector <vscale x 8 x i8> %head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
773 %vc = icmp sle <vscale x 8 x i8> %splat, %va
774 ret <vscale x 8 x i1> %vc
777 define <vscale x 8 x i1> @icmp_sle_vi_nxv8i8_0(<vscale x 8 x i8> %va) {
778 ; CHECK-LABEL: icmp_sle_vi_nxv8i8_0:
780 ; CHECK-NEXT: vsetvli a0, zero, e8, m1, ta, ma
781 ; CHECK-NEXT: vmsle.vi v0, v8, 5
783 %head = insertelement <vscale x 8 x i8> poison, i8 5, i32 0
784 %splat = shufflevector <vscale x 8 x i8> %head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
785 %vc = icmp sle <vscale x 8 x i8> %va, %splat
786 ret <vscale x 8 x i1> %vc
789 define <vscale x 8 x i1> @icmp_eq_vv_nxv8i16(<vscale x 8 x i16> %va, <vscale x 8 x i16> %vb) {
790 ; CHECK-LABEL: icmp_eq_vv_nxv8i16:
792 ; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma
793 ; CHECK-NEXT: vmseq.vv v0, v8, v10
795 %vc = icmp eq <vscale x 8 x i16> %va, %vb
796 ret <vscale x 8 x i1> %vc
799 define <vscale x 8 x i1> @icmp_eq_vx_nxv8i16(<vscale x 8 x i16> %va, i16 %b) {
800 ; CHECK-LABEL: icmp_eq_vx_nxv8i16:
802 ; CHECK-NEXT: vsetvli a1, zero, e16, m2, ta, ma
803 ; CHECK-NEXT: vmseq.vx v0, v8, a0
805 %head = insertelement <vscale x 8 x i16> poison, i16 %b, i32 0
806 %splat = shufflevector <vscale x 8 x i16> %head, <vscale x 8 x i16> poison, <vscale x 8 x i32> zeroinitializer
807 %vc = icmp eq <vscale x 8 x i16> %va, %splat
808 ret <vscale x 8 x i1> %vc
811 define <vscale x 8 x i1> @icmp_eq_xv_nxv8i16(<vscale x 8 x i16> %va, i16 %b) {
812 ; CHECK-LABEL: icmp_eq_xv_nxv8i16:
814 ; CHECK-NEXT: vsetvli a1, zero, e16, m2, ta, ma
815 ; CHECK-NEXT: vmseq.vx v0, v8, a0
817 %head = insertelement <vscale x 8 x i16> poison, i16 %b, i32 0
818 %splat = shufflevector <vscale x 8 x i16> %head, <vscale x 8 x i16> poison, <vscale x 8 x i32> zeroinitializer
819 %vc = icmp eq <vscale x 8 x i16> %splat, %va
820 ret <vscale x 8 x i1> %vc
823 define <vscale x 8 x i1> @icmp_eq_vi_nxv8i16_0(<vscale x 8 x i16> %va) {
824 ; CHECK-LABEL: icmp_eq_vi_nxv8i16_0:
826 ; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma
827 ; CHECK-NEXT: vmseq.vi v0, v8, 0
829 %head = insertelement <vscale x 8 x i16> poison, i16 0, i32 0
830 %splat = shufflevector <vscale x 8 x i16> %head, <vscale x 8 x i16> poison, <vscale x 8 x i32> zeroinitializer
831 %vc = icmp eq <vscale x 8 x i16> %va, %splat
832 ret <vscale x 8 x i1> %vc
835 define <vscale x 8 x i1> @icmp_eq_vi_nxv8i16_1(<vscale x 8 x i16> %va) {
836 ; CHECK-LABEL: icmp_eq_vi_nxv8i16_1:
838 ; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma
839 ; CHECK-NEXT: vmseq.vi v0, v8, 5
841 %head = insertelement <vscale x 8 x i16> poison, i16 5, i32 0
842 %splat = shufflevector <vscale x 8 x i16> %head, <vscale x 8 x i16> poison, <vscale x 8 x i32> zeroinitializer
843 %vc = icmp eq <vscale x 8 x i16> %va, %splat
844 ret <vscale x 8 x i1> %vc
847 define <vscale x 8 x i1> @icmp_eq_iv_nxv8i16_1(<vscale x 8 x i16> %va) {
848 ; CHECK-LABEL: icmp_eq_iv_nxv8i16_1:
850 ; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma
851 ; CHECK-NEXT: vmseq.vi v0, v8, 5
853 %head = insertelement <vscale x 8 x i16> poison, i16 5, i32 0
854 %splat = shufflevector <vscale x 8 x i16> %head, <vscale x 8 x i16> poison, <vscale x 8 x i32> zeroinitializer
855 %vc = icmp eq <vscale x 8 x i16> %splat, %va
856 ret <vscale x 8 x i1> %vc
859 define <vscale x 8 x i1> @icmp_ne_vv_nxv8i16(<vscale x 8 x i16> %va, <vscale x 8 x i16> %vb) {
860 ; CHECK-LABEL: icmp_ne_vv_nxv8i16:
862 ; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma
863 ; CHECK-NEXT: vmsne.vv v0, v8, v10
865 %vc = icmp ne <vscale x 8 x i16> %va, %vb
866 ret <vscale x 8 x i1> %vc
869 define <vscale x 8 x i1> @icmp_ne_vx_nxv8i16(<vscale x 8 x i16> %va, i16 %b) {
870 ; CHECK-LABEL: icmp_ne_vx_nxv8i16:
872 ; CHECK-NEXT: vsetvli a1, zero, e16, m2, ta, ma
873 ; CHECK-NEXT: vmsne.vx v0, v8, a0
875 %head = insertelement <vscale x 8 x i16> poison, i16 %b, i32 0
876 %splat = shufflevector <vscale x 8 x i16> %head, <vscale x 8 x i16> poison, <vscale x 8 x i32> zeroinitializer
877 %vc = icmp ne <vscale x 8 x i16> %va, %splat
878 ret <vscale x 8 x i1> %vc
881 define <vscale x 8 x i1> @icmp_ne_xv_nxv8i16(<vscale x 8 x i16> %va, i16 %b) {
882 ; CHECK-LABEL: icmp_ne_xv_nxv8i16:
884 ; CHECK-NEXT: vsetvli a1, zero, e16, m2, ta, ma
885 ; CHECK-NEXT: vmsne.vx v0, v8, a0
887 %head = insertelement <vscale x 8 x i16> poison, i16 %b, i32 0
888 %splat = shufflevector <vscale x 8 x i16> %head, <vscale x 8 x i16> poison, <vscale x 8 x i32> zeroinitializer
889 %vc = icmp ne <vscale x 8 x i16> %splat, %va
890 ret <vscale x 8 x i1> %vc
893 define <vscale x 8 x i1> @icmp_ne_vi_nxv8i16_0(<vscale x 8 x i16> %va) {
894 ; CHECK-LABEL: icmp_ne_vi_nxv8i16_0:
896 ; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma
897 ; CHECK-NEXT: vmsne.vi v0, v8, 5
899 %head = insertelement <vscale x 8 x i16> poison, i16 5, i32 0
900 %splat = shufflevector <vscale x 8 x i16> %head, <vscale x 8 x i16> poison, <vscale x 8 x i32> zeroinitializer
901 %vc = icmp ne <vscale x 8 x i16> %va, %splat
902 ret <vscale x 8 x i1> %vc
905 define <vscale x 8 x i1> @icmp_ugt_vv_nxv8i16(<vscale x 8 x i16> %va, <vscale x 8 x i16> %vb) {
906 ; CHECK-LABEL: icmp_ugt_vv_nxv8i16:
908 ; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma
909 ; CHECK-NEXT: vmsltu.vv v0, v10, v8
911 %vc = icmp ugt <vscale x 8 x i16> %va, %vb
912 ret <vscale x 8 x i1> %vc
915 define <vscale x 8 x i1> @icmp_ugt_vx_nxv8i16(<vscale x 8 x i16> %va, i16 %b) {
916 ; CHECK-LABEL: icmp_ugt_vx_nxv8i16:
918 ; CHECK-NEXT: vsetvli a1, zero, e16, m2, ta, ma
919 ; CHECK-NEXT: vmsgtu.vx v0, v8, a0
921 %head = insertelement <vscale x 8 x i16> poison, i16 %b, i32 0
922 %splat = shufflevector <vscale x 8 x i16> %head, <vscale x 8 x i16> poison, <vscale x 8 x i32> zeroinitializer
923 %vc = icmp ugt <vscale x 8 x i16> %va, %splat
924 ret <vscale x 8 x i1> %vc
927 define <vscale x 8 x i1> @icmp_ugt_xv_nxv8i16(<vscale x 8 x i16> %va, i16 %b) {
928 ; CHECK-LABEL: icmp_ugt_xv_nxv8i16:
930 ; CHECK-NEXT: vsetvli a1, zero, e16, m2, ta, ma
931 ; CHECK-NEXT: vmsltu.vx v0, v8, a0
933 %head = insertelement <vscale x 8 x i16> poison, i16 %b, i32 0
934 %splat = shufflevector <vscale x 8 x i16> %head, <vscale x 8 x i16> poison, <vscale x 8 x i32> zeroinitializer
935 %vc = icmp ugt <vscale x 8 x i16> %splat, %va
936 ret <vscale x 8 x i1> %vc
939 define <vscale x 8 x i1> @icmp_ugt_vi_nxv8i16_0(<vscale x 8 x i16> %va) {
940 ; CHECK-LABEL: icmp_ugt_vi_nxv8i16_0:
942 ; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma
943 ; CHECK-NEXT: vmsgtu.vi v0, v8, 5
945 %head = insertelement <vscale x 8 x i16> poison, i16 5, i32 0
946 %splat = shufflevector <vscale x 8 x i16> %head, <vscale x 8 x i16> poison, <vscale x 8 x i32> zeroinitializer
947 %vc = icmp ugt <vscale x 8 x i16> %va, %splat
948 ret <vscale x 8 x i1> %vc
951 define <vscale x 8 x i1> @icmp_uge_vv_nxv8i16(<vscale x 8 x i16> %va, <vscale x 8 x i16> %vb) {
952 ; CHECK-LABEL: icmp_uge_vv_nxv8i16:
954 ; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma
955 ; CHECK-NEXT: vmsleu.vv v0, v10, v8
957 %vc = icmp uge <vscale x 8 x i16> %va, %vb
958 ret <vscale x 8 x i1> %vc
961 define <vscale x 8 x i1> @icmp_uge_vx_nxv8i16(<vscale x 8 x i16> %va, i16 %b) {
962 ; CHECK-LABEL: icmp_uge_vx_nxv8i16:
964 ; CHECK-NEXT: vsetvli a1, zero, e16, m2, ta, ma
965 ; CHECK-NEXT: vmv.v.x v10, a0
966 ; CHECK-NEXT: vmsleu.vv v0, v10, v8
968 %head = insertelement <vscale x 8 x i16> poison, i16 %b, i32 0
969 %splat = shufflevector <vscale x 8 x i16> %head, <vscale x 8 x i16> poison, <vscale x 8 x i32> zeroinitializer
970 %vc = icmp uge <vscale x 8 x i16> %va, %splat
971 ret <vscale x 8 x i1> %vc
974 define <vscale x 8 x i1> @icmp_uge_xv_nxv8i16(<vscale x 8 x i16> %va, i16 %b) {
975 ; CHECK-LABEL: icmp_uge_xv_nxv8i16:
977 ; CHECK-NEXT: vsetvli a1, zero, e16, m2, ta, ma
978 ; CHECK-NEXT: vmsleu.vx v0, v8, a0
980 %head = insertelement <vscale x 8 x i16> poison, i16 %b, i32 0
981 %splat = shufflevector <vscale x 8 x i16> %head, <vscale x 8 x i16> poison, <vscale x 8 x i32> zeroinitializer
982 %vc = icmp uge <vscale x 8 x i16> %splat, %va
983 ret <vscale x 8 x i1> %vc
986 define <vscale x 8 x i1> @icmp_uge_vi_nxv8i16_0(<vscale x 8 x i16> %va) {
987 ; CHECK-LABEL: icmp_uge_vi_nxv8i16_0:
989 ; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma
990 ; CHECK-NEXT: vmv.v.i v10, -16
991 ; CHECK-NEXT: vmsleu.vv v0, v10, v8
993 %head = insertelement <vscale x 8 x i16> poison, i16 -16, i32 0
994 %splat = shufflevector <vscale x 8 x i16> %head, <vscale x 8 x i16> poison, <vscale x 8 x i32> zeroinitializer
995 %vc = icmp uge <vscale x 8 x i16> %va, %splat
996 ret <vscale x 8 x i1> %vc
999 define <vscale x 8 x i1> @icmp_uge_vi_nxv8i16_1(<vscale x 8 x i16> %va) {
1000 ; CHECK-LABEL: icmp_uge_vi_nxv8i16_1:
1002 ; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma
1003 ; CHECK-NEXT: vmsgtu.vi v0, v8, 14
1005 %head = insertelement <vscale x 8 x i16> poison, i16 15, i32 0
1006 %splat = shufflevector <vscale x 8 x i16> %head, <vscale x 8 x i16> poison, <vscale x 8 x i32> zeroinitializer
1007 %vc = icmp uge <vscale x 8 x i16> %va, %splat
1008 ret <vscale x 8 x i1> %vc
1011 define <vscale x 8 x i1> @icmp_uge_iv_nxv8i16_1(<vscale x 8 x i16> %va) {
1012 ; CHECK-LABEL: icmp_uge_iv_nxv8i16_1:
1014 ; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma
1015 ; CHECK-NEXT: vmsleu.vi v0, v8, 15
1017 %head = insertelement <vscale x 8 x i16> poison, i16 15, i32 0
1018 %splat = shufflevector <vscale x 8 x i16> %head, <vscale x 8 x i16> poison, <vscale x 8 x i32> zeroinitializer
1019 %vc = icmp uge <vscale x 8 x i16> %splat, %va
1020 ret <vscale x 8 x i1> %vc
1023 define <vscale x 8 x i1> @icmp_uge_vi_nxv8i16_2(<vscale x 8 x i16> %va) {
1024 ; CHECK-LABEL: icmp_uge_vi_nxv8i16_2:
1026 ; CHECK-NEXT: vsetvli a0, zero, e8, m1, ta, ma
1027 ; CHECK-NEXT: vmset.m v0
1029 %head = insertelement <vscale x 8 x i16> poison, i16 0, i32 0
1030 %splat = shufflevector <vscale x 8 x i16> %head, <vscale x 8 x i16> poison, <vscale x 8 x i32> zeroinitializer
1031 %vc = icmp uge <vscale x 8 x i16> %va, %splat
1032 ret <vscale x 8 x i1> %vc
1035 define <vscale x 8 x i1> @icmp_uge_vi_nxv8i16_3(<vscale x 8 x i16> %va) {
1036 ; CHECK-LABEL: icmp_uge_vi_nxv8i16_3:
1038 ; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma
1039 ; CHECK-NEXT: vmsgtu.vi v0, v8, 0
1041 %head = insertelement <vscale x 8 x i16> poison, i16 1, i32 0
1042 %splat = shufflevector <vscale x 8 x i16> %head, <vscale x 8 x i16> poison, <vscale x 8 x i32> zeroinitializer
1043 %vc = icmp uge <vscale x 8 x i16> %va, %splat
1044 ret <vscale x 8 x i1> %vc
1047 define <vscale x 8 x i1> @icmp_uge_vi_nxv8i16_4(<vscale x 8 x i16> %va) {
1048 ; CHECK-LABEL: icmp_uge_vi_nxv8i16_4:
1050 ; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma
1051 ; CHECK-NEXT: vmsgtu.vi v0, v8, -16
1053 %head = insertelement <vscale x 8 x i16> poison, i16 -15, i32 0
1054 %splat = shufflevector <vscale x 8 x i16> %head, <vscale x 8 x i16> poison, <vscale x 8 x i32> zeroinitializer
1055 %vc = icmp uge <vscale x 8 x i16> %va, %splat
1056 ret <vscale x 8 x i1> %vc
1059 define <vscale x 8 x i1> @icmp_uge_vi_nxv8i16_5(<vscale x 8 x i16> %va) {
1060 ; CHECK-LABEL: icmp_uge_vi_nxv8i16_5:
1062 ; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma
1063 ; CHECK-NEXT: vmsgtu.vi v0, v8, 15
1065 %head = insertelement <vscale x 8 x i16> poison, i16 16, i32 0
1066 %splat = shufflevector <vscale x 8 x i16> %head, <vscale x 8 x i16> poison, <vscale x 8 x i32> zeroinitializer
1067 %vc = icmp uge <vscale x 8 x i16> %va, %splat
1068 ret <vscale x 8 x i1> %vc
1071 define <vscale x 8 x i1> @icmp_ult_vv_nxv8i16(<vscale x 8 x i16> %va, <vscale x 8 x i16> %vb) {
1072 ; CHECK-LABEL: icmp_ult_vv_nxv8i16:
1074 ; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma
1075 ; CHECK-NEXT: vmsltu.vv v0, v8, v10
1077 %vc = icmp ult <vscale x 8 x i16> %va, %vb
1078 ret <vscale x 8 x i1> %vc
1081 define <vscale x 8 x i1> @icmp_ult_vx_nxv8i16(<vscale x 8 x i16> %va, i16 %b) {
1082 ; CHECK-LABEL: icmp_ult_vx_nxv8i16:
1084 ; CHECK-NEXT: vsetvli a1, zero, e16, m2, ta, ma
1085 ; CHECK-NEXT: vmsltu.vx v0, v8, a0
1087 %head = insertelement <vscale x 8 x i16> poison, i16 %b, i32 0
1088 %splat = shufflevector <vscale x 8 x i16> %head, <vscale x 8 x i16> poison, <vscale x 8 x i32> zeroinitializer
1089 %vc = icmp ult <vscale x 8 x i16> %va, %splat
1090 ret <vscale x 8 x i1> %vc
1093 define <vscale x 8 x i1> @icmp_ult_xv_nxv8i16(<vscale x 8 x i16> %va, i16 %b) {
1094 ; CHECK-LABEL: icmp_ult_xv_nxv8i16:
1096 ; CHECK-NEXT: vsetvli a1, zero, e16, m2, ta, ma
1097 ; CHECK-NEXT: vmsgtu.vx v0, v8, a0
1099 %head = insertelement <vscale x 8 x i16> poison, i16 %b, i32 0
1100 %splat = shufflevector <vscale x 8 x i16> %head, <vscale x 8 x i16> poison, <vscale x 8 x i32> zeroinitializer
1101 %vc = icmp ult <vscale x 8 x i16> %splat, %va
1102 ret <vscale x 8 x i1> %vc
1105 define <vscale x 8 x i1> @icmp_ult_vi_nxv8i16_0(<vscale x 8 x i16> %va) {
1106 ; CHECK-LABEL: icmp_ult_vi_nxv8i16_0:
1108 ; CHECK-NEXT: li a0, -16
1109 ; CHECK-NEXT: vsetvli a1, zero, e16, m2, ta, ma
1110 ; CHECK-NEXT: vmsltu.vx v0, v8, a0
1112 %head = insertelement <vscale x 8 x i16> poison, i16 -16, i32 0
1113 %splat = shufflevector <vscale x 8 x i16> %head, <vscale x 8 x i16> poison, <vscale x 8 x i32> zeroinitializer
1114 %vc = icmp ult <vscale x 8 x i16> %va, %splat
1115 ret <vscale x 8 x i1> %vc
1118 define <vscale x 8 x i1> @icmp_ult_vi_nxv8i16_1(<vscale x 8 x i16> %va) {
1119 ; CHECK-LABEL: icmp_ult_vi_nxv8i16_1:
1121 ; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma
1122 ; CHECK-NEXT: vmsleu.vi v0, v8, -16
1124 %head = insertelement <vscale x 8 x i16> poison, i16 -15, i32 0
1125 %splat = shufflevector <vscale x 8 x i16> %head, <vscale x 8 x i16> poison, <vscale x 8 x i32> zeroinitializer
1126 %vc = icmp ult <vscale x 8 x i16> %va, %splat
1127 ret <vscale x 8 x i1> %vc
1130 define <vscale x 8 x i1> @icmp_ult_iv_nxv8i16_1(<vscale x 8 x i16> %va) {
1131 ; CHECK-LABEL: icmp_ult_iv_nxv8i16_1:
1133 ; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma
1134 ; CHECK-NEXT: vmsgtu.vi v0, v8, -15
1136 %head = insertelement <vscale x 8 x i16> poison, i16 -15, i32 0
1137 %splat = shufflevector <vscale x 8 x i16> %head, <vscale x 8 x i16> poison, <vscale x 8 x i32> zeroinitializer
1138 %vc = icmp ult <vscale x 8 x i16> %splat, %va
1139 ret <vscale x 8 x i1> %vc
1142 define <vscale x 8 x i1> @icmp_ult_vi_nxv8i16_2(<vscale x 8 x i16> %va) {
1143 ; CHECK-LABEL: icmp_ult_vi_nxv8i16_2:
1145 ; CHECK-NEXT: vsetvli a0, zero, e8, m1, ta, ma
1146 ; CHECK-NEXT: vmclr.m v0
1148 %head = insertelement <vscale x 8 x i16> poison, i16 0, i32 0
1149 %splat = shufflevector <vscale x 8 x i16> %head, <vscale x 8 x i16> poison, <vscale x 8 x i32> zeroinitializer
1150 %vc = icmp ult <vscale x 8 x i16> %va, %splat
1151 ret <vscale x 8 x i1> %vc
1154 define <vscale x 8 x i1> @icmp_ult_vi_nxv8i16_3(<vscale x 8 x i16> %va) {
1155 ; CHECK-LABEL: icmp_ult_vi_nxv8i16_3:
1157 ; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma
1158 ; CHECK-NEXT: vmseq.vi v0, v8, 0
1160 %head = insertelement <vscale x 8 x i16> poison, i16 1, i32 0
1161 %splat = shufflevector <vscale x 8 x i16> %head, <vscale x 8 x i16> poison, <vscale x 8 x i32> zeroinitializer
1162 %vc = icmp ult <vscale x 8 x i16> %va, %splat
1163 ret <vscale x 8 x i1> %vc
1166 define <vscale x 8 x i1> @icmp_ult_vi_nxv8i16_4(<vscale x 8 x i16> %va) {
1167 ; CHECK-LABEL: icmp_ult_vi_nxv8i16_4:
1169 ; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma
1170 ; CHECK-NEXT: vmsleu.vi v0, v8, 15
1172 %head = insertelement <vscale x 8 x i16> poison, i16 16, i32 0
1173 %splat = shufflevector <vscale x 8 x i16> %head, <vscale x 8 x i16> poison, <vscale x 8 x i32> zeroinitializer
1174 %vc = icmp ult <vscale x 8 x i16> %va, %splat
1175 ret <vscale x 8 x i1> %vc
1178 define <vscale x 8 x i1> @icmp_ule_vv_nxv8i16(<vscale x 8 x i16> %va, <vscale x 8 x i16> %vb) {
1179 ; CHECK-LABEL: icmp_ule_vv_nxv8i16:
1181 ; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma
1182 ; CHECK-NEXT: vmsleu.vv v0, v8, v10
1184 %vc = icmp ule <vscale x 8 x i16> %va, %vb
1185 ret <vscale x 8 x i1> %vc
1188 define <vscale x 8 x i1> @icmp_ule_vx_nxv8i16(<vscale x 8 x i16> %va, i16 %b) {
1189 ; CHECK-LABEL: icmp_ule_vx_nxv8i16:
1191 ; CHECK-NEXT: vsetvli a1, zero, e16, m2, ta, ma
1192 ; CHECK-NEXT: vmsleu.vx v0, v8, a0
1194 %head = insertelement <vscale x 8 x i16> poison, i16 %b, i32 0
1195 %splat = shufflevector <vscale x 8 x i16> %head, <vscale x 8 x i16> poison, <vscale x 8 x i32> zeroinitializer
1196 %vc = icmp ule <vscale x 8 x i16> %va, %splat
1197 ret <vscale x 8 x i1> %vc
1200 define <vscale x 8 x i1> @icmp_ule_xv_nxv8i16(<vscale x 8 x i16> %va, i16 %b) {
1201 ; CHECK-LABEL: icmp_ule_xv_nxv8i16:
1203 ; CHECK-NEXT: vsetvli a1, zero, e16, m2, ta, ma
1204 ; CHECK-NEXT: vmv.v.x v10, a0
1205 ; CHECK-NEXT: vmsleu.vv v0, v10, v8
1207 %head = insertelement <vscale x 8 x i16> poison, i16 %b, i32 0
1208 %splat = shufflevector <vscale x 8 x i16> %head, <vscale x 8 x i16> poison, <vscale x 8 x i32> zeroinitializer
1209 %vc = icmp ule <vscale x 8 x i16> %splat, %va
1210 ret <vscale x 8 x i1> %vc
1213 define <vscale x 8 x i1> @icmp_ule_vi_nxv8i16_0(<vscale x 8 x i16> %va) {
1214 ; CHECK-LABEL: icmp_ule_vi_nxv8i16_0:
1216 ; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma
1217 ; CHECK-NEXT: vmsleu.vi v0, v8, 5
1219 %head = insertelement <vscale x 8 x i16> poison, i16 5, i32 0
1220 %splat = shufflevector <vscale x 8 x i16> %head, <vscale x 8 x i16> poison, <vscale x 8 x i32> zeroinitializer
1221 %vc = icmp ule <vscale x 8 x i16> %va, %splat
1222 ret <vscale x 8 x i1> %vc
1225 define <vscale x 8 x i1> @icmp_sgt_vv_nxv8i16(<vscale x 8 x i16> %va, <vscale x 8 x i16> %vb) {
1226 ; CHECK-LABEL: icmp_sgt_vv_nxv8i16:
1228 ; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma
1229 ; CHECK-NEXT: vmslt.vv v0, v10, v8
1231 %vc = icmp sgt <vscale x 8 x i16> %va, %vb
1232 ret <vscale x 8 x i1> %vc
1235 define <vscale x 8 x i1> @icmp_sgt_vx_nxv8i16(<vscale x 8 x i16> %va, i16 %b) {
1236 ; CHECK-LABEL: icmp_sgt_vx_nxv8i16:
1238 ; CHECK-NEXT: vsetvli a1, zero, e16, m2, ta, ma
1239 ; CHECK-NEXT: vmsgt.vx v0, v8, a0
1241 %head = insertelement <vscale x 8 x i16> poison, i16 %b, i32 0
1242 %splat = shufflevector <vscale x 8 x i16> %head, <vscale x 8 x i16> poison, <vscale x 8 x i32> zeroinitializer
1243 %vc = icmp sgt <vscale x 8 x i16> %va, %splat
1244 ret <vscale x 8 x i1> %vc
1247 define <vscale x 8 x i1> @icmp_sgt_xv_nxv8i16(<vscale x 8 x i16> %va, i16 %b) {
1248 ; CHECK-LABEL: icmp_sgt_xv_nxv8i16:
1250 ; CHECK-NEXT: vsetvli a1, zero, e16, m2, ta, ma
1251 ; CHECK-NEXT: vmslt.vx v0, v8, a0
1253 %head = insertelement <vscale x 8 x i16> poison, i16 %b, i32 0
1254 %splat = shufflevector <vscale x 8 x i16> %head, <vscale x 8 x i16> poison, <vscale x 8 x i32> zeroinitializer
1255 %vc = icmp sgt <vscale x 8 x i16> %splat, %va
1256 ret <vscale x 8 x i1> %vc
1259 define <vscale x 8 x i1> @icmp_sgt_vi_nxv8i16_0(<vscale x 8 x i16> %va) {
1260 ; CHECK-LABEL: icmp_sgt_vi_nxv8i16_0:
1262 ; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma
1263 ; CHECK-NEXT: vmsgt.vi v0, v8, 5
1265 %head = insertelement <vscale x 8 x i16> poison, i16 5, i32 0
1266 %splat = shufflevector <vscale x 8 x i16> %head, <vscale x 8 x i16> poison, <vscale x 8 x i32> zeroinitializer
1267 %vc = icmp sgt <vscale x 8 x i16> %va, %splat
1268 ret <vscale x 8 x i1> %vc
1271 define <vscale x 8 x i1> @icmp_sge_vv_nxv8i16(<vscale x 8 x i16> %va, <vscale x 8 x i16> %vb) {
1272 ; CHECK-LABEL: icmp_sge_vv_nxv8i16:
1274 ; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma
1275 ; CHECK-NEXT: vmsle.vv v0, v10, v8
1277 %vc = icmp sge <vscale x 8 x i16> %va, %vb
1278 ret <vscale x 8 x i1> %vc
1281 define <vscale x 8 x i1> @icmp_sge_vx_nxv8i16(<vscale x 8 x i16> %va, i16 %b) {
1282 ; CHECK-LABEL: icmp_sge_vx_nxv8i16:
1284 ; CHECK-NEXT: vsetvli a1, zero, e16, m2, ta, ma
1285 ; CHECK-NEXT: vmv.v.x v10, a0
1286 ; CHECK-NEXT: vmsle.vv v0, v10, v8
1288 %head = insertelement <vscale x 8 x i16> poison, i16 %b, i32 0
1289 %splat = shufflevector <vscale x 8 x i16> %head, <vscale x 8 x i16> poison, <vscale x 8 x i32> zeroinitializer
1290 %vc = icmp sge <vscale x 8 x i16> %va, %splat
1291 ret <vscale x 8 x i1> %vc
1294 define <vscale x 8 x i1> @icmp_sge_xv_nxv8i16(<vscale x 8 x i16> %va, i16 %b) {
1295 ; CHECK-LABEL: icmp_sge_xv_nxv8i16:
1297 ; CHECK-NEXT: vsetvli a1, zero, e16, m2, ta, ma
1298 ; CHECK-NEXT: vmsle.vx v0, v8, a0
1300 %head = insertelement <vscale x 8 x i16> poison, i16 %b, i32 0
1301 %splat = shufflevector <vscale x 8 x i16> %head, <vscale x 8 x i16> poison, <vscale x 8 x i32> zeroinitializer
1302 %vc = icmp sge <vscale x 8 x i16> %splat, %va
1303 ret <vscale x 8 x i1> %vc
1306 define <vscale x 8 x i1> @icmp_sge_vi_nxv8i16_0(<vscale x 8 x i16> %va) {
1307 ; CHECK-LABEL: icmp_sge_vi_nxv8i16_0:
1309 ; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma
1310 ; CHECK-NEXT: vmv.v.i v10, -16
1311 ; CHECK-NEXT: vmsle.vv v0, v10, v8
1313 %head = insertelement <vscale x 8 x i16> poison, i16 -16, i32 0
1314 %splat = shufflevector <vscale x 8 x i16> %head, <vscale x 8 x i16> poison, <vscale x 8 x i32> zeroinitializer
1315 %vc = icmp sge <vscale x 8 x i16> %va, %splat
1316 ret <vscale x 8 x i1> %vc
1319 define <vscale x 8 x i1> @icmp_sge_vi_nxv8i16_1(<vscale x 8 x i16> %va) {
1320 ; CHECK-LABEL: icmp_sge_vi_nxv8i16_1:
1322 ; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma
1323 ; CHECK-NEXT: vmsgt.vi v0, v8, -16
1325 %head = insertelement <vscale x 8 x i16> poison, i16 -15, i32 0
1326 %splat = shufflevector <vscale x 8 x i16> %head, <vscale x 8 x i16> poison, <vscale x 8 x i32> zeroinitializer
1327 %vc = icmp sge <vscale x 8 x i16> %va, %splat
1328 ret <vscale x 8 x i1> %vc
1331 define <vscale x 8 x i1> @icmp_sge_iv_nxv8i16_1(<vscale x 8 x i16> %va) {
1332 ; CHECK-LABEL: icmp_sge_iv_nxv8i16_1:
1334 ; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma
1335 ; CHECK-NEXT: vmsle.vi v0, v8, -15
1337 %head = insertelement <vscale x 8 x i16> poison, i16 -15, i32 0
1338 %splat = shufflevector <vscale x 8 x i16> %head, <vscale x 8 x i16> poison, <vscale x 8 x i32> zeroinitializer
1339 %vc = icmp sge <vscale x 8 x i16> %splat, %va
1340 ret <vscale x 8 x i1> %vc
1343 define <vscale x 8 x i1> @icmp_sge_vi_nxv8i16_2(<vscale x 8 x i16> %va) {
1344 ; CHECK-LABEL: icmp_sge_vi_nxv8i16_2:
1346 ; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma
1347 ; CHECK-NEXT: vmsgt.vi v0, v8, -1
1349 %head = insertelement <vscale x 8 x i16> poison, i16 0, i32 0
1350 %splat = shufflevector <vscale x 8 x i16> %head, <vscale x 8 x i16> poison, <vscale x 8 x i32> zeroinitializer
1351 %vc = icmp sge <vscale x 8 x i16> %va, %splat
1352 ret <vscale x 8 x i1> %vc
1355 define <vscale x 8 x i1> @icmp_sge_vi_nxv8i16_3(<vscale x 8 x i16> %va) {
1356 ; CHECK-LABEL: icmp_sge_vi_nxv8i16_3:
1358 ; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma
1359 ; CHECK-NEXT: vmsgt.vi v0, v8, 15
1361 %head = insertelement <vscale x 8 x i16> poison, i16 16, i32 0
1362 %splat = shufflevector <vscale x 8 x i16> %head, <vscale x 8 x i16> poison, <vscale x 8 x i32> zeroinitializer
1363 %vc = icmp sge <vscale x 8 x i16> %va, %splat
1364 ret <vscale x 8 x i1> %vc
1367 define <vscale x 8 x i1> @icmp_slt_vv_nxv8i16(<vscale x 8 x i16> %va, <vscale x 8 x i16> %vb) {
1368 ; CHECK-LABEL: icmp_slt_vv_nxv8i16:
1370 ; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma
1371 ; CHECK-NEXT: vmslt.vv v0, v8, v10
1373 %vc = icmp slt <vscale x 8 x i16> %va, %vb
1374 ret <vscale x 8 x i1> %vc
1377 define <vscale x 8 x i1> @icmp_slt_vx_nxv8i16(<vscale x 8 x i16> %va, i16 %b) {
1378 ; CHECK-LABEL: icmp_slt_vx_nxv8i16:
1380 ; CHECK-NEXT: vsetvli a1, zero, e16, m2, ta, ma
1381 ; CHECK-NEXT: vmslt.vx v0, v8, a0
1383 %head = insertelement <vscale x 8 x i16> poison, i16 %b, i32 0
1384 %splat = shufflevector <vscale x 8 x i16> %head, <vscale x 8 x i16> poison, <vscale x 8 x i32> zeroinitializer
1385 %vc = icmp slt <vscale x 8 x i16> %va, %splat
1386 ret <vscale x 8 x i1> %vc
1389 define <vscale x 8 x i1> @icmp_slt_xv_nxv8i16(<vscale x 8 x i16> %va, i16 %b) {
1390 ; CHECK-LABEL: icmp_slt_xv_nxv8i16:
1392 ; CHECK-NEXT: vsetvli a1, zero, e16, m2, ta, ma
1393 ; CHECK-NEXT: vmsgt.vx v0, v8, a0
1395 %head = insertelement <vscale x 8 x i16> poison, i16 %b, i32 0
1396 %splat = shufflevector <vscale x 8 x i16> %head, <vscale x 8 x i16> poison, <vscale x 8 x i32> zeroinitializer
1397 %vc = icmp slt <vscale x 8 x i16> %splat, %va
1398 ret <vscale x 8 x i1> %vc
1401 define <vscale x 8 x i1> @icmp_slt_vi_nxv8i16_0(<vscale x 8 x i16> %va) {
1402 ; CHECK-LABEL: icmp_slt_vi_nxv8i16_0:
1404 ; CHECK-NEXT: li a0, -16
1405 ; CHECK-NEXT: vsetvli a1, zero, e16, m2, ta, ma
1406 ; CHECK-NEXT: vmslt.vx v0, v8, a0
1408 %head = insertelement <vscale x 8 x i16> poison, i16 -16, i32 0
1409 %splat = shufflevector <vscale x 8 x i16> %head, <vscale x 8 x i16> poison, <vscale x 8 x i32> zeroinitializer
1410 %vc = icmp slt <vscale x 8 x i16> %va, %splat
1411 ret <vscale x 8 x i1> %vc
1414 define <vscale x 8 x i1> @icmp_slt_vi_nxv8i16_1(<vscale x 8 x i16> %va) {
1415 ; CHECK-LABEL: icmp_slt_vi_nxv8i16_1:
1417 ; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma
1418 ; CHECK-NEXT: vmsle.vi v0, v8, -16
1420 %head = insertelement <vscale x 8 x i16> poison, i16 -15, i32 0
1421 %splat = shufflevector <vscale x 8 x i16> %head, <vscale x 8 x i16> poison, <vscale x 8 x i32> zeroinitializer
1422 %vc = icmp slt <vscale x 8 x i16> %va, %splat
1423 ret <vscale x 8 x i1> %vc
1426 define <vscale x 8 x i1> @icmp_slt_iv_nxv8i16_1(<vscale x 8 x i16> %va) {
1427 ; CHECK-LABEL: icmp_slt_iv_nxv8i16_1:
1429 ; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma
1430 ; CHECK-NEXT: vmsgt.vi v0, v8, -15
1432 %head = insertelement <vscale x 8 x i16> poison, i16 -15, i32 0
1433 %splat = shufflevector <vscale x 8 x i16> %head, <vscale x 8 x i16> poison, <vscale x 8 x i32> zeroinitializer
1434 %vc = icmp slt <vscale x 8 x i16> %splat, %va
1435 ret <vscale x 8 x i1> %vc
1438 define <vscale x 8 x i1> @icmp_slt_vi_nxv8i16_2(<vscale x 8 x i16> %va) {
1439 ; CHECK-LABEL: icmp_slt_vi_nxv8i16_2:
1441 ; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma
1442 ; CHECK-NEXT: vmsle.vi v0, v8, -1
1444 %head = insertelement <vscale x 8 x i16> poison, i16 0, i32 0
1445 %splat = shufflevector <vscale x 8 x i16> %head, <vscale x 8 x i16> poison, <vscale x 8 x i32> zeroinitializer
1446 %vc = icmp slt <vscale x 8 x i16> %va, %splat
1447 ret <vscale x 8 x i1> %vc
1450 define <vscale x 8 x i1> @icmp_slt_vi_nxv8i16_3(<vscale x 8 x i16> %va) {
1451 ; CHECK-LABEL: icmp_slt_vi_nxv8i16_3:
1453 ; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma
1454 ; CHECK-NEXT: vmsle.vi v0, v8, 15
1456 %head = insertelement <vscale x 8 x i16> poison, i16 16, i32 0
1457 %splat = shufflevector <vscale x 8 x i16> %head, <vscale x 8 x i16> poison, <vscale x 8 x i32> zeroinitializer
1458 %vc = icmp slt <vscale x 8 x i16> %va, %splat
1459 ret <vscale x 8 x i1> %vc
1462 define <vscale x 8 x i1> @icmp_sle_vv_nxv8i16(<vscale x 8 x i16> %va, <vscale x 8 x i16> %vb) {
1463 ; CHECK-LABEL: icmp_sle_vv_nxv8i16:
1465 ; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma
1466 ; CHECK-NEXT: vmsle.vv v0, v8, v10
1468 %vc = icmp sle <vscale x 8 x i16> %va, %vb
1469 ret <vscale x 8 x i1> %vc
1472 define <vscale x 8 x i1> @icmp_sle_vx_nxv8i16(<vscale x 8 x i16> %va, i16 %b) {
1473 ; CHECK-LABEL: icmp_sle_vx_nxv8i16:
1475 ; CHECK-NEXT: vsetvli a1, zero, e16, m2, ta, ma
1476 ; CHECK-NEXT: vmsle.vx v0, v8, a0
1478 %head = insertelement <vscale x 8 x i16> poison, i16 %b, i32 0
1479 %splat = shufflevector <vscale x 8 x i16> %head, <vscale x 8 x i16> poison, <vscale x 8 x i32> zeroinitializer
1480 %vc = icmp sle <vscale x 8 x i16> %va, %splat
1481 ret <vscale x 8 x i1> %vc
1484 define <vscale x 8 x i1> @icmp_sle_xv_nxv8i16(<vscale x 8 x i16> %va, i16 %b) {
1485 ; CHECK-LABEL: icmp_sle_xv_nxv8i16:
1487 ; CHECK-NEXT: vsetvli a1, zero, e16, m2, ta, ma
1488 ; CHECK-NEXT: vmv.v.x v10, a0
1489 ; CHECK-NEXT: vmsle.vv v0, v10, v8
1491 %head = insertelement <vscale x 8 x i16> poison, i16 %b, i32 0
1492 %splat = shufflevector <vscale x 8 x i16> %head, <vscale x 8 x i16> poison, <vscale x 8 x i32> zeroinitializer
1493 %vc = icmp sle <vscale x 8 x i16> %splat, %va
1494 ret <vscale x 8 x i1> %vc
1497 define <vscale x 8 x i1> @icmp_sle_vi_nxv8i16_0(<vscale x 8 x i16> %va) {
1498 ; CHECK-LABEL: icmp_sle_vi_nxv8i16_0:
1500 ; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma
1501 ; CHECK-NEXT: vmsle.vi v0, v8, 5
1503 %head = insertelement <vscale x 8 x i16> poison, i16 5, i32 0
1504 %splat = shufflevector <vscale x 8 x i16> %head, <vscale x 8 x i16> poison, <vscale x 8 x i32> zeroinitializer
1505 %vc = icmp sle <vscale x 8 x i16> %va, %splat
1506 ret <vscale x 8 x i1> %vc
1509 define <vscale x 8 x i1> @icmp_eq_vv_nxv8i32(<vscale x 8 x i32> %va, <vscale x 8 x i32> %vb) {
1510 ; CHECK-LABEL: icmp_eq_vv_nxv8i32:
1512 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
1513 ; CHECK-NEXT: vmseq.vv v0, v8, v12
1515 %vc = icmp eq <vscale x 8 x i32> %va, %vb
1516 ret <vscale x 8 x i1> %vc
1519 define <vscale x 8 x i1> @icmp_eq_vx_nxv8i32(<vscale x 8 x i32> %va, i32 %b) {
1520 ; CHECK-LABEL: icmp_eq_vx_nxv8i32:
1522 ; CHECK-NEXT: vsetvli a1, zero, e32, m4, ta, ma
1523 ; CHECK-NEXT: vmseq.vx v0, v8, a0
1525 %head = insertelement <vscale x 8 x i32> poison, i32 %b, i32 0
1526 %splat = shufflevector <vscale x 8 x i32> %head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
1527 %vc = icmp eq <vscale x 8 x i32> %va, %splat
1528 ret <vscale x 8 x i1> %vc
1531 define <vscale x 8 x i1> @icmp_eq_xv_nxv8i32(<vscale x 8 x i32> %va, i32 %b) {
1532 ; CHECK-LABEL: icmp_eq_xv_nxv8i32:
1534 ; CHECK-NEXT: vsetvli a1, zero, e32, m4, ta, ma
1535 ; CHECK-NEXT: vmseq.vx v0, v8, a0
1537 %head = insertelement <vscale x 8 x i32> poison, i32 %b, i32 0
1538 %splat = shufflevector <vscale x 8 x i32> %head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
1539 %vc = icmp eq <vscale x 8 x i32> %splat, %va
1540 ret <vscale x 8 x i1> %vc
1543 define <vscale x 8 x i1> @icmp_eq_vi_nxv8i32_0(<vscale x 8 x i32> %va) {
1544 ; CHECK-LABEL: icmp_eq_vi_nxv8i32_0:
1546 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
1547 ; CHECK-NEXT: vmseq.vi v0, v8, 0
1549 %head = insertelement <vscale x 8 x i32> poison, i32 0, i32 0
1550 %splat = shufflevector <vscale x 8 x i32> %head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
1551 %vc = icmp eq <vscale x 8 x i32> %va, %splat
1552 ret <vscale x 8 x i1> %vc
1555 define <vscale x 8 x i1> @icmp_eq_vi_nxv8i32_1(<vscale x 8 x i32> %va) {
1556 ; CHECK-LABEL: icmp_eq_vi_nxv8i32_1:
1558 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
1559 ; CHECK-NEXT: vmseq.vi v0, v8, 5
1561 %head = insertelement <vscale x 8 x i32> poison, i32 5, i32 0
1562 %splat = shufflevector <vscale x 8 x i32> %head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
1563 %vc = icmp eq <vscale x 8 x i32> %va, %splat
1564 ret <vscale x 8 x i1> %vc
1567 define <vscale x 8 x i1> @icmp_eq_iv_nxv8i32_1(<vscale x 8 x i32> %va) {
1568 ; CHECK-LABEL: icmp_eq_iv_nxv8i32_1:
1570 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
1571 ; CHECK-NEXT: vmseq.vi v0, v8, 5
1573 %head = insertelement <vscale x 8 x i32> poison, i32 5, i32 0
1574 %splat = shufflevector <vscale x 8 x i32> %head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
1575 %vc = icmp eq <vscale x 8 x i32> %splat, %va
1576 ret <vscale x 8 x i1> %vc
1579 define <vscale x 8 x i1> @icmp_ne_vv_nxv8i32(<vscale x 8 x i32> %va, <vscale x 8 x i32> %vb) {
1580 ; CHECK-LABEL: icmp_ne_vv_nxv8i32:
1582 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
1583 ; CHECK-NEXT: vmsne.vv v0, v8, v12
1585 %vc = icmp ne <vscale x 8 x i32> %va, %vb
1586 ret <vscale x 8 x i1> %vc
1589 define <vscale x 8 x i1> @icmp_ne_vx_nxv8i32(<vscale x 8 x i32> %va, i32 %b) {
1590 ; CHECK-LABEL: icmp_ne_vx_nxv8i32:
1592 ; CHECK-NEXT: vsetvli a1, zero, e32, m4, ta, ma
1593 ; CHECK-NEXT: vmsne.vx v0, v8, a0
1595 %head = insertelement <vscale x 8 x i32> poison, i32 %b, i32 0
1596 %splat = shufflevector <vscale x 8 x i32> %head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
1597 %vc = icmp ne <vscale x 8 x i32> %va, %splat
1598 ret <vscale x 8 x i1> %vc
1601 define <vscale x 8 x i1> @icmp_ne_xv_nxv8i32(<vscale x 8 x i32> %va, i32 %b) {
1602 ; CHECK-LABEL: icmp_ne_xv_nxv8i32:
1604 ; CHECK-NEXT: vsetvli a1, zero, e32, m4, ta, ma
1605 ; CHECK-NEXT: vmsne.vx v0, v8, a0
1607 %head = insertelement <vscale x 8 x i32> poison, i32 %b, i32 0
1608 %splat = shufflevector <vscale x 8 x i32> %head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
1609 %vc = icmp ne <vscale x 8 x i32> %splat, %va
1610 ret <vscale x 8 x i1> %vc
1613 define <vscale x 8 x i1> @icmp_ne_vi_nxv8i32_0(<vscale x 8 x i32> %va) {
1614 ; CHECK-LABEL: icmp_ne_vi_nxv8i32_0:
1616 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
1617 ; CHECK-NEXT: vmsne.vi v0, v8, 5
1619 %head = insertelement <vscale x 8 x i32> poison, i32 5, i32 0
1620 %splat = shufflevector <vscale x 8 x i32> %head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
1621 %vc = icmp ne <vscale x 8 x i32> %va, %splat
1622 ret <vscale x 8 x i1> %vc
1625 define <vscale x 8 x i1> @icmp_ugt_vv_nxv8i32(<vscale x 8 x i32> %va, <vscale x 8 x i32> %vb) {
1626 ; CHECK-LABEL: icmp_ugt_vv_nxv8i32:
1628 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
1629 ; CHECK-NEXT: vmsltu.vv v0, v12, v8
1631 %vc = icmp ugt <vscale x 8 x i32> %va, %vb
1632 ret <vscale x 8 x i1> %vc
1635 define <vscale x 8 x i1> @icmp_ugt_vx_nxv8i32(<vscale x 8 x i32> %va, i32 %b) {
1636 ; CHECK-LABEL: icmp_ugt_vx_nxv8i32:
1638 ; CHECK-NEXT: vsetvli a1, zero, e32, m4, ta, ma
1639 ; CHECK-NEXT: vmsgtu.vx v0, v8, a0
1641 %head = insertelement <vscale x 8 x i32> poison, i32 %b, i32 0
1642 %splat = shufflevector <vscale x 8 x i32> %head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
1643 %vc = icmp ugt <vscale x 8 x i32> %va, %splat
1644 ret <vscale x 8 x i1> %vc
1647 define <vscale x 8 x i1> @icmp_ugt_xv_nxv8i32(<vscale x 8 x i32> %va, i32 %b) {
1648 ; CHECK-LABEL: icmp_ugt_xv_nxv8i32:
1650 ; CHECK-NEXT: vsetvli a1, zero, e32, m4, ta, ma
1651 ; CHECK-NEXT: vmsltu.vx v0, v8, a0
1653 %head = insertelement <vscale x 8 x i32> poison, i32 %b, i32 0
1654 %splat = shufflevector <vscale x 8 x i32> %head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
1655 %vc = icmp ugt <vscale x 8 x i32> %splat, %va
1656 ret <vscale x 8 x i1> %vc
1659 define <vscale x 8 x i1> @icmp_ugt_vi_nxv8i32_0(<vscale x 8 x i32> %va) {
1660 ; CHECK-LABEL: icmp_ugt_vi_nxv8i32_0:
1662 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
1663 ; CHECK-NEXT: vmsgtu.vi v0, v8, 5
1665 %head = insertelement <vscale x 8 x i32> poison, i32 5, i32 0
1666 %splat = shufflevector <vscale x 8 x i32> %head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
1667 %vc = icmp ugt <vscale x 8 x i32> %va, %splat
1668 ret <vscale x 8 x i1> %vc
1671 define <vscale x 8 x i1> @icmp_uge_vv_nxv8i32(<vscale x 8 x i32> %va, <vscale x 8 x i32> %vb) {
1672 ; CHECK-LABEL: icmp_uge_vv_nxv8i32:
1674 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
1675 ; CHECK-NEXT: vmsleu.vv v0, v12, v8
1677 %vc = icmp uge <vscale x 8 x i32> %va, %vb
1678 ret <vscale x 8 x i1> %vc
1681 define <vscale x 8 x i1> @icmp_uge_vx_nxv8i32(<vscale x 8 x i32> %va, i32 %b) {
1682 ; CHECK-LABEL: icmp_uge_vx_nxv8i32:
1684 ; CHECK-NEXT: vsetvli a1, zero, e32, m4, ta, ma
1685 ; CHECK-NEXT: vmv.v.x v12, a0
1686 ; CHECK-NEXT: vmsleu.vv v0, v12, v8
1688 %head = insertelement <vscale x 8 x i32> poison, i32 %b, i32 0
1689 %splat = shufflevector <vscale x 8 x i32> %head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
1690 %vc = icmp uge <vscale x 8 x i32> %va, %splat
1691 ret <vscale x 8 x i1> %vc
1694 define <vscale x 8 x i1> @icmp_uge_xv_nxv8i32(<vscale x 8 x i32> %va, i32 %b) {
1695 ; CHECK-LABEL: icmp_uge_xv_nxv8i32:
1697 ; CHECK-NEXT: vsetvli a1, zero, e32, m4, ta, ma
1698 ; CHECK-NEXT: vmsleu.vx v0, v8, a0
1700 %head = insertelement <vscale x 8 x i32> poison, i32 %b, i32 0
1701 %splat = shufflevector <vscale x 8 x i32> %head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
1702 %vc = icmp uge <vscale x 8 x i32> %splat, %va
1703 ret <vscale x 8 x i1> %vc
1706 define <vscale x 8 x i1> @icmp_uge_vi_nxv8i32_0(<vscale x 8 x i32> %va) {
1707 ; CHECK-LABEL: icmp_uge_vi_nxv8i32_0:
1709 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
1710 ; CHECK-NEXT: vmv.v.i v12, -16
1711 ; CHECK-NEXT: vmsleu.vv v0, v12, v8
1713 %head = insertelement <vscale x 8 x i32> poison, i32 -16, i32 0
1714 %splat = shufflevector <vscale x 8 x i32> %head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
1715 %vc = icmp uge <vscale x 8 x i32> %va, %splat
1716 ret <vscale x 8 x i1> %vc
1719 define <vscale x 8 x i1> @icmp_uge_vi_nxv8i32_1(<vscale x 8 x i32> %va) {
1720 ; CHECK-LABEL: icmp_uge_vi_nxv8i32_1:
1722 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
1723 ; CHECK-NEXT: vmsgtu.vi v0, v8, 14
1725 %head = insertelement <vscale x 8 x i32> poison, i32 15, i32 0
1726 %splat = shufflevector <vscale x 8 x i32> %head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
1727 %vc = icmp uge <vscale x 8 x i32> %va, %splat
1728 ret <vscale x 8 x i1> %vc
1731 define <vscale x 8 x i1> @icmp_uge_iv_nxv8i32_1(<vscale x 8 x i32> %va) {
1732 ; CHECK-LABEL: icmp_uge_iv_nxv8i32_1:
1734 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
1735 ; CHECK-NEXT: vmsleu.vi v0, v8, 15
1737 %head = insertelement <vscale x 8 x i32> poison, i32 15, i32 0
1738 %splat = shufflevector <vscale x 8 x i32> %head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
1739 %vc = icmp uge <vscale x 8 x i32> %splat, %va
1740 ret <vscale x 8 x i1> %vc
1743 define <vscale x 8 x i1> @icmp_uge_vi_nxv8i32_2(<vscale x 8 x i32> %va) {
1744 ; CHECK-LABEL: icmp_uge_vi_nxv8i32_2:
1746 ; CHECK-NEXT: vsetvli a0, zero, e8, m1, ta, ma
1747 ; CHECK-NEXT: vmset.m v0
1749 %head = insertelement <vscale x 8 x i32> poison, i32 0, i32 0
1750 %splat = shufflevector <vscale x 8 x i32> %head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
1751 %vc = icmp uge <vscale x 8 x i32> %va, %splat
1752 ret <vscale x 8 x i1> %vc
1755 define <vscale x 8 x i1> @icmp_uge_vi_nxv8i32_3(<vscale x 8 x i32> %va) {
1756 ; CHECK-LABEL: icmp_uge_vi_nxv8i32_3:
1758 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
1759 ; CHECK-NEXT: vmsgtu.vi v0, v8, 0
1761 %head = insertelement <vscale x 8 x i32> poison, i32 1, i32 0
1762 %splat = shufflevector <vscale x 8 x i32> %head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
1763 %vc = icmp uge <vscale x 8 x i32> %va, %splat
1764 ret <vscale x 8 x i1> %vc
1767 define <vscale x 8 x i1> @icmp_uge_vi_nxv8i32_4(<vscale x 8 x i32> %va) {
1768 ; CHECK-LABEL: icmp_uge_vi_nxv8i32_4:
1770 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
1771 ; CHECK-NEXT: vmsgtu.vi v0, v8, -16
1773 %head = insertelement <vscale x 8 x i32> poison, i32 -15, i32 0
1774 %splat = shufflevector <vscale x 8 x i32> %head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
1775 %vc = icmp uge <vscale x 8 x i32> %va, %splat
1776 ret <vscale x 8 x i1> %vc
1779 define <vscale x 8 x i1> @icmp_uge_vi_nxv8i32_5(<vscale x 8 x i32> %va) {
1780 ; CHECK-LABEL: icmp_uge_vi_nxv8i32_5:
1782 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
1783 ; CHECK-NEXT: vmsgtu.vi v0, v8, 15
1785 %head = insertelement <vscale x 8 x i32> poison, i32 16, i32 0
1786 %splat = shufflevector <vscale x 8 x i32> %head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
1787 %vc = icmp uge <vscale x 8 x i32> %va, %splat
1788 ret <vscale x 8 x i1> %vc
1791 define <vscale x 8 x i1> @icmp_ult_vv_nxv8i32(<vscale x 8 x i32> %va, <vscale x 8 x i32> %vb) {
1792 ; CHECK-LABEL: icmp_ult_vv_nxv8i32:
1794 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
1795 ; CHECK-NEXT: vmsltu.vv v0, v8, v12
1797 %vc = icmp ult <vscale x 8 x i32> %va, %vb
1798 ret <vscale x 8 x i1> %vc
1801 define <vscale x 8 x i1> @icmp_ult_vx_nxv8i32(<vscale x 8 x i32> %va, i32 %b) {
1802 ; CHECK-LABEL: icmp_ult_vx_nxv8i32:
1804 ; CHECK-NEXT: vsetvli a1, zero, e32, m4, ta, ma
1805 ; CHECK-NEXT: vmsltu.vx v0, v8, a0
1807 %head = insertelement <vscale x 8 x i32> poison, i32 %b, i32 0
1808 %splat = shufflevector <vscale x 8 x i32> %head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
1809 %vc = icmp ult <vscale x 8 x i32> %va, %splat
1810 ret <vscale x 8 x i1> %vc
1813 define <vscale x 8 x i1> @icmp_ult_xv_nxv8i32(<vscale x 8 x i32> %va, i32 %b) {
1814 ; CHECK-LABEL: icmp_ult_xv_nxv8i32:
1816 ; CHECK-NEXT: vsetvli a1, zero, e32, m4, ta, ma
1817 ; CHECK-NEXT: vmsgtu.vx v0, v8, a0
1819 %head = insertelement <vscale x 8 x i32> poison, i32 %b, i32 0
1820 %splat = shufflevector <vscale x 8 x i32> %head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
1821 %vc = icmp ult <vscale x 8 x i32> %splat, %va
1822 ret <vscale x 8 x i1> %vc
1825 define <vscale x 8 x i1> @icmp_ult_vi_nxv8i32_0(<vscale x 8 x i32> %va) {
1826 ; CHECK-LABEL: icmp_ult_vi_nxv8i32_0:
1828 ; CHECK-NEXT: li a0, -16
1829 ; CHECK-NEXT: vsetvli a1, zero, e32, m4, ta, ma
1830 ; CHECK-NEXT: vmsltu.vx v0, v8, a0
1832 %head = insertelement <vscale x 8 x i32> poison, i32 -16, i32 0
1833 %splat = shufflevector <vscale x 8 x i32> %head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
1834 %vc = icmp ult <vscale x 8 x i32> %va, %splat
1835 ret <vscale x 8 x i1> %vc
1838 define <vscale x 8 x i1> @icmp_ult_vi_nxv8i32_1(<vscale x 8 x i32> %va) {
1839 ; CHECK-LABEL: icmp_ult_vi_nxv8i32_1:
1841 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
1842 ; CHECK-NEXT: vmsleu.vi v0, v8, -16
1844 %head = insertelement <vscale x 8 x i32> poison, i32 -15, i32 0
1845 %splat = shufflevector <vscale x 8 x i32> %head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
1846 %vc = icmp ult <vscale x 8 x i32> %va, %splat
1847 ret <vscale x 8 x i1> %vc
1850 define <vscale x 8 x i1> @icmp_ult_iv_nxv8i32_1(<vscale x 8 x i32> %va) {
1851 ; CHECK-LABEL: icmp_ult_iv_nxv8i32_1:
1853 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
1854 ; CHECK-NEXT: vmsgtu.vi v0, v8, -15
1856 %head = insertelement <vscale x 8 x i32> poison, i32 -15, i32 0
1857 %splat = shufflevector <vscale x 8 x i32> %head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
1858 %vc = icmp ult <vscale x 8 x i32> %splat, %va
1859 ret <vscale x 8 x i1> %vc
1862 define <vscale x 8 x i1> @icmp_ult_vi_nxv8i32_2(<vscale x 8 x i32> %va) {
1863 ; CHECK-LABEL: icmp_ult_vi_nxv8i32_2:
1865 ; CHECK-NEXT: vsetvli a0, zero, e8, m1, ta, ma
1866 ; CHECK-NEXT: vmclr.m v0
1868 %head = insertelement <vscale x 8 x i32> poison, i32 0, i32 0
1869 %splat = shufflevector <vscale x 8 x i32> %head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
1870 %vc = icmp ult <vscale x 8 x i32> %va, %splat
1871 ret <vscale x 8 x i1> %vc
1874 define <vscale x 8 x i1> @icmp_ult_vi_nxv8i32_3(<vscale x 8 x i32> %va) {
1875 ; CHECK-LABEL: icmp_ult_vi_nxv8i32_3:
1877 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
1878 ; CHECK-NEXT: vmseq.vi v0, v8, 0
1880 %head = insertelement <vscale x 8 x i32> poison, i32 1, i32 0
1881 %splat = shufflevector <vscale x 8 x i32> %head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
1882 %vc = icmp ult <vscale x 8 x i32> %va, %splat
1883 ret <vscale x 8 x i1> %vc
1886 define <vscale x 8 x i1> @icmp_ult_vi_nxv8i32_4(<vscale x 8 x i32> %va) {
1887 ; CHECK-LABEL: icmp_ult_vi_nxv8i32_4:
1889 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
1890 ; CHECK-NEXT: vmsleu.vi v0, v8, 15
1892 %head = insertelement <vscale x 8 x i32> poison, i32 16, i32 0
1893 %splat = shufflevector <vscale x 8 x i32> %head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
1894 %vc = icmp ult <vscale x 8 x i32> %va, %splat
1895 ret <vscale x 8 x i1> %vc
1898 define <vscale x 8 x i1> @icmp_ule_vv_nxv8i32(<vscale x 8 x i32> %va, <vscale x 8 x i32> %vb) {
1899 ; CHECK-LABEL: icmp_ule_vv_nxv8i32:
1901 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
1902 ; CHECK-NEXT: vmsleu.vv v0, v8, v12
1904 %vc = icmp ule <vscale x 8 x i32> %va, %vb
1905 ret <vscale x 8 x i1> %vc
1908 define <vscale x 8 x i1> @icmp_ule_vx_nxv8i32(<vscale x 8 x i32> %va, i32 %b) {
1909 ; CHECK-LABEL: icmp_ule_vx_nxv8i32:
1911 ; CHECK-NEXT: vsetvli a1, zero, e32, m4, ta, ma
1912 ; CHECK-NEXT: vmsleu.vx v0, v8, a0
1914 %head = insertelement <vscale x 8 x i32> poison, i32 %b, i32 0
1915 %splat = shufflevector <vscale x 8 x i32> %head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
1916 %vc = icmp ule <vscale x 8 x i32> %va, %splat
1917 ret <vscale x 8 x i1> %vc
1920 define <vscale x 8 x i1> @icmp_ule_xv_nxv8i32(<vscale x 8 x i32> %va, i32 %b) {
1921 ; CHECK-LABEL: icmp_ule_xv_nxv8i32:
1923 ; CHECK-NEXT: vsetvli a1, zero, e32, m4, ta, ma
1924 ; CHECK-NEXT: vmv.v.x v12, a0
1925 ; CHECK-NEXT: vmsleu.vv v0, v12, v8
1927 %head = insertelement <vscale x 8 x i32> poison, i32 %b, i32 0
1928 %splat = shufflevector <vscale x 8 x i32> %head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
1929 %vc = icmp ule <vscale x 8 x i32> %splat, %va
1930 ret <vscale x 8 x i1> %vc
1933 define <vscale x 8 x i1> @icmp_ule_vi_nxv8i32_0(<vscale x 8 x i32> %va) {
1934 ; CHECK-LABEL: icmp_ule_vi_nxv8i32_0:
1936 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
1937 ; CHECK-NEXT: vmsleu.vi v0, v8, 5
1939 %head = insertelement <vscale x 8 x i32> poison, i32 5, i32 0
1940 %splat = shufflevector <vscale x 8 x i32> %head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
1941 %vc = icmp ule <vscale x 8 x i32> %va, %splat
1942 ret <vscale x 8 x i1> %vc
1945 define <vscale x 8 x i1> @icmp_sgt_vv_nxv8i32(<vscale x 8 x i32> %va, <vscale x 8 x i32> %vb) {
1946 ; CHECK-LABEL: icmp_sgt_vv_nxv8i32:
1948 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
1949 ; CHECK-NEXT: vmslt.vv v0, v12, v8
1951 %vc = icmp sgt <vscale x 8 x i32> %va, %vb
1952 ret <vscale x 8 x i1> %vc
1955 define <vscale x 8 x i1> @icmp_sgt_vx_nxv8i32(<vscale x 8 x i32> %va, i32 %b) {
1956 ; CHECK-LABEL: icmp_sgt_vx_nxv8i32:
1958 ; CHECK-NEXT: vsetvli a1, zero, e32, m4, ta, ma
1959 ; CHECK-NEXT: vmsgt.vx v0, v8, a0
1961 %head = insertelement <vscale x 8 x i32> poison, i32 %b, i32 0
1962 %splat = shufflevector <vscale x 8 x i32> %head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
1963 %vc = icmp sgt <vscale x 8 x i32> %va, %splat
1964 ret <vscale x 8 x i1> %vc
1967 define <vscale x 8 x i1> @icmp_sgt_xv_nxv8i32(<vscale x 8 x i32> %va, i32 %b) {
1968 ; CHECK-LABEL: icmp_sgt_xv_nxv8i32:
1970 ; CHECK-NEXT: vsetvli a1, zero, e32, m4, ta, ma
1971 ; CHECK-NEXT: vmslt.vx v0, v8, a0
1973 %head = insertelement <vscale x 8 x i32> poison, i32 %b, i32 0
1974 %splat = shufflevector <vscale x 8 x i32> %head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
1975 %vc = icmp sgt <vscale x 8 x i32> %splat, %va
1976 ret <vscale x 8 x i1> %vc
1979 define <vscale x 8 x i1> @icmp_sgt_vi_nxv8i32_0(<vscale x 8 x i32> %va) {
1980 ; CHECK-LABEL: icmp_sgt_vi_nxv8i32_0:
1982 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
1983 ; CHECK-NEXT: vmsgt.vi v0, v8, 5
1985 %head = insertelement <vscale x 8 x i32> poison, i32 5, i32 0
1986 %splat = shufflevector <vscale x 8 x i32> %head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
1987 %vc = icmp sgt <vscale x 8 x i32> %va, %splat
1988 ret <vscale x 8 x i1> %vc
1991 define <vscale x 8 x i1> @icmp_sge_vv_nxv8i32(<vscale x 8 x i32> %va, <vscale x 8 x i32> %vb) {
1992 ; CHECK-LABEL: icmp_sge_vv_nxv8i32:
1994 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
1995 ; CHECK-NEXT: vmsle.vv v0, v12, v8
1997 %vc = icmp sge <vscale x 8 x i32> %va, %vb
1998 ret <vscale x 8 x i1> %vc
2001 define <vscale x 8 x i1> @icmp_sge_vx_nxv8i32(<vscale x 8 x i32> %va, i32 %b) {
2002 ; CHECK-LABEL: icmp_sge_vx_nxv8i32:
2004 ; CHECK-NEXT: vsetvli a1, zero, e32, m4, ta, ma
2005 ; CHECK-NEXT: vmv.v.x v12, a0
2006 ; CHECK-NEXT: vmsle.vv v0, v12, v8
2008 %head = insertelement <vscale x 8 x i32> poison, i32 %b, i32 0
2009 %splat = shufflevector <vscale x 8 x i32> %head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
2010 %vc = icmp sge <vscale x 8 x i32> %va, %splat
2011 ret <vscale x 8 x i1> %vc
2014 define <vscale x 8 x i1> @icmp_sge_xv_nxv8i32(<vscale x 8 x i32> %va, i32 %b) {
2015 ; CHECK-LABEL: icmp_sge_xv_nxv8i32:
2017 ; CHECK-NEXT: vsetvli a1, zero, e32, m4, ta, ma
2018 ; CHECK-NEXT: vmsle.vx v0, v8, a0
2020 %head = insertelement <vscale x 8 x i32> poison, i32 %b, i32 0
2021 %splat = shufflevector <vscale x 8 x i32> %head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
2022 %vc = icmp sge <vscale x 8 x i32> %splat, %va
2023 ret <vscale x 8 x i1> %vc
2026 define <vscale x 8 x i1> @icmp_sge_vi_nxv8i32_0(<vscale x 8 x i32> %va) {
2027 ; CHECK-LABEL: icmp_sge_vi_nxv8i32_0:
2029 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
2030 ; CHECK-NEXT: vmv.v.i v12, -16
2031 ; CHECK-NEXT: vmsle.vv v0, v12, v8
2033 %head = insertelement <vscale x 8 x i32> poison, i32 -16, i32 0
2034 %splat = shufflevector <vscale x 8 x i32> %head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
2035 %vc = icmp sge <vscale x 8 x i32> %va, %splat
2036 ret <vscale x 8 x i1> %vc
2039 define <vscale x 8 x i1> @icmp_sge_vi_nxv8i32_1(<vscale x 8 x i32> %va) {
2040 ; CHECK-LABEL: icmp_sge_vi_nxv8i32_1:
2042 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
2043 ; CHECK-NEXT: vmsgt.vi v0, v8, -16
2045 %head = insertelement <vscale x 8 x i32> poison, i32 -15, i32 0
2046 %splat = shufflevector <vscale x 8 x i32> %head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
2047 %vc = icmp sge <vscale x 8 x i32> %va, %splat
2048 ret <vscale x 8 x i1> %vc
2051 define <vscale x 8 x i1> @icmp_sge_iv_nxv8i32_1(<vscale x 8 x i32> %va) {
2052 ; CHECK-LABEL: icmp_sge_iv_nxv8i32_1:
2054 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
2055 ; CHECK-NEXT: vmsle.vi v0, v8, -15
2057 %head = insertelement <vscale x 8 x i32> poison, i32 -15, i32 0
2058 %splat = shufflevector <vscale x 8 x i32> %head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
2059 %vc = icmp sge <vscale x 8 x i32> %splat, %va
2060 ret <vscale x 8 x i1> %vc
2063 define <vscale x 8 x i1> @icmp_sge_vi_nxv8i32_2(<vscale x 8 x i32> %va) {
2064 ; CHECK-LABEL: icmp_sge_vi_nxv8i32_2:
2066 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
2067 ; CHECK-NEXT: vmsgt.vi v0, v8, -1
2069 %head = insertelement <vscale x 8 x i32> poison, i32 0, i32 0
2070 %splat = shufflevector <vscale x 8 x i32> %head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
2071 %vc = icmp sge <vscale x 8 x i32> %va, %splat
2072 ret <vscale x 8 x i1> %vc
2075 define <vscale x 8 x i1> @icmp_sge_vi_nxv8i32_3(<vscale x 8 x i32> %va) {
2076 ; CHECK-LABEL: icmp_sge_vi_nxv8i32_3:
2078 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
2079 ; CHECK-NEXT: vmsgt.vi v0, v8, 15
2081 %head = insertelement <vscale x 8 x i32> poison, i32 16, i32 0
2082 %splat = shufflevector <vscale x 8 x i32> %head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
2083 %vc = icmp sge <vscale x 8 x i32> %va, %splat
2084 ret <vscale x 8 x i1> %vc
2087 define <vscale x 8 x i1> @icmp_slt_vv_nxv8i32(<vscale x 8 x i32> %va, <vscale x 8 x i32> %vb) {
2088 ; CHECK-LABEL: icmp_slt_vv_nxv8i32:
2090 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
2091 ; CHECK-NEXT: vmslt.vv v0, v8, v12
2093 %vc = icmp slt <vscale x 8 x i32> %va, %vb
2094 ret <vscale x 8 x i1> %vc
2097 define <vscale x 8 x i1> @icmp_slt_vx_nxv8i32(<vscale x 8 x i32> %va, i32 %b) {
2098 ; CHECK-LABEL: icmp_slt_vx_nxv8i32:
2100 ; CHECK-NEXT: vsetvli a1, zero, e32, m4, ta, ma
2101 ; CHECK-NEXT: vmslt.vx v0, v8, a0
2103 %head = insertelement <vscale x 8 x i32> poison, i32 %b, i32 0
2104 %splat = shufflevector <vscale x 8 x i32> %head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
2105 %vc = icmp slt <vscale x 8 x i32> %va, %splat
2106 ret <vscale x 8 x i1> %vc
2109 define <vscale x 8 x i1> @icmp_slt_xv_nxv8i32(<vscale x 8 x i32> %va, i32 %b) {
2110 ; CHECK-LABEL: icmp_slt_xv_nxv8i32:
2112 ; CHECK-NEXT: vsetvli a1, zero, e32, m4, ta, ma
2113 ; CHECK-NEXT: vmsgt.vx v0, v8, a0
2115 %head = insertelement <vscale x 8 x i32> poison, i32 %b, i32 0
2116 %splat = shufflevector <vscale x 8 x i32> %head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
2117 %vc = icmp slt <vscale x 8 x i32> %splat, %va
2118 ret <vscale x 8 x i1> %vc
2121 define <vscale x 8 x i1> @icmp_slt_vi_nxv8i32_0(<vscale x 8 x i32> %va) {
2122 ; CHECK-LABEL: icmp_slt_vi_nxv8i32_0:
2124 ; CHECK-NEXT: li a0, -16
2125 ; CHECK-NEXT: vsetvli a1, zero, e32, m4, ta, ma
2126 ; CHECK-NEXT: vmslt.vx v0, v8, a0
2128 %head = insertelement <vscale x 8 x i32> poison, i32 -16, i32 0
2129 %splat = shufflevector <vscale x 8 x i32> %head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
2130 %vc = icmp slt <vscale x 8 x i32> %va, %splat
2131 ret <vscale x 8 x i1> %vc
2134 define <vscale x 8 x i1> @icmp_slt_vi_nxv8i32_1(<vscale x 8 x i32> %va) {
2135 ; CHECK-LABEL: icmp_slt_vi_nxv8i32_1:
2137 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
2138 ; CHECK-NEXT: vmsle.vi v0, v8, -16
2140 %head = insertelement <vscale x 8 x i32> poison, i32 -15, i32 0
2141 %splat = shufflevector <vscale x 8 x i32> %head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
2142 %vc = icmp slt <vscale x 8 x i32> %va, %splat
2143 ret <vscale x 8 x i1> %vc
2146 define <vscale x 8 x i1> @icmp_slt_iv_nxv8i32_1(<vscale x 8 x i32> %va) {
2147 ; CHECK-LABEL: icmp_slt_iv_nxv8i32_1:
2149 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
2150 ; CHECK-NEXT: vmsgt.vi v0, v8, -15
2152 %head = insertelement <vscale x 8 x i32> poison, i32 -15, i32 0
2153 %splat = shufflevector <vscale x 8 x i32> %head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
2154 %vc = icmp slt <vscale x 8 x i32> %splat, %va
2155 ret <vscale x 8 x i1> %vc
2158 define <vscale x 8 x i1> @icmp_slt_vi_nxv8i32_2(<vscale x 8 x i32> %va) {
2159 ; CHECK-LABEL: icmp_slt_vi_nxv8i32_2:
2161 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
2162 ; CHECK-NEXT: vmsle.vi v0, v8, -1
2164 %head = insertelement <vscale x 8 x i32> poison, i32 0, i32 0
2165 %splat = shufflevector <vscale x 8 x i32> %head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
2166 %vc = icmp slt <vscale x 8 x i32> %va, %splat
2167 ret <vscale x 8 x i1> %vc
2170 define <vscale x 8 x i1> @icmp_slt_vi_nxv8i32_3(<vscale x 8 x i32> %va) {
2171 ; CHECK-LABEL: icmp_slt_vi_nxv8i32_3:
2173 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
2174 ; CHECK-NEXT: vmsle.vi v0, v8, 15
2176 %head = insertelement <vscale x 8 x i32> poison, i32 16, i32 0
2177 %splat = shufflevector <vscale x 8 x i32> %head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
2178 %vc = icmp slt <vscale x 8 x i32> %va, %splat
2179 ret <vscale x 8 x i1> %vc
2182 define <vscale x 8 x i1> @icmp_sle_vv_nxv8i32(<vscale x 8 x i32> %va, <vscale x 8 x i32> %vb) {
2183 ; CHECK-LABEL: icmp_sle_vv_nxv8i32:
2185 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
2186 ; CHECK-NEXT: vmsle.vv v0, v8, v12
2188 %vc = icmp sle <vscale x 8 x i32> %va, %vb
2189 ret <vscale x 8 x i1> %vc
2192 define <vscale x 8 x i1> @icmp_sle_vx_nxv8i32(<vscale x 8 x i32> %va, i32 %b) {
2193 ; CHECK-LABEL: icmp_sle_vx_nxv8i32:
2195 ; CHECK-NEXT: vsetvli a1, zero, e32, m4, ta, ma
2196 ; CHECK-NEXT: vmsle.vx v0, v8, a0
2198 %head = insertelement <vscale x 8 x i32> poison, i32 %b, i32 0
2199 %splat = shufflevector <vscale x 8 x i32> %head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
2200 %vc = icmp sle <vscale x 8 x i32> %va, %splat
2201 ret <vscale x 8 x i1> %vc
2204 define <vscale x 8 x i1> @icmp_sle_xv_nxv8i32(<vscale x 8 x i32> %va, i32 %b) {
2205 ; CHECK-LABEL: icmp_sle_xv_nxv8i32:
2207 ; CHECK-NEXT: vsetvli a1, zero, e32, m4, ta, ma
2208 ; CHECK-NEXT: vmv.v.x v12, a0
2209 ; CHECK-NEXT: vmsle.vv v0, v12, v8
2211 %head = insertelement <vscale x 8 x i32> poison, i32 %b, i32 0
2212 %splat = shufflevector <vscale x 8 x i32> %head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
2213 %vc = icmp sle <vscale x 8 x i32> %splat, %va
2214 ret <vscale x 8 x i1> %vc
2217 define <vscale x 8 x i1> @icmp_sle_vi_nxv8i32_0(<vscale x 8 x i32> %va) {
2218 ; CHECK-LABEL: icmp_sle_vi_nxv8i32_0:
2220 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
2221 ; CHECK-NEXT: vmsle.vi v0, v8, 5
2223 %head = insertelement <vscale x 8 x i32> poison, i32 5, i32 0
2224 %splat = shufflevector <vscale x 8 x i32> %head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
2225 %vc = icmp sle <vscale x 8 x i32> %va, %splat
2226 ret <vscale x 8 x i1> %vc
2229 define <vscale x 8 x i1> @icmp_eq_vv_nxv8i64(<vscale x 8 x i64> %va, <vscale x 8 x i64> %vb) {
2230 ; CHECK-LABEL: icmp_eq_vv_nxv8i64:
2232 ; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma
2233 ; CHECK-NEXT: vmseq.vv v0, v8, v16
2235 %vc = icmp eq <vscale x 8 x i64> %va, %vb
2236 ret <vscale x 8 x i1> %vc
2239 define <vscale x 8 x i1> @icmp_eq_vx_nxv8i64(<vscale x 8 x i64> %va, i64 %b) {
2240 ; RV32-LABEL: icmp_eq_vx_nxv8i64:
2242 ; RV32-NEXT: addi sp, sp, -16
2243 ; RV32-NEXT: .cfi_def_cfa_offset 16
2244 ; RV32-NEXT: sw a1, 12(sp)
2245 ; RV32-NEXT: sw a0, 8(sp)
2246 ; RV32-NEXT: addi a0, sp, 8
2247 ; RV32-NEXT: vsetvli a1, zero, e64, m8, ta, ma
2248 ; RV32-NEXT: vlse64.v v16, (a0), zero
2249 ; RV32-NEXT: vmseq.vv v0, v8, v16
2250 ; RV32-NEXT: addi sp, sp, 16
2253 ; RV64-LABEL: icmp_eq_vx_nxv8i64:
2255 ; RV64-NEXT: vsetvli a1, zero, e64, m8, ta, ma
2256 ; RV64-NEXT: vmseq.vx v0, v8, a0
2258 %head = insertelement <vscale x 8 x i64> poison, i64 %b, i32 0
2259 %splat = shufflevector <vscale x 8 x i64> %head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
2260 %vc = icmp eq <vscale x 8 x i64> %va, %splat
2261 ret <vscale x 8 x i1> %vc
2264 define <vscale x 8 x i1> @icmp_eq_xv_nxv8i64(<vscale x 8 x i64> %va, i64 %b) {
2265 ; RV32-LABEL: icmp_eq_xv_nxv8i64:
2267 ; RV32-NEXT: addi sp, sp, -16
2268 ; RV32-NEXT: .cfi_def_cfa_offset 16
2269 ; RV32-NEXT: sw a1, 12(sp)
2270 ; RV32-NEXT: sw a0, 8(sp)
2271 ; RV32-NEXT: addi a0, sp, 8
2272 ; RV32-NEXT: vsetvli a1, zero, e64, m8, ta, ma
2273 ; RV32-NEXT: vlse64.v v16, (a0), zero
2274 ; RV32-NEXT: vmseq.vv v0, v16, v8
2275 ; RV32-NEXT: addi sp, sp, 16
2278 ; RV64-LABEL: icmp_eq_xv_nxv8i64:
2280 ; RV64-NEXT: vsetvli a1, zero, e64, m8, ta, ma
2281 ; RV64-NEXT: vmseq.vx v0, v8, a0
2283 %head = insertelement <vscale x 8 x i64> poison, i64 %b, i32 0
2284 %splat = shufflevector <vscale x 8 x i64> %head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
2285 %vc = icmp eq <vscale x 8 x i64> %splat, %va
2286 ret <vscale x 8 x i1> %vc
2289 define <vscale x 8 x i1> @icmp_eq_vi_nxv8i64_0(<vscale x 8 x i64> %va) {
2290 ; CHECK-LABEL: icmp_eq_vi_nxv8i64_0:
2292 ; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma
2293 ; CHECK-NEXT: vmseq.vi v0, v8, 0
2295 %head = insertelement <vscale x 8 x i64> poison, i64 0, i32 0
2296 %splat = shufflevector <vscale x 8 x i64> %head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
2297 %vc = icmp eq <vscale x 8 x i64> %va, %splat
2298 ret <vscale x 8 x i1> %vc
2301 define <vscale x 8 x i1> @icmp_eq_vi_nxv8i64_1(<vscale x 8 x i64> %va) {
2302 ; CHECK-LABEL: icmp_eq_vi_nxv8i64_1:
2304 ; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma
2305 ; CHECK-NEXT: vmseq.vi v0, v8, 5
2307 %head = insertelement <vscale x 8 x i64> poison, i64 5, i32 0
2308 %splat = shufflevector <vscale x 8 x i64> %head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
2309 %vc = icmp eq <vscale x 8 x i64> %va, %splat
2310 ret <vscale x 8 x i1> %vc
2313 define <vscale x 8 x i1> @icmp_eq_iv_nxv8i64_1(<vscale x 8 x i64> %va) {
2314 ; CHECK-LABEL: icmp_eq_iv_nxv8i64_1:
2316 ; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma
2317 ; CHECK-NEXT: vmseq.vi v0, v8, 5
2319 %head = insertelement <vscale x 8 x i64> poison, i64 5, i32 0
2320 %splat = shufflevector <vscale x 8 x i64> %head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
2321 %vc = icmp eq <vscale x 8 x i64> %splat, %va
2322 ret <vscale x 8 x i1> %vc
2325 define <vscale x 8 x i1> @icmp_ne_vv_nxv8i64(<vscale x 8 x i64> %va, <vscale x 8 x i64> %vb) {
2326 ; CHECK-LABEL: icmp_ne_vv_nxv8i64:
2328 ; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma
2329 ; CHECK-NEXT: vmsne.vv v0, v8, v16
2331 %vc = icmp ne <vscale x 8 x i64> %va, %vb
2332 ret <vscale x 8 x i1> %vc
2335 define <vscale x 8 x i1> @icmp_ne_vx_nxv8i64(<vscale x 8 x i64> %va, i64 %b) {
2336 ; RV32-LABEL: icmp_ne_vx_nxv8i64:
2338 ; RV32-NEXT: addi sp, sp, -16
2339 ; RV32-NEXT: .cfi_def_cfa_offset 16
2340 ; RV32-NEXT: sw a1, 12(sp)
2341 ; RV32-NEXT: sw a0, 8(sp)
2342 ; RV32-NEXT: addi a0, sp, 8
2343 ; RV32-NEXT: vsetvli a1, zero, e64, m8, ta, ma
2344 ; RV32-NEXT: vlse64.v v16, (a0), zero
2345 ; RV32-NEXT: vmsne.vv v0, v8, v16
2346 ; RV32-NEXT: addi sp, sp, 16
2349 ; RV64-LABEL: icmp_ne_vx_nxv8i64:
2351 ; RV64-NEXT: vsetvli a1, zero, e64, m8, ta, ma
2352 ; RV64-NEXT: vmsne.vx v0, v8, a0
2354 %head = insertelement <vscale x 8 x i64> poison, i64 %b, i32 0
2355 %splat = shufflevector <vscale x 8 x i64> %head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
2356 %vc = icmp ne <vscale x 8 x i64> %va, %splat
2357 ret <vscale x 8 x i1> %vc
2360 define <vscale x 8 x i1> @icmp_ne_xv_nxv8i64(<vscale x 8 x i64> %va, i64 %b) {
2361 ; RV32-LABEL: icmp_ne_xv_nxv8i64:
2363 ; RV32-NEXT: addi sp, sp, -16
2364 ; RV32-NEXT: .cfi_def_cfa_offset 16
2365 ; RV32-NEXT: sw a1, 12(sp)
2366 ; RV32-NEXT: sw a0, 8(sp)
2367 ; RV32-NEXT: addi a0, sp, 8
2368 ; RV32-NEXT: vsetvli a1, zero, e64, m8, ta, ma
2369 ; RV32-NEXT: vlse64.v v16, (a0), zero
2370 ; RV32-NEXT: vmsne.vv v0, v16, v8
2371 ; RV32-NEXT: addi sp, sp, 16
2374 ; RV64-LABEL: icmp_ne_xv_nxv8i64:
2376 ; RV64-NEXT: vsetvli a1, zero, e64, m8, ta, ma
2377 ; RV64-NEXT: vmsne.vx v0, v8, a0
2379 %head = insertelement <vscale x 8 x i64> poison, i64 %b, i32 0
2380 %splat = shufflevector <vscale x 8 x i64> %head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
2381 %vc = icmp ne <vscale x 8 x i64> %splat, %va
2382 ret <vscale x 8 x i1> %vc
2385 define <vscale x 8 x i1> @icmp_ne_vi_nxv8i64_0(<vscale x 8 x i64> %va) {
2386 ; CHECK-LABEL: icmp_ne_vi_nxv8i64_0:
2388 ; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma
2389 ; CHECK-NEXT: vmsne.vi v0, v8, 5
2391 %head = insertelement <vscale x 8 x i64> poison, i64 5, i32 0
2392 %splat = shufflevector <vscale x 8 x i64> %head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
2393 %vc = icmp ne <vscale x 8 x i64> %va, %splat
2394 ret <vscale x 8 x i1> %vc
2397 define <vscale x 8 x i1> @icmp_ugt_vv_nxv8i64(<vscale x 8 x i64> %va, <vscale x 8 x i64> %vb) {
2398 ; CHECK-LABEL: icmp_ugt_vv_nxv8i64:
2400 ; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma
2401 ; CHECK-NEXT: vmsltu.vv v0, v16, v8
2403 %vc = icmp ugt <vscale x 8 x i64> %va, %vb
2404 ret <vscale x 8 x i1> %vc
2407 define <vscale x 8 x i1> @icmp_ugt_vx_nxv8i64(<vscale x 8 x i64> %va, i64 %b) {
2408 ; RV32-LABEL: icmp_ugt_vx_nxv8i64:
2410 ; RV32-NEXT: addi sp, sp, -16
2411 ; RV32-NEXT: .cfi_def_cfa_offset 16
2412 ; RV32-NEXT: sw a1, 12(sp)
2413 ; RV32-NEXT: sw a0, 8(sp)
2414 ; RV32-NEXT: addi a0, sp, 8
2415 ; RV32-NEXT: vsetvli a1, zero, e64, m8, ta, ma
2416 ; RV32-NEXT: vlse64.v v16, (a0), zero
2417 ; RV32-NEXT: vmsltu.vv v0, v16, v8
2418 ; RV32-NEXT: addi sp, sp, 16
2421 ; RV64-LABEL: icmp_ugt_vx_nxv8i64:
2423 ; RV64-NEXT: vsetvli a1, zero, e64, m8, ta, ma
2424 ; RV64-NEXT: vmsgtu.vx v0, v8, a0
2426 %head = insertelement <vscale x 8 x i64> poison, i64 %b, i32 0
2427 %splat = shufflevector <vscale x 8 x i64> %head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
2428 %vc = icmp ugt <vscale x 8 x i64> %va, %splat
2429 ret <vscale x 8 x i1> %vc
2432 define <vscale x 8 x i1> @icmp_ugt_xv_nxv8i64(<vscale x 8 x i64> %va, i64 %b) {
2433 ; RV32-LABEL: icmp_ugt_xv_nxv8i64:
2435 ; RV32-NEXT: addi sp, sp, -16
2436 ; RV32-NEXT: .cfi_def_cfa_offset 16
2437 ; RV32-NEXT: sw a1, 12(sp)
2438 ; RV32-NEXT: sw a0, 8(sp)
2439 ; RV32-NEXT: addi a0, sp, 8
2440 ; RV32-NEXT: vsetvli a1, zero, e64, m8, ta, ma
2441 ; RV32-NEXT: vlse64.v v16, (a0), zero
2442 ; RV32-NEXT: vmsltu.vv v0, v8, v16
2443 ; RV32-NEXT: addi sp, sp, 16
2446 ; RV64-LABEL: icmp_ugt_xv_nxv8i64:
2448 ; RV64-NEXT: vsetvli a1, zero, e64, m8, ta, ma
2449 ; RV64-NEXT: vmsltu.vx v0, v8, a0
2451 %head = insertelement <vscale x 8 x i64> poison, i64 %b, i32 0
2452 %splat = shufflevector <vscale x 8 x i64> %head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
2453 %vc = icmp ugt <vscale x 8 x i64> %splat, %va
2454 ret <vscale x 8 x i1> %vc
2457 define <vscale x 8 x i1> @icmp_ugt_vi_nxv8i64_0(<vscale x 8 x i64> %va) {
2458 ; CHECK-LABEL: icmp_ugt_vi_nxv8i64_0:
2460 ; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma
2461 ; CHECK-NEXT: vmsgtu.vi v0, v8, 5
2463 %head = insertelement <vscale x 8 x i64> poison, i64 5, i32 0
2464 %splat = shufflevector <vscale x 8 x i64> %head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
2465 %vc = icmp ugt <vscale x 8 x i64> %va, %splat
2466 ret <vscale x 8 x i1> %vc
2469 define <vscale x 8 x i1> @icmp_uge_vv_nxv8i64(<vscale x 8 x i64> %va, <vscale x 8 x i64> %vb) {
2470 ; CHECK-LABEL: icmp_uge_vv_nxv8i64:
2472 ; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma
2473 ; CHECK-NEXT: vmsleu.vv v0, v16, v8
2475 %vc = icmp uge <vscale x 8 x i64> %va, %vb
2476 ret <vscale x 8 x i1> %vc
2479 define <vscale x 8 x i1> @icmp_uge_vx_nxv8i64(<vscale x 8 x i64> %va, i64 %b) {
2480 ; RV32-LABEL: icmp_uge_vx_nxv8i64:
2482 ; RV32-NEXT: addi sp, sp, -16
2483 ; RV32-NEXT: .cfi_def_cfa_offset 16
2484 ; RV32-NEXT: sw a1, 12(sp)
2485 ; RV32-NEXT: sw a0, 8(sp)
2486 ; RV32-NEXT: addi a0, sp, 8
2487 ; RV32-NEXT: vsetvli a1, zero, e64, m8, ta, ma
2488 ; RV32-NEXT: vlse64.v v16, (a0), zero
2489 ; RV32-NEXT: vmsleu.vv v0, v16, v8
2490 ; RV32-NEXT: addi sp, sp, 16
2493 ; RV64-LABEL: icmp_uge_vx_nxv8i64:
2495 ; RV64-NEXT: vsetvli a1, zero, e64, m8, ta, ma
2496 ; RV64-NEXT: vmv.v.x v16, a0
2497 ; RV64-NEXT: vmsleu.vv v0, v16, v8
2499 %head = insertelement <vscale x 8 x i64> poison, i64 %b, i32 0
2500 %splat = shufflevector <vscale x 8 x i64> %head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
2501 %vc = icmp uge <vscale x 8 x i64> %va, %splat
2502 ret <vscale x 8 x i1> %vc
2505 define <vscale x 8 x i1> @icmp_uge_xv_nxv8i64(<vscale x 8 x i64> %va, i64 %b) {
2506 ; RV32-LABEL: icmp_uge_xv_nxv8i64:
2508 ; RV32-NEXT: addi sp, sp, -16
2509 ; RV32-NEXT: .cfi_def_cfa_offset 16
2510 ; RV32-NEXT: sw a1, 12(sp)
2511 ; RV32-NEXT: sw a0, 8(sp)
2512 ; RV32-NEXT: addi a0, sp, 8
2513 ; RV32-NEXT: vsetvli a1, zero, e64, m8, ta, ma
2514 ; RV32-NEXT: vlse64.v v16, (a0), zero
2515 ; RV32-NEXT: vmsleu.vv v0, v8, v16
2516 ; RV32-NEXT: addi sp, sp, 16
2519 ; RV64-LABEL: icmp_uge_xv_nxv8i64:
2521 ; RV64-NEXT: vsetvli a1, zero, e64, m8, ta, ma
2522 ; RV64-NEXT: vmsleu.vx v0, v8, a0
2524 %head = insertelement <vscale x 8 x i64> poison, i64 %b, i32 0
2525 %splat = shufflevector <vscale x 8 x i64> %head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
2526 %vc = icmp uge <vscale x 8 x i64> %splat, %va
2527 ret <vscale x 8 x i1> %vc
2530 define <vscale x 8 x i1> @icmp_uge_vi_nxv8i64_0(<vscale x 8 x i64> %va) {
2531 ; CHECK-LABEL: icmp_uge_vi_nxv8i64_0:
2533 ; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma
2534 ; CHECK-NEXT: vmv.v.i v16, -16
2535 ; CHECK-NEXT: vmsleu.vv v0, v16, v8
2537 %head = insertelement <vscale x 8 x i64> poison, i64 -16, i32 0
2538 %splat = shufflevector <vscale x 8 x i64> %head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
2539 %vc = icmp uge <vscale x 8 x i64> %va, %splat
2540 ret <vscale x 8 x i1> %vc
2543 define <vscale x 8 x i1> @icmp_uge_vi_nxv8i64_1(<vscale x 8 x i64> %va) {
2544 ; CHECK-LABEL: icmp_uge_vi_nxv8i64_1:
2546 ; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma
2547 ; CHECK-NEXT: vmsgtu.vi v0, v8, 14
2549 %head = insertelement <vscale x 8 x i64> poison, i64 15, i32 0
2550 %splat = shufflevector <vscale x 8 x i64> %head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
2551 %vc = icmp uge <vscale x 8 x i64> %va, %splat
2552 ret <vscale x 8 x i1> %vc
2555 define <vscale x 8 x i1> @icmp_uge_iv_nxv8i64_1(<vscale x 8 x i64> %va) {
2556 ; CHECK-LABEL: icmp_uge_iv_nxv8i64_1:
2558 ; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma
2559 ; CHECK-NEXT: vmsleu.vi v0, v8, 15
2561 %head = insertelement <vscale x 8 x i64> poison, i64 15, i32 0
2562 %splat = shufflevector <vscale x 8 x i64> %head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
2563 %vc = icmp uge <vscale x 8 x i64> %splat, %va
2564 ret <vscale x 8 x i1> %vc
2567 define <vscale x 8 x i1> @icmp_uge_vi_nxv8i64_2(<vscale x 8 x i64> %va) {
2568 ; CHECK-LABEL: icmp_uge_vi_nxv8i64_2:
2570 ; CHECK-NEXT: vsetvli a0, zero, e8, m1, ta, ma
2571 ; CHECK-NEXT: vmset.m v0
2573 %head = insertelement <vscale x 8 x i64> poison, i64 0, i32 0
2574 %splat = shufflevector <vscale x 8 x i64> %head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
2575 %vc = icmp uge <vscale x 8 x i64> %va, %splat
2576 ret <vscale x 8 x i1> %vc
2579 define <vscale x 8 x i1> @icmp_uge_vi_nxv8i64_3(<vscale x 8 x i64> %va) {
2580 ; CHECK-LABEL: icmp_uge_vi_nxv8i64_3:
2582 ; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma
2583 ; CHECK-NEXT: vmsgtu.vi v0, v8, 0
2585 %head = insertelement <vscale x 8 x i64> poison, i64 1, i32 0
2586 %splat = shufflevector <vscale x 8 x i64> %head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
2587 %vc = icmp uge <vscale x 8 x i64> %va, %splat
2588 ret <vscale x 8 x i1> %vc
2591 define <vscale x 8 x i1> @icmp_uge_vi_nxv8i64_4(<vscale x 8 x i64> %va) {
2592 ; CHECK-LABEL: icmp_uge_vi_nxv8i64_4:
2594 ; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma
2595 ; CHECK-NEXT: vmsgtu.vi v0, v8, -16
2597 %head = insertelement <vscale x 8 x i64> poison, i64 -15, i32 0
2598 %splat = shufflevector <vscale x 8 x i64> %head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
2599 %vc = icmp uge <vscale x 8 x i64> %va, %splat
2600 ret <vscale x 8 x i1> %vc
2603 define <vscale x 8 x i1> @icmp_uge_vi_nxv8i64_5(<vscale x 8 x i64> %va) {
2604 ; CHECK-LABEL: icmp_uge_vi_nxv8i64_5:
2606 ; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma
2607 ; CHECK-NEXT: vmsgtu.vi v0, v8, 15
2609 %head = insertelement <vscale x 8 x i64> poison, i64 16, i32 0
2610 %splat = shufflevector <vscale x 8 x i64> %head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
2611 %vc = icmp uge <vscale x 8 x i64> %va, %splat
2612 ret <vscale x 8 x i1> %vc
2615 define <vscale x 8 x i1> @icmp_ult_vv_nxv8i64(<vscale x 8 x i64> %va, <vscale x 8 x i64> %vb) {
2616 ; CHECK-LABEL: icmp_ult_vv_nxv8i64:
2618 ; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma
2619 ; CHECK-NEXT: vmsltu.vv v0, v8, v16
2621 %vc = icmp ult <vscale x 8 x i64> %va, %vb
2622 ret <vscale x 8 x i1> %vc
2625 define <vscale x 8 x i1> @icmp_ult_vx_nxv8i64(<vscale x 8 x i64> %va, i64 %b) {
2626 ; RV32-LABEL: icmp_ult_vx_nxv8i64:
2628 ; RV32-NEXT: addi sp, sp, -16
2629 ; RV32-NEXT: .cfi_def_cfa_offset 16
2630 ; RV32-NEXT: sw a1, 12(sp)
2631 ; RV32-NEXT: sw a0, 8(sp)
2632 ; RV32-NEXT: addi a0, sp, 8
2633 ; RV32-NEXT: vsetvli a1, zero, e64, m8, ta, ma
2634 ; RV32-NEXT: vlse64.v v16, (a0), zero
2635 ; RV32-NEXT: vmsltu.vv v0, v8, v16
2636 ; RV32-NEXT: addi sp, sp, 16
2639 ; RV64-LABEL: icmp_ult_vx_nxv8i64:
2641 ; RV64-NEXT: vsetvli a1, zero, e64, m8, ta, ma
2642 ; RV64-NEXT: vmsltu.vx v0, v8, a0
2644 %head = insertelement <vscale x 8 x i64> poison, i64 %b, i32 0
2645 %splat = shufflevector <vscale x 8 x i64> %head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
2646 %vc = icmp ult <vscale x 8 x i64> %va, %splat
2647 ret <vscale x 8 x i1> %vc
2650 define <vscale x 8 x i1> @icmp_ult_xv_nxv8i64(<vscale x 8 x i64> %va, i64 %b) {
2651 ; RV32-LABEL: icmp_ult_xv_nxv8i64:
2653 ; RV32-NEXT: addi sp, sp, -16
2654 ; RV32-NEXT: .cfi_def_cfa_offset 16
2655 ; RV32-NEXT: sw a1, 12(sp)
2656 ; RV32-NEXT: sw a0, 8(sp)
2657 ; RV32-NEXT: addi a0, sp, 8
2658 ; RV32-NEXT: vsetvli a1, zero, e64, m8, ta, ma
2659 ; RV32-NEXT: vlse64.v v16, (a0), zero
2660 ; RV32-NEXT: vmsltu.vv v0, v16, v8
2661 ; RV32-NEXT: addi sp, sp, 16
2664 ; RV64-LABEL: icmp_ult_xv_nxv8i64:
2666 ; RV64-NEXT: vsetvli a1, zero, e64, m8, ta, ma
2667 ; RV64-NEXT: vmsgtu.vx v0, v8, a0
2669 %head = insertelement <vscale x 8 x i64> poison, i64 %b, i32 0
2670 %splat = shufflevector <vscale x 8 x i64> %head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
2671 %vc = icmp ult <vscale x 8 x i64> %splat, %va
2672 ret <vscale x 8 x i1> %vc
2675 define <vscale x 8 x i1> @icmp_ult_vi_nxv8i64_0(<vscale x 8 x i64> %va) {
2676 ; CHECK-LABEL: icmp_ult_vi_nxv8i64_0:
2678 ; CHECK-NEXT: li a0, -16
2679 ; CHECK-NEXT: vsetvli a1, zero, e64, m8, ta, ma
2680 ; CHECK-NEXT: vmsltu.vx v0, v8, a0
2682 %head = insertelement <vscale x 8 x i64> poison, i64 -16, i32 0
2683 %splat = shufflevector <vscale x 8 x i64> %head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
2684 %vc = icmp ult <vscale x 8 x i64> %va, %splat
2685 ret <vscale x 8 x i1> %vc
2688 define <vscale x 8 x i1> @icmp_ult_vi_nxv8i64_1(<vscale x 8 x i64> %va) {
2689 ; CHECK-LABEL: icmp_ult_vi_nxv8i64_1:
2691 ; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma
2692 ; CHECK-NEXT: vmsleu.vi v0, v8, -16
2694 %head = insertelement <vscale x 8 x i64> poison, i64 -15, i32 0
2695 %splat = shufflevector <vscale x 8 x i64> %head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
2696 %vc = icmp ult <vscale x 8 x i64> %va, %splat
2697 ret <vscale x 8 x i1> %vc
2700 define <vscale x 8 x i1> @icmp_ult_iv_nxv8i64_1(<vscale x 8 x i64> %va) {
2701 ; CHECK-LABEL: icmp_ult_iv_nxv8i64_1:
2703 ; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma
2704 ; CHECK-NEXT: vmsgtu.vi v0, v8, -15
2706 %head = insertelement <vscale x 8 x i64> poison, i64 -15, i32 0
2707 %splat = shufflevector <vscale x 8 x i64> %head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
2708 %vc = icmp ult <vscale x 8 x i64> %splat, %va
2709 ret <vscale x 8 x i1> %vc
2712 define <vscale x 8 x i1> @icmp_ult_vi_nxv8i64_2(<vscale x 8 x i64> %va) {
2713 ; CHECK-LABEL: icmp_ult_vi_nxv8i64_2:
2715 ; CHECK-NEXT: vsetvli a0, zero, e8, m1, ta, ma
2716 ; CHECK-NEXT: vmclr.m v0
2718 %head = insertelement <vscale x 8 x i64> poison, i64 0, i32 0
2719 %splat = shufflevector <vscale x 8 x i64> %head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
2720 %vc = icmp ult <vscale x 8 x i64> %va, %splat
2721 ret <vscale x 8 x i1> %vc
2724 define <vscale x 8 x i1> @icmp_ult_vi_nxv8i64_3(<vscale x 8 x i64> %va) {
2725 ; CHECK-LABEL: icmp_ult_vi_nxv8i64_3:
2727 ; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma
2728 ; CHECK-NEXT: vmseq.vi v0, v8, 0
2730 %head = insertelement <vscale x 8 x i64> poison, i64 1, i32 0
2731 %splat = shufflevector <vscale x 8 x i64> %head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
2732 %vc = icmp ult <vscale x 8 x i64> %va, %splat
2733 ret <vscale x 8 x i1> %vc
2736 define <vscale x 8 x i1> @icmp_ult_vi_nxv8i64_4(<vscale x 8 x i64> %va) {
2737 ; CHECK-LABEL: icmp_ult_vi_nxv8i64_4:
2739 ; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma
2740 ; CHECK-NEXT: vmsleu.vi v0, v8, 15
2742 %head = insertelement <vscale x 8 x i64> poison, i64 16, i32 0
2743 %splat = shufflevector <vscale x 8 x i64> %head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
2744 %vc = icmp ult <vscale x 8 x i64> %va, %splat
2745 ret <vscale x 8 x i1> %vc
2748 define <vscale x 8 x i1> @icmp_ule_vv_nxv8i64(<vscale x 8 x i64> %va, <vscale x 8 x i64> %vb) {
2749 ; CHECK-LABEL: icmp_ule_vv_nxv8i64:
2751 ; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma
2752 ; CHECK-NEXT: vmsleu.vv v0, v8, v16
2754 %vc = icmp ule <vscale x 8 x i64> %va, %vb
2755 ret <vscale x 8 x i1> %vc
2758 define <vscale x 8 x i1> @icmp_ule_vx_nxv8i64(<vscale x 8 x i64> %va, i64 %b) {
2759 ; RV32-LABEL: icmp_ule_vx_nxv8i64:
2761 ; RV32-NEXT: addi sp, sp, -16
2762 ; RV32-NEXT: .cfi_def_cfa_offset 16
2763 ; RV32-NEXT: sw a1, 12(sp)
2764 ; RV32-NEXT: sw a0, 8(sp)
2765 ; RV32-NEXT: addi a0, sp, 8
2766 ; RV32-NEXT: vsetvli a1, zero, e64, m8, ta, ma
2767 ; RV32-NEXT: vlse64.v v16, (a0), zero
2768 ; RV32-NEXT: vmsleu.vv v0, v8, v16
2769 ; RV32-NEXT: addi sp, sp, 16
2772 ; RV64-LABEL: icmp_ule_vx_nxv8i64:
2774 ; RV64-NEXT: vsetvli a1, zero, e64, m8, ta, ma
2775 ; RV64-NEXT: vmsleu.vx v0, v8, a0
2777 %head = insertelement <vscale x 8 x i64> poison, i64 %b, i32 0
2778 %splat = shufflevector <vscale x 8 x i64> %head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
2779 %vc = icmp ule <vscale x 8 x i64> %va, %splat
2780 ret <vscale x 8 x i1> %vc
2783 define <vscale x 8 x i1> @icmp_ule_xv_nxv8i64(<vscale x 8 x i64> %va, i64 %b) {
2784 ; RV32-LABEL: icmp_ule_xv_nxv8i64:
2786 ; RV32-NEXT: addi sp, sp, -16
2787 ; RV32-NEXT: .cfi_def_cfa_offset 16
2788 ; RV32-NEXT: sw a1, 12(sp)
2789 ; RV32-NEXT: sw a0, 8(sp)
2790 ; RV32-NEXT: addi a0, sp, 8
2791 ; RV32-NEXT: vsetvli a1, zero, e64, m8, ta, ma
2792 ; RV32-NEXT: vlse64.v v16, (a0), zero
2793 ; RV32-NEXT: vmsleu.vv v0, v16, v8
2794 ; RV32-NEXT: addi sp, sp, 16
2797 ; RV64-LABEL: icmp_ule_xv_nxv8i64:
2799 ; RV64-NEXT: vsetvli a1, zero, e64, m8, ta, ma
2800 ; RV64-NEXT: vmv.v.x v16, a0
2801 ; RV64-NEXT: vmsleu.vv v0, v16, v8
2803 %head = insertelement <vscale x 8 x i64> poison, i64 %b, i32 0
2804 %splat = shufflevector <vscale x 8 x i64> %head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
2805 %vc = icmp ule <vscale x 8 x i64> %splat, %va
2806 ret <vscale x 8 x i1> %vc
2809 define <vscale x 8 x i1> @icmp_ule_vi_nxv8i64_0(<vscale x 8 x i64> %va) {
2810 ; CHECK-LABEL: icmp_ule_vi_nxv8i64_0:
2812 ; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma
2813 ; CHECK-NEXT: vmsleu.vi v0, v8, 5
2815 %head = insertelement <vscale x 8 x i64> poison, i64 5, i32 0
2816 %splat = shufflevector <vscale x 8 x i64> %head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
2817 %vc = icmp ule <vscale x 8 x i64> %va, %splat
2818 ret <vscale x 8 x i1> %vc
2821 define <vscale x 8 x i1> @icmp_sgt_vv_nxv8i64(<vscale x 8 x i64> %va, <vscale x 8 x i64> %vb) {
2822 ; CHECK-LABEL: icmp_sgt_vv_nxv8i64:
2824 ; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma
2825 ; CHECK-NEXT: vmslt.vv v0, v16, v8
2827 %vc = icmp sgt <vscale x 8 x i64> %va, %vb
2828 ret <vscale x 8 x i1> %vc
2831 define <vscale x 8 x i1> @icmp_sgt_vx_nxv8i64(<vscale x 8 x i64> %va, i64 %b) {
2832 ; RV32-LABEL: icmp_sgt_vx_nxv8i64:
2834 ; RV32-NEXT: addi sp, sp, -16
2835 ; RV32-NEXT: .cfi_def_cfa_offset 16
2836 ; RV32-NEXT: sw a1, 12(sp)
2837 ; RV32-NEXT: sw a0, 8(sp)
2838 ; RV32-NEXT: addi a0, sp, 8
2839 ; RV32-NEXT: vsetvli a1, zero, e64, m8, ta, ma
2840 ; RV32-NEXT: vlse64.v v16, (a0), zero
2841 ; RV32-NEXT: vmslt.vv v0, v16, v8
2842 ; RV32-NEXT: addi sp, sp, 16
2845 ; RV64-LABEL: icmp_sgt_vx_nxv8i64:
2847 ; RV64-NEXT: vsetvli a1, zero, e64, m8, ta, ma
2848 ; RV64-NEXT: vmsgt.vx v0, v8, a0
2850 %head = insertelement <vscale x 8 x i64> poison, i64 %b, i32 0
2851 %splat = shufflevector <vscale x 8 x i64> %head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
2852 %vc = icmp sgt <vscale x 8 x i64> %va, %splat
2853 ret <vscale x 8 x i1> %vc
2856 define <vscale x 8 x i1> @icmp_sgt_xv_nxv8i64(<vscale x 8 x i64> %va, i64 %b) {
2857 ; RV32-LABEL: icmp_sgt_xv_nxv8i64:
2859 ; RV32-NEXT: addi sp, sp, -16
2860 ; RV32-NEXT: .cfi_def_cfa_offset 16
2861 ; RV32-NEXT: sw a1, 12(sp)
2862 ; RV32-NEXT: sw a0, 8(sp)
2863 ; RV32-NEXT: addi a0, sp, 8
2864 ; RV32-NEXT: vsetvli a1, zero, e64, m8, ta, ma
2865 ; RV32-NEXT: vlse64.v v16, (a0), zero
2866 ; RV32-NEXT: vmslt.vv v0, v8, v16
2867 ; RV32-NEXT: addi sp, sp, 16
2870 ; RV64-LABEL: icmp_sgt_xv_nxv8i64:
2872 ; RV64-NEXT: vsetvli a1, zero, e64, m8, ta, ma
2873 ; RV64-NEXT: vmslt.vx v0, v8, a0
2875 %head = insertelement <vscale x 8 x i64> poison, i64 %b, i32 0
2876 %splat = shufflevector <vscale x 8 x i64> %head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
2877 %vc = icmp sgt <vscale x 8 x i64> %splat, %va
2878 ret <vscale x 8 x i1> %vc
2881 define <vscale x 8 x i1> @icmp_sgt_vi_nxv8i64_0(<vscale x 8 x i64> %va) {
2882 ; CHECK-LABEL: icmp_sgt_vi_nxv8i64_0:
2884 ; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma
2885 ; CHECK-NEXT: vmsgt.vi v0, v8, 5
2887 %head = insertelement <vscale x 8 x i64> poison, i64 5, i32 0
2888 %splat = shufflevector <vscale x 8 x i64> %head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
2889 %vc = icmp sgt <vscale x 8 x i64> %va, %splat
2890 ret <vscale x 8 x i1> %vc
2893 define <vscale x 8 x i1> @icmp_sge_vv_nxv8i64(<vscale x 8 x i64> %va, <vscale x 8 x i64> %vb) {
2894 ; CHECK-LABEL: icmp_sge_vv_nxv8i64:
2896 ; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma
2897 ; CHECK-NEXT: vmsle.vv v0, v16, v8
2899 %vc = icmp sge <vscale x 8 x i64> %va, %vb
2900 ret <vscale x 8 x i1> %vc
2903 define <vscale x 8 x i1> @icmp_sge_vx_nxv8i64(<vscale x 8 x i64> %va, i64 %b) {
2904 ; RV32-LABEL: icmp_sge_vx_nxv8i64:
2906 ; RV32-NEXT: addi sp, sp, -16
2907 ; RV32-NEXT: .cfi_def_cfa_offset 16
2908 ; RV32-NEXT: sw a1, 12(sp)
2909 ; RV32-NEXT: sw a0, 8(sp)
2910 ; RV32-NEXT: addi a0, sp, 8
2911 ; RV32-NEXT: vsetvli a1, zero, e64, m8, ta, ma
2912 ; RV32-NEXT: vlse64.v v16, (a0), zero
2913 ; RV32-NEXT: vmsle.vv v0, v16, v8
2914 ; RV32-NEXT: addi sp, sp, 16
2917 ; RV64-LABEL: icmp_sge_vx_nxv8i64:
2919 ; RV64-NEXT: vsetvli a1, zero, e64, m8, ta, ma
2920 ; RV64-NEXT: vmv.v.x v16, a0
2921 ; RV64-NEXT: vmsle.vv v0, v16, v8
2923 %head = insertelement <vscale x 8 x i64> poison, i64 %b, i32 0
2924 %splat = shufflevector <vscale x 8 x i64> %head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
2925 %vc = icmp sge <vscale x 8 x i64> %va, %splat
2926 ret <vscale x 8 x i1> %vc
2929 define <vscale x 8 x i1> @icmp_sge_xv_nxv8i64(<vscale x 8 x i64> %va, i64 %b) {
2930 ; RV32-LABEL: icmp_sge_xv_nxv8i64:
2932 ; RV32-NEXT: addi sp, sp, -16
2933 ; RV32-NEXT: .cfi_def_cfa_offset 16
2934 ; RV32-NEXT: sw a1, 12(sp)
2935 ; RV32-NEXT: sw a0, 8(sp)
2936 ; RV32-NEXT: addi a0, sp, 8
2937 ; RV32-NEXT: vsetvli a1, zero, e64, m8, ta, ma
2938 ; RV32-NEXT: vlse64.v v16, (a0), zero
2939 ; RV32-NEXT: vmsle.vv v0, v8, v16
2940 ; RV32-NEXT: addi sp, sp, 16
2943 ; RV64-LABEL: icmp_sge_xv_nxv8i64:
2945 ; RV64-NEXT: vsetvli a1, zero, e64, m8, ta, ma
2946 ; RV64-NEXT: vmsle.vx v0, v8, a0
2948 %head = insertelement <vscale x 8 x i64> poison, i64 %b, i32 0
2949 %splat = shufflevector <vscale x 8 x i64> %head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
2950 %vc = icmp sge <vscale x 8 x i64> %splat, %va
2951 ret <vscale x 8 x i1> %vc
2954 define <vscale x 8 x i1> @icmp_sge_vi_nxv8i64_0(<vscale x 8 x i64> %va) {
2955 ; CHECK-LABEL: icmp_sge_vi_nxv8i64_0:
2957 ; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma
2958 ; CHECK-NEXT: vmv.v.i v16, -16
2959 ; CHECK-NEXT: vmsle.vv v0, v16, v8
2961 %head = insertelement <vscale x 8 x i64> poison, i64 -16, i32 0
2962 %splat = shufflevector <vscale x 8 x i64> %head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
2963 %vc = icmp sge <vscale x 8 x i64> %va, %splat
2964 ret <vscale x 8 x i1> %vc
2967 define <vscale x 8 x i1> @icmp_sge_vi_nxv8i64_1(<vscale x 8 x i64> %va) {
2968 ; CHECK-LABEL: icmp_sge_vi_nxv8i64_1:
2970 ; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma
2971 ; CHECK-NEXT: vmsgt.vi v0, v8, -16
2973 %head = insertelement <vscale x 8 x i64> poison, i64 -15, i32 0
2974 %splat = shufflevector <vscale x 8 x i64> %head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
2975 %vc = icmp sge <vscale x 8 x i64> %va, %splat
2976 ret <vscale x 8 x i1> %vc
2979 define <vscale x 8 x i1> @icmp_sge_iv_nxv8i64_1(<vscale x 8 x i64> %va) {
2980 ; CHECK-LABEL: icmp_sge_iv_nxv8i64_1:
2982 ; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma
2983 ; CHECK-NEXT: vmsle.vi v0, v8, -15
2985 %head = insertelement <vscale x 8 x i64> poison, i64 -15, i32 0
2986 %splat = shufflevector <vscale x 8 x i64> %head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
2987 %vc = icmp sge <vscale x 8 x i64> %splat, %va
2988 ret <vscale x 8 x i1> %vc
2991 define <vscale x 8 x i1> @icmp_sge_vi_nxv8i64_2(<vscale x 8 x i64> %va) {
2992 ; CHECK-LABEL: icmp_sge_vi_nxv8i64_2:
2994 ; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma
2995 ; CHECK-NEXT: vmsgt.vi v0, v8, -1
2997 %head = insertelement <vscale x 8 x i64> poison, i64 0, i32 0
2998 %splat = shufflevector <vscale x 8 x i64> %head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
2999 %vc = icmp sge <vscale x 8 x i64> %va, %splat
3000 ret <vscale x 8 x i1> %vc
3003 define <vscale x 8 x i1> @icmp_sge_vi_nxv8i64_3(<vscale x 8 x i64> %va) {
3004 ; CHECK-LABEL: icmp_sge_vi_nxv8i64_3:
3006 ; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma
3007 ; CHECK-NEXT: vmsgt.vi v0, v8, 15
3009 %head = insertelement <vscale x 8 x i64> poison, i64 16, i32 0
3010 %splat = shufflevector <vscale x 8 x i64> %head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
3011 %vc = icmp sge <vscale x 8 x i64> %va, %splat
3012 ret <vscale x 8 x i1> %vc
3015 define <vscale x 8 x i1> @icmp_slt_vv_nxv8i64(<vscale x 8 x i64> %va, <vscale x 8 x i64> %vb) {
3016 ; CHECK-LABEL: icmp_slt_vv_nxv8i64:
3018 ; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma
3019 ; CHECK-NEXT: vmslt.vv v0, v8, v16
3021 %vc = icmp slt <vscale x 8 x i64> %va, %vb
3022 ret <vscale x 8 x i1> %vc
3025 define <vscale x 8 x i1> @icmp_slt_vx_nxv8i64(<vscale x 8 x i64> %va, i64 %b) {
3026 ; RV32-LABEL: icmp_slt_vx_nxv8i64:
3028 ; RV32-NEXT: addi sp, sp, -16
3029 ; RV32-NEXT: .cfi_def_cfa_offset 16
3030 ; RV32-NEXT: sw a1, 12(sp)
3031 ; RV32-NEXT: sw a0, 8(sp)
3032 ; RV32-NEXT: addi a0, sp, 8
3033 ; RV32-NEXT: vsetvli a1, zero, e64, m8, ta, ma
3034 ; RV32-NEXT: vlse64.v v16, (a0), zero
3035 ; RV32-NEXT: vmslt.vv v0, v8, v16
3036 ; RV32-NEXT: addi sp, sp, 16
3039 ; RV64-LABEL: icmp_slt_vx_nxv8i64:
3041 ; RV64-NEXT: vsetvli a1, zero, e64, m8, ta, ma
3042 ; RV64-NEXT: vmslt.vx v0, v8, a0
3044 %head = insertelement <vscale x 8 x i64> poison, i64 %b, i32 0
3045 %splat = shufflevector <vscale x 8 x i64> %head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
3046 %vc = icmp slt <vscale x 8 x i64> %va, %splat
3047 ret <vscale x 8 x i1> %vc
3050 define <vscale x 8 x i1> @icmp_slt_xv_nxv8i64(<vscale x 8 x i64> %va, i64 %b) {
3051 ; RV32-LABEL: icmp_slt_xv_nxv8i64:
3053 ; RV32-NEXT: addi sp, sp, -16
3054 ; RV32-NEXT: .cfi_def_cfa_offset 16
3055 ; RV32-NEXT: sw a1, 12(sp)
3056 ; RV32-NEXT: sw a0, 8(sp)
3057 ; RV32-NEXT: addi a0, sp, 8
3058 ; RV32-NEXT: vsetvli a1, zero, e64, m8, ta, ma
3059 ; RV32-NEXT: vlse64.v v16, (a0), zero
3060 ; RV32-NEXT: vmslt.vv v0, v16, v8
3061 ; RV32-NEXT: addi sp, sp, 16
3064 ; RV64-LABEL: icmp_slt_xv_nxv8i64:
3066 ; RV64-NEXT: vsetvli a1, zero, e64, m8, ta, ma
3067 ; RV64-NEXT: vmsgt.vx v0, v8, a0
3069 %head = insertelement <vscale x 8 x i64> poison, i64 %b, i32 0
3070 %splat = shufflevector <vscale x 8 x i64> %head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
3071 %vc = icmp slt <vscale x 8 x i64> %splat, %va
3072 ret <vscale x 8 x i1> %vc
3075 define <vscale x 8 x i1> @icmp_slt_vi_nxv8i64_0(<vscale x 8 x i64> %va) {
3076 ; CHECK-LABEL: icmp_slt_vi_nxv8i64_0:
3078 ; CHECK-NEXT: li a0, -16
3079 ; CHECK-NEXT: vsetvli a1, zero, e64, m8, ta, ma
3080 ; CHECK-NEXT: vmslt.vx v0, v8, a0
3082 %head = insertelement <vscale x 8 x i64> poison, i64 -16, i32 0
3083 %splat = shufflevector <vscale x 8 x i64> %head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
3084 %vc = icmp slt <vscale x 8 x i64> %va, %splat
3085 ret <vscale x 8 x i1> %vc
3088 define <vscale x 8 x i1> @icmp_slt_vi_nxv8i64_1(<vscale x 8 x i64> %va) {
3089 ; CHECK-LABEL: icmp_slt_vi_nxv8i64_1:
3091 ; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma
3092 ; CHECK-NEXT: vmsle.vi v0, v8, -16
3094 %head = insertelement <vscale x 8 x i64> poison, i64 -15, i32 0
3095 %splat = shufflevector <vscale x 8 x i64> %head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
3096 %vc = icmp slt <vscale x 8 x i64> %va, %splat
3097 ret <vscale x 8 x i1> %vc
3100 define <vscale x 8 x i1> @icmp_slt_iv_nxv8i64_1(<vscale x 8 x i64> %va) {
3101 ; CHECK-LABEL: icmp_slt_iv_nxv8i64_1:
3103 ; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma
3104 ; CHECK-NEXT: vmsgt.vi v0, v8, -15
3106 %head = insertelement <vscale x 8 x i64> poison, i64 -15, i32 0
3107 %splat = shufflevector <vscale x 8 x i64> %head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
3108 %vc = icmp slt <vscale x 8 x i64> %splat, %va
3109 ret <vscale x 8 x i1> %vc
3112 define <vscale x 8 x i1> @icmp_slt_vi_nxv8i64_2(<vscale x 8 x i64> %va) {
3113 ; CHECK-LABEL: icmp_slt_vi_nxv8i64_2:
3115 ; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma
3116 ; CHECK-NEXT: vmsle.vi v0, v8, -1
3118 %head = insertelement <vscale x 8 x i64> poison, i64 0, i32 0
3119 %splat = shufflevector <vscale x 8 x i64> %head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
3120 %vc = icmp slt <vscale x 8 x i64> %va, %splat
3121 ret <vscale x 8 x i1> %vc
3124 define <vscale x 8 x i1> @icmp_slt_vi_nxv8i64_3(<vscale x 8 x i64> %va) {
3125 ; CHECK-LABEL: icmp_slt_vi_nxv8i64_3:
3127 ; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma
3128 ; CHECK-NEXT: vmsle.vi v0, v8, 15
3130 %head = insertelement <vscale x 8 x i64> poison, i64 16, i32 0
3131 %splat = shufflevector <vscale x 8 x i64> %head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
3132 %vc = icmp slt <vscale x 8 x i64> %va, %splat
3133 ret <vscale x 8 x i1> %vc
3136 define <vscale x 8 x i1> @icmp_sle_vv_nxv8i64(<vscale x 8 x i64> %va, <vscale x 8 x i64> %vb) {
3137 ; CHECK-LABEL: icmp_sle_vv_nxv8i64:
3139 ; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma
3140 ; CHECK-NEXT: vmsle.vv v0, v8, v16
3142 %vc = icmp sle <vscale x 8 x i64> %va, %vb
3143 ret <vscale x 8 x i1> %vc
3146 define <vscale x 8 x i1> @icmp_sle_vx_nxv8i64(<vscale x 8 x i64> %va, i64 %b) {
3147 ; RV32-LABEL: icmp_sle_vx_nxv8i64:
3149 ; RV32-NEXT: addi sp, sp, -16
3150 ; RV32-NEXT: .cfi_def_cfa_offset 16
3151 ; RV32-NEXT: sw a1, 12(sp)
3152 ; RV32-NEXT: sw a0, 8(sp)
3153 ; RV32-NEXT: addi a0, sp, 8
3154 ; RV32-NEXT: vsetvli a1, zero, e64, m8, ta, ma
3155 ; RV32-NEXT: vlse64.v v16, (a0), zero
3156 ; RV32-NEXT: vmsle.vv v0, v8, v16
3157 ; RV32-NEXT: addi sp, sp, 16
3160 ; RV64-LABEL: icmp_sle_vx_nxv8i64:
3162 ; RV64-NEXT: vsetvli a1, zero, e64, m8, ta, ma
3163 ; RV64-NEXT: vmsle.vx v0, v8, a0
3165 %head = insertelement <vscale x 8 x i64> poison, i64 %b, i32 0
3166 %splat = shufflevector <vscale x 8 x i64> %head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
3167 %vc = icmp sle <vscale x 8 x i64> %va, %splat
3168 ret <vscale x 8 x i1> %vc
3171 define <vscale x 8 x i1> @icmp_sle_xv_nxv8i64(<vscale x 8 x i64> %va, i64 %b) {
3172 ; RV32-LABEL: icmp_sle_xv_nxv8i64:
3174 ; RV32-NEXT: addi sp, sp, -16
3175 ; RV32-NEXT: .cfi_def_cfa_offset 16
3176 ; RV32-NEXT: sw a1, 12(sp)
3177 ; RV32-NEXT: sw a0, 8(sp)
3178 ; RV32-NEXT: addi a0, sp, 8
3179 ; RV32-NEXT: vsetvli a1, zero, e64, m8, ta, ma
3180 ; RV32-NEXT: vlse64.v v16, (a0), zero
3181 ; RV32-NEXT: vmsle.vv v0, v16, v8
3182 ; RV32-NEXT: addi sp, sp, 16
3185 ; RV64-LABEL: icmp_sle_xv_nxv8i64:
3187 ; RV64-NEXT: vsetvli a1, zero, e64, m8, ta, ma
3188 ; RV64-NEXT: vmv.v.x v16, a0
3189 ; RV64-NEXT: vmsle.vv v0, v16, v8
3191 %head = insertelement <vscale x 8 x i64> poison, i64 %b, i32 0
3192 %splat = shufflevector <vscale x 8 x i64> %head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
3193 %vc = icmp sle <vscale x 8 x i64> %splat, %va
3194 ret <vscale x 8 x i1> %vc
3197 define <vscale x 8 x i1> @icmp_sle_vi_nxv8i64_0(<vscale x 8 x i64> %va) {
3198 ; CHECK-LABEL: icmp_sle_vi_nxv8i64_0:
3200 ; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma
3201 ; CHECK-NEXT: vmsle.vi v0, v8, 5
3203 %head = insertelement <vscale x 8 x i64> poison, i64 5, i32 0
3204 %splat = shufflevector <vscale x 8 x i64> %head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
3205 %vc = icmp sle <vscale x 8 x i64> %va, %splat
3206 ret <vscale x 8 x i1> %vc
3209 ; Check a setcc with two constant splats, which would previously get stuck in
3210 ; an infinite loop. DAGCombine isn't clever enough to constant-fold
3211 ; splat_vectors but could continuously swap the operands, trying to put the
3213 define <vscale x 8 x i1> @icmp_eq_ii_nxv8i8() {
3214 ; CHECK-LABEL: icmp_eq_ii_nxv8i8:
3216 ; CHECK-NEXT: vsetvli a0, zero, e8, m1, ta, ma
3217 ; CHECK-NEXT: vmclr.m v0
3219 %heada = insertelement <vscale x 8 x i8> poison, i8 5, i32 0
3220 %splata = shufflevector <vscale x 8 x i8> %heada, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
3221 %headb = insertelement <vscale x 8 x i8> poison, i8 2, i32 0
3222 %splatb = shufflevector <vscale x 8 x i8> %headb, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
3223 %vc = icmp eq <vscale x 8 x i8> %splata, %splatb
3224 ret <vscale x 8 x i1> %vc
3227 ; This icmp/setcc is split and so we find a scalable-vector mask CONCAT_VECTOR
3228 ; node. Ensure we correctly (custom) lower this.
3229 define <vscale x 16 x i1> @icmp_eq_vi_nx16i64(<vscale x 16 x i64> %va) {
3230 ; CHECK-LABEL: icmp_eq_vi_nx16i64:
3232 ; CHECK-NEXT: csrr a0, vlenb
3233 ; CHECK-NEXT: srli a0, a0, 3
3234 ; CHECK-NEXT: add a1, a0, a0
3235 ; CHECK-NEXT: vsetvli a2, zero, e64, m8, ta, ma
3236 ; CHECK-NEXT: vmseq.vi v24, v16, 0
3237 ; CHECK-NEXT: vmseq.vi v0, v8, 0
3238 ; CHECK-NEXT: vsetvli zero, a1, e8, mf4, tu, ma
3239 ; CHECK-NEXT: vslideup.vx v0, v24, a0
3241 %vc = icmp eq <vscale x 16 x i64> %va, zeroinitializer
3242 ret <vscale x 16 x i1> %vc