1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=riscv32 -mattr=+v,+m -verify-machineinstrs < %s \
3 ; RUN: | FileCheck %s --check-prefixes=CHECK,RV32
4 ; RUN: llc -mtriple=riscv64 -mattr=+v,+m -verify-machineinstrs < %s \
5 ; RUN: | FileCheck %s --check-prefixes=CHECK,RV64
7 ; FIXME: We're missing canonicalizations of ISD::VP_SETCC equivalent to those
8 ; for ISD::SETCC, e.g., splats aren't moved to the RHS.
10 declare <vscale x 1 x i1> @llvm.vp.icmp.nxv1i8(<vscale x 1 x i8>, <vscale x 1 x i8>, metadata, <vscale x 1 x i1>, i32)
12 define <vscale x 1 x i1> @icmp_eq_vv_nxv1i8(<vscale x 1 x i8> %va, <vscale x 1 x i8> %vb, <vscale x 1 x i1> %m, i32 zeroext %evl) {
13 ; CHECK-LABEL: icmp_eq_vv_nxv1i8:
15 ; CHECK-NEXT: vsetvli zero, a0, e8, mf8, ta, ma
16 ; CHECK-NEXT: vmseq.vv v0, v8, v9, v0.t
18 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i8(<vscale x 1 x i8> %va, <vscale x 1 x i8> %vb, metadata !"eq", <vscale x 1 x i1> %m, i32 %evl)
19 ret <vscale x 1 x i1> %v
22 define <vscale x 1 x i1> @icmp_eq_vx_nxv1i8(<vscale x 1 x i8> %va, i8 %b, <vscale x 1 x i1> %m, i32 zeroext %evl) {
23 ; CHECK-LABEL: icmp_eq_vx_nxv1i8:
25 ; CHECK-NEXT: vsetvli zero, a1, e8, mf8, ta, ma
26 ; CHECK-NEXT: vmseq.vx v0, v8, a0, v0.t
28 %elt.head = insertelement <vscale x 1 x i8> poison, i8 %b, i32 0
29 %vb = shufflevector <vscale x 1 x i8> %elt.head, <vscale x 1 x i8> poison, <vscale x 1 x i32> zeroinitializer
30 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i8(<vscale x 1 x i8> %va, <vscale x 1 x i8> %vb, metadata !"eq", <vscale x 1 x i1> %m, i32 %evl)
31 ret <vscale x 1 x i1> %v
34 define <vscale x 1 x i1> @icmp_eq_vx_swap_nxv1i8(<vscale x 1 x i8> %va, i8 %b, <vscale x 1 x i1> %m, i32 zeroext %evl) {
35 ; CHECK-LABEL: icmp_eq_vx_swap_nxv1i8:
37 ; CHECK-NEXT: vsetvli zero, a1, e8, mf8, ta, ma
38 ; CHECK-NEXT: vmseq.vx v0, v8, a0, v0.t
40 %elt.head = insertelement <vscale x 1 x i8> poison, i8 %b, i32 0
41 %vb = shufflevector <vscale x 1 x i8> %elt.head, <vscale x 1 x i8> poison, <vscale x 1 x i32> zeroinitializer
42 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i8(<vscale x 1 x i8> %vb, <vscale x 1 x i8> %va, metadata !"eq", <vscale x 1 x i1> %m, i32 %evl)
43 ret <vscale x 1 x i1> %v
46 define <vscale x 1 x i1> @icmp_eq_vi_nxv1i8(<vscale x 1 x i8> %va, <vscale x 1 x i1> %m, i32 zeroext %evl) {
47 ; CHECK-LABEL: icmp_eq_vi_nxv1i8:
49 ; CHECK-NEXT: vsetvli zero, a0, e8, mf8, ta, ma
50 ; CHECK-NEXT: vmseq.vi v0, v8, 4, v0.t
52 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i8(<vscale x 1 x i8> %va, <vscale x 1 x i8> splat (i8 4), metadata !"eq", <vscale x 1 x i1> %m, i32 %evl)
53 ret <vscale x 1 x i1> %v
56 define <vscale x 1 x i1> @icmp_eq_vi_swap_nxv1i8(<vscale x 1 x i8> %va, <vscale x 1 x i1> %m, i32 zeroext %evl) {
57 ; CHECK-LABEL: icmp_eq_vi_swap_nxv1i8:
59 ; CHECK-NEXT: vsetvli zero, a0, e8, mf8, ta, ma
60 ; CHECK-NEXT: vmseq.vi v0, v8, 4, v0.t
62 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i8(<vscale x 1 x i8> splat (i8 4), <vscale x 1 x i8> %va, metadata !"eq", <vscale x 1 x i1> %m, i32 %evl)
63 ret <vscale x 1 x i1> %v
66 define <vscale x 1 x i1> @icmp_ne_vv_nxv1i8(<vscale x 1 x i8> %va, <vscale x 1 x i8> %vb, <vscale x 1 x i1> %m, i32 zeroext %evl) {
67 ; CHECK-LABEL: icmp_ne_vv_nxv1i8:
69 ; CHECK-NEXT: vsetvli zero, a0, e8, mf8, ta, ma
70 ; CHECK-NEXT: vmsne.vv v0, v8, v9, v0.t
72 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i8(<vscale x 1 x i8> %va, <vscale x 1 x i8> %vb, metadata !"ne", <vscale x 1 x i1> %m, i32 %evl)
73 ret <vscale x 1 x i1> %v
76 define <vscale x 1 x i1> @icmp_ne_vx_nxv1i8(<vscale x 1 x i8> %va, i8 %b, <vscale x 1 x i1> %m, i32 zeroext %evl) {
77 ; CHECK-LABEL: icmp_ne_vx_nxv1i8:
79 ; CHECK-NEXT: vsetvli zero, a1, e8, mf8, ta, ma
80 ; CHECK-NEXT: vmsne.vx v0, v8, a0, v0.t
82 %elt.head = insertelement <vscale x 1 x i8> poison, i8 %b, i32 0
83 %vb = shufflevector <vscale x 1 x i8> %elt.head, <vscale x 1 x i8> poison, <vscale x 1 x i32> zeroinitializer
84 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i8(<vscale x 1 x i8> %va, <vscale x 1 x i8> %vb, metadata !"ne", <vscale x 1 x i1> %m, i32 %evl)
85 ret <vscale x 1 x i1> %v
88 define <vscale x 1 x i1> @icmp_ne_vx_swap_nxv1i8(<vscale x 1 x i8> %va, i8 %b, <vscale x 1 x i1> %m, i32 zeroext %evl) {
89 ; CHECK-LABEL: icmp_ne_vx_swap_nxv1i8:
91 ; CHECK-NEXT: vsetvli zero, a1, e8, mf8, ta, ma
92 ; CHECK-NEXT: vmsne.vx v0, v8, a0, v0.t
94 %elt.head = insertelement <vscale x 1 x i8> poison, i8 %b, i32 0
95 %vb = shufflevector <vscale x 1 x i8> %elt.head, <vscale x 1 x i8> poison, <vscale x 1 x i32> zeroinitializer
96 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i8(<vscale x 1 x i8> %vb, <vscale x 1 x i8> %va, metadata !"ne", <vscale x 1 x i1> %m, i32 %evl)
97 ret <vscale x 1 x i1> %v
100 define <vscale x 1 x i1> @icmp_ne_vi_nxv1i8(<vscale x 1 x i8> %va, <vscale x 1 x i1> %m, i32 zeroext %evl) {
101 ; CHECK-LABEL: icmp_ne_vi_nxv1i8:
103 ; CHECK-NEXT: vsetvli zero, a0, e8, mf8, ta, ma
104 ; CHECK-NEXT: vmsne.vi v0, v8, 4, v0.t
106 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i8(<vscale x 1 x i8> %va, <vscale x 1 x i8> splat (i8 4), metadata !"ne", <vscale x 1 x i1> %m, i32 %evl)
107 ret <vscale x 1 x i1> %v
110 define <vscale x 1 x i1> @icmp_ne_vi_swap_nxv1i8(<vscale x 1 x i8> %va, <vscale x 1 x i1> %m, i32 zeroext %evl) {
111 ; CHECK-LABEL: icmp_ne_vi_swap_nxv1i8:
113 ; CHECK-NEXT: vsetvli zero, a0, e8, mf8, ta, ma
114 ; CHECK-NEXT: vmsne.vi v0, v8, 4, v0.t
116 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i8(<vscale x 1 x i8> splat (i8 4), <vscale x 1 x i8> %va, metadata !"ne", <vscale x 1 x i1> %m, i32 %evl)
117 ret <vscale x 1 x i1> %v
120 define <vscale x 1 x i1> @icmp_ugt_vv_nxv1i8(<vscale x 1 x i8> %va, <vscale x 1 x i8> %vb, <vscale x 1 x i1> %m, i32 zeroext %evl) {
121 ; CHECK-LABEL: icmp_ugt_vv_nxv1i8:
123 ; CHECK-NEXT: vsetvli zero, a0, e8, mf8, ta, ma
124 ; CHECK-NEXT: vmsltu.vv v0, v9, v8, v0.t
126 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i8(<vscale x 1 x i8> %va, <vscale x 1 x i8> %vb, metadata !"ugt", <vscale x 1 x i1> %m, i32 %evl)
127 ret <vscale x 1 x i1> %v
130 define <vscale x 1 x i1> @icmp_ugt_vx_nxv1i8(<vscale x 1 x i8> %va, i8 %b, <vscale x 1 x i1> %m, i32 zeroext %evl) {
131 ; CHECK-LABEL: icmp_ugt_vx_nxv1i8:
133 ; CHECK-NEXT: vsetvli zero, a1, e8, mf8, ta, ma
134 ; CHECK-NEXT: vmsgtu.vx v0, v8, a0, v0.t
136 %elt.head = insertelement <vscale x 1 x i8> poison, i8 %b, i32 0
137 %vb = shufflevector <vscale x 1 x i8> %elt.head, <vscale x 1 x i8> poison, <vscale x 1 x i32> zeroinitializer
138 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i8(<vscale x 1 x i8> %va, <vscale x 1 x i8> %vb, metadata !"ugt", <vscale x 1 x i1> %m, i32 %evl)
139 ret <vscale x 1 x i1> %v
142 define <vscale x 1 x i1> @icmp_ugt_vx_swap_nxv1i8(<vscale x 1 x i8> %va, i8 %b, <vscale x 1 x i1> %m, i32 zeroext %evl) {
143 ; CHECK-LABEL: icmp_ugt_vx_swap_nxv1i8:
145 ; CHECK-NEXT: vsetvli zero, a1, e8, mf8, ta, ma
146 ; CHECK-NEXT: vmsltu.vx v0, v8, a0, v0.t
148 %elt.head = insertelement <vscale x 1 x i8> poison, i8 %b, i32 0
149 %vb = shufflevector <vscale x 1 x i8> %elt.head, <vscale x 1 x i8> poison, <vscale x 1 x i32> zeroinitializer
150 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i8(<vscale x 1 x i8> %vb, <vscale x 1 x i8> %va, metadata !"ugt", <vscale x 1 x i1> %m, i32 %evl)
151 ret <vscale x 1 x i1> %v
154 define <vscale x 1 x i1> @icmp_ugt_vi_nxv1i8(<vscale x 1 x i8> %va, <vscale x 1 x i1> %m, i32 zeroext %evl) {
155 ; CHECK-LABEL: icmp_ugt_vi_nxv1i8:
157 ; CHECK-NEXT: vsetvli zero, a0, e8, mf8, ta, ma
158 ; CHECK-NEXT: vmsgtu.vi v0, v8, 4, v0.t
160 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i8(<vscale x 1 x i8> %va, <vscale x 1 x i8> splat (i8 4), metadata !"ugt", <vscale x 1 x i1> %m, i32 %evl)
161 ret <vscale x 1 x i1> %v
164 define <vscale x 1 x i1> @icmp_ugt_vi_swap_nxv1i8(<vscale x 1 x i8> %va, <vscale x 1 x i1> %m, i32 zeroext %evl) {
165 ; CHECK-LABEL: icmp_ugt_vi_swap_nxv1i8:
167 ; CHECK-NEXT: vsetvli zero, a0, e8, mf8, ta, ma
168 ; CHECK-NEXT: vmsleu.vi v0, v8, 3, v0.t
170 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i8(<vscale x 1 x i8> splat (i8 4), <vscale x 1 x i8> %va, metadata !"ugt", <vscale x 1 x i1> %m, i32 %evl)
171 ret <vscale x 1 x i1> %v
174 define <vscale x 1 x i1> @icmp_uge_vv_nxv1i8(<vscale x 1 x i8> %va, <vscale x 1 x i8> %vb, <vscale x 1 x i1> %m, i32 zeroext %evl) {
175 ; CHECK-LABEL: icmp_uge_vv_nxv1i8:
177 ; CHECK-NEXT: vsetvli zero, a0, e8, mf8, ta, ma
178 ; CHECK-NEXT: vmsleu.vv v0, v9, v8, v0.t
180 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i8(<vscale x 1 x i8> %va, <vscale x 1 x i8> %vb, metadata !"uge", <vscale x 1 x i1> %m, i32 %evl)
181 ret <vscale x 1 x i1> %v
184 define <vscale x 1 x i1> @icmp_uge_vx_nxv1i8(<vscale x 1 x i8> %va, i8 %b, <vscale x 1 x i1> %m, i32 zeroext %evl) {
185 ; CHECK-LABEL: icmp_uge_vx_nxv1i8:
187 ; CHECK-NEXT: vsetvli a2, zero, e8, mf8, ta, ma
188 ; CHECK-NEXT: vmv.v.x v9, a0
189 ; CHECK-NEXT: vsetvli zero, a1, e8, mf8, ta, ma
190 ; CHECK-NEXT: vmsleu.vv v0, v9, v8, v0.t
192 %elt.head = insertelement <vscale x 1 x i8> poison, i8 %b, i32 0
193 %vb = shufflevector <vscale x 1 x i8> %elt.head, <vscale x 1 x i8> poison, <vscale x 1 x i32> zeroinitializer
194 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i8(<vscale x 1 x i8> %va, <vscale x 1 x i8> %vb, metadata !"uge", <vscale x 1 x i1> %m, i32 %evl)
195 ret <vscale x 1 x i1> %v
198 define <vscale x 1 x i1> @icmp_uge_vx_swap_nxv1i8(<vscale x 1 x i8> %va, i8 %b, <vscale x 1 x i1> %m, i32 zeroext %evl) {
199 ; CHECK-LABEL: icmp_uge_vx_swap_nxv1i8:
201 ; CHECK-NEXT: vsetvli zero, a1, e8, mf8, ta, ma
202 ; CHECK-NEXT: vmsleu.vx v0, v8, a0, v0.t
204 %elt.head = insertelement <vscale x 1 x i8> poison, i8 %b, i32 0
205 %vb = shufflevector <vscale x 1 x i8> %elt.head, <vscale x 1 x i8> poison, <vscale x 1 x i32> zeroinitializer
206 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i8(<vscale x 1 x i8> %vb, <vscale x 1 x i8> %va, metadata !"uge", <vscale x 1 x i1> %m, i32 %evl)
207 ret <vscale x 1 x i1> %v
210 define <vscale x 1 x i1> @icmp_uge_vi_nxv1i8(<vscale x 1 x i8> %va, <vscale x 1 x i1> %m, i32 zeroext %evl) {
211 ; CHECK-LABEL: icmp_uge_vi_nxv1i8:
213 ; CHECK-NEXT: vsetvli zero, a0, e8, mf8, ta, ma
214 ; CHECK-NEXT: vmsgtu.vi v0, v8, 3, v0.t
216 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i8(<vscale x 1 x i8> %va, <vscale x 1 x i8> splat (i8 4), metadata !"uge", <vscale x 1 x i1> %m, i32 %evl)
217 ret <vscale x 1 x i1> %v
220 define <vscale x 1 x i1> @icmp_uge_vi_swap_nxv1i8(<vscale x 1 x i8> %va, <vscale x 1 x i1> %m, i32 zeroext %evl) {
221 ; CHECK-LABEL: icmp_uge_vi_swap_nxv1i8:
223 ; CHECK-NEXT: vsetvli zero, a0, e8, mf8, ta, ma
224 ; CHECK-NEXT: vmsleu.vi v0, v8, 4, v0.t
226 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i8(<vscale x 1 x i8> splat (i8 4), <vscale x 1 x i8> %va, metadata !"uge", <vscale x 1 x i1> %m, i32 %evl)
227 ret <vscale x 1 x i1> %v
230 define <vscale x 1 x i1> @icmp_ult_vv_nxv1i8(<vscale x 1 x i8> %va, <vscale x 1 x i8> %vb, <vscale x 1 x i1> %m, i32 zeroext %evl) {
231 ; CHECK-LABEL: icmp_ult_vv_nxv1i8:
233 ; CHECK-NEXT: vsetvli zero, a0, e8, mf8, ta, ma
234 ; CHECK-NEXT: vmsltu.vv v0, v8, v9, v0.t
236 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i8(<vscale x 1 x i8> %va, <vscale x 1 x i8> %vb, metadata !"ult", <vscale x 1 x i1> %m, i32 %evl)
237 ret <vscale x 1 x i1> %v
240 define <vscale x 1 x i1> @icmp_ult_vx_nxv1i8(<vscale x 1 x i8> %va, i8 %b, <vscale x 1 x i1> %m, i32 zeroext %evl) {
241 ; CHECK-LABEL: icmp_ult_vx_nxv1i8:
243 ; CHECK-NEXT: vsetvli zero, a1, e8, mf8, ta, ma
244 ; CHECK-NEXT: vmsltu.vx v0, v8, a0, v0.t
246 %elt.head = insertelement <vscale x 1 x i8> poison, i8 %b, i32 0
247 %vb = shufflevector <vscale x 1 x i8> %elt.head, <vscale x 1 x i8> poison, <vscale x 1 x i32> zeroinitializer
248 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i8(<vscale x 1 x i8> %va, <vscale x 1 x i8> %vb, metadata !"ult", <vscale x 1 x i1> %m, i32 %evl)
249 ret <vscale x 1 x i1> %v
252 define <vscale x 1 x i1> @icmp_ult_vx_swap_nxv1i8(<vscale x 1 x i8> %va, i8 %b, <vscale x 1 x i1> %m, i32 zeroext %evl) {
253 ; CHECK-LABEL: icmp_ult_vx_swap_nxv1i8:
255 ; CHECK-NEXT: vsetvli zero, a1, e8, mf8, ta, ma
256 ; CHECK-NEXT: vmsgtu.vx v0, v8, a0, v0.t
258 %elt.head = insertelement <vscale x 1 x i8> poison, i8 %b, i32 0
259 %vb = shufflevector <vscale x 1 x i8> %elt.head, <vscale x 1 x i8> poison, <vscale x 1 x i32> zeroinitializer
260 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i8(<vscale x 1 x i8> %vb, <vscale x 1 x i8> %va, metadata !"ult", <vscale x 1 x i1> %m, i32 %evl)
261 ret <vscale x 1 x i1> %v
264 define <vscale x 1 x i1> @icmp_ult_vi_nxv1i8(<vscale x 1 x i8> %va, <vscale x 1 x i1> %m, i32 zeroext %evl) {
265 ; CHECK-LABEL: icmp_ult_vi_nxv1i8:
267 ; CHECK-NEXT: vsetvli zero, a0, e8, mf8, ta, ma
268 ; CHECK-NEXT: vmsleu.vi v0, v8, 3, v0.t
270 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i8(<vscale x 1 x i8> %va, <vscale x 1 x i8> splat (i8 4), metadata !"ult", <vscale x 1 x i1> %m, i32 %evl)
271 ret <vscale x 1 x i1> %v
274 define <vscale x 1 x i1> @icmp_ult_vi_swap_nxv1i8(<vscale x 1 x i8> %va, <vscale x 1 x i1> %m, i32 zeroext %evl) {
275 ; CHECK-LABEL: icmp_ult_vi_swap_nxv1i8:
277 ; CHECK-NEXT: vsetvli zero, a0, e8, mf8, ta, ma
278 ; CHECK-NEXT: vmsgtu.vi v0, v8, 4, v0.t
280 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i8(<vscale x 1 x i8> splat (i8 4), <vscale x 1 x i8> %va, metadata !"ult", <vscale x 1 x i1> %m, i32 %evl)
281 ret <vscale x 1 x i1> %v
284 define <vscale x 1 x i1> @icmp_sgt_vv_nxv1i8(<vscale x 1 x i8> %va, <vscale x 1 x i8> %vb, <vscale x 1 x i1> %m, i32 zeroext %evl) {
285 ; CHECK-LABEL: icmp_sgt_vv_nxv1i8:
287 ; CHECK-NEXT: vsetvli zero, a0, e8, mf8, ta, ma
288 ; CHECK-NEXT: vmslt.vv v0, v9, v8, v0.t
290 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i8(<vscale x 1 x i8> %va, <vscale x 1 x i8> %vb, metadata !"sgt", <vscale x 1 x i1> %m, i32 %evl)
291 ret <vscale x 1 x i1> %v
294 define <vscale x 1 x i1> @icmp_sgt_vx_nxv1i8(<vscale x 1 x i8> %va, i8 %b, <vscale x 1 x i1> %m, i32 zeroext %evl) {
295 ; CHECK-LABEL: icmp_sgt_vx_nxv1i8:
297 ; CHECK-NEXT: vsetvli zero, a1, e8, mf8, ta, ma
298 ; CHECK-NEXT: vmsgt.vx v0, v8, a0, v0.t
300 %elt.head = insertelement <vscale x 1 x i8> poison, i8 %b, i32 0
301 %vb = shufflevector <vscale x 1 x i8> %elt.head, <vscale x 1 x i8> poison, <vscale x 1 x i32> zeroinitializer
302 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i8(<vscale x 1 x i8> %va, <vscale x 1 x i8> %vb, metadata !"sgt", <vscale x 1 x i1> %m, i32 %evl)
303 ret <vscale x 1 x i1> %v
306 define <vscale x 1 x i1> @icmp_sgt_vx_swap_nxv1i8(<vscale x 1 x i8> %va, i8 %b, <vscale x 1 x i1> %m, i32 zeroext %evl) {
307 ; CHECK-LABEL: icmp_sgt_vx_swap_nxv1i8:
309 ; CHECK-NEXT: vsetvli zero, a1, e8, mf8, ta, ma
310 ; CHECK-NEXT: vmslt.vx v0, v8, a0, v0.t
312 %elt.head = insertelement <vscale x 1 x i8> poison, i8 %b, i32 0
313 %vb = shufflevector <vscale x 1 x i8> %elt.head, <vscale x 1 x i8> poison, <vscale x 1 x i32> zeroinitializer
314 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i8(<vscale x 1 x i8> %vb, <vscale x 1 x i8> %va, metadata !"sgt", <vscale x 1 x i1> %m, i32 %evl)
315 ret <vscale x 1 x i1> %v
318 define <vscale x 1 x i1> @icmp_sgt_vi_nxv1i8(<vscale x 1 x i8> %va, <vscale x 1 x i1> %m, i32 zeroext %evl) {
319 ; CHECK-LABEL: icmp_sgt_vi_nxv1i8:
321 ; CHECK-NEXT: vsetvli zero, a0, e8, mf8, ta, ma
322 ; CHECK-NEXT: vmsgt.vi v0, v8, 4, v0.t
324 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i8(<vscale x 1 x i8> %va, <vscale x 1 x i8> splat (i8 4), metadata !"sgt", <vscale x 1 x i1> %m, i32 %evl)
325 ret <vscale x 1 x i1> %v
328 define <vscale x 1 x i1> @icmp_sgt_vi_swap_nxv1i8(<vscale x 1 x i8> %va, <vscale x 1 x i1> %m, i32 zeroext %evl) {
329 ; CHECK-LABEL: icmp_sgt_vi_swap_nxv1i8:
331 ; CHECK-NEXT: vsetvli zero, a0, e8, mf8, ta, ma
332 ; CHECK-NEXT: vmsle.vi v0, v8, 3, v0.t
334 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i8(<vscale x 1 x i8> splat (i8 4), <vscale x 1 x i8> %va, metadata !"sgt", <vscale x 1 x i1> %m, i32 %evl)
335 ret <vscale x 1 x i1> %v
338 define <vscale x 1 x i1> @icmp_sge_vv_nxv1i8(<vscale x 1 x i8> %va, <vscale x 1 x i8> %vb, <vscale x 1 x i1> %m, i32 zeroext %evl) {
339 ; CHECK-LABEL: icmp_sge_vv_nxv1i8:
341 ; CHECK-NEXT: vsetvli zero, a0, e8, mf8, ta, ma
342 ; CHECK-NEXT: vmsle.vv v0, v9, v8, v0.t
344 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i8(<vscale x 1 x i8> %va, <vscale x 1 x i8> %vb, metadata !"sge", <vscale x 1 x i1> %m, i32 %evl)
345 ret <vscale x 1 x i1> %v
348 define <vscale x 1 x i1> @icmp_sge_vx_nxv1i8(<vscale x 1 x i8> %va, i8 %b, <vscale x 1 x i1> %m, i32 zeroext %evl) {
349 ; CHECK-LABEL: icmp_sge_vx_nxv1i8:
351 ; CHECK-NEXT: vsetvli a2, zero, e8, mf8, ta, ma
352 ; CHECK-NEXT: vmv.v.x v9, a0
353 ; CHECK-NEXT: vsetvli zero, a1, e8, mf8, ta, ma
354 ; CHECK-NEXT: vmsle.vv v0, v9, v8, v0.t
356 %elt.head = insertelement <vscale x 1 x i8> poison, i8 %b, i32 0
357 %vb = shufflevector <vscale x 1 x i8> %elt.head, <vscale x 1 x i8> poison, <vscale x 1 x i32> zeroinitializer
358 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i8(<vscale x 1 x i8> %va, <vscale x 1 x i8> %vb, metadata !"sge", <vscale x 1 x i1> %m, i32 %evl)
359 ret <vscale x 1 x i1> %v
362 define <vscale x 1 x i1> @icmp_sge_vx_swap_nxv1i8(<vscale x 1 x i8> %va, i8 %b, <vscale x 1 x i1> %m, i32 zeroext %evl) {
363 ; CHECK-LABEL: icmp_sge_vx_swap_nxv1i8:
365 ; CHECK-NEXT: vsetvli zero, a1, e8, mf8, ta, ma
366 ; CHECK-NEXT: vmsle.vx v0, v8, a0, v0.t
368 %elt.head = insertelement <vscale x 1 x i8> poison, i8 %b, i32 0
369 %vb = shufflevector <vscale x 1 x i8> %elt.head, <vscale x 1 x i8> poison, <vscale x 1 x i32> zeroinitializer
370 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i8(<vscale x 1 x i8> %vb, <vscale x 1 x i8> %va, metadata !"sge", <vscale x 1 x i1> %m, i32 %evl)
371 ret <vscale x 1 x i1> %v
374 define <vscale x 1 x i1> @icmp_sge_vi_nxv1i8(<vscale x 1 x i8> %va, <vscale x 1 x i1> %m, i32 zeroext %evl) {
375 ; CHECK-LABEL: icmp_sge_vi_nxv1i8:
377 ; CHECK-NEXT: vsetvli zero, a0, e8, mf8, ta, ma
378 ; CHECK-NEXT: vmsgt.vi v0, v8, 3, v0.t
380 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i8(<vscale x 1 x i8> %va, <vscale x 1 x i8> splat (i8 4), metadata !"sge", <vscale x 1 x i1> %m, i32 %evl)
381 ret <vscale x 1 x i1> %v
384 define <vscale x 1 x i1> @icmp_sge_vi_swap_nxv1i8(<vscale x 1 x i8> %va, <vscale x 1 x i1> %m, i32 zeroext %evl) {
385 ; CHECK-LABEL: icmp_sge_vi_swap_nxv1i8:
387 ; CHECK-NEXT: vsetvli zero, a0, e8, mf8, ta, ma
388 ; CHECK-NEXT: vmsle.vi v0, v8, 4, v0.t
390 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i8(<vscale x 1 x i8> splat (i8 4), <vscale x 1 x i8> %va, metadata !"sge", <vscale x 1 x i1> %m, i32 %evl)
391 ret <vscale x 1 x i1> %v
394 define <vscale x 1 x i1> @icmp_slt_vv_nxv1i8(<vscale x 1 x i8> %va, <vscale x 1 x i8> %vb, <vscale x 1 x i1> %m, i32 zeroext %evl) {
395 ; CHECK-LABEL: icmp_slt_vv_nxv1i8:
397 ; CHECK-NEXT: vsetvli zero, a0, e8, mf8, ta, ma
398 ; CHECK-NEXT: vmslt.vv v0, v8, v9, v0.t
400 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i8(<vscale x 1 x i8> %va, <vscale x 1 x i8> %vb, metadata !"slt", <vscale x 1 x i1> %m, i32 %evl)
401 ret <vscale x 1 x i1> %v
404 define <vscale x 1 x i1> @icmp_slt_vx_nxv1i8(<vscale x 1 x i8> %va, i8 %b, <vscale x 1 x i1> %m, i32 zeroext %evl) {
405 ; CHECK-LABEL: icmp_slt_vx_nxv1i8:
407 ; CHECK-NEXT: vsetvli zero, a1, e8, mf8, ta, ma
408 ; CHECK-NEXT: vmslt.vx v0, v8, a0, v0.t
410 %elt.head = insertelement <vscale x 1 x i8> poison, i8 %b, i32 0
411 %vb = shufflevector <vscale x 1 x i8> %elt.head, <vscale x 1 x i8> poison, <vscale x 1 x i32> zeroinitializer
412 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i8(<vscale x 1 x i8> %va, <vscale x 1 x i8> %vb, metadata !"slt", <vscale x 1 x i1> %m, i32 %evl)
413 ret <vscale x 1 x i1> %v
416 define <vscale x 1 x i1> @icmp_slt_vx_swap_nxv1i8(<vscale x 1 x i8> %va, i8 %b, <vscale x 1 x i1> %m, i32 zeroext %evl) {
417 ; CHECK-LABEL: icmp_slt_vx_swap_nxv1i8:
419 ; CHECK-NEXT: vsetvli zero, a1, e8, mf8, ta, ma
420 ; CHECK-NEXT: vmsgt.vx v0, v8, a0, v0.t
422 %elt.head = insertelement <vscale x 1 x i8> poison, i8 %b, i32 0
423 %vb = shufflevector <vscale x 1 x i8> %elt.head, <vscale x 1 x i8> poison, <vscale x 1 x i32> zeroinitializer
424 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i8(<vscale x 1 x i8> %vb, <vscale x 1 x i8> %va, metadata !"slt", <vscale x 1 x i1> %m, i32 %evl)
425 ret <vscale x 1 x i1> %v
428 define <vscale x 1 x i1> @icmp_slt_vi_nxv1i8(<vscale x 1 x i8> %va, <vscale x 1 x i1> %m, i32 zeroext %evl) {
429 ; CHECK-LABEL: icmp_slt_vi_nxv1i8:
431 ; CHECK-NEXT: vsetvli zero, a0, e8, mf8, ta, ma
432 ; CHECK-NEXT: vmsle.vi v0, v8, 3, v0.t
434 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i8(<vscale x 1 x i8> %va, <vscale x 1 x i8> splat (i8 4), metadata !"slt", <vscale x 1 x i1> %m, i32 %evl)
435 ret <vscale x 1 x i1> %v
438 define <vscale x 1 x i1> @icmp_slt_vi_swap_nxv1i8(<vscale x 1 x i8> %va, <vscale x 1 x i1> %m, i32 zeroext %evl) {
439 ; CHECK-LABEL: icmp_slt_vi_swap_nxv1i8:
441 ; CHECK-NEXT: vsetvli zero, a0, e8, mf8, ta, ma
442 ; CHECK-NEXT: vmsgt.vi v0, v8, 4, v0.t
444 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i8(<vscale x 1 x i8> splat (i8 4), <vscale x 1 x i8> %va, metadata !"slt", <vscale x 1 x i1> %m, i32 %evl)
445 ret <vscale x 1 x i1> %v
448 define <vscale x 1 x i1> @icmp_sle_vv_nxv1i8(<vscale x 1 x i8> %va, <vscale x 1 x i8> %vb, <vscale x 1 x i1> %m, i32 zeroext %evl) {
449 ; CHECK-LABEL: icmp_sle_vv_nxv1i8:
451 ; CHECK-NEXT: vsetvli zero, a0, e8, mf8, ta, ma
452 ; CHECK-NEXT: vmsle.vv v0, v8, v9, v0.t
454 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i8(<vscale x 1 x i8> %va, <vscale x 1 x i8> %vb, metadata !"sle", <vscale x 1 x i1> %m, i32 %evl)
455 ret <vscale x 1 x i1> %v
458 define <vscale x 1 x i1> @icmp_sle_vx_nxv1i8(<vscale x 1 x i8> %va, i8 %b, <vscale x 1 x i1> %m, i32 zeroext %evl) {
459 ; CHECK-LABEL: icmp_sle_vx_nxv1i8:
461 ; CHECK-NEXT: vsetvli zero, a1, e8, mf8, ta, ma
462 ; CHECK-NEXT: vmsle.vx v0, v8, a0, v0.t
464 %elt.head = insertelement <vscale x 1 x i8> poison, i8 %b, i32 0
465 %vb = shufflevector <vscale x 1 x i8> %elt.head, <vscale x 1 x i8> poison, <vscale x 1 x i32> zeroinitializer
466 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i8(<vscale x 1 x i8> %va, <vscale x 1 x i8> %vb, metadata !"sle", <vscale x 1 x i1> %m, i32 %evl)
467 ret <vscale x 1 x i1> %v
470 define <vscale x 1 x i1> @icmp_sle_vx_swap_nxv1i8(<vscale x 1 x i8> %va, i8 %b, <vscale x 1 x i1> %m, i32 zeroext %evl) {
471 ; CHECK-LABEL: icmp_sle_vx_swap_nxv1i8:
473 ; CHECK-NEXT: vsetvli a2, zero, e8, mf8, ta, ma
474 ; CHECK-NEXT: vmv.v.x v9, a0
475 ; CHECK-NEXT: vsetvli zero, a1, e8, mf8, ta, ma
476 ; CHECK-NEXT: vmsle.vv v0, v9, v8, v0.t
478 %elt.head = insertelement <vscale x 1 x i8> poison, i8 %b, i32 0
479 %vb = shufflevector <vscale x 1 x i8> %elt.head, <vscale x 1 x i8> poison, <vscale x 1 x i32> zeroinitializer
480 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i8(<vscale x 1 x i8> %vb, <vscale x 1 x i8> %va, metadata !"sle", <vscale x 1 x i1> %m, i32 %evl)
481 ret <vscale x 1 x i1> %v
484 define <vscale x 1 x i1> @icmp_sle_vi_nxv1i8(<vscale x 1 x i8> %va, <vscale x 1 x i1> %m, i32 zeroext %evl) {
485 ; CHECK-LABEL: icmp_sle_vi_nxv1i8:
487 ; CHECK-NEXT: vsetvli zero, a0, e8, mf8, ta, ma
488 ; CHECK-NEXT: vmsle.vi v0, v8, 4, v0.t
490 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i8(<vscale x 1 x i8> %va, <vscale x 1 x i8> splat (i8 4), metadata !"sle", <vscale x 1 x i1> %m, i32 %evl)
491 ret <vscale x 1 x i1> %v
494 define <vscale x 1 x i1> @icmp_sle_vi_swap_nxv1i8(<vscale x 1 x i8> %va, <vscale x 1 x i1> %m, i32 zeroext %evl) {
495 ; CHECK-LABEL: icmp_sle_vi_swap_nxv1i8:
497 ; CHECK-NEXT: vsetvli zero, a0, e8, mf8, ta, ma
498 ; CHECK-NEXT: vmsgt.vi v0, v8, 3, v0.t
500 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i8(<vscale x 1 x i8> splat (i8 4), <vscale x 1 x i8> %va, metadata !"sle", <vscale x 1 x i1> %m, i32 %evl)
501 ret <vscale x 1 x i1> %v
504 declare <vscale x 3 x i1> @llvm.vp.icmp.nxv3i8(<vscale x 3 x i8>, <vscale x 3 x i8>, metadata, <vscale x 3 x i1>, i32)
506 define <vscale x 3 x i1> @icmp_eq_vv_nxv3i8(<vscale x 3 x i8> %va, <vscale x 3 x i8> %vb, <vscale x 3 x i1> %m, i32 zeroext %evl) {
507 ; CHECK-LABEL: icmp_eq_vv_nxv3i8:
509 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
510 ; CHECK-NEXT: vmseq.vv v0, v8, v9, v0.t
512 %v = call <vscale x 3 x i1> @llvm.vp.icmp.nxv3i8(<vscale x 3 x i8> %va, <vscale x 3 x i8> %vb, metadata !"eq", <vscale x 3 x i1> %m, i32 %evl)
513 ret <vscale x 3 x i1> %v
516 define <vscale x 3 x i1> @icmp_eq_vx_nxv3i8(<vscale x 3 x i8> %va, i8 %b, <vscale x 3 x i1> %m, i32 zeroext %evl) {
517 ; CHECK-LABEL: icmp_eq_vx_nxv3i8:
519 ; CHECK-NEXT: vsetvli zero, a1, e8, mf2, ta, ma
520 ; CHECK-NEXT: vmseq.vx v0, v8, a0, v0.t
522 %elt.head = insertelement <vscale x 3 x i8> poison, i8 %b, i32 0
523 %vb = shufflevector <vscale x 3 x i8> %elt.head, <vscale x 3 x i8> poison, <vscale x 3 x i32> zeroinitializer
524 %v = call <vscale x 3 x i1> @llvm.vp.icmp.nxv3i8(<vscale x 3 x i8> %va, <vscale x 3 x i8> %vb, metadata !"eq", <vscale x 3 x i1> %m, i32 %evl)
525 ret <vscale x 3 x i1> %v
528 define <vscale x 3 x i1> @icmp_eq_vx_swap_nxv3i8(<vscale x 3 x i8> %va, i8 %b, <vscale x 3 x i1> %m, i32 zeroext %evl) {
529 ; CHECK-LABEL: icmp_eq_vx_swap_nxv3i8:
531 ; CHECK-NEXT: vsetvli zero, a1, e8, mf2, ta, ma
532 ; CHECK-NEXT: vmseq.vx v0, v8, a0, v0.t
534 %elt.head = insertelement <vscale x 3 x i8> poison, i8 %b, i32 0
535 %vb = shufflevector <vscale x 3 x i8> %elt.head, <vscale x 3 x i8> poison, <vscale x 3 x i32> zeroinitializer
536 %v = call <vscale x 3 x i1> @llvm.vp.icmp.nxv3i8(<vscale x 3 x i8> %vb, <vscale x 3 x i8> %va, metadata !"eq", <vscale x 3 x i1> %m, i32 %evl)
537 ret <vscale x 3 x i1> %v
540 declare <vscale x 8 x i1> @llvm.vp.icmp.nxv8i7(<vscale x 8 x i7>, <vscale x 8 x i7>, metadata, <vscale x 8 x i1>, i32)
542 define <vscale x 8 x i1> @icmp_eq_vv_nxv8i7(<vscale x 8 x i7> %va, <vscale x 8 x i7> %vb, <vscale x 8 x i1> %m, i32 zeroext %evl) {
543 ; CHECK-LABEL: icmp_eq_vv_nxv8i7:
545 ; CHECK-NEXT: li a1, 127
546 ; CHECK-NEXT: vsetvli a2, zero, e8, m1, ta, ma
547 ; CHECK-NEXT: vand.vx v9, v9, a1
548 ; CHECK-NEXT: vand.vx v8, v8, a1
549 ; CHECK-NEXT: vsetvli zero, a0, e8, m1, ta, ma
550 ; CHECK-NEXT: vmseq.vv v0, v8, v9, v0.t
552 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i7(<vscale x 8 x i7> %va, <vscale x 8 x i7> %vb, metadata !"eq", <vscale x 8 x i1> %m, i32 %evl)
553 ret <vscale x 8 x i1> %v
556 define <vscale x 8 x i1> @icmp_eq_vx_nxv8i7(<vscale x 8 x i7> %va, i7 %b, <vscale x 8 x i1> %m, i32 zeroext %evl) {
557 ; CHECK-LABEL: icmp_eq_vx_nxv8i7:
559 ; CHECK-NEXT: li a2, 127
560 ; CHECK-NEXT: vsetvli a3, zero, e8, m1, ta, ma
561 ; CHECK-NEXT: vand.vx v8, v8, a2
562 ; CHECK-NEXT: vmv.v.x v9, a0
563 ; CHECK-NEXT: vand.vx v9, v9, a2
564 ; CHECK-NEXT: vsetvli zero, a1, e8, m1, ta, ma
565 ; CHECK-NEXT: vmseq.vv v0, v8, v9, v0.t
567 %elt.head = insertelement <vscale x 8 x i7> poison, i7 %b, i32 0
568 %vb = shufflevector <vscale x 8 x i7> %elt.head, <vscale x 8 x i7> poison, <vscale x 8 x i32> zeroinitializer
569 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i7(<vscale x 8 x i7> %va, <vscale x 8 x i7> %vb, metadata !"eq", <vscale x 8 x i1> %m, i32 %evl)
570 ret <vscale x 8 x i1> %v
573 define <vscale x 8 x i1> @icmp_eq_vx_swap_nxv8i7(<vscale x 8 x i7> %va, i7 %b, <vscale x 8 x i1> %m, i32 zeroext %evl) {
574 ; CHECK-LABEL: icmp_eq_vx_swap_nxv8i7:
576 ; CHECK-NEXT: li a2, 127
577 ; CHECK-NEXT: vsetvli a3, zero, e8, m1, ta, ma
578 ; CHECK-NEXT: vand.vx v8, v8, a2
579 ; CHECK-NEXT: vmv.v.x v9, a0
580 ; CHECK-NEXT: vand.vx v9, v9, a2
581 ; CHECK-NEXT: vsetvli zero, a1, e8, m1, ta, ma
582 ; CHECK-NEXT: vmseq.vv v0, v9, v8, v0.t
584 %elt.head = insertelement <vscale x 8 x i7> poison, i7 %b, i32 0
585 %vb = shufflevector <vscale x 8 x i7> %elt.head, <vscale x 8 x i7> poison, <vscale x 8 x i32> zeroinitializer
586 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i7(<vscale x 8 x i7> %vb, <vscale x 8 x i7> %va, metadata !"eq", <vscale x 8 x i1> %m, i32 %evl)
587 ret <vscale x 8 x i1> %v
590 declare <vscale x 8 x i1> @llvm.vp.icmp.nxv8i8(<vscale x 8 x i8>, <vscale x 8 x i8>, metadata, <vscale x 8 x i1>, i32)
592 define <vscale x 8 x i1> @icmp_eq_vv_nxv8i8(<vscale x 8 x i8> %va, <vscale x 8 x i8> %vb, <vscale x 8 x i1> %m, i32 zeroext %evl) {
593 ; CHECK-LABEL: icmp_eq_vv_nxv8i8:
595 ; CHECK-NEXT: vsetvli zero, a0, e8, m1, ta, ma
596 ; CHECK-NEXT: vmseq.vv v0, v8, v9, v0.t
598 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i8(<vscale x 8 x i8> %va, <vscale x 8 x i8> %vb, metadata !"eq", <vscale x 8 x i1> %m, i32 %evl)
599 ret <vscale x 8 x i1> %v
602 define <vscale x 8 x i1> @icmp_eq_vx_nxv8i8(<vscale x 8 x i8> %va, i8 %b, <vscale x 8 x i1> %m, i32 zeroext %evl) {
603 ; CHECK-LABEL: icmp_eq_vx_nxv8i8:
605 ; CHECK-NEXT: vsetvli zero, a1, e8, m1, ta, ma
606 ; CHECK-NEXT: vmseq.vx v0, v8, a0, v0.t
608 %elt.head = insertelement <vscale x 8 x i8> poison, i8 %b, i32 0
609 %vb = shufflevector <vscale x 8 x i8> %elt.head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
610 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i8(<vscale x 8 x i8> %va, <vscale x 8 x i8> %vb, metadata !"eq", <vscale x 8 x i1> %m, i32 %evl)
611 ret <vscale x 8 x i1> %v
614 define <vscale x 8 x i1> @icmp_eq_vx_swap_nxv8i8(<vscale x 8 x i8> %va, i8 %b, <vscale x 8 x i1> %m, i32 zeroext %evl) {
615 ; CHECK-LABEL: icmp_eq_vx_swap_nxv8i8:
617 ; CHECK-NEXT: vsetvli zero, a1, e8, m1, ta, ma
618 ; CHECK-NEXT: vmseq.vx v0, v8, a0, v0.t
620 %elt.head = insertelement <vscale x 8 x i8> poison, i8 %b, i32 0
621 %vb = shufflevector <vscale x 8 x i8> %elt.head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
622 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i8(<vscale x 8 x i8> %vb, <vscale x 8 x i8> %va, metadata !"eq", <vscale x 8 x i1> %m, i32 %evl)
623 ret <vscale x 8 x i1> %v
626 define <vscale x 8 x i1> @icmp_eq_vi_nxv8i8(<vscale x 8 x i8> %va, <vscale x 8 x i1> %m, i32 zeroext %evl) {
627 ; CHECK-LABEL: icmp_eq_vi_nxv8i8:
629 ; CHECK-NEXT: vsetvli zero, a0, e8, m1, ta, ma
630 ; CHECK-NEXT: vmseq.vi v0, v8, 4, v0.t
632 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i8(<vscale x 8 x i8> %va, <vscale x 8 x i8> splat (i8 4), metadata !"eq", <vscale x 8 x i1> %m, i32 %evl)
633 ret <vscale x 8 x i1> %v
636 define <vscale x 8 x i1> @icmp_eq_vi_swap_nxv8i8(<vscale x 8 x i8> %va, <vscale x 8 x i1> %m, i32 zeroext %evl) {
637 ; CHECK-LABEL: icmp_eq_vi_swap_nxv8i8:
639 ; CHECK-NEXT: vsetvli zero, a0, e8, m1, ta, ma
640 ; CHECK-NEXT: vmseq.vi v0, v8, 4, v0.t
642 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i8(<vscale x 8 x i8> splat (i8 4), <vscale x 8 x i8> %va, metadata !"eq", <vscale x 8 x i1> %m, i32 %evl)
643 ret <vscale x 8 x i1> %v
646 define <vscale x 8 x i1> @icmp_ne_vv_nxv8i8(<vscale x 8 x i8> %va, <vscale x 8 x i8> %vb, <vscale x 8 x i1> %m, i32 zeroext %evl) {
647 ; CHECK-LABEL: icmp_ne_vv_nxv8i8:
649 ; CHECK-NEXT: vsetvli zero, a0, e8, m1, ta, ma
650 ; CHECK-NEXT: vmsne.vv v0, v8, v9, v0.t
652 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i8(<vscale x 8 x i8> %va, <vscale x 8 x i8> %vb, metadata !"ne", <vscale x 8 x i1> %m, i32 %evl)
653 ret <vscale x 8 x i1> %v
656 define <vscale x 8 x i1> @icmp_ne_vx_nxv8i8(<vscale x 8 x i8> %va, i8 %b, <vscale x 8 x i1> %m, i32 zeroext %evl) {
657 ; CHECK-LABEL: icmp_ne_vx_nxv8i8:
659 ; CHECK-NEXT: vsetvli zero, a1, e8, m1, ta, ma
660 ; CHECK-NEXT: vmsne.vx v0, v8, a0, v0.t
662 %elt.head = insertelement <vscale x 8 x i8> poison, i8 %b, i32 0
663 %vb = shufflevector <vscale x 8 x i8> %elt.head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
664 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i8(<vscale x 8 x i8> %va, <vscale x 8 x i8> %vb, metadata !"ne", <vscale x 8 x i1> %m, i32 %evl)
665 ret <vscale x 8 x i1> %v
668 define <vscale x 8 x i1> @icmp_ne_vx_swap_nxv8i8(<vscale x 8 x i8> %va, i8 %b, <vscale x 8 x i1> %m, i32 zeroext %evl) {
669 ; CHECK-LABEL: icmp_ne_vx_swap_nxv8i8:
671 ; CHECK-NEXT: vsetvli zero, a1, e8, m1, ta, ma
672 ; CHECK-NEXT: vmsne.vx v0, v8, a0, v0.t
674 %elt.head = insertelement <vscale x 8 x i8> poison, i8 %b, i32 0
675 %vb = shufflevector <vscale x 8 x i8> %elt.head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
676 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i8(<vscale x 8 x i8> %vb, <vscale x 8 x i8> %va, metadata !"ne", <vscale x 8 x i1> %m, i32 %evl)
677 ret <vscale x 8 x i1> %v
680 define <vscale x 8 x i1> @icmp_ne_vi_nxv8i8(<vscale x 8 x i8> %va, <vscale x 8 x i1> %m, i32 zeroext %evl) {
681 ; CHECK-LABEL: icmp_ne_vi_nxv8i8:
683 ; CHECK-NEXT: vsetvli zero, a0, e8, m1, ta, ma
684 ; CHECK-NEXT: vmsne.vi v0, v8, 4, v0.t
686 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i8(<vscale x 8 x i8> %va, <vscale x 8 x i8> splat (i8 4), metadata !"ne", <vscale x 8 x i1> %m, i32 %evl)
687 ret <vscale x 8 x i1> %v
690 define <vscale x 8 x i1> @icmp_ne_vi_swap_nxv8i8(<vscale x 8 x i8> %va, <vscale x 8 x i1> %m, i32 zeroext %evl) {
691 ; CHECK-LABEL: icmp_ne_vi_swap_nxv8i8:
693 ; CHECK-NEXT: vsetvli zero, a0, e8, m1, ta, ma
694 ; CHECK-NEXT: vmsne.vi v0, v8, 4, v0.t
696 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i8(<vscale x 8 x i8> splat (i8 4), <vscale x 8 x i8> %va, metadata !"ne", <vscale x 8 x i1> %m, i32 %evl)
697 ret <vscale x 8 x i1> %v
700 define <vscale x 8 x i1> @icmp_ugt_vv_nxv8i8(<vscale x 8 x i8> %va, <vscale x 8 x i8> %vb, <vscale x 8 x i1> %m, i32 zeroext %evl) {
701 ; CHECK-LABEL: icmp_ugt_vv_nxv8i8:
703 ; CHECK-NEXT: vsetvli zero, a0, e8, m1, ta, ma
704 ; CHECK-NEXT: vmsltu.vv v0, v9, v8, v0.t
706 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i8(<vscale x 8 x i8> %va, <vscale x 8 x i8> %vb, metadata !"ugt", <vscale x 8 x i1> %m, i32 %evl)
707 ret <vscale x 8 x i1> %v
710 define <vscale x 8 x i1> @icmp_ugt_vx_nxv8i8(<vscale x 8 x i8> %va, i8 %b, <vscale x 8 x i1> %m, i32 zeroext %evl) {
711 ; CHECK-LABEL: icmp_ugt_vx_nxv8i8:
713 ; CHECK-NEXT: vsetvli zero, a1, e8, m1, ta, ma
714 ; CHECK-NEXT: vmsgtu.vx v0, v8, a0, v0.t
716 %elt.head = insertelement <vscale x 8 x i8> poison, i8 %b, i32 0
717 %vb = shufflevector <vscale x 8 x i8> %elt.head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
718 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i8(<vscale x 8 x i8> %va, <vscale x 8 x i8> %vb, metadata !"ugt", <vscale x 8 x i1> %m, i32 %evl)
719 ret <vscale x 8 x i1> %v
722 define <vscale x 8 x i1> @icmp_ugt_vx_swap_nxv8i8(<vscale x 8 x i8> %va, i8 %b, <vscale x 8 x i1> %m, i32 zeroext %evl) {
723 ; CHECK-LABEL: icmp_ugt_vx_swap_nxv8i8:
725 ; CHECK-NEXT: vsetvli zero, a1, e8, m1, ta, ma
726 ; CHECK-NEXT: vmsltu.vx v0, v8, a0, v0.t
728 %elt.head = insertelement <vscale x 8 x i8> poison, i8 %b, i32 0
729 %vb = shufflevector <vscale x 8 x i8> %elt.head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
730 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i8(<vscale x 8 x i8> %vb, <vscale x 8 x i8> %va, metadata !"ugt", <vscale x 8 x i1> %m, i32 %evl)
731 ret <vscale x 8 x i1> %v
734 define <vscale x 8 x i1> @icmp_ugt_vi_nxv8i8(<vscale x 8 x i8> %va, <vscale x 8 x i1> %m, i32 zeroext %evl) {
735 ; CHECK-LABEL: icmp_ugt_vi_nxv8i8:
737 ; CHECK-NEXT: vsetvli zero, a0, e8, m1, ta, ma
738 ; CHECK-NEXT: vmsgtu.vi v0, v8, 4, v0.t
740 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i8(<vscale x 8 x i8> %va, <vscale x 8 x i8> splat (i8 4), metadata !"ugt", <vscale x 8 x i1> %m, i32 %evl)
741 ret <vscale x 8 x i1> %v
744 define <vscale x 8 x i1> @icmp_ugt_vi_swap_nxv8i8(<vscale x 8 x i8> %va, <vscale x 8 x i1> %m, i32 zeroext %evl) {
745 ; CHECK-LABEL: icmp_ugt_vi_swap_nxv8i8:
747 ; CHECK-NEXT: vsetvli zero, a0, e8, m1, ta, ma
748 ; CHECK-NEXT: vmsleu.vi v0, v8, 3, v0.t
750 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i8(<vscale x 8 x i8> splat (i8 4), <vscale x 8 x i8> %va, metadata !"ugt", <vscale x 8 x i1> %m, i32 %evl)
751 ret <vscale x 8 x i1> %v
754 define <vscale x 8 x i1> @icmp_uge_vv_nxv8i8(<vscale x 8 x i8> %va, <vscale x 8 x i8> %vb, <vscale x 8 x i1> %m, i32 zeroext %evl) {
755 ; CHECK-LABEL: icmp_uge_vv_nxv8i8:
757 ; CHECK-NEXT: vsetvli zero, a0, e8, m1, ta, ma
758 ; CHECK-NEXT: vmsleu.vv v0, v9, v8, v0.t
760 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i8(<vscale x 8 x i8> %va, <vscale x 8 x i8> %vb, metadata !"uge", <vscale x 8 x i1> %m, i32 %evl)
761 ret <vscale x 8 x i1> %v
764 define <vscale x 8 x i1> @icmp_uge_vx_nxv8i8(<vscale x 8 x i8> %va, i8 %b, <vscale x 8 x i1> %m, i32 zeroext %evl) {
765 ; CHECK-LABEL: icmp_uge_vx_nxv8i8:
767 ; CHECK-NEXT: vsetvli a2, zero, e8, m1, ta, ma
768 ; CHECK-NEXT: vmv.v.x v9, a0
769 ; CHECK-NEXT: vsetvli zero, a1, e8, m1, ta, ma
770 ; CHECK-NEXT: vmsleu.vv v0, v9, v8, v0.t
772 %elt.head = insertelement <vscale x 8 x i8> poison, i8 %b, i32 0
773 %vb = shufflevector <vscale x 8 x i8> %elt.head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
774 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i8(<vscale x 8 x i8> %va, <vscale x 8 x i8> %vb, metadata !"uge", <vscale x 8 x i1> %m, i32 %evl)
775 ret <vscale x 8 x i1> %v
778 define <vscale x 8 x i1> @icmp_uge_vx_swap_nxv8i8(<vscale x 8 x i8> %va, i8 %b, <vscale x 8 x i1> %m, i32 zeroext %evl) {
779 ; CHECK-LABEL: icmp_uge_vx_swap_nxv8i8:
781 ; CHECK-NEXT: vsetvli zero, a1, e8, m1, ta, ma
782 ; CHECK-NEXT: vmsleu.vx v0, v8, a0, v0.t
784 %elt.head = insertelement <vscale x 8 x i8> poison, i8 %b, i32 0
785 %vb = shufflevector <vscale x 8 x i8> %elt.head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
786 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i8(<vscale x 8 x i8> %vb, <vscale x 8 x i8> %va, metadata !"uge", <vscale x 8 x i1> %m, i32 %evl)
787 ret <vscale x 8 x i1> %v
790 define <vscale x 8 x i1> @icmp_uge_vi_nxv8i8(<vscale x 8 x i8> %va, <vscale x 8 x i1> %m, i32 zeroext %evl) {
791 ; CHECK-LABEL: icmp_uge_vi_nxv8i8:
793 ; CHECK-NEXT: vsetvli zero, a0, e8, m1, ta, ma
794 ; CHECK-NEXT: vmsgtu.vi v0, v8, 3, v0.t
796 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i8(<vscale x 8 x i8> %va, <vscale x 8 x i8> splat (i8 4), metadata !"uge", <vscale x 8 x i1> %m, i32 %evl)
797 ret <vscale x 8 x i1> %v
800 define <vscale x 8 x i1> @icmp_uge_vi_swap_nxv8i8(<vscale x 8 x i8> %va, <vscale x 8 x i1> %m, i32 zeroext %evl) {
801 ; CHECK-LABEL: icmp_uge_vi_swap_nxv8i8:
803 ; CHECK-NEXT: vsetvli zero, a0, e8, m1, ta, ma
804 ; CHECK-NEXT: vmsleu.vi v0, v8, 4, v0.t
806 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i8(<vscale x 8 x i8> splat (i8 4), <vscale x 8 x i8> %va, metadata !"uge", <vscale x 8 x i1> %m, i32 %evl)
807 ret <vscale x 8 x i1> %v
810 define <vscale x 8 x i1> @icmp_ult_vv_nxv8i8(<vscale x 8 x i8> %va, <vscale x 8 x i8> %vb, <vscale x 8 x i1> %m, i32 zeroext %evl) {
811 ; CHECK-LABEL: icmp_ult_vv_nxv8i8:
813 ; CHECK-NEXT: vsetvli zero, a0, e8, m1, ta, ma
814 ; CHECK-NEXT: vmsltu.vv v0, v8, v9, v0.t
816 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i8(<vscale x 8 x i8> %va, <vscale x 8 x i8> %vb, metadata !"ult", <vscale x 8 x i1> %m, i32 %evl)
817 ret <vscale x 8 x i1> %v
820 define <vscale x 8 x i1> @icmp_ult_vx_nxv8i8(<vscale x 8 x i8> %va, i8 %b, <vscale x 8 x i1> %m, i32 zeroext %evl) {
821 ; CHECK-LABEL: icmp_ult_vx_nxv8i8:
823 ; CHECK-NEXT: vsetvli zero, a1, e8, m1, ta, ma
824 ; CHECK-NEXT: vmsltu.vx v0, v8, a0, v0.t
826 %elt.head = insertelement <vscale x 8 x i8> poison, i8 %b, i32 0
827 %vb = shufflevector <vscale x 8 x i8> %elt.head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
828 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i8(<vscale x 8 x i8> %va, <vscale x 8 x i8> %vb, metadata !"ult", <vscale x 8 x i1> %m, i32 %evl)
829 ret <vscale x 8 x i1> %v
832 define <vscale x 8 x i1> @icmp_ult_vx_swap_nxv8i8(<vscale x 8 x i8> %va, i8 %b, <vscale x 8 x i1> %m, i32 zeroext %evl) {
833 ; CHECK-LABEL: icmp_ult_vx_swap_nxv8i8:
835 ; CHECK-NEXT: vsetvli zero, a1, e8, m1, ta, ma
836 ; CHECK-NEXT: vmsgtu.vx v0, v8, a0, v0.t
838 %elt.head = insertelement <vscale x 8 x i8> poison, i8 %b, i32 0
839 %vb = shufflevector <vscale x 8 x i8> %elt.head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
840 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i8(<vscale x 8 x i8> %vb, <vscale x 8 x i8> %va, metadata !"ult", <vscale x 8 x i1> %m, i32 %evl)
841 ret <vscale x 8 x i1> %v
844 define <vscale x 8 x i1> @icmp_ult_vi_nxv8i8(<vscale x 8 x i8> %va, <vscale x 8 x i1> %m, i32 zeroext %evl) {
845 ; CHECK-LABEL: icmp_ult_vi_nxv8i8:
847 ; CHECK-NEXT: vsetvli zero, a0, e8, m1, ta, ma
848 ; CHECK-NEXT: vmsleu.vi v0, v8, 3, v0.t
850 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i8(<vscale x 8 x i8> %va, <vscale x 8 x i8> splat (i8 4), metadata !"ult", <vscale x 8 x i1> %m, i32 %evl)
851 ret <vscale x 8 x i1> %v
854 define <vscale x 8 x i1> @icmp_ult_vi_swap_nxv8i8(<vscale x 8 x i8> %va, <vscale x 8 x i1> %m, i32 zeroext %evl) {
855 ; CHECK-LABEL: icmp_ult_vi_swap_nxv8i8:
857 ; CHECK-NEXT: vsetvli zero, a0, e8, m1, ta, ma
858 ; CHECK-NEXT: vmsgtu.vi v0, v8, 4, v0.t
860 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i8(<vscale x 8 x i8> splat (i8 4), <vscale x 8 x i8> %va, metadata !"ult", <vscale x 8 x i1> %m, i32 %evl)
861 ret <vscale x 8 x i1> %v
864 define <vscale x 8 x i1> @icmp_sgt_vv_nxv8i8(<vscale x 8 x i8> %va, <vscale x 8 x i8> %vb, <vscale x 8 x i1> %m, i32 zeroext %evl) {
865 ; CHECK-LABEL: icmp_sgt_vv_nxv8i8:
867 ; CHECK-NEXT: vsetvli zero, a0, e8, m1, ta, ma
868 ; CHECK-NEXT: vmslt.vv v0, v9, v8, v0.t
870 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i8(<vscale x 8 x i8> %va, <vscale x 8 x i8> %vb, metadata !"sgt", <vscale x 8 x i1> %m, i32 %evl)
871 ret <vscale x 8 x i1> %v
874 define <vscale x 8 x i1> @icmp_sgt_vx_nxv8i8(<vscale x 8 x i8> %va, i8 %b, <vscale x 8 x i1> %m, i32 zeroext %evl) {
875 ; CHECK-LABEL: icmp_sgt_vx_nxv8i8:
877 ; CHECK-NEXT: vsetvli zero, a1, e8, m1, ta, ma
878 ; CHECK-NEXT: vmsgt.vx v0, v8, a0, v0.t
880 %elt.head = insertelement <vscale x 8 x i8> poison, i8 %b, i32 0
881 %vb = shufflevector <vscale x 8 x i8> %elt.head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
882 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i8(<vscale x 8 x i8> %va, <vscale x 8 x i8> %vb, metadata !"sgt", <vscale x 8 x i1> %m, i32 %evl)
883 ret <vscale x 8 x i1> %v
886 define <vscale x 8 x i1> @icmp_sgt_vx_swap_nxv8i8(<vscale x 8 x i8> %va, i8 %b, <vscale x 8 x i1> %m, i32 zeroext %evl) {
887 ; CHECK-LABEL: icmp_sgt_vx_swap_nxv8i8:
889 ; CHECK-NEXT: vsetvli zero, a1, e8, m1, ta, ma
890 ; CHECK-NEXT: vmslt.vx v0, v8, a0, v0.t
892 %elt.head = insertelement <vscale x 8 x i8> poison, i8 %b, i32 0
893 %vb = shufflevector <vscale x 8 x i8> %elt.head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
894 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i8(<vscale x 8 x i8> %vb, <vscale x 8 x i8> %va, metadata !"sgt", <vscale x 8 x i1> %m, i32 %evl)
895 ret <vscale x 8 x i1> %v
898 define <vscale x 8 x i1> @icmp_sgt_vi_nxv8i8(<vscale x 8 x i8> %va, <vscale x 8 x i1> %m, i32 zeroext %evl) {
899 ; CHECK-LABEL: icmp_sgt_vi_nxv8i8:
901 ; CHECK-NEXT: vsetvli zero, a0, e8, m1, ta, ma
902 ; CHECK-NEXT: vmsgt.vi v0, v8, 4, v0.t
904 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i8(<vscale x 8 x i8> %va, <vscale x 8 x i8> splat (i8 4), metadata !"sgt", <vscale x 8 x i1> %m, i32 %evl)
905 ret <vscale x 8 x i1> %v
908 define <vscale x 8 x i1> @icmp_sgt_vi_swap_nxv8i8(<vscale x 8 x i8> %va, <vscale x 8 x i1> %m, i32 zeroext %evl) {
909 ; CHECK-LABEL: icmp_sgt_vi_swap_nxv8i8:
911 ; CHECK-NEXT: vsetvli zero, a0, e8, m1, ta, ma
912 ; CHECK-NEXT: vmsle.vi v0, v8, 3, v0.t
914 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i8(<vscale x 8 x i8> splat (i8 4), <vscale x 8 x i8> %va, metadata !"sgt", <vscale x 8 x i1> %m, i32 %evl)
915 ret <vscale x 8 x i1> %v
918 define <vscale x 8 x i1> @icmp_sge_vv_nxv8i8(<vscale x 8 x i8> %va, <vscale x 8 x i8> %vb, <vscale x 8 x i1> %m, i32 zeroext %evl) {
919 ; CHECK-LABEL: icmp_sge_vv_nxv8i8:
921 ; CHECK-NEXT: vsetvli zero, a0, e8, m1, ta, ma
922 ; CHECK-NEXT: vmsle.vv v0, v9, v8, v0.t
924 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i8(<vscale x 8 x i8> %va, <vscale x 8 x i8> %vb, metadata !"sge", <vscale x 8 x i1> %m, i32 %evl)
925 ret <vscale x 8 x i1> %v
928 define <vscale x 8 x i1> @icmp_sge_vx_nxv8i8(<vscale x 8 x i8> %va, i8 %b, <vscale x 8 x i1> %m, i32 zeroext %evl) {
929 ; CHECK-LABEL: icmp_sge_vx_nxv8i8:
931 ; CHECK-NEXT: vsetvli a2, zero, e8, m1, ta, ma
932 ; CHECK-NEXT: vmv.v.x v9, a0
933 ; CHECK-NEXT: vsetvli zero, a1, e8, m1, ta, ma
934 ; CHECK-NEXT: vmsle.vv v0, v9, v8, v0.t
936 %elt.head = insertelement <vscale x 8 x i8> poison, i8 %b, i32 0
937 %vb = shufflevector <vscale x 8 x i8> %elt.head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
938 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i8(<vscale x 8 x i8> %va, <vscale x 8 x i8> %vb, metadata !"sge", <vscale x 8 x i1> %m, i32 %evl)
939 ret <vscale x 8 x i1> %v
942 define <vscale x 8 x i1> @icmp_sge_vx_swap_nxv8i8(<vscale x 8 x i8> %va, i8 %b, <vscale x 8 x i1> %m, i32 zeroext %evl) {
943 ; CHECK-LABEL: icmp_sge_vx_swap_nxv8i8:
945 ; CHECK-NEXT: vsetvli zero, a1, e8, m1, ta, ma
946 ; CHECK-NEXT: vmsle.vx v0, v8, a0, v0.t
948 %elt.head = insertelement <vscale x 8 x i8> poison, i8 %b, i32 0
949 %vb = shufflevector <vscale x 8 x i8> %elt.head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
950 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i8(<vscale x 8 x i8> %vb, <vscale x 8 x i8> %va, metadata !"sge", <vscale x 8 x i1> %m, i32 %evl)
951 ret <vscale x 8 x i1> %v
954 define <vscale x 8 x i1> @icmp_sge_vi_nxv8i8(<vscale x 8 x i8> %va, <vscale x 8 x i1> %m, i32 zeroext %evl) {
955 ; CHECK-LABEL: icmp_sge_vi_nxv8i8:
957 ; CHECK-NEXT: vsetvli zero, a0, e8, m1, ta, ma
958 ; CHECK-NEXT: vmsgt.vi v0, v8, 3, v0.t
960 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i8(<vscale x 8 x i8> %va, <vscale x 8 x i8> splat (i8 4), metadata !"sge", <vscale x 8 x i1> %m, i32 %evl)
961 ret <vscale x 8 x i1> %v
964 define <vscale x 8 x i1> @icmp_sge_vi_swap_nxv8i8(<vscale x 8 x i8> %va, <vscale x 8 x i1> %m, i32 zeroext %evl) {
965 ; CHECK-LABEL: icmp_sge_vi_swap_nxv8i8:
967 ; CHECK-NEXT: vsetvli zero, a0, e8, m1, ta, ma
968 ; CHECK-NEXT: vmsle.vi v0, v8, 4, v0.t
970 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i8(<vscale x 8 x i8> splat (i8 4), <vscale x 8 x i8> %va, metadata !"sge", <vscale x 8 x i1> %m, i32 %evl)
971 ret <vscale x 8 x i1> %v
974 define <vscale x 8 x i1> @icmp_slt_vv_nxv8i8(<vscale x 8 x i8> %va, <vscale x 8 x i8> %vb, <vscale x 8 x i1> %m, i32 zeroext %evl) {
975 ; CHECK-LABEL: icmp_slt_vv_nxv8i8:
977 ; CHECK-NEXT: vsetvli zero, a0, e8, m1, ta, ma
978 ; CHECK-NEXT: vmslt.vv v0, v8, v9, v0.t
980 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i8(<vscale x 8 x i8> %va, <vscale x 8 x i8> %vb, metadata !"slt", <vscale x 8 x i1> %m, i32 %evl)
981 ret <vscale x 8 x i1> %v
984 define <vscale x 8 x i1> @icmp_slt_vx_nxv8i8(<vscale x 8 x i8> %va, i8 %b, <vscale x 8 x i1> %m, i32 zeroext %evl) {
985 ; CHECK-LABEL: icmp_slt_vx_nxv8i8:
987 ; CHECK-NEXT: vsetvli zero, a1, e8, m1, ta, ma
988 ; CHECK-NEXT: vmslt.vx v0, v8, a0, v0.t
990 %elt.head = insertelement <vscale x 8 x i8> poison, i8 %b, i32 0
991 %vb = shufflevector <vscale x 8 x i8> %elt.head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
992 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i8(<vscale x 8 x i8> %va, <vscale x 8 x i8> %vb, metadata !"slt", <vscale x 8 x i1> %m, i32 %evl)
993 ret <vscale x 8 x i1> %v
996 define <vscale x 8 x i1> @icmp_slt_vx_swap_nxv8i8(<vscale x 8 x i8> %va, i8 %b, <vscale x 8 x i1> %m, i32 zeroext %evl) {
997 ; CHECK-LABEL: icmp_slt_vx_swap_nxv8i8:
999 ; CHECK-NEXT: vsetvli zero, a1, e8, m1, ta, ma
1000 ; CHECK-NEXT: vmsgt.vx v0, v8, a0, v0.t
1002 %elt.head = insertelement <vscale x 8 x i8> poison, i8 %b, i32 0
1003 %vb = shufflevector <vscale x 8 x i8> %elt.head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
1004 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i8(<vscale x 8 x i8> %vb, <vscale x 8 x i8> %va, metadata !"slt", <vscale x 8 x i1> %m, i32 %evl)
1005 ret <vscale x 8 x i1> %v
1008 define <vscale x 8 x i1> @icmp_slt_vi_nxv8i8(<vscale x 8 x i8> %va, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1009 ; CHECK-LABEL: icmp_slt_vi_nxv8i8:
1011 ; CHECK-NEXT: vsetvli zero, a0, e8, m1, ta, ma
1012 ; CHECK-NEXT: vmsle.vi v0, v8, 3, v0.t
1014 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i8(<vscale x 8 x i8> %va, <vscale x 8 x i8> splat (i8 4), metadata !"slt", <vscale x 8 x i1> %m, i32 %evl)
1015 ret <vscale x 8 x i1> %v
1018 define <vscale x 8 x i1> @icmp_slt_vi_swap_nxv8i8(<vscale x 8 x i8> %va, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1019 ; CHECK-LABEL: icmp_slt_vi_swap_nxv8i8:
1021 ; CHECK-NEXT: vsetvli zero, a0, e8, m1, ta, ma
1022 ; CHECK-NEXT: vmsgt.vi v0, v8, 4, v0.t
1024 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i8(<vscale x 8 x i8> splat (i8 4), <vscale x 8 x i8> %va, metadata !"slt", <vscale x 8 x i1> %m, i32 %evl)
1025 ret <vscale x 8 x i1> %v
1028 define <vscale x 8 x i1> @icmp_sle_vv_nxv8i8(<vscale x 8 x i8> %va, <vscale x 8 x i8> %vb, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1029 ; CHECK-LABEL: icmp_sle_vv_nxv8i8:
1031 ; CHECK-NEXT: vsetvli zero, a0, e8, m1, ta, ma
1032 ; CHECK-NEXT: vmsle.vv v0, v8, v9, v0.t
1034 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i8(<vscale x 8 x i8> %va, <vscale x 8 x i8> %vb, metadata !"sle", <vscale x 8 x i1> %m, i32 %evl)
1035 ret <vscale x 8 x i1> %v
1038 define <vscale x 8 x i1> @icmp_sle_vx_nxv8i8(<vscale x 8 x i8> %va, i8 %b, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1039 ; CHECK-LABEL: icmp_sle_vx_nxv8i8:
1041 ; CHECK-NEXT: vsetvli zero, a1, e8, m1, ta, ma
1042 ; CHECK-NEXT: vmsle.vx v0, v8, a0, v0.t
1044 %elt.head = insertelement <vscale x 8 x i8> poison, i8 %b, i32 0
1045 %vb = shufflevector <vscale x 8 x i8> %elt.head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
1046 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i8(<vscale x 8 x i8> %va, <vscale x 8 x i8> %vb, metadata !"sle", <vscale x 8 x i1> %m, i32 %evl)
1047 ret <vscale x 8 x i1> %v
1050 define <vscale x 8 x i1> @icmp_sle_vx_swap_nxv8i8(<vscale x 8 x i8> %va, i8 %b, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1051 ; CHECK-LABEL: icmp_sle_vx_swap_nxv8i8:
1053 ; CHECK-NEXT: vsetvli a2, zero, e8, m1, ta, ma
1054 ; CHECK-NEXT: vmv.v.x v9, a0
1055 ; CHECK-NEXT: vsetvli zero, a1, e8, m1, ta, ma
1056 ; CHECK-NEXT: vmsle.vv v0, v9, v8, v0.t
1058 %elt.head = insertelement <vscale x 8 x i8> poison, i8 %b, i32 0
1059 %vb = shufflevector <vscale x 8 x i8> %elt.head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
1060 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i8(<vscale x 8 x i8> %vb, <vscale x 8 x i8> %va, metadata !"sle", <vscale x 8 x i1> %m, i32 %evl)
1061 ret <vscale x 8 x i1> %v
1064 define <vscale x 8 x i1> @icmp_sle_vi_nxv8i8(<vscale x 8 x i8> %va, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1065 ; CHECK-LABEL: icmp_sle_vi_nxv8i8:
1067 ; CHECK-NEXT: vsetvli zero, a0, e8, m1, ta, ma
1068 ; CHECK-NEXT: vmsle.vi v0, v8, 4, v0.t
1070 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i8(<vscale x 8 x i8> %va, <vscale x 8 x i8> splat (i8 4), metadata !"sle", <vscale x 8 x i1> %m, i32 %evl)
1071 ret <vscale x 8 x i1> %v
1074 define <vscale x 8 x i1> @icmp_sle_vi_swap_nxv8i8(<vscale x 8 x i8> %va, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1075 ; CHECK-LABEL: icmp_sle_vi_swap_nxv8i8:
1077 ; CHECK-NEXT: vsetvli zero, a0, e8, m1, ta, ma
1078 ; CHECK-NEXT: vmsgt.vi v0, v8, 3, v0.t
1080 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i8(<vscale x 8 x i8> splat (i8 4), <vscale x 8 x i8> %va, metadata !"sle", <vscale x 8 x i1> %m, i32 %evl)
1081 ret <vscale x 8 x i1> %v
1084 declare <vscale x 128 x i1> @llvm.vp.icmp.nxv128i8(<vscale x 128 x i8>, <vscale x 128 x i8>, metadata, <vscale x 128 x i1>, i32)
1086 define <vscale x 128 x i1> @icmp_eq_vv_nxv128i8(<vscale x 128 x i8> %va, <vscale x 128 x i8> %vb, <vscale x 128 x i1> %m, i32 zeroext %evl) {
1087 ; CHECK-LABEL: icmp_eq_vv_nxv128i8:
1089 ; CHECK-NEXT: addi sp, sp, -16
1090 ; CHECK-NEXT: .cfi_def_cfa_offset 16
1091 ; CHECK-NEXT: csrr a1, vlenb
1092 ; CHECK-NEXT: slli a1, a1, 4
1093 ; CHECK-NEXT: sub sp, sp, a1
1094 ; CHECK-NEXT: .cfi_escape 0x0f, 0x0d, 0x72, 0x00, 0x11, 0x10, 0x22, 0x11, 0x10, 0x92, 0xa2, 0x38, 0x00, 0x1e, 0x22 # sp + 16 + 16 * vlenb
1095 ; CHECK-NEXT: vmv1r.v v7, v0
1096 ; CHECK-NEXT: csrr a1, vlenb
1097 ; CHECK-NEXT: slli a1, a1, 3
1098 ; CHECK-NEXT: add a1, sp, a1
1099 ; CHECK-NEXT: addi a1, a1, 16
1100 ; CHECK-NEXT: vs8r.v v8, (a1) # Unknown-size Folded Spill
1101 ; CHECK-NEXT: csrr a1, vlenb
1102 ; CHECK-NEXT: slli a1, a1, 3
1103 ; CHECK-NEXT: add a4, a0, a1
1104 ; CHECK-NEXT: vl8r.v v8, (a4)
1105 ; CHECK-NEXT: vsetvli a4, zero, e8, m8, ta, ma
1106 ; CHECK-NEXT: vlm.v v0, (a2)
1107 ; CHECK-NEXT: sub a2, a3, a1
1108 ; CHECK-NEXT: sltu a4, a3, a2
1109 ; CHECK-NEXT: vl8r.v v24, (a0)
1110 ; CHECK-NEXT: addi a0, sp, 16
1111 ; CHECK-NEXT: vs8r.v v24, (a0) # Unknown-size Folded Spill
1112 ; CHECK-NEXT: addi a4, a4, -1
1113 ; CHECK-NEXT: and a2, a4, a2
1114 ; CHECK-NEXT: vsetvli zero, a2, e8, m8, ta, ma
1115 ; CHECK-NEXT: vmseq.vv v6, v16, v8, v0.t
1116 ; CHECK-NEXT: bltu a3, a1, .LBB96_2
1117 ; CHECK-NEXT: # %bb.1:
1118 ; CHECK-NEXT: mv a3, a1
1119 ; CHECK-NEXT: .LBB96_2:
1120 ; CHECK-NEXT: vmv1r.v v0, v7
1121 ; CHECK-NEXT: csrr a0, vlenb
1122 ; CHECK-NEXT: slli a0, a0, 3
1123 ; CHECK-NEXT: add a0, sp, a0
1124 ; CHECK-NEXT: addi a0, a0, 16
1125 ; CHECK-NEXT: vl8r.v v8, (a0) # Unknown-size Folded Reload
1126 ; CHECK-NEXT: addi a0, sp, 16
1127 ; CHECK-NEXT: vl8r.v v24, (a0) # Unknown-size Folded Reload
1128 ; CHECK-NEXT: vsetvli zero, a3, e8, m8, ta, ma
1129 ; CHECK-NEXT: vmseq.vv v16, v8, v24, v0.t
1130 ; CHECK-NEXT: vmv1r.v v0, v16
1131 ; CHECK-NEXT: vmv1r.v v8, v6
1132 ; CHECK-NEXT: csrr a0, vlenb
1133 ; CHECK-NEXT: slli a0, a0, 4
1134 ; CHECK-NEXT: add sp, sp, a0
1135 ; CHECK-NEXT: addi sp, sp, 16
1137 %v = call <vscale x 128 x i1> @llvm.vp.icmp.nxv128i8(<vscale x 128 x i8> %va, <vscale x 128 x i8> %vb, metadata !"eq", <vscale x 128 x i1> %m, i32 %evl)
1138 ret <vscale x 128 x i1> %v
1141 define <vscale x 128 x i1> @icmp_eq_vx_nxv128i8(<vscale x 128 x i8> %va, i8 %b, <vscale x 128 x i1> %m, i32 zeroext %evl) {
1142 ; CHECK-LABEL: icmp_eq_vx_nxv128i8:
1144 ; CHECK-NEXT: vmv1r.v v24, v0
1145 ; CHECK-NEXT: vsetvli a3, zero, e8, m8, ta, ma
1146 ; CHECK-NEXT: vlm.v v0, (a1)
1147 ; CHECK-NEXT: csrr a1, vlenb
1148 ; CHECK-NEXT: slli a1, a1, 3
1149 ; CHECK-NEXT: sub a3, a2, a1
1150 ; CHECK-NEXT: sltu a4, a2, a3
1151 ; CHECK-NEXT: addi a4, a4, -1
1152 ; CHECK-NEXT: and a3, a4, a3
1153 ; CHECK-NEXT: vsetvli zero, a3, e8, m8, ta, ma
1154 ; CHECK-NEXT: vmseq.vx v25, v16, a0, v0.t
1155 ; CHECK-NEXT: bltu a2, a1, .LBB97_2
1156 ; CHECK-NEXT: # %bb.1:
1157 ; CHECK-NEXT: mv a2, a1
1158 ; CHECK-NEXT: .LBB97_2:
1159 ; CHECK-NEXT: vmv1r.v v0, v24
1160 ; CHECK-NEXT: vsetvli zero, a2, e8, m8, ta, ma
1161 ; CHECK-NEXT: vmseq.vx v16, v8, a0, v0.t
1162 ; CHECK-NEXT: vmv1r.v v0, v16
1163 ; CHECK-NEXT: vmv1r.v v8, v25
1165 %elt.head = insertelement <vscale x 128 x i8> poison, i8 %b, i8 0
1166 %vb = shufflevector <vscale x 128 x i8> %elt.head, <vscale x 128 x i8> poison, <vscale x 128 x i32> zeroinitializer
1167 %v = call <vscale x 128 x i1> @llvm.vp.icmp.nxv128i8(<vscale x 128 x i8> %va, <vscale x 128 x i8> %vb, metadata !"eq", <vscale x 128 x i1> %m, i32 %evl)
1168 ret <vscale x 128 x i1> %v
1171 define <vscale x 128 x i1> @icmp_eq_vx_swap_nxv128i8(<vscale x 128 x i8> %va, i8 %b, <vscale x 128 x i1> %m, i32 zeroext %evl) {
1172 ; CHECK-LABEL: icmp_eq_vx_swap_nxv128i8:
1174 ; CHECK-NEXT: vmv1r.v v24, v0
1175 ; CHECK-NEXT: vsetvli a3, zero, e8, m8, ta, ma
1176 ; CHECK-NEXT: vlm.v v0, (a1)
1177 ; CHECK-NEXT: csrr a1, vlenb
1178 ; CHECK-NEXT: slli a1, a1, 3
1179 ; CHECK-NEXT: sub a3, a2, a1
1180 ; CHECK-NEXT: sltu a4, a2, a3
1181 ; CHECK-NEXT: addi a4, a4, -1
1182 ; CHECK-NEXT: and a3, a4, a3
1183 ; CHECK-NEXT: vsetvli zero, a3, e8, m8, ta, ma
1184 ; CHECK-NEXT: vmseq.vx v25, v16, a0, v0.t
1185 ; CHECK-NEXT: bltu a2, a1, .LBB98_2
1186 ; CHECK-NEXT: # %bb.1:
1187 ; CHECK-NEXT: mv a2, a1
1188 ; CHECK-NEXT: .LBB98_2:
1189 ; CHECK-NEXT: vmv1r.v v0, v24
1190 ; CHECK-NEXT: vsetvli zero, a2, e8, m8, ta, ma
1191 ; CHECK-NEXT: vmseq.vx v16, v8, a0, v0.t
1192 ; CHECK-NEXT: vmv1r.v v0, v16
1193 ; CHECK-NEXT: vmv1r.v v8, v25
1195 %elt.head = insertelement <vscale x 128 x i8> poison, i8 %b, i8 0
1196 %vb = shufflevector <vscale x 128 x i8> %elt.head, <vscale x 128 x i8> poison, <vscale x 128 x i32> zeroinitializer
1197 %v = call <vscale x 128 x i1> @llvm.vp.icmp.nxv128i8(<vscale x 128 x i8> %vb, <vscale x 128 x i8> %va, metadata !"eq", <vscale x 128 x i1> %m, i32 %evl)
1198 ret <vscale x 128 x i1> %v
1201 declare <vscale x 1 x i1> @llvm.vp.icmp.nxv1i32(<vscale x 1 x i32>, <vscale x 1 x i32>, metadata, <vscale x 1 x i1>, i32)
1203 define <vscale x 1 x i1> @icmp_eq_vv_nxv1i32(<vscale x 1 x i32> %va, <vscale x 1 x i32> %vb, <vscale x 1 x i1> %m, i32 zeroext %evl) {
1204 ; CHECK-LABEL: icmp_eq_vv_nxv1i32:
1206 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
1207 ; CHECK-NEXT: vmseq.vv v0, v8, v9, v0.t
1209 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i32(<vscale x 1 x i32> %va, <vscale x 1 x i32> %vb, metadata !"eq", <vscale x 1 x i1> %m, i32 %evl)
1210 ret <vscale x 1 x i1> %v
1213 define <vscale x 1 x i1> @icmp_eq_vx_nxv1i32(<vscale x 1 x i32> %va, i32 %b, <vscale x 1 x i1> %m, i32 zeroext %evl) {
1214 ; CHECK-LABEL: icmp_eq_vx_nxv1i32:
1216 ; CHECK-NEXT: vsetvli zero, a1, e32, mf2, ta, ma
1217 ; CHECK-NEXT: vmseq.vx v0, v8, a0, v0.t
1219 %elt.head = insertelement <vscale x 1 x i32> poison, i32 %b, i32 0
1220 %vb = shufflevector <vscale x 1 x i32> %elt.head, <vscale x 1 x i32> poison, <vscale x 1 x i32> zeroinitializer
1221 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i32(<vscale x 1 x i32> %va, <vscale x 1 x i32> %vb, metadata !"eq", <vscale x 1 x i1> %m, i32 %evl)
1222 ret <vscale x 1 x i1> %v
1225 define <vscale x 1 x i1> @icmp_eq_vx_swap_nxv1i32(<vscale x 1 x i32> %va, i32 %b, <vscale x 1 x i1> %m, i32 zeroext %evl) {
1226 ; CHECK-LABEL: icmp_eq_vx_swap_nxv1i32:
1228 ; CHECK-NEXT: vsetvli zero, a1, e32, mf2, ta, ma
1229 ; CHECK-NEXT: vmseq.vx v0, v8, a0, v0.t
1231 %elt.head = insertelement <vscale x 1 x i32> poison, i32 %b, i32 0
1232 %vb = shufflevector <vscale x 1 x i32> %elt.head, <vscale x 1 x i32> poison, <vscale x 1 x i32> zeroinitializer
1233 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i32(<vscale x 1 x i32> %vb, <vscale x 1 x i32> %va, metadata !"eq", <vscale x 1 x i1> %m, i32 %evl)
1234 ret <vscale x 1 x i1> %v
1237 define <vscale x 1 x i1> @icmp_eq_vi_nxv1i32(<vscale x 1 x i32> %va, <vscale x 1 x i1> %m, i32 zeroext %evl) {
1238 ; CHECK-LABEL: icmp_eq_vi_nxv1i32:
1240 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
1241 ; CHECK-NEXT: vmseq.vi v0, v8, 4, v0.t
1243 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i32(<vscale x 1 x i32> %va, <vscale x 1 x i32> splat (i32 4), metadata !"eq", <vscale x 1 x i1> %m, i32 %evl)
1244 ret <vscale x 1 x i1> %v
1247 define <vscale x 1 x i1> @icmp_eq_vi_swap_nxv1i32(<vscale x 1 x i32> %va, <vscale x 1 x i1> %m, i32 zeroext %evl) {
1248 ; CHECK-LABEL: icmp_eq_vi_swap_nxv1i32:
1250 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
1251 ; CHECK-NEXT: vmseq.vi v0, v8, 4, v0.t
1253 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i32(<vscale x 1 x i32> splat (i32 4), <vscale x 1 x i32> %va, metadata !"eq", <vscale x 1 x i1> %m, i32 %evl)
1254 ret <vscale x 1 x i1> %v
1257 define <vscale x 1 x i1> @icmp_ne_vv_nxv1i32(<vscale x 1 x i32> %va, <vscale x 1 x i32> %vb, <vscale x 1 x i1> %m, i32 zeroext %evl) {
1258 ; CHECK-LABEL: icmp_ne_vv_nxv1i32:
1260 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
1261 ; CHECK-NEXT: vmsne.vv v0, v8, v9, v0.t
1263 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i32(<vscale x 1 x i32> %va, <vscale x 1 x i32> %vb, metadata !"ne", <vscale x 1 x i1> %m, i32 %evl)
1264 ret <vscale x 1 x i1> %v
1267 define <vscale x 1 x i1> @icmp_ne_vx_nxv1i32(<vscale x 1 x i32> %va, i32 %b, <vscale x 1 x i1> %m, i32 zeroext %evl) {
1268 ; CHECK-LABEL: icmp_ne_vx_nxv1i32:
1270 ; CHECK-NEXT: vsetvli zero, a1, e32, mf2, ta, ma
1271 ; CHECK-NEXT: vmsne.vx v0, v8, a0, v0.t
1273 %elt.head = insertelement <vscale x 1 x i32> poison, i32 %b, i32 0
1274 %vb = shufflevector <vscale x 1 x i32> %elt.head, <vscale x 1 x i32> poison, <vscale x 1 x i32> zeroinitializer
1275 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i32(<vscale x 1 x i32> %va, <vscale x 1 x i32> %vb, metadata !"ne", <vscale x 1 x i1> %m, i32 %evl)
1276 ret <vscale x 1 x i1> %v
1279 define <vscale x 1 x i1> @icmp_ne_vx_swap_nxv1i32(<vscale x 1 x i32> %va, i32 %b, <vscale x 1 x i1> %m, i32 zeroext %evl) {
1280 ; CHECK-LABEL: icmp_ne_vx_swap_nxv1i32:
1282 ; CHECK-NEXT: vsetvli zero, a1, e32, mf2, ta, ma
1283 ; CHECK-NEXT: vmsne.vx v0, v8, a0, v0.t
1285 %elt.head = insertelement <vscale x 1 x i32> poison, i32 %b, i32 0
1286 %vb = shufflevector <vscale x 1 x i32> %elt.head, <vscale x 1 x i32> poison, <vscale x 1 x i32> zeroinitializer
1287 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i32(<vscale x 1 x i32> %vb, <vscale x 1 x i32> %va, metadata !"ne", <vscale x 1 x i1> %m, i32 %evl)
1288 ret <vscale x 1 x i1> %v
1291 define <vscale x 1 x i1> @icmp_ne_vi_nxv1i32(<vscale x 1 x i32> %va, <vscale x 1 x i1> %m, i32 zeroext %evl) {
1292 ; CHECK-LABEL: icmp_ne_vi_nxv1i32:
1294 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
1295 ; CHECK-NEXT: vmsne.vi v0, v8, 4, v0.t
1297 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i32(<vscale x 1 x i32> %va, <vscale x 1 x i32> splat (i32 4), metadata !"ne", <vscale x 1 x i1> %m, i32 %evl)
1298 ret <vscale x 1 x i1> %v
1301 define <vscale x 1 x i1> @icmp_ne_vi_swap_nxv1i32(<vscale x 1 x i32> %va, <vscale x 1 x i1> %m, i32 zeroext %evl) {
1302 ; CHECK-LABEL: icmp_ne_vi_swap_nxv1i32:
1304 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
1305 ; CHECK-NEXT: vmsne.vi v0, v8, 4, v0.t
1307 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i32(<vscale x 1 x i32> splat (i32 4), <vscale x 1 x i32> %va, metadata !"ne", <vscale x 1 x i1> %m, i32 %evl)
1308 ret <vscale x 1 x i1> %v
1311 define <vscale x 1 x i1> @icmp_ugt_vv_nxv1i32(<vscale x 1 x i32> %va, <vscale x 1 x i32> %vb, <vscale x 1 x i1> %m, i32 zeroext %evl) {
1312 ; CHECK-LABEL: icmp_ugt_vv_nxv1i32:
1314 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
1315 ; CHECK-NEXT: vmsltu.vv v0, v9, v8, v0.t
1317 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i32(<vscale x 1 x i32> %va, <vscale x 1 x i32> %vb, metadata !"ugt", <vscale x 1 x i1> %m, i32 %evl)
1318 ret <vscale x 1 x i1> %v
1321 define <vscale x 1 x i1> @icmp_ugt_vx_nxv1i32(<vscale x 1 x i32> %va, i32 %b, <vscale x 1 x i1> %m, i32 zeroext %evl) {
1322 ; CHECK-LABEL: icmp_ugt_vx_nxv1i32:
1324 ; CHECK-NEXT: vsetvli zero, a1, e32, mf2, ta, ma
1325 ; CHECK-NEXT: vmsgtu.vx v0, v8, a0, v0.t
1327 %elt.head = insertelement <vscale x 1 x i32> poison, i32 %b, i32 0
1328 %vb = shufflevector <vscale x 1 x i32> %elt.head, <vscale x 1 x i32> poison, <vscale x 1 x i32> zeroinitializer
1329 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i32(<vscale x 1 x i32> %va, <vscale x 1 x i32> %vb, metadata !"ugt", <vscale x 1 x i1> %m, i32 %evl)
1330 ret <vscale x 1 x i1> %v
1333 define <vscale x 1 x i1> @icmp_ugt_vx_swap_nxv1i32(<vscale x 1 x i32> %va, i32 %b, <vscale x 1 x i1> %m, i32 zeroext %evl) {
1334 ; CHECK-LABEL: icmp_ugt_vx_swap_nxv1i32:
1336 ; CHECK-NEXT: vsetvli zero, a1, e32, mf2, ta, ma
1337 ; CHECK-NEXT: vmsltu.vx v0, v8, a0, v0.t
1339 %elt.head = insertelement <vscale x 1 x i32> poison, i32 %b, i32 0
1340 %vb = shufflevector <vscale x 1 x i32> %elt.head, <vscale x 1 x i32> poison, <vscale x 1 x i32> zeroinitializer
1341 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i32(<vscale x 1 x i32> %vb, <vscale x 1 x i32> %va, metadata !"ugt", <vscale x 1 x i1> %m, i32 %evl)
1342 ret <vscale x 1 x i1> %v
1345 define <vscale x 1 x i1> @icmp_ugt_vi_nxv1i32(<vscale x 1 x i32> %va, <vscale x 1 x i1> %m, i32 zeroext %evl) {
1346 ; CHECK-LABEL: icmp_ugt_vi_nxv1i32:
1348 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
1349 ; CHECK-NEXT: vmsgtu.vi v0, v8, 4, v0.t
1351 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i32(<vscale x 1 x i32> %va, <vscale x 1 x i32> splat (i32 4), metadata !"ugt", <vscale x 1 x i1> %m, i32 %evl)
1352 ret <vscale x 1 x i1> %v
1355 define <vscale x 1 x i1> @icmp_ugt_vi_swap_nxv1i32(<vscale x 1 x i32> %va, <vscale x 1 x i1> %m, i32 zeroext %evl) {
1356 ; CHECK-LABEL: icmp_ugt_vi_swap_nxv1i32:
1358 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
1359 ; CHECK-NEXT: vmsleu.vi v0, v8, 3, v0.t
1361 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i32(<vscale x 1 x i32> splat (i32 4), <vscale x 1 x i32> %va, metadata !"ugt", <vscale x 1 x i1> %m, i32 %evl)
1362 ret <vscale x 1 x i1> %v
1365 define <vscale x 1 x i1> @icmp_uge_vv_nxv1i32(<vscale x 1 x i32> %va, <vscale x 1 x i32> %vb, <vscale x 1 x i1> %m, i32 zeroext %evl) {
1366 ; CHECK-LABEL: icmp_uge_vv_nxv1i32:
1368 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
1369 ; CHECK-NEXT: vmsleu.vv v0, v9, v8, v0.t
1371 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i32(<vscale x 1 x i32> %va, <vscale x 1 x i32> %vb, metadata !"uge", <vscale x 1 x i1> %m, i32 %evl)
1372 ret <vscale x 1 x i1> %v
1375 define <vscale x 1 x i1> @icmp_uge_vx_nxv1i32(<vscale x 1 x i32> %va, i32 %b, <vscale x 1 x i1> %m, i32 zeroext %evl) {
1376 ; CHECK-LABEL: icmp_uge_vx_nxv1i32:
1378 ; CHECK-NEXT: vsetvli a2, zero, e32, mf2, ta, ma
1379 ; CHECK-NEXT: vmv.v.x v9, a0
1380 ; CHECK-NEXT: vsetvli zero, a1, e32, mf2, ta, ma
1381 ; CHECK-NEXT: vmsleu.vv v0, v9, v8, v0.t
1383 %elt.head = insertelement <vscale x 1 x i32> poison, i32 %b, i32 0
1384 %vb = shufflevector <vscale x 1 x i32> %elt.head, <vscale x 1 x i32> poison, <vscale x 1 x i32> zeroinitializer
1385 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i32(<vscale x 1 x i32> %va, <vscale x 1 x i32> %vb, metadata !"uge", <vscale x 1 x i1> %m, i32 %evl)
1386 ret <vscale x 1 x i1> %v
1389 define <vscale x 1 x i1> @icmp_uge_vx_swap_nxv1i32(<vscale x 1 x i32> %va, i32 %b, <vscale x 1 x i1> %m, i32 zeroext %evl) {
1390 ; CHECK-LABEL: icmp_uge_vx_swap_nxv1i32:
1392 ; CHECK-NEXT: vsetvli zero, a1, e32, mf2, ta, ma
1393 ; CHECK-NEXT: vmsleu.vx v0, v8, a0, v0.t
1395 %elt.head = insertelement <vscale x 1 x i32> poison, i32 %b, i32 0
1396 %vb = shufflevector <vscale x 1 x i32> %elt.head, <vscale x 1 x i32> poison, <vscale x 1 x i32> zeroinitializer
1397 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i32(<vscale x 1 x i32> %vb, <vscale x 1 x i32> %va, metadata !"uge", <vscale x 1 x i1> %m, i32 %evl)
1398 ret <vscale x 1 x i1> %v
1401 define <vscale x 1 x i1> @icmp_uge_vi_nxv1i32(<vscale x 1 x i32> %va, <vscale x 1 x i1> %m, i32 zeroext %evl) {
1402 ; CHECK-LABEL: icmp_uge_vi_nxv1i32:
1404 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
1405 ; CHECK-NEXT: vmsgtu.vi v0, v8, 3, v0.t
1407 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i32(<vscale x 1 x i32> %va, <vscale x 1 x i32> splat (i32 4), metadata !"uge", <vscale x 1 x i1> %m, i32 %evl)
1408 ret <vscale x 1 x i1> %v
1411 define <vscale x 1 x i1> @icmp_uge_vi_swap_nxv1i32(<vscale x 1 x i32> %va, <vscale x 1 x i1> %m, i32 zeroext %evl) {
1412 ; CHECK-LABEL: icmp_uge_vi_swap_nxv1i32:
1414 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
1415 ; CHECK-NEXT: vmsleu.vi v0, v8, 4, v0.t
1417 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i32(<vscale x 1 x i32> splat (i32 4), <vscale x 1 x i32> %va, metadata !"uge", <vscale x 1 x i1> %m, i32 %evl)
1418 ret <vscale x 1 x i1> %v
1421 define <vscale x 1 x i1> @icmp_ult_vv_nxv1i32(<vscale x 1 x i32> %va, <vscale x 1 x i32> %vb, <vscale x 1 x i1> %m, i32 zeroext %evl) {
1422 ; CHECK-LABEL: icmp_ult_vv_nxv1i32:
1424 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
1425 ; CHECK-NEXT: vmsltu.vv v0, v8, v9, v0.t
1427 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i32(<vscale x 1 x i32> %va, <vscale x 1 x i32> %vb, metadata !"ult", <vscale x 1 x i1> %m, i32 %evl)
1428 ret <vscale x 1 x i1> %v
1431 define <vscale x 1 x i1> @icmp_ult_vx_nxv1i32(<vscale x 1 x i32> %va, i32 %b, <vscale x 1 x i1> %m, i32 zeroext %evl) {
1432 ; CHECK-LABEL: icmp_ult_vx_nxv1i32:
1434 ; CHECK-NEXT: vsetvli zero, a1, e32, mf2, ta, ma
1435 ; CHECK-NEXT: vmsltu.vx v0, v8, a0, v0.t
1437 %elt.head = insertelement <vscale x 1 x i32> poison, i32 %b, i32 0
1438 %vb = shufflevector <vscale x 1 x i32> %elt.head, <vscale x 1 x i32> poison, <vscale x 1 x i32> zeroinitializer
1439 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i32(<vscale x 1 x i32> %va, <vscale x 1 x i32> %vb, metadata !"ult", <vscale x 1 x i1> %m, i32 %evl)
1440 ret <vscale x 1 x i1> %v
1443 define <vscale x 1 x i1> @icmp_ult_vx_swap_nxv1i32(<vscale x 1 x i32> %va, i32 %b, <vscale x 1 x i1> %m, i32 zeroext %evl) {
1444 ; CHECK-LABEL: icmp_ult_vx_swap_nxv1i32:
1446 ; CHECK-NEXT: vsetvli zero, a1, e32, mf2, ta, ma
1447 ; CHECK-NEXT: vmsgtu.vx v0, v8, a0, v0.t
1449 %elt.head = insertelement <vscale x 1 x i32> poison, i32 %b, i32 0
1450 %vb = shufflevector <vscale x 1 x i32> %elt.head, <vscale x 1 x i32> poison, <vscale x 1 x i32> zeroinitializer
1451 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i32(<vscale x 1 x i32> %vb, <vscale x 1 x i32> %va, metadata !"ult", <vscale x 1 x i1> %m, i32 %evl)
1452 ret <vscale x 1 x i1> %v
1455 define <vscale x 1 x i1> @icmp_ult_vi_nxv1i32(<vscale x 1 x i32> %va, <vscale x 1 x i1> %m, i32 zeroext %evl) {
1456 ; CHECK-LABEL: icmp_ult_vi_nxv1i32:
1458 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
1459 ; CHECK-NEXT: vmsleu.vi v0, v8, 3, v0.t
1461 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i32(<vscale x 1 x i32> %va, <vscale x 1 x i32> splat (i32 4), metadata !"ult", <vscale x 1 x i1> %m, i32 %evl)
1462 ret <vscale x 1 x i1> %v
1465 define <vscale x 1 x i1> @icmp_ult_vi_swap_nxv1i32(<vscale x 1 x i32> %va, <vscale x 1 x i1> %m, i32 zeroext %evl) {
1466 ; CHECK-LABEL: icmp_ult_vi_swap_nxv1i32:
1468 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
1469 ; CHECK-NEXT: vmsgtu.vi v0, v8, 4, v0.t
1471 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i32(<vscale x 1 x i32> splat (i32 4), <vscale x 1 x i32> %va, metadata !"ult", <vscale x 1 x i1> %m, i32 %evl)
1472 ret <vscale x 1 x i1> %v
1475 define <vscale x 1 x i1> @icmp_sgt_vv_nxv1i32(<vscale x 1 x i32> %va, <vscale x 1 x i32> %vb, <vscale x 1 x i1> %m, i32 zeroext %evl) {
1476 ; CHECK-LABEL: icmp_sgt_vv_nxv1i32:
1478 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
1479 ; CHECK-NEXT: vmslt.vv v0, v9, v8, v0.t
1481 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i32(<vscale x 1 x i32> %va, <vscale x 1 x i32> %vb, metadata !"sgt", <vscale x 1 x i1> %m, i32 %evl)
1482 ret <vscale x 1 x i1> %v
1485 define <vscale x 1 x i1> @icmp_sgt_vx_nxv1i32(<vscale x 1 x i32> %va, i32 %b, <vscale x 1 x i1> %m, i32 zeroext %evl) {
1486 ; CHECK-LABEL: icmp_sgt_vx_nxv1i32:
1488 ; CHECK-NEXT: vsetvli zero, a1, e32, mf2, ta, ma
1489 ; CHECK-NEXT: vmsgt.vx v0, v8, a0, v0.t
1491 %elt.head = insertelement <vscale x 1 x i32> poison, i32 %b, i32 0
1492 %vb = shufflevector <vscale x 1 x i32> %elt.head, <vscale x 1 x i32> poison, <vscale x 1 x i32> zeroinitializer
1493 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i32(<vscale x 1 x i32> %va, <vscale x 1 x i32> %vb, metadata !"sgt", <vscale x 1 x i1> %m, i32 %evl)
1494 ret <vscale x 1 x i1> %v
1497 define <vscale x 1 x i1> @icmp_sgt_vx_swap_nxv1i32(<vscale x 1 x i32> %va, i32 %b, <vscale x 1 x i1> %m, i32 zeroext %evl) {
1498 ; CHECK-LABEL: icmp_sgt_vx_swap_nxv1i32:
1500 ; CHECK-NEXT: vsetvli zero, a1, e32, mf2, ta, ma
1501 ; CHECK-NEXT: vmslt.vx v0, v8, a0, v0.t
1503 %elt.head = insertelement <vscale x 1 x i32> poison, i32 %b, i32 0
1504 %vb = shufflevector <vscale x 1 x i32> %elt.head, <vscale x 1 x i32> poison, <vscale x 1 x i32> zeroinitializer
1505 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i32(<vscale x 1 x i32> %vb, <vscale x 1 x i32> %va, metadata !"sgt", <vscale x 1 x i1> %m, i32 %evl)
1506 ret <vscale x 1 x i1> %v
1509 define <vscale x 1 x i1> @icmp_sgt_vi_nxv1i32(<vscale x 1 x i32> %va, <vscale x 1 x i1> %m, i32 zeroext %evl) {
1510 ; CHECK-LABEL: icmp_sgt_vi_nxv1i32:
1512 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
1513 ; CHECK-NEXT: vmsgt.vi v0, v8, 4, v0.t
1515 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i32(<vscale x 1 x i32> %va, <vscale x 1 x i32> splat (i32 4), metadata !"sgt", <vscale x 1 x i1> %m, i32 %evl)
1516 ret <vscale x 1 x i1> %v
1519 define <vscale x 1 x i1> @icmp_sgt_vi_swap_nxv1i32(<vscale x 1 x i32> %va, <vscale x 1 x i1> %m, i32 zeroext %evl) {
1520 ; CHECK-LABEL: icmp_sgt_vi_swap_nxv1i32:
1522 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
1523 ; CHECK-NEXT: vmsle.vi v0, v8, 3, v0.t
1525 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i32(<vscale x 1 x i32> splat (i32 4), <vscale x 1 x i32> %va, metadata !"sgt", <vscale x 1 x i1> %m, i32 %evl)
1526 ret <vscale x 1 x i1> %v
1529 define <vscale x 1 x i1> @icmp_sge_vv_nxv1i32(<vscale x 1 x i32> %va, <vscale x 1 x i32> %vb, <vscale x 1 x i1> %m, i32 zeroext %evl) {
1530 ; CHECK-LABEL: icmp_sge_vv_nxv1i32:
1532 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
1533 ; CHECK-NEXT: vmsle.vv v0, v9, v8, v0.t
1535 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i32(<vscale x 1 x i32> %va, <vscale x 1 x i32> %vb, metadata !"sge", <vscale x 1 x i1> %m, i32 %evl)
1536 ret <vscale x 1 x i1> %v
1539 define <vscale x 1 x i1> @icmp_sge_vx_nxv1i32(<vscale x 1 x i32> %va, i32 %b, <vscale x 1 x i1> %m, i32 zeroext %evl) {
1540 ; CHECK-LABEL: icmp_sge_vx_nxv1i32:
1542 ; CHECK-NEXT: vsetvli a2, zero, e32, mf2, ta, ma
1543 ; CHECK-NEXT: vmv.v.x v9, a0
1544 ; CHECK-NEXT: vsetvli zero, a1, e32, mf2, ta, ma
1545 ; CHECK-NEXT: vmsle.vv v0, v9, v8, v0.t
1547 %elt.head = insertelement <vscale x 1 x i32> poison, i32 %b, i32 0
1548 %vb = shufflevector <vscale x 1 x i32> %elt.head, <vscale x 1 x i32> poison, <vscale x 1 x i32> zeroinitializer
1549 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i32(<vscale x 1 x i32> %va, <vscale x 1 x i32> %vb, metadata !"sge", <vscale x 1 x i1> %m, i32 %evl)
1550 ret <vscale x 1 x i1> %v
1553 define <vscale x 1 x i1> @icmp_sge_vx_swap_nxv1i32(<vscale x 1 x i32> %va, i32 %b, <vscale x 1 x i1> %m, i32 zeroext %evl) {
1554 ; CHECK-LABEL: icmp_sge_vx_swap_nxv1i32:
1556 ; CHECK-NEXT: vsetvli zero, a1, e32, mf2, ta, ma
1557 ; CHECK-NEXT: vmsle.vx v0, v8, a0, v0.t
1559 %elt.head = insertelement <vscale x 1 x i32> poison, i32 %b, i32 0
1560 %vb = shufflevector <vscale x 1 x i32> %elt.head, <vscale x 1 x i32> poison, <vscale x 1 x i32> zeroinitializer
1561 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i32(<vscale x 1 x i32> %vb, <vscale x 1 x i32> %va, metadata !"sge", <vscale x 1 x i1> %m, i32 %evl)
1562 ret <vscale x 1 x i1> %v
1565 define <vscale x 1 x i1> @icmp_sge_vi_nxv1i32(<vscale x 1 x i32> %va, <vscale x 1 x i1> %m, i32 zeroext %evl) {
1566 ; CHECK-LABEL: icmp_sge_vi_nxv1i32:
1568 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
1569 ; CHECK-NEXT: vmsgt.vi v0, v8, 3, v0.t
1571 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i32(<vscale x 1 x i32> %va, <vscale x 1 x i32> splat (i32 4), metadata !"sge", <vscale x 1 x i1> %m, i32 %evl)
1572 ret <vscale x 1 x i1> %v
1575 define <vscale x 1 x i1> @icmp_sge_vi_swap_nxv1i32(<vscale x 1 x i32> %va, <vscale x 1 x i1> %m, i32 zeroext %evl) {
1576 ; CHECK-LABEL: icmp_sge_vi_swap_nxv1i32:
1578 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
1579 ; CHECK-NEXT: vmsle.vi v0, v8, 4, v0.t
1581 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i32(<vscale x 1 x i32> splat (i32 4), <vscale x 1 x i32> %va, metadata !"sge", <vscale x 1 x i1> %m, i32 %evl)
1582 ret <vscale x 1 x i1> %v
1585 define <vscale x 1 x i1> @icmp_slt_vv_nxv1i32(<vscale x 1 x i32> %va, <vscale x 1 x i32> %vb, <vscale x 1 x i1> %m, i32 zeroext %evl) {
1586 ; CHECK-LABEL: icmp_slt_vv_nxv1i32:
1588 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
1589 ; CHECK-NEXT: vmslt.vv v0, v8, v9, v0.t
1591 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i32(<vscale x 1 x i32> %va, <vscale x 1 x i32> %vb, metadata !"slt", <vscale x 1 x i1> %m, i32 %evl)
1592 ret <vscale x 1 x i1> %v
1595 define <vscale x 1 x i1> @icmp_slt_vx_nxv1i32(<vscale x 1 x i32> %va, i32 %b, <vscale x 1 x i1> %m, i32 zeroext %evl) {
1596 ; CHECK-LABEL: icmp_slt_vx_nxv1i32:
1598 ; CHECK-NEXT: vsetvli zero, a1, e32, mf2, ta, ma
1599 ; CHECK-NEXT: vmslt.vx v0, v8, a0, v0.t
1601 %elt.head = insertelement <vscale x 1 x i32> poison, i32 %b, i32 0
1602 %vb = shufflevector <vscale x 1 x i32> %elt.head, <vscale x 1 x i32> poison, <vscale x 1 x i32> zeroinitializer
1603 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i32(<vscale x 1 x i32> %va, <vscale x 1 x i32> %vb, metadata !"slt", <vscale x 1 x i1> %m, i32 %evl)
1604 ret <vscale x 1 x i1> %v
1607 define <vscale x 1 x i1> @icmp_slt_vx_swap_nxv1i32(<vscale x 1 x i32> %va, i32 %b, <vscale x 1 x i1> %m, i32 zeroext %evl) {
1608 ; CHECK-LABEL: icmp_slt_vx_swap_nxv1i32:
1610 ; CHECK-NEXT: vsetvli zero, a1, e32, mf2, ta, ma
1611 ; CHECK-NEXT: vmsgt.vx v0, v8, a0, v0.t
1613 %elt.head = insertelement <vscale x 1 x i32> poison, i32 %b, i32 0
1614 %vb = shufflevector <vscale x 1 x i32> %elt.head, <vscale x 1 x i32> poison, <vscale x 1 x i32> zeroinitializer
1615 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i32(<vscale x 1 x i32> %vb, <vscale x 1 x i32> %va, metadata !"slt", <vscale x 1 x i1> %m, i32 %evl)
1616 ret <vscale x 1 x i1> %v
1619 define <vscale x 1 x i1> @icmp_slt_vi_nxv1i32(<vscale x 1 x i32> %va, <vscale x 1 x i1> %m, i32 zeroext %evl) {
1620 ; CHECK-LABEL: icmp_slt_vi_nxv1i32:
1622 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
1623 ; CHECK-NEXT: vmsle.vi v0, v8, 3, v0.t
1625 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i32(<vscale x 1 x i32> %va, <vscale x 1 x i32> splat (i32 4), metadata !"slt", <vscale x 1 x i1> %m, i32 %evl)
1626 ret <vscale x 1 x i1> %v
1629 define <vscale x 1 x i1> @icmp_slt_vi_swap_nxv1i32(<vscale x 1 x i32> %va, <vscale x 1 x i1> %m, i32 zeroext %evl) {
1630 ; CHECK-LABEL: icmp_slt_vi_swap_nxv1i32:
1632 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
1633 ; CHECK-NEXT: vmsgt.vi v0, v8, 4, v0.t
1635 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i32(<vscale x 1 x i32> splat (i32 4), <vscale x 1 x i32> %va, metadata !"slt", <vscale x 1 x i1> %m, i32 %evl)
1636 ret <vscale x 1 x i1> %v
1639 define <vscale x 1 x i1> @icmp_sle_vv_nxv1i32(<vscale x 1 x i32> %va, <vscale x 1 x i32> %vb, <vscale x 1 x i1> %m, i32 zeroext %evl) {
1640 ; CHECK-LABEL: icmp_sle_vv_nxv1i32:
1642 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
1643 ; CHECK-NEXT: vmsle.vv v0, v8, v9, v0.t
1645 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i32(<vscale x 1 x i32> %va, <vscale x 1 x i32> %vb, metadata !"sle", <vscale x 1 x i1> %m, i32 %evl)
1646 ret <vscale x 1 x i1> %v
1649 define <vscale x 1 x i1> @icmp_sle_vx_nxv1i32(<vscale x 1 x i32> %va, i32 %b, <vscale x 1 x i1> %m, i32 zeroext %evl) {
1650 ; CHECK-LABEL: icmp_sle_vx_nxv1i32:
1652 ; CHECK-NEXT: vsetvli zero, a1, e32, mf2, ta, ma
1653 ; CHECK-NEXT: vmsle.vx v0, v8, a0, v0.t
1655 %elt.head = insertelement <vscale x 1 x i32> poison, i32 %b, i32 0
1656 %vb = shufflevector <vscale x 1 x i32> %elt.head, <vscale x 1 x i32> poison, <vscale x 1 x i32> zeroinitializer
1657 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i32(<vscale x 1 x i32> %va, <vscale x 1 x i32> %vb, metadata !"sle", <vscale x 1 x i1> %m, i32 %evl)
1658 ret <vscale x 1 x i1> %v
1661 define <vscale x 1 x i1> @icmp_sle_vx_swap_nxv1i32(<vscale x 1 x i32> %va, i32 %b, <vscale x 1 x i1> %m, i32 zeroext %evl) {
1662 ; CHECK-LABEL: icmp_sle_vx_swap_nxv1i32:
1664 ; CHECK-NEXT: vsetvli a2, zero, e32, mf2, ta, ma
1665 ; CHECK-NEXT: vmv.v.x v9, a0
1666 ; CHECK-NEXT: vsetvli zero, a1, e32, mf2, ta, ma
1667 ; CHECK-NEXT: vmsle.vv v0, v9, v8, v0.t
1669 %elt.head = insertelement <vscale x 1 x i32> poison, i32 %b, i32 0
1670 %vb = shufflevector <vscale x 1 x i32> %elt.head, <vscale x 1 x i32> poison, <vscale x 1 x i32> zeroinitializer
1671 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i32(<vscale x 1 x i32> %vb, <vscale x 1 x i32> %va, metadata !"sle", <vscale x 1 x i1> %m, i32 %evl)
1672 ret <vscale x 1 x i1> %v
1675 define <vscale x 1 x i1> @icmp_sle_vi_nxv1i32(<vscale x 1 x i32> %va, <vscale x 1 x i1> %m, i32 zeroext %evl) {
1676 ; CHECK-LABEL: icmp_sle_vi_nxv1i32:
1678 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
1679 ; CHECK-NEXT: vmsle.vi v0, v8, 4, v0.t
1681 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i32(<vscale x 1 x i32> %va, <vscale x 1 x i32> splat (i32 4), metadata !"sle", <vscale x 1 x i1> %m, i32 %evl)
1682 ret <vscale x 1 x i1> %v
1685 define <vscale x 1 x i1> @icmp_sle_vi_swap_nxv1i32(<vscale x 1 x i32> %va, <vscale x 1 x i1> %m, i32 zeroext %evl) {
1686 ; CHECK-LABEL: icmp_sle_vi_swap_nxv1i32:
1688 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
1689 ; CHECK-NEXT: vmsgt.vi v0, v8, 3, v0.t
1691 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i32(<vscale x 1 x i32> splat (i32 4), <vscale x 1 x i32> %va, metadata !"sle", <vscale x 1 x i1> %m, i32 %evl)
1692 ret <vscale x 1 x i1> %v
1695 declare <vscale x 8 x i1> @llvm.vp.icmp.nxv8i32(<vscale x 8 x i32>, <vscale x 8 x i32>, metadata, <vscale x 8 x i1>, i32)
1697 define <vscale x 8 x i1> @icmp_eq_vv_nxv8i32(<vscale x 8 x i32> %va, <vscale x 8 x i32> %vb, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1698 ; CHECK-LABEL: icmp_eq_vv_nxv8i32:
1700 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
1701 ; CHECK-NEXT: vmseq.vv v16, v8, v12, v0.t
1702 ; CHECK-NEXT: vmv1r.v v0, v16
1704 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i32(<vscale x 8 x i32> %va, <vscale x 8 x i32> %vb, metadata !"eq", <vscale x 8 x i1> %m, i32 %evl)
1705 ret <vscale x 8 x i1> %v
1708 define <vscale x 8 x i1> @icmp_eq_vx_nxv8i32(<vscale x 8 x i32> %va, i32 %b, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1709 ; CHECK-LABEL: icmp_eq_vx_nxv8i32:
1711 ; CHECK-NEXT: vsetvli zero, a1, e32, m4, ta, ma
1712 ; CHECK-NEXT: vmseq.vx v12, v8, a0, v0.t
1713 ; CHECK-NEXT: vmv1r.v v0, v12
1715 %elt.head = insertelement <vscale x 8 x i32> poison, i32 %b, i32 0
1716 %vb = shufflevector <vscale x 8 x i32> %elt.head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
1717 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i32(<vscale x 8 x i32> %va, <vscale x 8 x i32> %vb, metadata !"eq", <vscale x 8 x i1> %m, i32 %evl)
1718 ret <vscale x 8 x i1> %v
1721 define <vscale x 8 x i1> @icmp_eq_vx_swap_nxv8i32(<vscale x 8 x i32> %va, i32 %b, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1722 ; CHECK-LABEL: icmp_eq_vx_swap_nxv8i32:
1724 ; CHECK-NEXT: vsetvli zero, a1, e32, m4, ta, ma
1725 ; CHECK-NEXT: vmseq.vx v12, v8, a0, v0.t
1726 ; CHECK-NEXT: vmv1r.v v0, v12
1728 %elt.head = insertelement <vscale x 8 x i32> poison, i32 %b, i32 0
1729 %vb = shufflevector <vscale x 8 x i32> %elt.head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
1730 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i32(<vscale x 8 x i32> %vb, <vscale x 8 x i32> %va, metadata !"eq", <vscale x 8 x i1> %m, i32 %evl)
1731 ret <vscale x 8 x i1> %v
1734 define <vscale x 8 x i1> @icmp_eq_vi_nxv8i32(<vscale x 8 x i32> %va, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1735 ; CHECK-LABEL: icmp_eq_vi_nxv8i32:
1737 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
1738 ; CHECK-NEXT: vmseq.vi v12, v8, 4, v0.t
1739 ; CHECK-NEXT: vmv1r.v v0, v12
1741 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i32(<vscale x 8 x i32> %va, <vscale x 8 x i32> splat (i32 4), metadata !"eq", <vscale x 8 x i1> %m, i32 %evl)
1742 ret <vscale x 8 x i1> %v
1745 define <vscale x 8 x i1> @icmp_eq_vi_swap_nxv8i32(<vscale x 8 x i32> %va, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1746 ; CHECK-LABEL: icmp_eq_vi_swap_nxv8i32:
1748 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
1749 ; CHECK-NEXT: vmseq.vi v12, v8, 4, v0.t
1750 ; CHECK-NEXT: vmv1r.v v0, v12
1752 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i32(<vscale x 8 x i32> splat (i32 4), <vscale x 8 x i32> %va, metadata !"eq", <vscale x 8 x i1> %m, i32 %evl)
1753 ret <vscale x 8 x i1> %v
1756 define <vscale x 8 x i1> @icmp_ne_vv_nxv8i32(<vscale x 8 x i32> %va, <vscale x 8 x i32> %vb, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1757 ; CHECK-LABEL: icmp_ne_vv_nxv8i32:
1759 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
1760 ; CHECK-NEXT: vmsne.vv v16, v8, v12, v0.t
1761 ; CHECK-NEXT: vmv1r.v v0, v16
1763 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i32(<vscale x 8 x i32> %va, <vscale x 8 x i32> %vb, metadata !"ne", <vscale x 8 x i1> %m, i32 %evl)
1764 ret <vscale x 8 x i1> %v
1767 define <vscale x 8 x i1> @icmp_ne_vx_nxv8i32(<vscale x 8 x i32> %va, i32 %b, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1768 ; CHECK-LABEL: icmp_ne_vx_nxv8i32:
1770 ; CHECK-NEXT: vsetvli zero, a1, e32, m4, ta, ma
1771 ; CHECK-NEXT: vmsne.vx v12, v8, a0, v0.t
1772 ; CHECK-NEXT: vmv1r.v v0, v12
1774 %elt.head = insertelement <vscale x 8 x i32> poison, i32 %b, i32 0
1775 %vb = shufflevector <vscale x 8 x i32> %elt.head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
1776 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i32(<vscale x 8 x i32> %va, <vscale x 8 x i32> %vb, metadata !"ne", <vscale x 8 x i1> %m, i32 %evl)
1777 ret <vscale x 8 x i1> %v
1780 define <vscale x 8 x i1> @icmp_ne_vx_swap_nxv8i32(<vscale x 8 x i32> %va, i32 %b, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1781 ; CHECK-LABEL: icmp_ne_vx_swap_nxv8i32:
1783 ; CHECK-NEXT: vsetvli zero, a1, e32, m4, ta, ma
1784 ; CHECK-NEXT: vmsne.vx v12, v8, a0, v0.t
1785 ; CHECK-NEXT: vmv1r.v v0, v12
1787 %elt.head = insertelement <vscale x 8 x i32> poison, i32 %b, i32 0
1788 %vb = shufflevector <vscale x 8 x i32> %elt.head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
1789 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i32(<vscale x 8 x i32> %vb, <vscale x 8 x i32> %va, metadata !"ne", <vscale x 8 x i1> %m, i32 %evl)
1790 ret <vscale x 8 x i1> %v
1793 define <vscale x 8 x i1> @icmp_ne_vi_nxv8i32(<vscale x 8 x i32> %va, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1794 ; CHECK-LABEL: icmp_ne_vi_nxv8i32:
1796 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
1797 ; CHECK-NEXT: vmsne.vi v12, v8, 4, v0.t
1798 ; CHECK-NEXT: vmv1r.v v0, v12
1800 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i32(<vscale x 8 x i32> %va, <vscale x 8 x i32> splat (i32 4), metadata !"ne", <vscale x 8 x i1> %m, i32 %evl)
1801 ret <vscale x 8 x i1> %v
1804 define <vscale x 8 x i1> @icmp_ne_vi_swap_nxv8i32(<vscale x 8 x i32> %va, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1805 ; CHECK-LABEL: icmp_ne_vi_swap_nxv8i32:
1807 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
1808 ; CHECK-NEXT: vmsne.vi v12, v8, 4, v0.t
1809 ; CHECK-NEXT: vmv1r.v v0, v12
1811 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i32(<vscale x 8 x i32> splat (i32 4), <vscale x 8 x i32> %va, metadata !"ne", <vscale x 8 x i1> %m, i32 %evl)
1812 ret <vscale x 8 x i1> %v
1815 define <vscale x 8 x i1> @icmp_ugt_vv_nxv8i32(<vscale x 8 x i32> %va, <vscale x 8 x i32> %vb, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1816 ; CHECK-LABEL: icmp_ugt_vv_nxv8i32:
1818 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
1819 ; CHECK-NEXT: vmsltu.vv v16, v12, v8, v0.t
1820 ; CHECK-NEXT: vmv1r.v v0, v16
1822 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i32(<vscale x 8 x i32> %va, <vscale x 8 x i32> %vb, metadata !"ugt", <vscale x 8 x i1> %m, i32 %evl)
1823 ret <vscale x 8 x i1> %v
1826 define <vscale x 8 x i1> @icmp_ugt_vx_nxv8i32(<vscale x 8 x i32> %va, i32 %b, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1827 ; CHECK-LABEL: icmp_ugt_vx_nxv8i32:
1829 ; CHECK-NEXT: vsetvli zero, a1, e32, m4, ta, ma
1830 ; CHECK-NEXT: vmsgtu.vx v12, v8, a0, v0.t
1831 ; CHECK-NEXT: vmv1r.v v0, v12
1833 %elt.head = insertelement <vscale x 8 x i32> poison, i32 %b, i32 0
1834 %vb = shufflevector <vscale x 8 x i32> %elt.head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
1835 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i32(<vscale x 8 x i32> %va, <vscale x 8 x i32> %vb, metadata !"ugt", <vscale x 8 x i1> %m, i32 %evl)
1836 ret <vscale x 8 x i1> %v
1839 define <vscale x 8 x i1> @icmp_ugt_vx_swap_nxv8i32(<vscale x 8 x i32> %va, i32 %b, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1840 ; CHECK-LABEL: icmp_ugt_vx_swap_nxv8i32:
1842 ; CHECK-NEXT: vsetvli zero, a1, e32, m4, ta, ma
1843 ; CHECK-NEXT: vmsltu.vx v12, v8, a0, v0.t
1844 ; CHECK-NEXT: vmv1r.v v0, v12
1846 %elt.head = insertelement <vscale x 8 x i32> poison, i32 %b, i32 0
1847 %vb = shufflevector <vscale x 8 x i32> %elt.head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
1848 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i32(<vscale x 8 x i32> %vb, <vscale x 8 x i32> %va, metadata !"ugt", <vscale x 8 x i1> %m, i32 %evl)
1849 ret <vscale x 8 x i1> %v
1852 define <vscale x 8 x i1> @icmp_ugt_vi_nxv8i32(<vscale x 8 x i32> %va, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1853 ; CHECK-LABEL: icmp_ugt_vi_nxv8i32:
1855 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
1856 ; CHECK-NEXT: vmsgtu.vi v12, v8, 4, v0.t
1857 ; CHECK-NEXT: vmv1r.v v0, v12
1859 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i32(<vscale x 8 x i32> %va, <vscale x 8 x i32> splat (i32 4), metadata !"ugt", <vscale x 8 x i1> %m, i32 %evl)
1860 ret <vscale x 8 x i1> %v
1863 define <vscale x 8 x i1> @icmp_ugt_vi_swap_nxv8i32(<vscale x 8 x i32> %va, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1864 ; CHECK-LABEL: icmp_ugt_vi_swap_nxv8i32:
1866 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
1867 ; CHECK-NEXT: vmsleu.vi v12, v8, 3, v0.t
1868 ; CHECK-NEXT: vmv1r.v v0, v12
1870 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i32(<vscale x 8 x i32> splat (i32 4), <vscale x 8 x i32> %va, metadata !"ugt", <vscale x 8 x i1> %m, i32 %evl)
1871 ret <vscale x 8 x i1> %v
1874 define <vscale x 8 x i1> @icmp_uge_vv_nxv8i32(<vscale x 8 x i32> %va, <vscale x 8 x i32> %vb, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1875 ; CHECK-LABEL: icmp_uge_vv_nxv8i32:
1877 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
1878 ; CHECK-NEXT: vmsleu.vv v16, v12, v8, v0.t
1879 ; CHECK-NEXT: vmv1r.v v0, v16
1881 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i32(<vscale x 8 x i32> %va, <vscale x 8 x i32> %vb, metadata !"uge", <vscale x 8 x i1> %m, i32 %evl)
1882 ret <vscale x 8 x i1> %v
1885 define <vscale x 8 x i1> @icmp_uge_vx_nxv8i32(<vscale x 8 x i32> %va, i32 %b, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1886 ; CHECK-LABEL: icmp_uge_vx_nxv8i32:
1888 ; CHECK-NEXT: vsetvli a2, zero, e32, m4, ta, ma
1889 ; CHECK-NEXT: vmv.v.x v16, a0
1890 ; CHECK-NEXT: vsetvli zero, a1, e32, m4, ta, ma
1891 ; CHECK-NEXT: vmsleu.vv v12, v16, v8, v0.t
1892 ; CHECK-NEXT: vmv1r.v v0, v12
1894 %elt.head = insertelement <vscale x 8 x i32> poison, i32 %b, i32 0
1895 %vb = shufflevector <vscale x 8 x i32> %elt.head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
1896 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i32(<vscale x 8 x i32> %va, <vscale x 8 x i32> %vb, metadata !"uge", <vscale x 8 x i1> %m, i32 %evl)
1897 ret <vscale x 8 x i1> %v
1900 define <vscale x 8 x i1> @icmp_uge_vx_swap_nxv8i32(<vscale x 8 x i32> %va, i32 %b, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1901 ; CHECK-LABEL: icmp_uge_vx_swap_nxv8i32:
1903 ; CHECK-NEXT: vsetvli zero, a1, e32, m4, ta, ma
1904 ; CHECK-NEXT: vmsleu.vx v12, v8, a0, v0.t
1905 ; CHECK-NEXT: vmv1r.v v0, v12
1907 %elt.head = insertelement <vscale x 8 x i32> poison, i32 %b, i32 0
1908 %vb = shufflevector <vscale x 8 x i32> %elt.head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
1909 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i32(<vscale x 8 x i32> %vb, <vscale x 8 x i32> %va, metadata !"uge", <vscale x 8 x i1> %m, i32 %evl)
1910 ret <vscale x 8 x i1> %v
1913 define <vscale x 8 x i1> @icmp_uge_vi_nxv8i32(<vscale x 8 x i32> %va, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1914 ; CHECK-LABEL: icmp_uge_vi_nxv8i32:
1916 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
1917 ; CHECK-NEXT: vmsgtu.vi v12, v8, 3, v0.t
1918 ; CHECK-NEXT: vmv1r.v v0, v12
1920 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i32(<vscale x 8 x i32> %va, <vscale x 8 x i32> splat (i32 4), metadata !"uge", <vscale x 8 x i1> %m, i32 %evl)
1921 ret <vscale x 8 x i1> %v
1924 define <vscale x 8 x i1> @icmp_uge_vi_swap_nxv8i32(<vscale x 8 x i32> %va, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1925 ; CHECK-LABEL: icmp_uge_vi_swap_nxv8i32:
1927 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
1928 ; CHECK-NEXT: vmsleu.vi v12, v8, 4, v0.t
1929 ; CHECK-NEXT: vmv1r.v v0, v12
1931 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i32(<vscale x 8 x i32> splat (i32 4), <vscale x 8 x i32> %va, metadata !"uge", <vscale x 8 x i1> %m, i32 %evl)
1932 ret <vscale x 8 x i1> %v
1935 define <vscale x 8 x i1> @icmp_ult_vv_nxv8i32(<vscale x 8 x i32> %va, <vscale x 8 x i32> %vb, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1936 ; CHECK-LABEL: icmp_ult_vv_nxv8i32:
1938 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
1939 ; CHECK-NEXT: vmsltu.vv v16, v8, v12, v0.t
1940 ; CHECK-NEXT: vmv1r.v v0, v16
1942 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i32(<vscale x 8 x i32> %va, <vscale x 8 x i32> %vb, metadata !"ult", <vscale x 8 x i1> %m, i32 %evl)
1943 ret <vscale x 8 x i1> %v
1946 define <vscale x 8 x i1> @icmp_ult_vx_nxv8i32(<vscale x 8 x i32> %va, i32 %b, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1947 ; CHECK-LABEL: icmp_ult_vx_nxv8i32:
1949 ; CHECK-NEXT: vsetvli zero, a1, e32, m4, ta, ma
1950 ; CHECK-NEXT: vmsltu.vx v12, v8, a0, v0.t
1951 ; CHECK-NEXT: vmv1r.v v0, v12
1953 %elt.head = insertelement <vscale x 8 x i32> poison, i32 %b, i32 0
1954 %vb = shufflevector <vscale x 8 x i32> %elt.head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
1955 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i32(<vscale x 8 x i32> %va, <vscale x 8 x i32> %vb, metadata !"ult", <vscale x 8 x i1> %m, i32 %evl)
1956 ret <vscale x 8 x i1> %v
1959 define <vscale x 8 x i1> @icmp_ult_vx_swap_nxv8i32(<vscale x 8 x i32> %va, i32 %b, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1960 ; CHECK-LABEL: icmp_ult_vx_swap_nxv8i32:
1962 ; CHECK-NEXT: vsetvli zero, a1, e32, m4, ta, ma
1963 ; CHECK-NEXT: vmsgtu.vx v12, v8, a0, v0.t
1964 ; CHECK-NEXT: vmv1r.v v0, v12
1966 %elt.head = insertelement <vscale x 8 x i32> poison, i32 %b, i32 0
1967 %vb = shufflevector <vscale x 8 x i32> %elt.head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
1968 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i32(<vscale x 8 x i32> %vb, <vscale x 8 x i32> %va, metadata !"ult", <vscale x 8 x i1> %m, i32 %evl)
1969 ret <vscale x 8 x i1> %v
1972 define <vscale x 8 x i1> @icmp_ult_vi_nxv8i32(<vscale x 8 x i32> %va, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1973 ; CHECK-LABEL: icmp_ult_vi_nxv8i32:
1975 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
1976 ; CHECK-NEXT: vmsleu.vi v12, v8, 3, v0.t
1977 ; CHECK-NEXT: vmv1r.v v0, v12
1979 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i32(<vscale x 8 x i32> %va, <vscale x 8 x i32> splat (i32 4), metadata !"ult", <vscale x 8 x i1> %m, i32 %evl)
1980 ret <vscale x 8 x i1> %v
1983 define <vscale x 8 x i1> @icmp_ult_vi_swap_nxv8i32(<vscale x 8 x i32> %va, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1984 ; CHECK-LABEL: icmp_ult_vi_swap_nxv8i32:
1986 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
1987 ; CHECK-NEXT: vmsgtu.vi v12, v8, 4, v0.t
1988 ; CHECK-NEXT: vmv1r.v v0, v12
1990 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i32(<vscale x 8 x i32> splat (i32 4), <vscale x 8 x i32> %va, metadata !"ult", <vscale x 8 x i1> %m, i32 %evl)
1991 ret <vscale x 8 x i1> %v
1994 define <vscale x 8 x i1> @icmp_sgt_vv_nxv8i32(<vscale x 8 x i32> %va, <vscale x 8 x i32> %vb, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1995 ; CHECK-LABEL: icmp_sgt_vv_nxv8i32:
1997 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
1998 ; CHECK-NEXT: vmslt.vv v16, v12, v8, v0.t
1999 ; CHECK-NEXT: vmv1r.v v0, v16
2001 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i32(<vscale x 8 x i32> %va, <vscale x 8 x i32> %vb, metadata !"sgt", <vscale x 8 x i1> %m, i32 %evl)
2002 ret <vscale x 8 x i1> %v
2005 define <vscale x 8 x i1> @icmp_sgt_vx_nxv8i32(<vscale x 8 x i32> %va, i32 %b, <vscale x 8 x i1> %m, i32 zeroext %evl) {
2006 ; CHECK-LABEL: icmp_sgt_vx_nxv8i32:
2008 ; CHECK-NEXT: vsetvli zero, a1, e32, m4, ta, ma
2009 ; CHECK-NEXT: vmsgt.vx v12, v8, a0, v0.t
2010 ; CHECK-NEXT: vmv1r.v v0, v12
2012 %elt.head = insertelement <vscale x 8 x i32> poison, i32 %b, i32 0
2013 %vb = shufflevector <vscale x 8 x i32> %elt.head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
2014 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i32(<vscale x 8 x i32> %va, <vscale x 8 x i32> %vb, metadata !"sgt", <vscale x 8 x i1> %m, i32 %evl)
2015 ret <vscale x 8 x i1> %v
2018 define <vscale x 8 x i1> @icmp_sgt_vx_swap_nxv8i32(<vscale x 8 x i32> %va, i32 %b, <vscale x 8 x i1> %m, i32 zeroext %evl) {
2019 ; CHECK-LABEL: icmp_sgt_vx_swap_nxv8i32:
2021 ; CHECK-NEXT: vsetvli zero, a1, e32, m4, ta, ma
2022 ; CHECK-NEXT: vmslt.vx v12, v8, a0, v0.t
2023 ; CHECK-NEXT: vmv1r.v v0, v12
2025 %elt.head = insertelement <vscale x 8 x i32> poison, i32 %b, i32 0
2026 %vb = shufflevector <vscale x 8 x i32> %elt.head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
2027 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i32(<vscale x 8 x i32> %vb, <vscale x 8 x i32> %va, metadata !"sgt", <vscale x 8 x i1> %m, i32 %evl)
2028 ret <vscale x 8 x i1> %v
2031 define <vscale x 8 x i1> @icmp_sgt_vi_nxv8i32(<vscale x 8 x i32> %va, <vscale x 8 x i1> %m, i32 zeroext %evl) {
2032 ; CHECK-LABEL: icmp_sgt_vi_nxv8i32:
2034 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
2035 ; CHECK-NEXT: vmsgt.vi v12, v8, 4, v0.t
2036 ; CHECK-NEXT: vmv1r.v v0, v12
2038 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i32(<vscale x 8 x i32> %va, <vscale x 8 x i32> splat (i32 4), metadata !"sgt", <vscale x 8 x i1> %m, i32 %evl)
2039 ret <vscale x 8 x i1> %v
2042 define <vscale x 8 x i1> @icmp_sgt_vi_swap_nxv8i32(<vscale x 8 x i32> %va, <vscale x 8 x i1> %m, i32 zeroext %evl) {
2043 ; CHECK-LABEL: icmp_sgt_vi_swap_nxv8i32:
2045 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
2046 ; CHECK-NEXT: vmsle.vi v12, v8, 3, v0.t
2047 ; CHECK-NEXT: vmv1r.v v0, v12
2049 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i32(<vscale x 8 x i32> splat (i32 4), <vscale x 8 x i32> %va, metadata !"sgt", <vscale x 8 x i1> %m, i32 %evl)
2050 ret <vscale x 8 x i1> %v
2053 define <vscale x 8 x i1> @icmp_sge_vv_nxv8i32(<vscale x 8 x i32> %va, <vscale x 8 x i32> %vb, <vscale x 8 x i1> %m, i32 zeroext %evl) {
2054 ; CHECK-LABEL: icmp_sge_vv_nxv8i32:
2056 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
2057 ; CHECK-NEXT: vmsle.vv v16, v12, v8, v0.t
2058 ; CHECK-NEXT: vmv1r.v v0, v16
2060 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i32(<vscale x 8 x i32> %va, <vscale x 8 x i32> %vb, metadata !"sge", <vscale x 8 x i1> %m, i32 %evl)
2061 ret <vscale x 8 x i1> %v
2064 define <vscale x 8 x i1> @icmp_sge_vx_nxv8i32(<vscale x 8 x i32> %va, i32 %b, <vscale x 8 x i1> %m, i32 zeroext %evl) {
2065 ; CHECK-LABEL: icmp_sge_vx_nxv8i32:
2067 ; CHECK-NEXT: vsetvli a2, zero, e32, m4, ta, ma
2068 ; CHECK-NEXT: vmv.v.x v16, a0
2069 ; CHECK-NEXT: vsetvli zero, a1, e32, m4, ta, ma
2070 ; CHECK-NEXT: vmsle.vv v12, v16, v8, v0.t
2071 ; CHECK-NEXT: vmv1r.v v0, v12
2073 %elt.head = insertelement <vscale x 8 x i32> poison, i32 %b, i32 0
2074 %vb = shufflevector <vscale x 8 x i32> %elt.head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
2075 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i32(<vscale x 8 x i32> %va, <vscale x 8 x i32> %vb, metadata !"sge", <vscale x 8 x i1> %m, i32 %evl)
2076 ret <vscale x 8 x i1> %v
2079 define <vscale x 8 x i1> @icmp_sge_vx_swap_nxv8i32(<vscale x 8 x i32> %va, i32 %b, <vscale x 8 x i1> %m, i32 zeroext %evl) {
2080 ; CHECK-LABEL: icmp_sge_vx_swap_nxv8i32:
2082 ; CHECK-NEXT: vsetvli zero, a1, e32, m4, ta, ma
2083 ; CHECK-NEXT: vmsle.vx v12, v8, a0, v0.t
2084 ; CHECK-NEXT: vmv1r.v v0, v12
2086 %elt.head = insertelement <vscale x 8 x i32> poison, i32 %b, i32 0
2087 %vb = shufflevector <vscale x 8 x i32> %elt.head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
2088 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i32(<vscale x 8 x i32> %vb, <vscale x 8 x i32> %va, metadata !"sge", <vscale x 8 x i1> %m, i32 %evl)
2089 ret <vscale x 8 x i1> %v
2092 define <vscale x 8 x i1> @icmp_sge_vi_nxv8i32(<vscale x 8 x i32> %va, <vscale x 8 x i1> %m, i32 zeroext %evl) {
2093 ; CHECK-LABEL: icmp_sge_vi_nxv8i32:
2095 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
2096 ; CHECK-NEXT: vmsgt.vi v12, v8, 3, v0.t
2097 ; CHECK-NEXT: vmv1r.v v0, v12
2099 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i32(<vscale x 8 x i32> %va, <vscale x 8 x i32> splat (i32 4), metadata !"sge", <vscale x 8 x i1> %m, i32 %evl)
2100 ret <vscale x 8 x i1> %v
2103 define <vscale x 8 x i1> @icmp_sge_vi_swap_nxv8i32(<vscale x 8 x i32> %va, <vscale x 8 x i1> %m, i32 zeroext %evl) {
2104 ; CHECK-LABEL: icmp_sge_vi_swap_nxv8i32:
2106 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
2107 ; CHECK-NEXT: vmsle.vi v12, v8, 4, v0.t
2108 ; CHECK-NEXT: vmv1r.v v0, v12
2110 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i32(<vscale x 8 x i32> splat (i32 4), <vscale x 8 x i32> %va, metadata !"sge", <vscale x 8 x i1> %m, i32 %evl)
2111 ret <vscale x 8 x i1> %v
2114 define <vscale x 8 x i1> @icmp_slt_vv_nxv8i32(<vscale x 8 x i32> %va, <vscale x 8 x i32> %vb, <vscale x 8 x i1> %m, i32 zeroext %evl) {
2115 ; CHECK-LABEL: icmp_slt_vv_nxv8i32:
2117 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
2118 ; CHECK-NEXT: vmslt.vv v16, v8, v12, v0.t
2119 ; CHECK-NEXT: vmv1r.v v0, v16
2121 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i32(<vscale x 8 x i32> %va, <vscale x 8 x i32> %vb, metadata !"slt", <vscale x 8 x i1> %m, i32 %evl)
2122 ret <vscale x 8 x i1> %v
2125 define <vscale x 8 x i1> @icmp_slt_vx_nxv8i32(<vscale x 8 x i32> %va, i32 %b, <vscale x 8 x i1> %m, i32 zeroext %evl) {
2126 ; CHECK-LABEL: icmp_slt_vx_nxv8i32:
2128 ; CHECK-NEXT: vsetvli zero, a1, e32, m4, ta, ma
2129 ; CHECK-NEXT: vmslt.vx v12, v8, a0, v0.t
2130 ; CHECK-NEXT: vmv1r.v v0, v12
2132 %elt.head = insertelement <vscale x 8 x i32> poison, i32 %b, i32 0
2133 %vb = shufflevector <vscale x 8 x i32> %elt.head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
2134 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i32(<vscale x 8 x i32> %va, <vscale x 8 x i32> %vb, metadata !"slt", <vscale x 8 x i1> %m, i32 %evl)
2135 ret <vscale x 8 x i1> %v
2138 define <vscale x 8 x i1> @icmp_slt_vx_swap_nxv8i32(<vscale x 8 x i32> %va, i32 %b, <vscale x 8 x i1> %m, i32 zeroext %evl) {
2139 ; CHECK-LABEL: icmp_slt_vx_swap_nxv8i32:
2141 ; CHECK-NEXT: vsetvli zero, a1, e32, m4, ta, ma
2142 ; CHECK-NEXT: vmsgt.vx v12, v8, a0, v0.t
2143 ; CHECK-NEXT: vmv1r.v v0, v12
2145 %elt.head = insertelement <vscale x 8 x i32> poison, i32 %b, i32 0
2146 %vb = shufflevector <vscale x 8 x i32> %elt.head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
2147 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i32(<vscale x 8 x i32> %vb, <vscale x 8 x i32> %va, metadata !"slt", <vscale x 8 x i1> %m, i32 %evl)
2148 ret <vscale x 8 x i1> %v
2151 define <vscale x 8 x i1> @icmp_slt_vi_nxv8i32(<vscale x 8 x i32> %va, <vscale x 8 x i1> %m, i32 zeroext %evl) {
2152 ; CHECK-LABEL: icmp_slt_vi_nxv8i32:
2154 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
2155 ; CHECK-NEXT: vmsle.vi v12, v8, 3, v0.t
2156 ; CHECK-NEXT: vmv1r.v v0, v12
2158 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i32(<vscale x 8 x i32> %va, <vscale x 8 x i32> splat (i32 4), metadata !"slt", <vscale x 8 x i1> %m, i32 %evl)
2159 ret <vscale x 8 x i1> %v
2162 define <vscale x 8 x i1> @icmp_slt_vi_swap_nxv8i32(<vscale x 8 x i32> %va, <vscale x 8 x i1> %m, i32 zeroext %evl) {
2163 ; CHECK-LABEL: icmp_slt_vi_swap_nxv8i32:
2165 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
2166 ; CHECK-NEXT: vmsgt.vi v12, v8, 4, v0.t
2167 ; CHECK-NEXT: vmv1r.v v0, v12
2169 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i32(<vscale x 8 x i32> splat (i32 4), <vscale x 8 x i32> %va, metadata !"slt", <vscale x 8 x i1> %m, i32 %evl)
2170 ret <vscale x 8 x i1> %v
2173 define <vscale x 8 x i1> @icmp_sle_vv_nxv8i32(<vscale x 8 x i32> %va, <vscale x 8 x i32> %vb, <vscale x 8 x i1> %m, i32 zeroext %evl) {
2174 ; CHECK-LABEL: icmp_sle_vv_nxv8i32:
2176 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
2177 ; CHECK-NEXT: vmsle.vv v16, v8, v12, v0.t
2178 ; CHECK-NEXT: vmv1r.v v0, v16
2180 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i32(<vscale x 8 x i32> %va, <vscale x 8 x i32> %vb, metadata !"sle", <vscale x 8 x i1> %m, i32 %evl)
2181 ret <vscale x 8 x i1> %v
2184 define <vscale x 8 x i1> @icmp_sle_vx_nxv8i32(<vscale x 8 x i32> %va, i32 %b, <vscale x 8 x i1> %m, i32 zeroext %evl) {
2185 ; CHECK-LABEL: icmp_sle_vx_nxv8i32:
2187 ; CHECK-NEXT: vsetvli zero, a1, e32, m4, ta, ma
2188 ; CHECK-NEXT: vmsle.vx v12, v8, a0, v0.t
2189 ; CHECK-NEXT: vmv1r.v v0, v12
2191 %elt.head = insertelement <vscale x 8 x i32> poison, i32 %b, i32 0
2192 %vb = shufflevector <vscale x 8 x i32> %elt.head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
2193 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i32(<vscale x 8 x i32> %va, <vscale x 8 x i32> %vb, metadata !"sle", <vscale x 8 x i1> %m, i32 %evl)
2194 ret <vscale x 8 x i1> %v
2197 define <vscale x 8 x i1> @icmp_sle_vx_swap_nxv8i32(<vscale x 8 x i32> %va, i32 %b, <vscale x 8 x i1> %m, i32 zeroext %evl) {
2198 ; CHECK-LABEL: icmp_sle_vx_swap_nxv8i32:
2200 ; CHECK-NEXT: vsetvli a2, zero, e32, m4, ta, ma
2201 ; CHECK-NEXT: vmv.v.x v16, a0
2202 ; CHECK-NEXT: vsetvli zero, a1, e32, m4, ta, ma
2203 ; CHECK-NEXT: vmsle.vv v12, v16, v8, v0.t
2204 ; CHECK-NEXT: vmv1r.v v0, v12
2206 %elt.head = insertelement <vscale x 8 x i32> poison, i32 %b, i32 0
2207 %vb = shufflevector <vscale x 8 x i32> %elt.head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
2208 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i32(<vscale x 8 x i32> %vb, <vscale x 8 x i32> %va, metadata !"sle", <vscale x 8 x i1> %m, i32 %evl)
2209 ret <vscale x 8 x i1> %v
2212 define <vscale x 8 x i1> @icmp_sle_vi_nxv8i32(<vscale x 8 x i32> %va, <vscale x 8 x i1> %m, i32 zeroext %evl) {
2213 ; CHECK-LABEL: icmp_sle_vi_nxv8i32:
2215 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
2216 ; CHECK-NEXT: vmsle.vi v12, v8, 4, v0.t
2217 ; CHECK-NEXT: vmv1r.v v0, v12
2219 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i32(<vscale x 8 x i32> %va, <vscale x 8 x i32> splat (i32 4), metadata !"sle", <vscale x 8 x i1> %m, i32 %evl)
2220 ret <vscale x 8 x i1> %v
2223 define <vscale x 8 x i1> @icmp_sle_vi_swap_nxv8i32(<vscale x 8 x i32> %va, <vscale x 8 x i1> %m, i32 zeroext %evl) {
2224 ; CHECK-LABEL: icmp_sle_vi_swap_nxv8i32:
2226 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
2227 ; CHECK-NEXT: vmsgt.vi v12, v8, 3, v0.t
2228 ; CHECK-NEXT: vmv1r.v v0, v12
2230 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i32(<vscale x 8 x i32> splat (i32 4), <vscale x 8 x i32> %va, metadata !"sle", <vscale x 8 x i1> %m, i32 %evl)
2231 ret <vscale x 8 x i1> %v
2234 declare <vscale x 32 x i1> @llvm.vp.icmp.nxv32i32(<vscale x 32 x i32>, <vscale x 32 x i32>, metadata, <vscale x 32 x i1>, i32)
2236 define <vscale x 32 x i1> @icmp_eq_vv_nxv32i32(<vscale x 32 x i32> %va, <vscale x 32 x i32> %vb, <vscale x 32 x i1> %m, i32 zeroext %evl) {
2237 ; CHECK-LABEL: icmp_eq_vv_nxv32i32:
2239 ; CHECK-NEXT: addi sp, sp, -16
2240 ; CHECK-NEXT: .cfi_def_cfa_offset 16
2241 ; CHECK-NEXT: csrr a1, vlenb
2242 ; CHECK-NEXT: slli a1, a1, 4
2243 ; CHECK-NEXT: sub sp, sp, a1
2244 ; CHECK-NEXT: .cfi_escape 0x0f, 0x0d, 0x72, 0x00, 0x11, 0x10, 0x22, 0x11, 0x10, 0x92, 0xa2, 0x38, 0x00, 0x1e, 0x22 # sp + 16 + 16 * vlenb
2245 ; CHECK-NEXT: vmv1r.v v24, v0
2246 ; CHECK-NEXT: csrr a1, vlenb
2247 ; CHECK-NEXT: slli a1, a1, 3
2248 ; CHECK-NEXT: add a1, sp, a1
2249 ; CHECK-NEXT: addi a1, a1, 16
2250 ; CHECK-NEXT: vs8r.v v8, (a1) # Unknown-size Folded Spill
2251 ; CHECK-NEXT: csrr a3, vlenb
2252 ; CHECK-NEXT: srli a1, a3, 2
2253 ; CHECK-NEXT: slli a4, a3, 3
2254 ; CHECK-NEXT: add a4, a0, a4
2255 ; CHECK-NEXT: vl8re32.v v8, (a4)
2256 ; CHECK-NEXT: slli a3, a3, 1
2257 ; CHECK-NEXT: sub a4, a2, a3
2258 ; CHECK-NEXT: sltu a5, a2, a4
2259 ; CHECK-NEXT: addi a5, a5, -1
2260 ; CHECK-NEXT: vl8re32.v v0, (a0)
2261 ; CHECK-NEXT: addi a0, sp, 16
2262 ; CHECK-NEXT: vs8r.v v0, (a0) # Unknown-size Folded Spill
2263 ; CHECK-NEXT: vsetvli a0, zero, e8, mf2, ta, ma
2264 ; CHECK-NEXT: vslidedown.vx v0, v24, a1
2265 ; CHECK-NEXT: and a4, a5, a4
2266 ; CHECK-NEXT: vsetvli zero, a4, e32, m8, ta, ma
2267 ; CHECK-NEXT: vmseq.vv v7, v16, v8, v0.t
2268 ; CHECK-NEXT: bltu a2, a3, .LBB189_2
2269 ; CHECK-NEXT: # %bb.1:
2270 ; CHECK-NEXT: mv a2, a3
2271 ; CHECK-NEXT: .LBB189_2:
2272 ; CHECK-NEXT: vmv1r.v v0, v24
2273 ; CHECK-NEXT: csrr a0, vlenb
2274 ; CHECK-NEXT: slli a0, a0, 3
2275 ; CHECK-NEXT: add a0, sp, a0
2276 ; CHECK-NEXT: addi a0, a0, 16
2277 ; CHECK-NEXT: vl8r.v v8, (a0) # Unknown-size Folded Reload
2278 ; CHECK-NEXT: addi a0, sp, 16
2279 ; CHECK-NEXT: vl8r.v v24, (a0) # Unknown-size Folded Reload
2280 ; CHECK-NEXT: vsetvli zero, a2, e32, m8, ta, ma
2281 ; CHECK-NEXT: vmseq.vv v16, v8, v24, v0.t
2282 ; CHECK-NEXT: add a0, a1, a1
2283 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
2284 ; CHECK-NEXT: vslideup.vx v16, v7, a1
2285 ; CHECK-NEXT: vmv1r.v v0, v16
2286 ; CHECK-NEXT: csrr a0, vlenb
2287 ; CHECK-NEXT: slli a0, a0, 4
2288 ; CHECK-NEXT: add sp, sp, a0
2289 ; CHECK-NEXT: addi sp, sp, 16
2291 %v = call <vscale x 32 x i1> @llvm.vp.icmp.nxv32i32(<vscale x 32 x i32> %va, <vscale x 32 x i32> %vb, metadata !"eq", <vscale x 32 x i1> %m, i32 %evl)
2292 ret <vscale x 32 x i1> %v
2295 define <vscale x 32 x i1> @icmp_eq_vx_nxv32i32(<vscale x 32 x i32> %va, i32 %b, <vscale x 32 x i1> %m, i32 zeroext %evl) {
2296 ; CHECK-LABEL: icmp_eq_vx_nxv32i32:
2298 ; CHECK-NEXT: vmv1r.v v24, v0
2299 ; CHECK-NEXT: csrr a3, vlenb
2300 ; CHECK-NEXT: srli a2, a3, 2
2301 ; CHECK-NEXT: vsetvli a4, zero, e8, mf2, ta, ma
2302 ; CHECK-NEXT: vslidedown.vx v0, v0, a2
2303 ; CHECK-NEXT: slli a3, a3, 1
2304 ; CHECK-NEXT: sub a4, a1, a3
2305 ; CHECK-NEXT: sltu a5, a1, a4
2306 ; CHECK-NEXT: addi a5, a5, -1
2307 ; CHECK-NEXT: and a4, a5, a4
2308 ; CHECK-NEXT: vsetvli zero, a4, e32, m8, ta, ma
2309 ; CHECK-NEXT: vmseq.vx v25, v16, a0, v0.t
2310 ; CHECK-NEXT: bltu a1, a3, .LBB190_2
2311 ; CHECK-NEXT: # %bb.1:
2312 ; CHECK-NEXT: mv a1, a3
2313 ; CHECK-NEXT: .LBB190_2:
2314 ; CHECK-NEXT: vmv1r.v v0, v24
2315 ; CHECK-NEXT: vsetvli zero, a1, e32, m8, ta, ma
2316 ; CHECK-NEXT: vmseq.vx v16, v8, a0, v0.t
2317 ; CHECK-NEXT: add a0, a2, a2
2318 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
2319 ; CHECK-NEXT: vslideup.vx v16, v25, a2
2320 ; CHECK-NEXT: vmv1r.v v0, v16
2322 %elt.head = insertelement <vscale x 32 x i32> poison, i32 %b, i32 0
2323 %vb = shufflevector <vscale x 32 x i32> %elt.head, <vscale x 32 x i32> poison, <vscale x 32 x i32> zeroinitializer
2324 %v = call <vscale x 32 x i1> @llvm.vp.icmp.nxv32i32(<vscale x 32 x i32> %va, <vscale x 32 x i32> %vb, metadata !"eq", <vscale x 32 x i1> %m, i32 %evl)
2325 ret <vscale x 32 x i1> %v
2328 define <vscale x 32 x i1> @icmp_eq_vx_swap_nxv32i32(<vscale x 32 x i32> %va, i32 %b, <vscale x 32 x i1> %m, i32 zeroext %evl) {
2329 ; CHECK-LABEL: icmp_eq_vx_swap_nxv32i32:
2331 ; CHECK-NEXT: vmv1r.v v24, v0
2332 ; CHECK-NEXT: csrr a3, vlenb
2333 ; CHECK-NEXT: srli a2, a3, 2
2334 ; CHECK-NEXT: vsetvli a4, zero, e8, mf2, ta, ma
2335 ; CHECK-NEXT: vslidedown.vx v0, v0, a2
2336 ; CHECK-NEXT: slli a3, a3, 1
2337 ; CHECK-NEXT: sub a4, a1, a3
2338 ; CHECK-NEXT: sltu a5, a1, a4
2339 ; CHECK-NEXT: addi a5, a5, -1
2340 ; CHECK-NEXT: and a4, a5, a4
2341 ; CHECK-NEXT: vsetvli zero, a4, e32, m8, ta, ma
2342 ; CHECK-NEXT: vmseq.vx v25, v16, a0, v0.t
2343 ; CHECK-NEXT: bltu a1, a3, .LBB191_2
2344 ; CHECK-NEXT: # %bb.1:
2345 ; CHECK-NEXT: mv a1, a3
2346 ; CHECK-NEXT: .LBB191_2:
2347 ; CHECK-NEXT: vmv1r.v v0, v24
2348 ; CHECK-NEXT: vsetvli zero, a1, e32, m8, ta, ma
2349 ; CHECK-NEXT: vmseq.vx v16, v8, a0, v0.t
2350 ; CHECK-NEXT: add a0, a2, a2
2351 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
2352 ; CHECK-NEXT: vslideup.vx v16, v25, a2
2353 ; CHECK-NEXT: vmv1r.v v0, v16
2355 %elt.head = insertelement <vscale x 32 x i32> poison, i32 %b, i32 0
2356 %vb = shufflevector <vscale x 32 x i32> %elt.head, <vscale x 32 x i32> poison, <vscale x 32 x i32> zeroinitializer
2357 %v = call <vscale x 32 x i1> @llvm.vp.icmp.nxv32i32(<vscale x 32 x i32> %vb, <vscale x 32 x i32> %va, metadata !"eq", <vscale x 32 x i1> %m, i32 %evl)
2358 ret <vscale x 32 x i1> %v
2361 declare <vscale x 1 x i1> @llvm.vp.icmp.nxv1i64(<vscale x 1 x i64>, <vscale x 1 x i64>, metadata, <vscale x 1 x i1>, i32)
2363 define <vscale x 1 x i1> @icmp_eq_vv_nxv1i64(<vscale x 1 x i64> %va, <vscale x 1 x i64> %vb, <vscale x 1 x i1> %m, i32 zeroext %evl) {
2364 ; CHECK-LABEL: icmp_eq_vv_nxv1i64:
2366 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
2367 ; CHECK-NEXT: vmseq.vv v0, v8, v9, v0.t
2369 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i64(<vscale x 1 x i64> %va, <vscale x 1 x i64> %vb, metadata !"eq", <vscale x 1 x i1> %m, i32 %evl)
2370 ret <vscale x 1 x i1> %v
2373 define <vscale x 1 x i1> @icmp_eq_vx_nxv1i64(<vscale x 1 x i64> %va, i64 %b, <vscale x 1 x i1> %m, i32 zeroext %evl) {
2374 ; RV32-LABEL: icmp_eq_vx_nxv1i64:
2376 ; RV32-NEXT: addi sp, sp, -16
2377 ; RV32-NEXT: .cfi_def_cfa_offset 16
2378 ; RV32-NEXT: sw a1, 12(sp)
2379 ; RV32-NEXT: sw a0, 8(sp)
2380 ; RV32-NEXT: addi a0, sp, 8
2381 ; RV32-NEXT: vsetvli a1, zero, e64, m1, ta, ma
2382 ; RV32-NEXT: vlse64.v v9, (a0), zero
2383 ; RV32-NEXT: vsetvli zero, a2, e64, m1, ta, ma
2384 ; RV32-NEXT: vmseq.vv v0, v8, v9, v0.t
2385 ; RV32-NEXT: addi sp, sp, 16
2388 ; RV64-LABEL: icmp_eq_vx_nxv1i64:
2390 ; RV64-NEXT: vsetvli zero, a1, e64, m1, ta, ma
2391 ; RV64-NEXT: vmseq.vx v0, v8, a0, v0.t
2393 %elt.head = insertelement <vscale x 1 x i64> poison, i64 %b, i32 0
2394 %vb = shufflevector <vscale x 1 x i64> %elt.head, <vscale x 1 x i64> poison, <vscale x 1 x i32> zeroinitializer
2395 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i64(<vscale x 1 x i64> %va, <vscale x 1 x i64> %vb, metadata !"eq", <vscale x 1 x i1> %m, i32 %evl)
2396 ret <vscale x 1 x i1> %v
2399 define <vscale x 1 x i1> @icmp_eq_vx_swap_nxv1i64(<vscale x 1 x i64> %va, i64 %b, <vscale x 1 x i1> %m, i32 zeroext %evl) {
2400 ; RV32-LABEL: icmp_eq_vx_swap_nxv1i64:
2402 ; RV32-NEXT: addi sp, sp, -16
2403 ; RV32-NEXT: .cfi_def_cfa_offset 16
2404 ; RV32-NEXT: sw a1, 12(sp)
2405 ; RV32-NEXT: sw a0, 8(sp)
2406 ; RV32-NEXT: addi a0, sp, 8
2407 ; RV32-NEXT: vsetvli a1, zero, e64, m1, ta, ma
2408 ; RV32-NEXT: vlse64.v v9, (a0), zero
2409 ; RV32-NEXT: vsetvli zero, a2, e64, m1, ta, ma
2410 ; RV32-NEXT: vmseq.vv v0, v9, v8, v0.t
2411 ; RV32-NEXT: addi sp, sp, 16
2414 ; RV64-LABEL: icmp_eq_vx_swap_nxv1i64:
2416 ; RV64-NEXT: vsetvli zero, a1, e64, m1, ta, ma
2417 ; RV64-NEXT: vmseq.vx v0, v8, a0, v0.t
2419 %elt.head = insertelement <vscale x 1 x i64> poison, i64 %b, i32 0
2420 %vb = shufflevector <vscale x 1 x i64> %elt.head, <vscale x 1 x i64> poison, <vscale x 1 x i32> zeroinitializer
2421 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i64(<vscale x 1 x i64> %vb, <vscale x 1 x i64> %va, metadata !"eq", <vscale x 1 x i1> %m, i32 %evl)
2422 ret <vscale x 1 x i1> %v
2425 define <vscale x 1 x i1> @icmp_eq_vi_nxv1i64(<vscale x 1 x i64> %va, <vscale x 1 x i1> %m, i32 zeroext %evl) {
2426 ; CHECK-LABEL: icmp_eq_vi_nxv1i64:
2428 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
2429 ; CHECK-NEXT: vmseq.vi v0, v8, 4, v0.t
2431 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i64(<vscale x 1 x i64> %va, <vscale x 1 x i64> splat (i64 4), metadata !"eq", <vscale x 1 x i1> %m, i32 %evl)
2432 ret <vscale x 1 x i1> %v
2435 define <vscale x 1 x i1> @icmp_eq_vi_swap_nxv1i64(<vscale x 1 x i64> %va, <vscale x 1 x i1> %m, i32 zeroext %evl) {
2436 ; CHECK-LABEL: icmp_eq_vi_swap_nxv1i64:
2438 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
2439 ; CHECK-NEXT: vmseq.vi v0, v8, 4, v0.t
2441 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i64(<vscale x 1 x i64> splat (i64 4), <vscale x 1 x i64> %va, metadata !"eq", <vscale x 1 x i1> %m, i32 %evl)
2442 ret <vscale x 1 x i1> %v
2445 define <vscale x 1 x i1> @icmp_ne_vv_nxv1i64(<vscale x 1 x i64> %va, <vscale x 1 x i64> %vb, <vscale x 1 x i1> %m, i32 zeroext %evl) {
2446 ; CHECK-LABEL: icmp_ne_vv_nxv1i64:
2448 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
2449 ; CHECK-NEXT: vmsne.vv v0, v8, v9, v0.t
2451 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i64(<vscale x 1 x i64> %va, <vscale x 1 x i64> %vb, metadata !"ne", <vscale x 1 x i1> %m, i32 %evl)
2452 ret <vscale x 1 x i1> %v
2455 define <vscale x 1 x i1> @icmp_ne_vx_nxv1i64(<vscale x 1 x i64> %va, i64 %b, <vscale x 1 x i1> %m, i32 zeroext %evl) {
2456 ; RV32-LABEL: icmp_ne_vx_nxv1i64:
2458 ; RV32-NEXT: addi sp, sp, -16
2459 ; RV32-NEXT: .cfi_def_cfa_offset 16
2460 ; RV32-NEXT: sw a1, 12(sp)
2461 ; RV32-NEXT: sw a0, 8(sp)
2462 ; RV32-NEXT: addi a0, sp, 8
2463 ; RV32-NEXT: vsetvli a1, zero, e64, m1, ta, ma
2464 ; RV32-NEXT: vlse64.v v9, (a0), zero
2465 ; RV32-NEXT: vsetvli zero, a2, e64, m1, ta, ma
2466 ; RV32-NEXT: vmsne.vv v0, v8, v9, v0.t
2467 ; RV32-NEXT: addi sp, sp, 16
2470 ; RV64-LABEL: icmp_ne_vx_nxv1i64:
2472 ; RV64-NEXT: vsetvli zero, a1, e64, m1, ta, ma
2473 ; RV64-NEXT: vmsne.vx v0, v8, a0, v0.t
2475 %elt.head = insertelement <vscale x 1 x i64> poison, i64 %b, i32 0
2476 %vb = shufflevector <vscale x 1 x i64> %elt.head, <vscale x 1 x i64> poison, <vscale x 1 x i32> zeroinitializer
2477 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i64(<vscale x 1 x i64> %va, <vscale x 1 x i64> %vb, metadata !"ne", <vscale x 1 x i1> %m, i32 %evl)
2478 ret <vscale x 1 x i1> %v
2481 define <vscale x 1 x i1> @icmp_ne_vx_swap_nxv1i64(<vscale x 1 x i64> %va, i64 %b, <vscale x 1 x i1> %m, i32 zeroext %evl) {
2482 ; RV32-LABEL: icmp_ne_vx_swap_nxv1i64:
2484 ; RV32-NEXT: addi sp, sp, -16
2485 ; RV32-NEXT: .cfi_def_cfa_offset 16
2486 ; RV32-NEXT: sw a1, 12(sp)
2487 ; RV32-NEXT: sw a0, 8(sp)
2488 ; RV32-NEXT: addi a0, sp, 8
2489 ; RV32-NEXT: vsetvli a1, zero, e64, m1, ta, ma
2490 ; RV32-NEXT: vlse64.v v9, (a0), zero
2491 ; RV32-NEXT: vsetvli zero, a2, e64, m1, ta, ma
2492 ; RV32-NEXT: vmsne.vv v0, v9, v8, v0.t
2493 ; RV32-NEXT: addi sp, sp, 16
2496 ; RV64-LABEL: icmp_ne_vx_swap_nxv1i64:
2498 ; RV64-NEXT: vsetvli zero, a1, e64, m1, ta, ma
2499 ; RV64-NEXT: vmsne.vx v0, v8, a0, v0.t
2501 %elt.head = insertelement <vscale x 1 x i64> poison, i64 %b, i32 0
2502 %vb = shufflevector <vscale x 1 x i64> %elt.head, <vscale x 1 x i64> poison, <vscale x 1 x i32> zeroinitializer
2503 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i64(<vscale x 1 x i64> %vb, <vscale x 1 x i64> %va, metadata !"ne", <vscale x 1 x i1> %m, i32 %evl)
2504 ret <vscale x 1 x i1> %v
2507 define <vscale x 1 x i1> @icmp_ne_vi_nxv1i64(<vscale x 1 x i64> %va, <vscale x 1 x i1> %m, i32 zeroext %evl) {
2508 ; CHECK-LABEL: icmp_ne_vi_nxv1i64:
2510 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
2511 ; CHECK-NEXT: vmsne.vi v0, v8, 4, v0.t
2513 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i64(<vscale x 1 x i64> %va, <vscale x 1 x i64> splat (i64 4), metadata !"ne", <vscale x 1 x i1> %m, i32 %evl)
2514 ret <vscale x 1 x i1> %v
2517 define <vscale x 1 x i1> @icmp_ne_vi_swap_nxv1i64(<vscale x 1 x i64> %va, <vscale x 1 x i1> %m, i32 zeroext %evl) {
2518 ; CHECK-LABEL: icmp_ne_vi_swap_nxv1i64:
2520 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
2521 ; CHECK-NEXT: vmsne.vi v0, v8, 4, v0.t
2523 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i64(<vscale x 1 x i64> splat (i64 4), <vscale x 1 x i64> %va, metadata !"ne", <vscale x 1 x i1> %m, i32 %evl)
2524 ret <vscale x 1 x i1> %v
2527 define <vscale x 1 x i1> @icmp_ugt_vv_nxv1i64(<vscale x 1 x i64> %va, <vscale x 1 x i64> %vb, <vscale x 1 x i1> %m, i32 zeroext %evl) {
2528 ; CHECK-LABEL: icmp_ugt_vv_nxv1i64:
2530 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
2531 ; CHECK-NEXT: vmsltu.vv v0, v9, v8, v0.t
2533 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i64(<vscale x 1 x i64> %va, <vscale x 1 x i64> %vb, metadata !"ugt", <vscale x 1 x i1> %m, i32 %evl)
2534 ret <vscale x 1 x i1> %v
2537 define <vscale x 1 x i1> @icmp_ugt_vx_nxv1i64(<vscale x 1 x i64> %va, i64 %b, <vscale x 1 x i1> %m, i32 zeroext %evl) {
2538 ; RV32-LABEL: icmp_ugt_vx_nxv1i64:
2540 ; RV32-NEXT: addi sp, sp, -16
2541 ; RV32-NEXT: .cfi_def_cfa_offset 16
2542 ; RV32-NEXT: sw a1, 12(sp)
2543 ; RV32-NEXT: sw a0, 8(sp)
2544 ; RV32-NEXT: addi a0, sp, 8
2545 ; RV32-NEXT: vsetvli a1, zero, e64, m1, ta, ma
2546 ; RV32-NEXT: vlse64.v v9, (a0), zero
2547 ; RV32-NEXT: vsetvli zero, a2, e64, m1, ta, ma
2548 ; RV32-NEXT: vmsltu.vv v0, v9, v8, v0.t
2549 ; RV32-NEXT: addi sp, sp, 16
2552 ; RV64-LABEL: icmp_ugt_vx_nxv1i64:
2554 ; RV64-NEXT: vsetvli zero, a1, e64, m1, ta, ma
2555 ; RV64-NEXT: vmsgtu.vx v0, v8, a0, v0.t
2557 %elt.head = insertelement <vscale x 1 x i64> poison, i64 %b, i32 0
2558 %vb = shufflevector <vscale x 1 x i64> %elt.head, <vscale x 1 x i64> poison, <vscale x 1 x i32> zeroinitializer
2559 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i64(<vscale x 1 x i64> %va, <vscale x 1 x i64> %vb, metadata !"ugt", <vscale x 1 x i1> %m, i32 %evl)
2560 ret <vscale x 1 x i1> %v
2563 define <vscale x 1 x i1> @icmp_ugt_vx_swap_nxv1i64(<vscale x 1 x i64> %va, i64 %b, <vscale x 1 x i1> %m, i32 zeroext %evl) {
2564 ; RV32-LABEL: icmp_ugt_vx_swap_nxv1i64:
2566 ; RV32-NEXT: addi sp, sp, -16
2567 ; RV32-NEXT: .cfi_def_cfa_offset 16
2568 ; RV32-NEXT: sw a1, 12(sp)
2569 ; RV32-NEXT: sw a0, 8(sp)
2570 ; RV32-NEXT: addi a0, sp, 8
2571 ; RV32-NEXT: vsetvli a1, zero, e64, m1, ta, ma
2572 ; RV32-NEXT: vlse64.v v9, (a0), zero
2573 ; RV32-NEXT: vsetvli zero, a2, e64, m1, ta, ma
2574 ; RV32-NEXT: vmsltu.vv v0, v8, v9, v0.t
2575 ; RV32-NEXT: addi sp, sp, 16
2578 ; RV64-LABEL: icmp_ugt_vx_swap_nxv1i64:
2580 ; RV64-NEXT: vsetvli zero, a1, e64, m1, ta, ma
2581 ; RV64-NEXT: vmsltu.vx v0, v8, a0, v0.t
2583 %elt.head = insertelement <vscale x 1 x i64> poison, i64 %b, i32 0
2584 %vb = shufflevector <vscale x 1 x i64> %elt.head, <vscale x 1 x i64> poison, <vscale x 1 x i32> zeroinitializer
2585 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i64(<vscale x 1 x i64> %vb, <vscale x 1 x i64> %va, metadata !"ugt", <vscale x 1 x i1> %m, i32 %evl)
2586 ret <vscale x 1 x i1> %v
2589 define <vscale x 1 x i1> @icmp_ugt_vi_nxv1i64(<vscale x 1 x i64> %va, <vscale x 1 x i1> %m, i32 zeroext %evl) {
2590 ; CHECK-LABEL: icmp_ugt_vi_nxv1i64:
2592 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
2593 ; CHECK-NEXT: vmsgtu.vi v0, v8, 4, v0.t
2595 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i64(<vscale x 1 x i64> %va, <vscale x 1 x i64> splat (i64 4), metadata !"ugt", <vscale x 1 x i1> %m, i32 %evl)
2596 ret <vscale x 1 x i1> %v
2599 define <vscale x 1 x i1> @icmp_ugt_vi_swap_nxv1i64(<vscale x 1 x i64> %va, <vscale x 1 x i1> %m, i32 zeroext %evl) {
2600 ; CHECK-LABEL: icmp_ugt_vi_swap_nxv1i64:
2602 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
2603 ; CHECK-NEXT: vmsleu.vi v0, v8, 3, v0.t
2605 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i64(<vscale x 1 x i64> splat (i64 4), <vscale x 1 x i64> %va, metadata !"ugt", <vscale x 1 x i1> %m, i32 %evl)
2606 ret <vscale x 1 x i1> %v
2609 define <vscale x 1 x i1> @icmp_uge_vv_nxv1i64(<vscale x 1 x i64> %va, <vscale x 1 x i64> %vb, <vscale x 1 x i1> %m, i32 zeroext %evl) {
2610 ; CHECK-LABEL: icmp_uge_vv_nxv1i64:
2612 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
2613 ; CHECK-NEXT: vmsleu.vv v0, v9, v8, v0.t
2615 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i64(<vscale x 1 x i64> %va, <vscale x 1 x i64> %vb, metadata !"uge", <vscale x 1 x i1> %m, i32 %evl)
2616 ret <vscale x 1 x i1> %v
2619 define <vscale x 1 x i1> @icmp_uge_vx_nxv1i64(<vscale x 1 x i64> %va, i64 %b, <vscale x 1 x i1> %m, i32 zeroext %evl) {
2620 ; RV32-LABEL: icmp_uge_vx_nxv1i64:
2622 ; RV32-NEXT: addi sp, sp, -16
2623 ; RV32-NEXT: .cfi_def_cfa_offset 16
2624 ; RV32-NEXT: sw a1, 12(sp)
2625 ; RV32-NEXT: sw a0, 8(sp)
2626 ; RV32-NEXT: addi a0, sp, 8
2627 ; RV32-NEXT: vsetvli a1, zero, e64, m1, ta, ma
2628 ; RV32-NEXT: vlse64.v v9, (a0), zero
2629 ; RV32-NEXT: vsetvli zero, a2, e64, m1, ta, ma
2630 ; RV32-NEXT: vmsleu.vv v0, v9, v8, v0.t
2631 ; RV32-NEXT: addi sp, sp, 16
2634 ; RV64-LABEL: icmp_uge_vx_nxv1i64:
2636 ; RV64-NEXT: vsetvli a2, zero, e64, m1, ta, ma
2637 ; RV64-NEXT: vmv.v.x v9, a0
2638 ; RV64-NEXT: vsetvli zero, a1, e64, m1, ta, ma
2639 ; RV64-NEXT: vmsleu.vv v0, v9, v8, v0.t
2641 %elt.head = insertelement <vscale x 1 x i64> poison, i64 %b, i32 0
2642 %vb = shufflevector <vscale x 1 x i64> %elt.head, <vscale x 1 x i64> poison, <vscale x 1 x i32> zeroinitializer
2643 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i64(<vscale x 1 x i64> %va, <vscale x 1 x i64> %vb, metadata !"uge", <vscale x 1 x i1> %m, i32 %evl)
2644 ret <vscale x 1 x i1> %v
2647 define <vscale x 1 x i1> @icmp_uge_vx_swap_nxv1i64(<vscale x 1 x i64> %va, i64 %b, <vscale x 1 x i1> %m, i32 zeroext %evl) {
2648 ; RV32-LABEL: icmp_uge_vx_swap_nxv1i64:
2650 ; RV32-NEXT: addi sp, sp, -16
2651 ; RV32-NEXT: .cfi_def_cfa_offset 16
2652 ; RV32-NEXT: sw a1, 12(sp)
2653 ; RV32-NEXT: sw a0, 8(sp)
2654 ; RV32-NEXT: addi a0, sp, 8
2655 ; RV32-NEXT: vsetvli a1, zero, e64, m1, ta, ma
2656 ; RV32-NEXT: vlse64.v v9, (a0), zero
2657 ; RV32-NEXT: vsetvli zero, a2, e64, m1, ta, ma
2658 ; RV32-NEXT: vmsleu.vv v0, v8, v9, v0.t
2659 ; RV32-NEXT: addi sp, sp, 16
2662 ; RV64-LABEL: icmp_uge_vx_swap_nxv1i64:
2664 ; RV64-NEXT: vsetvli zero, a1, e64, m1, ta, ma
2665 ; RV64-NEXT: vmsleu.vx v0, v8, a0, v0.t
2667 %elt.head = insertelement <vscale x 1 x i64> poison, i64 %b, i32 0
2668 %vb = shufflevector <vscale x 1 x i64> %elt.head, <vscale x 1 x i64> poison, <vscale x 1 x i32> zeroinitializer
2669 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i64(<vscale x 1 x i64> %vb, <vscale x 1 x i64> %va, metadata !"uge", <vscale x 1 x i1> %m, i32 %evl)
2670 ret <vscale x 1 x i1> %v
2673 define <vscale x 1 x i1> @icmp_uge_vi_nxv1i64(<vscale x 1 x i64> %va, <vscale x 1 x i1> %m, i32 zeroext %evl) {
2674 ; CHECK-LABEL: icmp_uge_vi_nxv1i64:
2676 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
2677 ; CHECK-NEXT: vmsgtu.vi v0, v8, 3, v0.t
2679 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i64(<vscale x 1 x i64> %va, <vscale x 1 x i64> splat (i64 4), metadata !"uge", <vscale x 1 x i1> %m, i32 %evl)
2680 ret <vscale x 1 x i1> %v
2683 define <vscale x 1 x i1> @icmp_uge_vi_swap_nxv1i64(<vscale x 1 x i64> %va, <vscale x 1 x i1> %m, i32 zeroext %evl) {
2684 ; CHECK-LABEL: icmp_uge_vi_swap_nxv1i64:
2686 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
2687 ; CHECK-NEXT: vmsleu.vi v0, v8, 4, v0.t
2689 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i64(<vscale x 1 x i64> splat (i64 4), <vscale x 1 x i64> %va, metadata !"uge", <vscale x 1 x i1> %m, i32 %evl)
2690 ret <vscale x 1 x i1> %v
2693 define <vscale x 1 x i1> @icmp_ult_vv_nxv1i64(<vscale x 1 x i64> %va, <vscale x 1 x i64> %vb, <vscale x 1 x i1> %m, i32 zeroext %evl) {
2694 ; CHECK-LABEL: icmp_ult_vv_nxv1i64:
2696 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
2697 ; CHECK-NEXT: vmsltu.vv v0, v8, v9, v0.t
2699 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i64(<vscale x 1 x i64> %va, <vscale x 1 x i64> %vb, metadata !"ult", <vscale x 1 x i1> %m, i32 %evl)
2700 ret <vscale x 1 x i1> %v
2703 define <vscale x 1 x i1> @icmp_ult_vx_nxv1i64(<vscale x 1 x i64> %va, i64 %b, <vscale x 1 x i1> %m, i32 zeroext %evl) {
2704 ; RV32-LABEL: icmp_ult_vx_nxv1i64:
2706 ; RV32-NEXT: addi sp, sp, -16
2707 ; RV32-NEXT: .cfi_def_cfa_offset 16
2708 ; RV32-NEXT: sw a1, 12(sp)
2709 ; RV32-NEXT: sw a0, 8(sp)
2710 ; RV32-NEXT: addi a0, sp, 8
2711 ; RV32-NEXT: vsetvli a1, zero, e64, m1, ta, ma
2712 ; RV32-NEXT: vlse64.v v9, (a0), zero
2713 ; RV32-NEXT: vsetvli zero, a2, e64, m1, ta, ma
2714 ; RV32-NEXT: vmsltu.vv v0, v8, v9, v0.t
2715 ; RV32-NEXT: addi sp, sp, 16
2718 ; RV64-LABEL: icmp_ult_vx_nxv1i64:
2720 ; RV64-NEXT: vsetvli zero, a1, e64, m1, ta, ma
2721 ; RV64-NEXT: vmsltu.vx v0, v8, a0, v0.t
2723 %elt.head = insertelement <vscale x 1 x i64> poison, i64 %b, i32 0
2724 %vb = shufflevector <vscale x 1 x i64> %elt.head, <vscale x 1 x i64> poison, <vscale x 1 x i32> zeroinitializer
2725 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i64(<vscale x 1 x i64> %va, <vscale x 1 x i64> %vb, metadata !"ult", <vscale x 1 x i1> %m, i32 %evl)
2726 ret <vscale x 1 x i1> %v
2729 define <vscale x 1 x i1> @icmp_ult_vx_swap_nxv1i64(<vscale x 1 x i64> %va, i64 %b, <vscale x 1 x i1> %m, i32 zeroext %evl) {
2730 ; RV32-LABEL: icmp_ult_vx_swap_nxv1i64:
2732 ; RV32-NEXT: addi sp, sp, -16
2733 ; RV32-NEXT: .cfi_def_cfa_offset 16
2734 ; RV32-NEXT: sw a1, 12(sp)
2735 ; RV32-NEXT: sw a0, 8(sp)
2736 ; RV32-NEXT: addi a0, sp, 8
2737 ; RV32-NEXT: vsetvli a1, zero, e64, m1, ta, ma
2738 ; RV32-NEXT: vlse64.v v9, (a0), zero
2739 ; RV32-NEXT: vsetvli zero, a2, e64, m1, ta, ma
2740 ; RV32-NEXT: vmsltu.vv v0, v9, v8, v0.t
2741 ; RV32-NEXT: addi sp, sp, 16
2744 ; RV64-LABEL: icmp_ult_vx_swap_nxv1i64:
2746 ; RV64-NEXT: vsetvli zero, a1, e64, m1, ta, ma
2747 ; RV64-NEXT: vmsgtu.vx v0, v8, a0, v0.t
2749 %elt.head = insertelement <vscale x 1 x i64> poison, i64 %b, i32 0
2750 %vb = shufflevector <vscale x 1 x i64> %elt.head, <vscale x 1 x i64> poison, <vscale x 1 x i32> zeroinitializer
2751 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i64(<vscale x 1 x i64> %vb, <vscale x 1 x i64> %va, metadata !"ult", <vscale x 1 x i1> %m, i32 %evl)
2752 ret <vscale x 1 x i1> %v
2755 define <vscale x 1 x i1> @icmp_ult_vi_nxv1i64(<vscale x 1 x i64> %va, <vscale x 1 x i1> %m, i32 zeroext %evl) {
2756 ; CHECK-LABEL: icmp_ult_vi_nxv1i64:
2758 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
2759 ; CHECK-NEXT: vmsleu.vi v0, v8, 3, v0.t
2761 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i64(<vscale x 1 x i64> %va, <vscale x 1 x i64> splat (i64 4), metadata !"ult", <vscale x 1 x i1> %m, i32 %evl)
2762 ret <vscale x 1 x i1> %v
2765 define <vscale x 1 x i1> @icmp_ult_vi_swap_nxv1i64(<vscale x 1 x i64> %va, <vscale x 1 x i1> %m, i32 zeroext %evl) {
2766 ; CHECK-LABEL: icmp_ult_vi_swap_nxv1i64:
2768 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
2769 ; CHECK-NEXT: vmsgtu.vi v0, v8, 4, v0.t
2771 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i64(<vscale x 1 x i64> splat (i64 4), <vscale x 1 x i64> %va, metadata !"ult", <vscale x 1 x i1> %m, i32 %evl)
2772 ret <vscale x 1 x i1> %v
2775 define <vscale x 1 x i1> @icmp_sgt_vv_nxv1i64(<vscale x 1 x i64> %va, <vscale x 1 x i64> %vb, <vscale x 1 x i1> %m, i32 zeroext %evl) {
2776 ; CHECK-LABEL: icmp_sgt_vv_nxv1i64:
2778 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
2779 ; CHECK-NEXT: vmslt.vv v0, v9, v8, v0.t
2781 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i64(<vscale x 1 x i64> %va, <vscale x 1 x i64> %vb, metadata !"sgt", <vscale x 1 x i1> %m, i32 %evl)
2782 ret <vscale x 1 x i1> %v
2785 define <vscale x 1 x i1> @icmp_sgt_vx_nxv1i64(<vscale x 1 x i64> %va, i64 %b, <vscale x 1 x i1> %m, i32 zeroext %evl) {
2786 ; RV32-LABEL: icmp_sgt_vx_nxv1i64:
2788 ; RV32-NEXT: addi sp, sp, -16
2789 ; RV32-NEXT: .cfi_def_cfa_offset 16
2790 ; RV32-NEXT: sw a1, 12(sp)
2791 ; RV32-NEXT: sw a0, 8(sp)
2792 ; RV32-NEXT: addi a0, sp, 8
2793 ; RV32-NEXT: vsetvli a1, zero, e64, m1, ta, ma
2794 ; RV32-NEXT: vlse64.v v9, (a0), zero
2795 ; RV32-NEXT: vsetvli zero, a2, e64, m1, ta, ma
2796 ; RV32-NEXT: vmslt.vv v0, v9, v8, v0.t
2797 ; RV32-NEXT: addi sp, sp, 16
2800 ; RV64-LABEL: icmp_sgt_vx_nxv1i64:
2802 ; RV64-NEXT: vsetvli zero, a1, e64, m1, ta, ma
2803 ; RV64-NEXT: vmsgt.vx v0, v8, a0, v0.t
2805 %elt.head = insertelement <vscale x 1 x i64> poison, i64 %b, i32 0
2806 %vb = shufflevector <vscale x 1 x i64> %elt.head, <vscale x 1 x i64> poison, <vscale x 1 x i32> zeroinitializer
2807 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i64(<vscale x 1 x i64> %va, <vscale x 1 x i64> %vb, metadata !"sgt", <vscale x 1 x i1> %m, i32 %evl)
2808 ret <vscale x 1 x i1> %v
2811 define <vscale x 1 x i1> @icmp_sgt_vx_swap_nxv1i64(<vscale x 1 x i64> %va, i64 %b, <vscale x 1 x i1> %m, i32 zeroext %evl) {
2812 ; RV32-LABEL: icmp_sgt_vx_swap_nxv1i64:
2814 ; RV32-NEXT: addi sp, sp, -16
2815 ; RV32-NEXT: .cfi_def_cfa_offset 16
2816 ; RV32-NEXT: sw a1, 12(sp)
2817 ; RV32-NEXT: sw a0, 8(sp)
2818 ; RV32-NEXT: addi a0, sp, 8
2819 ; RV32-NEXT: vsetvli a1, zero, e64, m1, ta, ma
2820 ; RV32-NEXT: vlse64.v v9, (a0), zero
2821 ; RV32-NEXT: vsetvli zero, a2, e64, m1, ta, ma
2822 ; RV32-NEXT: vmslt.vv v0, v8, v9, v0.t
2823 ; RV32-NEXT: addi sp, sp, 16
2826 ; RV64-LABEL: icmp_sgt_vx_swap_nxv1i64:
2828 ; RV64-NEXT: vsetvli zero, a1, e64, m1, ta, ma
2829 ; RV64-NEXT: vmslt.vx v0, v8, a0, v0.t
2831 %elt.head = insertelement <vscale x 1 x i64> poison, i64 %b, i32 0
2832 %vb = shufflevector <vscale x 1 x i64> %elt.head, <vscale x 1 x i64> poison, <vscale x 1 x i32> zeroinitializer
2833 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i64(<vscale x 1 x i64> %vb, <vscale x 1 x i64> %va, metadata !"sgt", <vscale x 1 x i1> %m, i32 %evl)
2834 ret <vscale x 1 x i1> %v
2837 define <vscale x 1 x i1> @icmp_sgt_vi_nxv1i64(<vscale x 1 x i64> %va, <vscale x 1 x i1> %m, i32 zeroext %evl) {
2838 ; CHECK-LABEL: icmp_sgt_vi_nxv1i64:
2840 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
2841 ; CHECK-NEXT: vmsgt.vi v0, v8, 4, v0.t
2843 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i64(<vscale x 1 x i64> %va, <vscale x 1 x i64> splat (i64 4), metadata !"sgt", <vscale x 1 x i1> %m, i32 %evl)
2844 ret <vscale x 1 x i1> %v
2847 define <vscale x 1 x i1> @icmp_sgt_vi_swap_nxv1i64(<vscale x 1 x i64> %va, <vscale x 1 x i1> %m, i32 zeroext %evl) {
2848 ; CHECK-LABEL: icmp_sgt_vi_swap_nxv1i64:
2850 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
2851 ; CHECK-NEXT: vmsle.vi v0, v8, 3, v0.t
2853 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i64(<vscale x 1 x i64> splat (i64 4), <vscale x 1 x i64> %va, metadata !"sgt", <vscale x 1 x i1> %m, i32 %evl)
2854 ret <vscale x 1 x i1> %v
2857 define <vscale x 1 x i1> @icmp_sge_vv_nxv1i64(<vscale x 1 x i64> %va, <vscale x 1 x i64> %vb, <vscale x 1 x i1> %m, i32 zeroext %evl) {
2858 ; CHECK-LABEL: icmp_sge_vv_nxv1i64:
2860 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
2861 ; CHECK-NEXT: vmsle.vv v0, v9, v8, v0.t
2863 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i64(<vscale x 1 x i64> %va, <vscale x 1 x i64> %vb, metadata !"sge", <vscale x 1 x i1> %m, i32 %evl)
2864 ret <vscale x 1 x i1> %v
2867 define <vscale x 1 x i1> @icmp_sge_vx_nxv1i64(<vscale x 1 x i64> %va, i64 %b, <vscale x 1 x i1> %m, i32 zeroext %evl) {
2868 ; RV32-LABEL: icmp_sge_vx_nxv1i64:
2870 ; RV32-NEXT: addi sp, sp, -16
2871 ; RV32-NEXT: .cfi_def_cfa_offset 16
2872 ; RV32-NEXT: sw a1, 12(sp)
2873 ; RV32-NEXT: sw a0, 8(sp)
2874 ; RV32-NEXT: addi a0, sp, 8
2875 ; RV32-NEXT: vsetvli a1, zero, e64, m1, ta, ma
2876 ; RV32-NEXT: vlse64.v v9, (a0), zero
2877 ; RV32-NEXT: vsetvli zero, a2, e64, m1, ta, ma
2878 ; RV32-NEXT: vmsle.vv v0, v9, v8, v0.t
2879 ; RV32-NEXT: addi sp, sp, 16
2882 ; RV64-LABEL: icmp_sge_vx_nxv1i64:
2884 ; RV64-NEXT: vsetvli a2, zero, e64, m1, ta, ma
2885 ; RV64-NEXT: vmv.v.x v9, a0
2886 ; RV64-NEXT: vsetvli zero, a1, e64, m1, ta, ma
2887 ; RV64-NEXT: vmsle.vv v0, v9, v8, v0.t
2889 %elt.head = insertelement <vscale x 1 x i64> poison, i64 %b, i32 0
2890 %vb = shufflevector <vscale x 1 x i64> %elt.head, <vscale x 1 x i64> poison, <vscale x 1 x i32> zeroinitializer
2891 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i64(<vscale x 1 x i64> %va, <vscale x 1 x i64> %vb, metadata !"sge", <vscale x 1 x i1> %m, i32 %evl)
2892 ret <vscale x 1 x i1> %v
2895 define <vscale x 1 x i1> @icmp_sge_vx_swap_nxv1i64(<vscale x 1 x i64> %va, i64 %b, <vscale x 1 x i1> %m, i32 zeroext %evl) {
2896 ; RV32-LABEL: icmp_sge_vx_swap_nxv1i64:
2898 ; RV32-NEXT: addi sp, sp, -16
2899 ; RV32-NEXT: .cfi_def_cfa_offset 16
2900 ; RV32-NEXT: sw a1, 12(sp)
2901 ; RV32-NEXT: sw a0, 8(sp)
2902 ; RV32-NEXT: addi a0, sp, 8
2903 ; RV32-NEXT: vsetvli a1, zero, e64, m1, ta, ma
2904 ; RV32-NEXT: vlse64.v v9, (a0), zero
2905 ; RV32-NEXT: vsetvli zero, a2, e64, m1, ta, ma
2906 ; RV32-NEXT: vmsle.vv v0, v8, v9, v0.t
2907 ; RV32-NEXT: addi sp, sp, 16
2910 ; RV64-LABEL: icmp_sge_vx_swap_nxv1i64:
2912 ; RV64-NEXT: vsetvli zero, a1, e64, m1, ta, ma
2913 ; RV64-NEXT: vmsle.vx v0, v8, a0, v0.t
2915 %elt.head = insertelement <vscale x 1 x i64> poison, i64 %b, i32 0
2916 %vb = shufflevector <vscale x 1 x i64> %elt.head, <vscale x 1 x i64> poison, <vscale x 1 x i32> zeroinitializer
2917 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i64(<vscale x 1 x i64> %vb, <vscale x 1 x i64> %va, metadata !"sge", <vscale x 1 x i1> %m, i32 %evl)
2918 ret <vscale x 1 x i1> %v
2921 define <vscale x 1 x i1> @icmp_sge_vi_nxv1i64(<vscale x 1 x i64> %va, <vscale x 1 x i1> %m, i32 zeroext %evl) {
2922 ; CHECK-LABEL: icmp_sge_vi_nxv1i64:
2924 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
2925 ; CHECK-NEXT: vmsgt.vi v0, v8, 3, v0.t
2927 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i64(<vscale x 1 x i64> %va, <vscale x 1 x i64> splat (i64 4), metadata !"sge", <vscale x 1 x i1> %m, i32 %evl)
2928 ret <vscale x 1 x i1> %v
2931 define <vscale x 1 x i1> @icmp_sge_vi_swap_nxv1i64(<vscale x 1 x i64> %va, <vscale x 1 x i1> %m, i32 zeroext %evl) {
2932 ; CHECK-LABEL: icmp_sge_vi_swap_nxv1i64:
2934 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
2935 ; CHECK-NEXT: vmsle.vi v0, v8, 4, v0.t
2937 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i64(<vscale x 1 x i64> splat (i64 4), <vscale x 1 x i64> %va, metadata !"sge", <vscale x 1 x i1> %m, i32 %evl)
2938 ret <vscale x 1 x i1> %v
2941 define <vscale x 1 x i1> @icmp_slt_vv_nxv1i64(<vscale x 1 x i64> %va, <vscale x 1 x i64> %vb, <vscale x 1 x i1> %m, i32 zeroext %evl) {
2942 ; CHECK-LABEL: icmp_slt_vv_nxv1i64:
2944 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
2945 ; CHECK-NEXT: vmslt.vv v0, v8, v9, v0.t
2947 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i64(<vscale x 1 x i64> %va, <vscale x 1 x i64> %vb, metadata !"slt", <vscale x 1 x i1> %m, i32 %evl)
2948 ret <vscale x 1 x i1> %v
2951 define <vscale x 1 x i1> @icmp_slt_vx_nxv1i64(<vscale x 1 x i64> %va, i64 %b, <vscale x 1 x i1> %m, i32 zeroext %evl) {
2952 ; RV32-LABEL: icmp_slt_vx_nxv1i64:
2954 ; RV32-NEXT: addi sp, sp, -16
2955 ; RV32-NEXT: .cfi_def_cfa_offset 16
2956 ; RV32-NEXT: sw a1, 12(sp)
2957 ; RV32-NEXT: sw a0, 8(sp)
2958 ; RV32-NEXT: addi a0, sp, 8
2959 ; RV32-NEXT: vsetvli a1, zero, e64, m1, ta, ma
2960 ; RV32-NEXT: vlse64.v v9, (a0), zero
2961 ; RV32-NEXT: vsetvli zero, a2, e64, m1, ta, ma
2962 ; RV32-NEXT: vmslt.vv v0, v8, v9, v0.t
2963 ; RV32-NEXT: addi sp, sp, 16
2966 ; RV64-LABEL: icmp_slt_vx_nxv1i64:
2968 ; RV64-NEXT: vsetvli zero, a1, e64, m1, ta, ma
2969 ; RV64-NEXT: vmslt.vx v0, v8, a0, v0.t
2971 %elt.head = insertelement <vscale x 1 x i64> poison, i64 %b, i32 0
2972 %vb = shufflevector <vscale x 1 x i64> %elt.head, <vscale x 1 x i64> poison, <vscale x 1 x i32> zeroinitializer
2973 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i64(<vscale x 1 x i64> %va, <vscale x 1 x i64> %vb, metadata !"slt", <vscale x 1 x i1> %m, i32 %evl)
2974 ret <vscale x 1 x i1> %v
2977 define <vscale x 1 x i1> @icmp_slt_vx_swap_nxv1i64(<vscale x 1 x i64> %va, i64 %b, <vscale x 1 x i1> %m, i32 zeroext %evl) {
2978 ; RV32-LABEL: icmp_slt_vx_swap_nxv1i64:
2980 ; RV32-NEXT: addi sp, sp, -16
2981 ; RV32-NEXT: .cfi_def_cfa_offset 16
2982 ; RV32-NEXT: sw a1, 12(sp)
2983 ; RV32-NEXT: sw a0, 8(sp)
2984 ; RV32-NEXT: addi a0, sp, 8
2985 ; RV32-NEXT: vsetvli a1, zero, e64, m1, ta, ma
2986 ; RV32-NEXT: vlse64.v v9, (a0), zero
2987 ; RV32-NEXT: vsetvli zero, a2, e64, m1, ta, ma
2988 ; RV32-NEXT: vmslt.vv v0, v9, v8, v0.t
2989 ; RV32-NEXT: addi sp, sp, 16
2992 ; RV64-LABEL: icmp_slt_vx_swap_nxv1i64:
2994 ; RV64-NEXT: vsetvli zero, a1, e64, m1, ta, ma
2995 ; RV64-NEXT: vmsgt.vx v0, v8, a0, v0.t
2997 %elt.head = insertelement <vscale x 1 x i64> poison, i64 %b, i32 0
2998 %vb = shufflevector <vscale x 1 x i64> %elt.head, <vscale x 1 x i64> poison, <vscale x 1 x i32> zeroinitializer
2999 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i64(<vscale x 1 x i64> %vb, <vscale x 1 x i64> %va, metadata !"slt", <vscale x 1 x i1> %m, i32 %evl)
3000 ret <vscale x 1 x i1> %v
3003 define <vscale x 1 x i1> @icmp_slt_vi_nxv1i64(<vscale x 1 x i64> %va, <vscale x 1 x i1> %m, i32 zeroext %evl) {
3004 ; CHECK-LABEL: icmp_slt_vi_nxv1i64:
3006 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
3007 ; CHECK-NEXT: vmsle.vi v0, v8, 3, v0.t
3009 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i64(<vscale x 1 x i64> %va, <vscale x 1 x i64> splat (i64 4), metadata !"slt", <vscale x 1 x i1> %m, i32 %evl)
3010 ret <vscale x 1 x i1> %v
3013 define <vscale x 1 x i1> @icmp_slt_vi_swap_nxv1i64(<vscale x 1 x i64> %va, <vscale x 1 x i1> %m, i32 zeroext %evl) {
3014 ; CHECK-LABEL: icmp_slt_vi_swap_nxv1i64:
3016 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
3017 ; CHECK-NEXT: vmsgt.vi v0, v8, 4, v0.t
3019 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i64(<vscale x 1 x i64> splat (i64 4), <vscale x 1 x i64> %va, metadata !"slt", <vscale x 1 x i1> %m, i32 %evl)
3020 ret <vscale x 1 x i1> %v
3023 define <vscale x 1 x i1> @icmp_sle_vv_nxv1i64(<vscale x 1 x i64> %va, <vscale x 1 x i64> %vb, <vscale x 1 x i1> %m, i32 zeroext %evl) {
3024 ; CHECK-LABEL: icmp_sle_vv_nxv1i64:
3026 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
3027 ; CHECK-NEXT: vmsle.vv v0, v8, v9, v0.t
3029 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i64(<vscale x 1 x i64> %va, <vscale x 1 x i64> %vb, metadata !"sle", <vscale x 1 x i1> %m, i32 %evl)
3030 ret <vscale x 1 x i1> %v
3033 define <vscale x 1 x i1> @icmp_sle_vx_nxv1i64(<vscale x 1 x i64> %va, i64 %b, <vscale x 1 x i1> %m, i32 zeroext %evl) {
3034 ; RV32-LABEL: icmp_sle_vx_nxv1i64:
3036 ; RV32-NEXT: addi sp, sp, -16
3037 ; RV32-NEXT: .cfi_def_cfa_offset 16
3038 ; RV32-NEXT: sw a1, 12(sp)
3039 ; RV32-NEXT: sw a0, 8(sp)
3040 ; RV32-NEXT: addi a0, sp, 8
3041 ; RV32-NEXT: vsetvli a1, zero, e64, m1, ta, ma
3042 ; RV32-NEXT: vlse64.v v9, (a0), zero
3043 ; RV32-NEXT: vsetvli zero, a2, e64, m1, ta, ma
3044 ; RV32-NEXT: vmsle.vv v0, v8, v9, v0.t
3045 ; RV32-NEXT: addi sp, sp, 16
3048 ; RV64-LABEL: icmp_sle_vx_nxv1i64:
3050 ; RV64-NEXT: vsetvli zero, a1, e64, m1, ta, ma
3051 ; RV64-NEXT: vmsle.vx v0, v8, a0, v0.t
3053 %elt.head = insertelement <vscale x 1 x i64> poison, i64 %b, i32 0
3054 %vb = shufflevector <vscale x 1 x i64> %elt.head, <vscale x 1 x i64> poison, <vscale x 1 x i32> zeroinitializer
3055 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i64(<vscale x 1 x i64> %va, <vscale x 1 x i64> %vb, metadata !"sle", <vscale x 1 x i1> %m, i32 %evl)
3056 ret <vscale x 1 x i1> %v
3059 define <vscale x 1 x i1> @icmp_sle_vx_swap_nxv1i64(<vscale x 1 x i64> %va, i64 %b, <vscale x 1 x i1> %m, i32 zeroext %evl) {
3060 ; RV32-LABEL: icmp_sle_vx_swap_nxv1i64:
3062 ; RV32-NEXT: addi sp, sp, -16
3063 ; RV32-NEXT: .cfi_def_cfa_offset 16
3064 ; RV32-NEXT: sw a1, 12(sp)
3065 ; RV32-NEXT: sw a0, 8(sp)
3066 ; RV32-NEXT: addi a0, sp, 8
3067 ; RV32-NEXT: vsetvli a1, zero, e64, m1, ta, ma
3068 ; RV32-NEXT: vlse64.v v9, (a0), zero
3069 ; RV32-NEXT: vsetvli zero, a2, e64, m1, ta, ma
3070 ; RV32-NEXT: vmsle.vv v0, v9, v8, v0.t
3071 ; RV32-NEXT: addi sp, sp, 16
3074 ; RV64-LABEL: icmp_sle_vx_swap_nxv1i64:
3076 ; RV64-NEXT: vsetvli a2, zero, e64, m1, ta, ma
3077 ; RV64-NEXT: vmv.v.x v9, a0
3078 ; RV64-NEXT: vsetvli zero, a1, e64, m1, ta, ma
3079 ; RV64-NEXT: vmsle.vv v0, v9, v8, v0.t
3081 %elt.head = insertelement <vscale x 1 x i64> poison, i64 %b, i32 0
3082 %vb = shufflevector <vscale x 1 x i64> %elt.head, <vscale x 1 x i64> poison, <vscale x 1 x i32> zeroinitializer
3083 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i64(<vscale x 1 x i64> %vb, <vscale x 1 x i64> %va, metadata !"sle", <vscale x 1 x i1> %m, i32 %evl)
3084 ret <vscale x 1 x i1> %v
3087 define <vscale x 1 x i1> @icmp_sle_vi_nxv1i64(<vscale x 1 x i64> %va, <vscale x 1 x i1> %m, i32 zeroext %evl) {
3088 ; CHECK-LABEL: icmp_sle_vi_nxv1i64:
3090 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
3091 ; CHECK-NEXT: vmsle.vi v0, v8, 4, v0.t
3093 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i64(<vscale x 1 x i64> %va, <vscale x 1 x i64> splat (i64 4), metadata !"sle", <vscale x 1 x i1> %m, i32 %evl)
3094 ret <vscale x 1 x i1> %v
3097 define <vscale x 1 x i1> @icmp_sle_vi_swap_nxv1i64(<vscale x 1 x i64> %va, <vscale x 1 x i1> %m, i32 zeroext %evl) {
3098 ; CHECK-LABEL: icmp_sle_vi_swap_nxv1i64:
3100 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
3101 ; CHECK-NEXT: vmsgt.vi v0, v8, 3, v0.t
3103 %v = call <vscale x 1 x i1> @llvm.vp.icmp.nxv1i64(<vscale x 1 x i64> splat (i64 4), <vscale x 1 x i64> %va, metadata !"sle", <vscale x 1 x i1> %m, i32 %evl)
3104 ret <vscale x 1 x i1> %v
3107 declare <vscale x 8 x i1> @llvm.vp.icmp.nxv8i64(<vscale x 8 x i64>, <vscale x 8 x i64>, metadata, <vscale x 8 x i1>, i32)
3109 define <vscale x 8 x i1> @icmp_eq_vv_nxv8i64(<vscale x 8 x i64> %va, <vscale x 8 x i64> %vb, <vscale x 8 x i1> %m, i32 zeroext %evl) {
3110 ; CHECK-LABEL: icmp_eq_vv_nxv8i64:
3112 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
3113 ; CHECK-NEXT: vmseq.vv v24, v8, v16, v0.t
3114 ; CHECK-NEXT: vmv1r.v v0, v24
3116 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i64(<vscale x 8 x i64> %va, <vscale x 8 x i64> %vb, metadata !"eq", <vscale x 8 x i1> %m, i32 %evl)
3117 ret <vscale x 8 x i1> %v
3120 define <vscale x 8 x i1> @icmp_eq_vx_nxv8i64(<vscale x 8 x i64> %va, i64 %b, <vscale x 8 x i1> %m, i32 zeroext %evl) {
3121 ; RV32-LABEL: icmp_eq_vx_nxv8i64:
3123 ; RV32-NEXT: addi sp, sp, -16
3124 ; RV32-NEXT: .cfi_def_cfa_offset 16
3125 ; RV32-NEXT: sw a1, 12(sp)
3126 ; RV32-NEXT: sw a0, 8(sp)
3127 ; RV32-NEXT: addi a0, sp, 8
3128 ; RV32-NEXT: vsetvli a1, zero, e64, m8, ta, ma
3129 ; RV32-NEXT: vlse64.v v24, (a0), zero
3130 ; RV32-NEXT: vsetvli zero, a2, e64, m8, ta, ma
3131 ; RV32-NEXT: vmseq.vv v16, v8, v24, v0.t
3132 ; RV32-NEXT: vmv1r.v v0, v16
3133 ; RV32-NEXT: addi sp, sp, 16
3136 ; RV64-LABEL: icmp_eq_vx_nxv8i64:
3138 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
3139 ; RV64-NEXT: vmseq.vx v16, v8, a0, v0.t
3140 ; RV64-NEXT: vmv1r.v v0, v16
3142 %elt.head = insertelement <vscale x 8 x i64> poison, i64 %b, i32 0
3143 %vb = shufflevector <vscale x 8 x i64> %elt.head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
3144 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i64(<vscale x 8 x i64> %va, <vscale x 8 x i64> %vb, metadata !"eq", <vscale x 8 x i1> %m, i32 %evl)
3145 ret <vscale x 8 x i1> %v
3148 define <vscale x 8 x i1> @icmp_eq_vx_swap_nxv8i64(<vscale x 8 x i64> %va, i64 %b, <vscale x 8 x i1> %m, i32 zeroext %evl) {
3149 ; RV32-LABEL: icmp_eq_vx_swap_nxv8i64:
3151 ; RV32-NEXT: addi sp, sp, -16
3152 ; RV32-NEXT: .cfi_def_cfa_offset 16
3153 ; RV32-NEXT: sw a1, 12(sp)
3154 ; RV32-NEXT: sw a0, 8(sp)
3155 ; RV32-NEXT: addi a0, sp, 8
3156 ; RV32-NEXT: vsetvli a1, zero, e64, m8, ta, ma
3157 ; RV32-NEXT: vlse64.v v24, (a0), zero
3158 ; RV32-NEXT: vsetvli zero, a2, e64, m8, ta, ma
3159 ; RV32-NEXT: vmseq.vv v16, v24, v8, v0.t
3160 ; RV32-NEXT: vmv1r.v v0, v16
3161 ; RV32-NEXT: addi sp, sp, 16
3164 ; RV64-LABEL: icmp_eq_vx_swap_nxv8i64:
3166 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
3167 ; RV64-NEXT: vmseq.vx v16, v8, a0, v0.t
3168 ; RV64-NEXT: vmv1r.v v0, v16
3170 %elt.head = insertelement <vscale x 8 x i64> poison, i64 %b, i32 0
3171 %vb = shufflevector <vscale x 8 x i64> %elt.head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
3172 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i64(<vscale x 8 x i64> %vb, <vscale x 8 x i64> %va, metadata !"eq", <vscale x 8 x i1> %m, i32 %evl)
3173 ret <vscale x 8 x i1> %v
3176 define <vscale x 8 x i1> @icmp_eq_vi_nxv8i64(<vscale x 8 x i64> %va, <vscale x 8 x i1> %m, i32 zeroext %evl) {
3177 ; CHECK-LABEL: icmp_eq_vi_nxv8i64:
3179 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
3180 ; CHECK-NEXT: vmseq.vi v16, v8, 4, v0.t
3181 ; CHECK-NEXT: vmv1r.v v0, v16
3183 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i64(<vscale x 8 x i64> %va, <vscale x 8 x i64> splat (i64 4), metadata !"eq", <vscale x 8 x i1> %m, i32 %evl)
3184 ret <vscale x 8 x i1> %v
3187 define <vscale x 8 x i1> @icmp_eq_vi_swap_nxv8i64(<vscale x 8 x i64> %va, <vscale x 8 x i1> %m, i32 zeroext %evl) {
3188 ; CHECK-LABEL: icmp_eq_vi_swap_nxv8i64:
3190 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
3191 ; CHECK-NEXT: vmseq.vi v16, v8, 4, v0.t
3192 ; CHECK-NEXT: vmv1r.v v0, v16
3194 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i64(<vscale x 8 x i64> splat (i64 4), <vscale x 8 x i64> %va, metadata !"eq", <vscale x 8 x i1> %m, i32 %evl)
3195 ret <vscale x 8 x i1> %v
3198 define <vscale x 8 x i1> @icmp_ne_vv_nxv8i64(<vscale x 8 x i64> %va, <vscale x 8 x i64> %vb, <vscale x 8 x i1> %m, i32 zeroext %evl) {
3199 ; CHECK-LABEL: icmp_ne_vv_nxv8i64:
3201 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
3202 ; CHECK-NEXT: vmsne.vv v24, v8, v16, v0.t
3203 ; CHECK-NEXT: vmv1r.v v0, v24
3205 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i64(<vscale x 8 x i64> %va, <vscale x 8 x i64> %vb, metadata !"ne", <vscale x 8 x i1> %m, i32 %evl)
3206 ret <vscale x 8 x i1> %v
3209 define <vscale x 8 x i1> @icmp_ne_vx_nxv8i64(<vscale x 8 x i64> %va, i64 %b, <vscale x 8 x i1> %m, i32 zeroext %evl) {
3210 ; RV32-LABEL: icmp_ne_vx_nxv8i64:
3212 ; RV32-NEXT: addi sp, sp, -16
3213 ; RV32-NEXT: .cfi_def_cfa_offset 16
3214 ; RV32-NEXT: sw a1, 12(sp)
3215 ; RV32-NEXT: sw a0, 8(sp)
3216 ; RV32-NEXT: addi a0, sp, 8
3217 ; RV32-NEXT: vsetvli a1, zero, e64, m8, ta, ma
3218 ; RV32-NEXT: vlse64.v v24, (a0), zero
3219 ; RV32-NEXT: vsetvli zero, a2, e64, m8, ta, ma
3220 ; RV32-NEXT: vmsne.vv v16, v8, v24, v0.t
3221 ; RV32-NEXT: vmv1r.v v0, v16
3222 ; RV32-NEXT: addi sp, sp, 16
3225 ; RV64-LABEL: icmp_ne_vx_nxv8i64:
3227 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
3228 ; RV64-NEXT: vmsne.vx v16, v8, a0, v0.t
3229 ; RV64-NEXT: vmv1r.v v0, v16
3231 %elt.head = insertelement <vscale x 8 x i64> poison, i64 %b, i32 0
3232 %vb = shufflevector <vscale x 8 x i64> %elt.head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
3233 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i64(<vscale x 8 x i64> %va, <vscale x 8 x i64> %vb, metadata !"ne", <vscale x 8 x i1> %m, i32 %evl)
3234 ret <vscale x 8 x i1> %v
3237 define <vscale x 8 x i1> @icmp_ne_vx_swap_nxv8i64(<vscale x 8 x i64> %va, i64 %b, <vscale x 8 x i1> %m, i32 zeroext %evl) {
3238 ; RV32-LABEL: icmp_ne_vx_swap_nxv8i64:
3240 ; RV32-NEXT: addi sp, sp, -16
3241 ; RV32-NEXT: .cfi_def_cfa_offset 16
3242 ; RV32-NEXT: sw a1, 12(sp)
3243 ; RV32-NEXT: sw a0, 8(sp)
3244 ; RV32-NEXT: addi a0, sp, 8
3245 ; RV32-NEXT: vsetvli a1, zero, e64, m8, ta, ma
3246 ; RV32-NEXT: vlse64.v v24, (a0), zero
3247 ; RV32-NEXT: vsetvli zero, a2, e64, m8, ta, ma
3248 ; RV32-NEXT: vmsne.vv v16, v24, v8, v0.t
3249 ; RV32-NEXT: vmv1r.v v0, v16
3250 ; RV32-NEXT: addi sp, sp, 16
3253 ; RV64-LABEL: icmp_ne_vx_swap_nxv8i64:
3255 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
3256 ; RV64-NEXT: vmsne.vx v16, v8, a0, v0.t
3257 ; RV64-NEXT: vmv1r.v v0, v16
3259 %elt.head = insertelement <vscale x 8 x i64> poison, i64 %b, i32 0
3260 %vb = shufflevector <vscale x 8 x i64> %elt.head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
3261 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i64(<vscale x 8 x i64> %vb, <vscale x 8 x i64> %va, metadata !"ne", <vscale x 8 x i1> %m, i32 %evl)
3262 ret <vscale x 8 x i1> %v
3265 define <vscale x 8 x i1> @icmp_ne_vi_nxv8i64(<vscale x 8 x i64> %va, <vscale x 8 x i1> %m, i32 zeroext %evl) {
3266 ; CHECK-LABEL: icmp_ne_vi_nxv8i64:
3268 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
3269 ; CHECK-NEXT: vmsne.vi v16, v8, 4, v0.t
3270 ; CHECK-NEXT: vmv1r.v v0, v16
3272 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i64(<vscale x 8 x i64> %va, <vscale x 8 x i64> splat (i64 4), metadata !"ne", <vscale x 8 x i1> %m, i32 %evl)
3273 ret <vscale x 8 x i1> %v
3276 define <vscale x 8 x i1> @icmp_ne_vi_swap_nxv8i64(<vscale x 8 x i64> %va, <vscale x 8 x i1> %m, i32 zeroext %evl) {
3277 ; CHECK-LABEL: icmp_ne_vi_swap_nxv8i64:
3279 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
3280 ; CHECK-NEXT: vmsne.vi v16, v8, 4, v0.t
3281 ; CHECK-NEXT: vmv1r.v v0, v16
3283 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i64(<vscale x 8 x i64> splat (i64 4), <vscale x 8 x i64> %va, metadata !"ne", <vscale x 8 x i1> %m, i32 %evl)
3284 ret <vscale x 8 x i1> %v
3287 define <vscale x 8 x i1> @icmp_ugt_vv_nxv8i64(<vscale x 8 x i64> %va, <vscale x 8 x i64> %vb, <vscale x 8 x i1> %m, i32 zeroext %evl) {
3288 ; CHECK-LABEL: icmp_ugt_vv_nxv8i64:
3290 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
3291 ; CHECK-NEXT: vmsltu.vv v24, v16, v8, v0.t
3292 ; CHECK-NEXT: vmv1r.v v0, v24
3294 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i64(<vscale x 8 x i64> %va, <vscale x 8 x i64> %vb, metadata !"ugt", <vscale x 8 x i1> %m, i32 %evl)
3295 ret <vscale x 8 x i1> %v
3298 define <vscale x 8 x i1> @icmp_ugt_vx_nxv8i64(<vscale x 8 x i64> %va, i64 %b, <vscale x 8 x i1> %m, i32 zeroext %evl) {
3299 ; RV32-LABEL: icmp_ugt_vx_nxv8i64:
3301 ; RV32-NEXT: addi sp, sp, -16
3302 ; RV32-NEXT: .cfi_def_cfa_offset 16
3303 ; RV32-NEXT: sw a1, 12(sp)
3304 ; RV32-NEXT: sw a0, 8(sp)
3305 ; RV32-NEXT: addi a0, sp, 8
3306 ; RV32-NEXT: vsetvli a1, zero, e64, m8, ta, ma
3307 ; RV32-NEXT: vlse64.v v24, (a0), zero
3308 ; RV32-NEXT: vsetvli zero, a2, e64, m8, ta, ma
3309 ; RV32-NEXT: vmsltu.vv v16, v24, v8, v0.t
3310 ; RV32-NEXT: vmv1r.v v0, v16
3311 ; RV32-NEXT: addi sp, sp, 16
3314 ; RV64-LABEL: icmp_ugt_vx_nxv8i64:
3316 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
3317 ; RV64-NEXT: vmsgtu.vx v16, v8, a0, v0.t
3318 ; RV64-NEXT: vmv1r.v v0, v16
3320 %elt.head = insertelement <vscale x 8 x i64> poison, i64 %b, i32 0
3321 %vb = shufflevector <vscale x 8 x i64> %elt.head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
3322 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i64(<vscale x 8 x i64> %va, <vscale x 8 x i64> %vb, metadata !"ugt", <vscale x 8 x i1> %m, i32 %evl)
3323 ret <vscale x 8 x i1> %v
3326 define <vscale x 8 x i1> @icmp_ugt_vx_swap_nxv8i64(<vscale x 8 x i64> %va, i64 %b, <vscale x 8 x i1> %m, i32 zeroext %evl) {
3327 ; RV32-LABEL: icmp_ugt_vx_swap_nxv8i64:
3329 ; RV32-NEXT: addi sp, sp, -16
3330 ; RV32-NEXT: .cfi_def_cfa_offset 16
3331 ; RV32-NEXT: sw a1, 12(sp)
3332 ; RV32-NEXT: sw a0, 8(sp)
3333 ; RV32-NEXT: addi a0, sp, 8
3334 ; RV32-NEXT: vsetvli a1, zero, e64, m8, ta, ma
3335 ; RV32-NEXT: vlse64.v v24, (a0), zero
3336 ; RV32-NEXT: vsetvli zero, a2, e64, m8, ta, ma
3337 ; RV32-NEXT: vmsltu.vv v16, v8, v24, v0.t
3338 ; RV32-NEXT: vmv1r.v v0, v16
3339 ; RV32-NEXT: addi sp, sp, 16
3342 ; RV64-LABEL: icmp_ugt_vx_swap_nxv8i64:
3344 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
3345 ; RV64-NEXT: vmsltu.vx v16, v8, a0, v0.t
3346 ; RV64-NEXT: vmv1r.v v0, v16
3348 %elt.head = insertelement <vscale x 8 x i64> poison, i64 %b, i32 0
3349 %vb = shufflevector <vscale x 8 x i64> %elt.head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
3350 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i64(<vscale x 8 x i64> %vb, <vscale x 8 x i64> %va, metadata !"ugt", <vscale x 8 x i1> %m, i32 %evl)
3351 ret <vscale x 8 x i1> %v
3354 define <vscale x 8 x i1> @icmp_ugt_vi_nxv8i64(<vscale x 8 x i64> %va, <vscale x 8 x i1> %m, i32 zeroext %evl) {
3355 ; CHECK-LABEL: icmp_ugt_vi_nxv8i64:
3357 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
3358 ; CHECK-NEXT: vmsgtu.vi v16, v8, 4, v0.t
3359 ; CHECK-NEXT: vmv1r.v v0, v16
3361 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i64(<vscale x 8 x i64> %va, <vscale x 8 x i64> splat (i64 4), metadata !"ugt", <vscale x 8 x i1> %m, i32 %evl)
3362 ret <vscale x 8 x i1> %v
3365 define <vscale x 8 x i1> @icmp_ugt_vi_swap_nxv8i64(<vscale x 8 x i64> %va, <vscale x 8 x i1> %m, i32 zeroext %evl) {
3366 ; CHECK-LABEL: icmp_ugt_vi_swap_nxv8i64:
3368 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
3369 ; CHECK-NEXT: vmsleu.vi v16, v8, 3, v0.t
3370 ; CHECK-NEXT: vmv1r.v v0, v16
3372 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i64(<vscale x 8 x i64> splat (i64 4), <vscale x 8 x i64> %va, metadata !"ugt", <vscale x 8 x i1> %m, i32 %evl)
3373 ret <vscale x 8 x i1> %v
3376 define <vscale x 8 x i1> @icmp_uge_vv_nxv8i64(<vscale x 8 x i64> %va, <vscale x 8 x i64> %vb, <vscale x 8 x i1> %m, i32 zeroext %evl) {
3377 ; CHECK-LABEL: icmp_uge_vv_nxv8i64:
3379 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
3380 ; CHECK-NEXT: vmsleu.vv v24, v16, v8, v0.t
3381 ; CHECK-NEXT: vmv1r.v v0, v24
3383 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i64(<vscale x 8 x i64> %va, <vscale x 8 x i64> %vb, metadata !"uge", <vscale x 8 x i1> %m, i32 %evl)
3384 ret <vscale x 8 x i1> %v
3387 define <vscale x 8 x i1> @icmp_uge_vx_nxv8i64(<vscale x 8 x i64> %va, i64 %b, <vscale x 8 x i1> %m, i32 zeroext %evl) {
3388 ; RV32-LABEL: icmp_uge_vx_nxv8i64:
3390 ; RV32-NEXT: addi sp, sp, -16
3391 ; RV32-NEXT: .cfi_def_cfa_offset 16
3392 ; RV32-NEXT: sw a1, 12(sp)
3393 ; RV32-NEXT: sw a0, 8(sp)
3394 ; RV32-NEXT: addi a0, sp, 8
3395 ; RV32-NEXT: vsetvli a1, zero, e64, m8, ta, ma
3396 ; RV32-NEXT: vlse64.v v24, (a0), zero
3397 ; RV32-NEXT: vsetvli zero, a2, e64, m8, ta, ma
3398 ; RV32-NEXT: vmsleu.vv v16, v24, v8, v0.t
3399 ; RV32-NEXT: vmv1r.v v0, v16
3400 ; RV32-NEXT: addi sp, sp, 16
3403 ; RV64-LABEL: icmp_uge_vx_nxv8i64:
3405 ; RV64-NEXT: vsetvli a2, zero, e64, m8, ta, ma
3406 ; RV64-NEXT: vmv.v.x v24, a0
3407 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
3408 ; RV64-NEXT: vmsleu.vv v16, v24, v8, v0.t
3409 ; RV64-NEXT: vmv1r.v v0, v16
3411 %elt.head = insertelement <vscale x 8 x i64> poison, i64 %b, i32 0
3412 %vb = shufflevector <vscale x 8 x i64> %elt.head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
3413 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i64(<vscale x 8 x i64> %va, <vscale x 8 x i64> %vb, metadata !"uge", <vscale x 8 x i1> %m, i32 %evl)
3414 ret <vscale x 8 x i1> %v
3417 define <vscale x 8 x i1> @icmp_uge_vx_swap_nxv8i64(<vscale x 8 x i64> %va, i64 %b, <vscale x 8 x i1> %m, i32 zeroext %evl) {
3418 ; RV32-LABEL: icmp_uge_vx_swap_nxv8i64:
3420 ; RV32-NEXT: addi sp, sp, -16
3421 ; RV32-NEXT: .cfi_def_cfa_offset 16
3422 ; RV32-NEXT: sw a1, 12(sp)
3423 ; RV32-NEXT: sw a0, 8(sp)
3424 ; RV32-NEXT: addi a0, sp, 8
3425 ; RV32-NEXT: vsetvli a1, zero, e64, m8, ta, ma
3426 ; RV32-NEXT: vlse64.v v24, (a0), zero
3427 ; RV32-NEXT: vsetvli zero, a2, e64, m8, ta, ma
3428 ; RV32-NEXT: vmsleu.vv v16, v8, v24, v0.t
3429 ; RV32-NEXT: vmv1r.v v0, v16
3430 ; RV32-NEXT: addi sp, sp, 16
3433 ; RV64-LABEL: icmp_uge_vx_swap_nxv8i64:
3435 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
3436 ; RV64-NEXT: vmsleu.vx v16, v8, a0, v0.t
3437 ; RV64-NEXT: vmv1r.v v0, v16
3439 %elt.head = insertelement <vscale x 8 x i64> poison, i64 %b, i32 0
3440 %vb = shufflevector <vscale x 8 x i64> %elt.head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
3441 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i64(<vscale x 8 x i64> %vb, <vscale x 8 x i64> %va, metadata !"uge", <vscale x 8 x i1> %m, i32 %evl)
3442 ret <vscale x 8 x i1> %v
3445 define <vscale x 8 x i1> @icmp_uge_vi_nxv8i64(<vscale x 8 x i64> %va, <vscale x 8 x i1> %m, i32 zeroext %evl) {
3446 ; CHECK-LABEL: icmp_uge_vi_nxv8i64:
3448 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
3449 ; CHECK-NEXT: vmsgtu.vi v16, v8, 3, v0.t
3450 ; CHECK-NEXT: vmv1r.v v0, v16
3452 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i64(<vscale x 8 x i64> %va, <vscale x 8 x i64> splat (i64 4), metadata !"uge", <vscale x 8 x i1> %m, i32 %evl)
3453 ret <vscale x 8 x i1> %v
3456 define <vscale x 8 x i1> @icmp_uge_vi_swap_nxv8i64(<vscale x 8 x i64> %va, <vscale x 8 x i1> %m, i32 zeroext %evl) {
3457 ; CHECK-LABEL: icmp_uge_vi_swap_nxv8i64:
3459 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
3460 ; CHECK-NEXT: vmsleu.vi v16, v8, 4, v0.t
3461 ; CHECK-NEXT: vmv1r.v v0, v16
3463 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i64(<vscale x 8 x i64> splat (i64 4), <vscale x 8 x i64> %va, metadata !"uge", <vscale x 8 x i1> %m, i32 %evl)
3464 ret <vscale x 8 x i1> %v
3467 define <vscale x 8 x i1> @icmp_ult_vv_nxv8i64(<vscale x 8 x i64> %va, <vscale x 8 x i64> %vb, <vscale x 8 x i1> %m, i32 zeroext %evl) {
3468 ; CHECK-LABEL: icmp_ult_vv_nxv8i64:
3470 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
3471 ; CHECK-NEXT: vmsltu.vv v24, v8, v16, v0.t
3472 ; CHECK-NEXT: vmv1r.v v0, v24
3474 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i64(<vscale x 8 x i64> %va, <vscale x 8 x i64> %vb, metadata !"ult", <vscale x 8 x i1> %m, i32 %evl)
3475 ret <vscale x 8 x i1> %v
3478 define <vscale x 8 x i1> @icmp_ult_vx_nxv8i64(<vscale x 8 x i64> %va, i64 %b, <vscale x 8 x i1> %m, i32 zeroext %evl) {
3479 ; RV32-LABEL: icmp_ult_vx_nxv8i64:
3481 ; RV32-NEXT: addi sp, sp, -16
3482 ; RV32-NEXT: .cfi_def_cfa_offset 16
3483 ; RV32-NEXT: sw a1, 12(sp)
3484 ; RV32-NEXT: sw a0, 8(sp)
3485 ; RV32-NEXT: addi a0, sp, 8
3486 ; RV32-NEXT: vsetvli a1, zero, e64, m8, ta, ma
3487 ; RV32-NEXT: vlse64.v v24, (a0), zero
3488 ; RV32-NEXT: vsetvli zero, a2, e64, m8, ta, ma
3489 ; RV32-NEXT: vmsltu.vv v16, v8, v24, v0.t
3490 ; RV32-NEXT: vmv1r.v v0, v16
3491 ; RV32-NEXT: addi sp, sp, 16
3494 ; RV64-LABEL: icmp_ult_vx_nxv8i64:
3496 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
3497 ; RV64-NEXT: vmsltu.vx v16, v8, a0, v0.t
3498 ; RV64-NEXT: vmv1r.v v0, v16
3500 %elt.head = insertelement <vscale x 8 x i64> poison, i64 %b, i32 0
3501 %vb = shufflevector <vscale x 8 x i64> %elt.head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
3502 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i64(<vscale x 8 x i64> %va, <vscale x 8 x i64> %vb, metadata !"ult", <vscale x 8 x i1> %m, i32 %evl)
3503 ret <vscale x 8 x i1> %v
3506 define <vscale x 8 x i1> @icmp_ult_vx_swap_nxv8i64(<vscale x 8 x i64> %va, i64 %b, <vscale x 8 x i1> %m, i32 zeroext %evl) {
3507 ; RV32-LABEL: icmp_ult_vx_swap_nxv8i64:
3509 ; RV32-NEXT: addi sp, sp, -16
3510 ; RV32-NEXT: .cfi_def_cfa_offset 16
3511 ; RV32-NEXT: sw a1, 12(sp)
3512 ; RV32-NEXT: sw a0, 8(sp)
3513 ; RV32-NEXT: addi a0, sp, 8
3514 ; RV32-NEXT: vsetvli a1, zero, e64, m8, ta, ma
3515 ; RV32-NEXT: vlse64.v v24, (a0), zero
3516 ; RV32-NEXT: vsetvli zero, a2, e64, m8, ta, ma
3517 ; RV32-NEXT: vmsltu.vv v16, v24, v8, v0.t
3518 ; RV32-NEXT: vmv1r.v v0, v16
3519 ; RV32-NEXT: addi sp, sp, 16
3522 ; RV64-LABEL: icmp_ult_vx_swap_nxv8i64:
3524 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
3525 ; RV64-NEXT: vmsgtu.vx v16, v8, a0, v0.t
3526 ; RV64-NEXT: vmv1r.v v0, v16
3528 %elt.head = insertelement <vscale x 8 x i64> poison, i64 %b, i32 0
3529 %vb = shufflevector <vscale x 8 x i64> %elt.head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
3530 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i64(<vscale x 8 x i64> %vb, <vscale x 8 x i64> %va, metadata !"ult", <vscale x 8 x i1> %m, i32 %evl)
3531 ret <vscale x 8 x i1> %v
3534 define <vscale x 8 x i1> @icmp_ult_vi_nxv8i64(<vscale x 8 x i64> %va, <vscale x 8 x i1> %m, i32 zeroext %evl) {
3535 ; CHECK-LABEL: icmp_ult_vi_nxv8i64:
3537 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
3538 ; CHECK-NEXT: vmsleu.vi v16, v8, 3, v0.t
3539 ; CHECK-NEXT: vmv1r.v v0, v16
3541 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i64(<vscale x 8 x i64> %va, <vscale x 8 x i64> splat (i64 4), metadata !"ult", <vscale x 8 x i1> %m, i32 %evl)
3542 ret <vscale x 8 x i1> %v
3545 define <vscale x 8 x i1> @icmp_ult_vi_swap_nxv8i64(<vscale x 8 x i64> %va, <vscale x 8 x i1> %m, i32 zeroext %evl) {
3546 ; CHECK-LABEL: icmp_ult_vi_swap_nxv8i64:
3548 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
3549 ; CHECK-NEXT: vmsgtu.vi v16, v8, 4, v0.t
3550 ; CHECK-NEXT: vmv1r.v v0, v16
3552 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i64(<vscale x 8 x i64> splat (i64 4), <vscale x 8 x i64> %va, metadata !"ult", <vscale x 8 x i1> %m, i32 %evl)
3553 ret <vscale x 8 x i1> %v
3556 define <vscale x 8 x i1> @icmp_sgt_vv_nxv8i64(<vscale x 8 x i64> %va, <vscale x 8 x i64> %vb, <vscale x 8 x i1> %m, i32 zeroext %evl) {
3557 ; CHECK-LABEL: icmp_sgt_vv_nxv8i64:
3559 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
3560 ; CHECK-NEXT: vmslt.vv v24, v16, v8, v0.t
3561 ; CHECK-NEXT: vmv1r.v v0, v24
3563 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i64(<vscale x 8 x i64> %va, <vscale x 8 x i64> %vb, metadata !"sgt", <vscale x 8 x i1> %m, i32 %evl)
3564 ret <vscale x 8 x i1> %v
3567 define <vscale x 8 x i1> @icmp_sgt_vx_nxv8i64(<vscale x 8 x i64> %va, i64 %b, <vscale x 8 x i1> %m, i32 zeroext %evl) {
3568 ; RV32-LABEL: icmp_sgt_vx_nxv8i64:
3570 ; RV32-NEXT: addi sp, sp, -16
3571 ; RV32-NEXT: .cfi_def_cfa_offset 16
3572 ; RV32-NEXT: sw a1, 12(sp)
3573 ; RV32-NEXT: sw a0, 8(sp)
3574 ; RV32-NEXT: addi a0, sp, 8
3575 ; RV32-NEXT: vsetvli a1, zero, e64, m8, ta, ma
3576 ; RV32-NEXT: vlse64.v v24, (a0), zero
3577 ; RV32-NEXT: vsetvli zero, a2, e64, m8, ta, ma
3578 ; RV32-NEXT: vmslt.vv v16, v24, v8, v0.t
3579 ; RV32-NEXT: vmv1r.v v0, v16
3580 ; RV32-NEXT: addi sp, sp, 16
3583 ; RV64-LABEL: icmp_sgt_vx_nxv8i64:
3585 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
3586 ; RV64-NEXT: vmsgt.vx v16, v8, a0, v0.t
3587 ; RV64-NEXT: vmv1r.v v0, v16
3589 %elt.head = insertelement <vscale x 8 x i64> poison, i64 %b, i32 0
3590 %vb = shufflevector <vscale x 8 x i64> %elt.head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
3591 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i64(<vscale x 8 x i64> %va, <vscale x 8 x i64> %vb, metadata !"sgt", <vscale x 8 x i1> %m, i32 %evl)
3592 ret <vscale x 8 x i1> %v
3595 define <vscale x 8 x i1> @icmp_sgt_vx_swap_nxv8i64(<vscale x 8 x i64> %va, i64 %b, <vscale x 8 x i1> %m, i32 zeroext %evl) {
3596 ; RV32-LABEL: icmp_sgt_vx_swap_nxv8i64:
3598 ; RV32-NEXT: addi sp, sp, -16
3599 ; RV32-NEXT: .cfi_def_cfa_offset 16
3600 ; RV32-NEXT: sw a1, 12(sp)
3601 ; RV32-NEXT: sw a0, 8(sp)
3602 ; RV32-NEXT: addi a0, sp, 8
3603 ; RV32-NEXT: vsetvli a1, zero, e64, m8, ta, ma
3604 ; RV32-NEXT: vlse64.v v24, (a0), zero
3605 ; RV32-NEXT: vsetvli zero, a2, e64, m8, ta, ma
3606 ; RV32-NEXT: vmslt.vv v16, v8, v24, v0.t
3607 ; RV32-NEXT: vmv1r.v v0, v16
3608 ; RV32-NEXT: addi sp, sp, 16
3611 ; RV64-LABEL: icmp_sgt_vx_swap_nxv8i64:
3613 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
3614 ; RV64-NEXT: vmslt.vx v16, v8, a0, v0.t
3615 ; RV64-NEXT: vmv1r.v v0, v16
3617 %elt.head = insertelement <vscale x 8 x i64> poison, i64 %b, i32 0
3618 %vb = shufflevector <vscale x 8 x i64> %elt.head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
3619 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i64(<vscale x 8 x i64> %vb, <vscale x 8 x i64> %va, metadata !"sgt", <vscale x 8 x i1> %m, i32 %evl)
3620 ret <vscale x 8 x i1> %v
3623 define <vscale x 8 x i1> @icmp_sgt_vi_nxv8i64(<vscale x 8 x i64> %va, <vscale x 8 x i1> %m, i32 zeroext %evl) {
3624 ; CHECK-LABEL: icmp_sgt_vi_nxv8i64:
3626 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
3627 ; CHECK-NEXT: vmsgt.vi v16, v8, 4, v0.t
3628 ; CHECK-NEXT: vmv1r.v v0, v16
3630 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i64(<vscale x 8 x i64> %va, <vscale x 8 x i64> splat (i64 4), metadata !"sgt", <vscale x 8 x i1> %m, i32 %evl)
3631 ret <vscale x 8 x i1> %v
3634 define <vscale x 8 x i1> @icmp_sgt_vi_swap_nxv8i64(<vscale x 8 x i64> %va, <vscale x 8 x i1> %m, i32 zeroext %evl) {
3635 ; CHECK-LABEL: icmp_sgt_vi_swap_nxv8i64:
3637 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
3638 ; CHECK-NEXT: vmsle.vi v16, v8, 3, v0.t
3639 ; CHECK-NEXT: vmv1r.v v0, v16
3641 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i64(<vscale x 8 x i64> splat (i64 4), <vscale x 8 x i64> %va, metadata !"sgt", <vscale x 8 x i1> %m, i32 %evl)
3642 ret <vscale x 8 x i1> %v
3645 define <vscale x 8 x i1> @icmp_sge_vv_nxv8i64(<vscale x 8 x i64> %va, <vscale x 8 x i64> %vb, <vscale x 8 x i1> %m, i32 zeroext %evl) {
3646 ; CHECK-LABEL: icmp_sge_vv_nxv8i64:
3648 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
3649 ; CHECK-NEXT: vmsle.vv v24, v16, v8, v0.t
3650 ; CHECK-NEXT: vmv1r.v v0, v24
3652 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i64(<vscale x 8 x i64> %va, <vscale x 8 x i64> %vb, metadata !"sge", <vscale x 8 x i1> %m, i32 %evl)
3653 ret <vscale x 8 x i1> %v
3656 define <vscale x 8 x i1> @icmp_sge_vx_nxv8i64(<vscale x 8 x i64> %va, i64 %b, <vscale x 8 x i1> %m, i32 zeroext %evl) {
3657 ; RV32-LABEL: icmp_sge_vx_nxv8i64:
3659 ; RV32-NEXT: addi sp, sp, -16
3660 ; RV32-NEXT: .cfi_def_cfa_offset 16
3661 ; RV32-NEXT: sw a1, 12(sp)
3662 ; RV32-NEXT: sw a0, 8(sp)
3663 ; RV32-NEXT: addi a0, sp, 8
3664 ; RV32-NEXT: vsetvli a1, zero, e64, m8, ta, ma
3665 ; RV32-NEXT: vlse64.v v24, (a0), zero
3666 ; RV32-NEXT: vsetvli zero, a2, e64, m8, ta, ma
3667 ; RV32-NEXT: vmsle.vv v16, v24, v8, v0.t
3668 ; RV32-NEXT: vmv1r.v v0, v16
3669 ; RV32-NEXT: addi sp, sp, 16
3672 ; RV64-LABEL: icmp_sge_vx_nxv8i64:
3674 ; RV64-NEXT: vsetvli a2, zero, e64, m8, ta, ma
3675 ; RV64-NEXT: vmv.v.x v24, a0
3676 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
3677 ; RV64-NEXT: vmsle.vv v16, v24, v8, v0.t
3678 ; RV64-NEXT: vmv1r.v v0, v16
3680 %elt.head = insertelement <vscale x 8 x i64> poison, i64 %b, i32 0
3681 %vb = shufflevector <vscale x 8 x i64> %elt.head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
3682 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i64(<vscale x 8 x i64> %va, <vscale x 8 x i64> %vb, metadata !"sge", <vscale x 8 x i1> %m, i32 %evl)
3683 ret <vscale x 8 x i1> %v
3686 define <vscale x 8 x i1> @icmp_sge_vx_swap_nxv8i64(<vscale x 8 x i64> %va, i64 %b, <vscale x 8 x i1> %m, i32 zeroext %evl) {
3687 ; RV32-LABEL: icmp_sge_vx_swap_nxv8i64:
3689 ; RV32-NEXT: addi sp, sp, -16
3690 ; RV32-NEXT: .cfi_def_cfa_offset 16
3691 ; RV32-NEXT: sw a1, 12(sp)
3692 ; RV32-NEXT: sw a0, 8(sp)
3693 ; RV32-NEXT: addi a0, sp, 8
3694 ; RV32-NEXT: vsetvli a1, zero, e64, m8, ta, ma
3695 ; RV32-NEXT: vlse64.v v24, (a0), zero
3696 ; RV32-NEXT: vsetvli zero, a2, e64, m8, ta, ma
3697 ; RV32-NEXT: vmsle.vv v16, v8, v24, v0.t
3698 ; RV32-NEXT: vmv1r.v v0, v16
3699 ; RV32-NEXT: addi sp, sp, 16
3702 ; RV64-LABEL: icmp_sge_vx_swap_nxv8i64:
3704 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
3705 ; RV64-NEXT: vmsle.vx v16, v8, a0, v0.t
3706 ; RV64-NEXT: vmv1r.v v0, v16
3708 %elt.head = insertelement <vscale x 8 x i64> poison, i64 %b, i32 0
3709 %vb = shufflevector <vscale x 8 x i64> %elt.head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
3710 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i64(<vscale x 8 x i64> %vb, <vscale x 8 x i64> %va, metadata !"sge", <vscale x 8 x i1> %m, i32 %evl)
3711 ret <vscale x 8 x i1> %v
3714 define <vscale x 8 x i1> @icmp_sge_vi_nxv8i64(<vscale x 8 x i64> %va, <vscale x 8 x i1> %m, i32 zeroext %evl) {
3715 ; CHECK-LABEL: icmp_sge_vi_nxv8i64:
3717 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
3718 ; CHECK-NEXT: vmsgt.vi v16, v8, 3, v0.t
3719 ; CHECK-NEXT: vmv1r.v v0, v16
3721 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i64(<vscale x 8 x i64> %va, <vscale x 8 x i64> splat (i64 4), metadata !"sge", <vscale x 8 x i1> %m, i32 %evl)
3722 ret <vscale x 8 x i1> %v
3725 define <vscale x 8 x i1> @icmp_sge_vi_swap_nxv8i64(<vscale x 8 x i64> %va, <vscale x 8 x i1> %m, i32 zeroext %evl) {
3726 ; CHECK-LABEL: icmp_sge_vi_swap_nxv8i64:
3728 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
3729 ; CHECK-NEXT: vmsle.vi v16, v8, 4, v0.t
3730 ; CHECK-NEXT: vmv1r.v v0, v16
3732 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i64(<vscale x 8 x i64> splat (i64 4), <vscale x 8 x i64> %va, metadata !"sge", <vscale x 8 x i1> %m, i32 %evl)
3733 ret <vscale x 8 x i1> %v
3736 define <vscale x 8 x i1> @icmp_slt_vv_nxv8i64(<vscale x 8 x i64> %va, <vscale x 8 x i64> %vb, <vscale x 8 x i1> %m, i32 zeroext %evl) {
3737 ; CHECK-LABEL: icmp_slt_vv_nxv8i64:
3739 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
3740 ; CHECK-NEXT: vmslt.vv v24, v8, v16, v0.t
3741 ; CHECK-NEXT: vmv1r.v v0, v24
3743 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i64(<vscale x 8 x i64> %va, <vscale x 8 x i64> %vb, metadata !"slt", <vscale x 8 x i1> %m, i32 %evl)
3744 ret <vscale x 8 x i1> %v
3747 define <vscale x 8 x i1> @icmp_slt_vx_nxv8i64(<vscale x 8 x i64> %va, i64 %b, <vscale x 8 x i1> %m, i32 zeroext %evl) {
3748 ; RV32-LABEL: icmp_slt_vx_nxv8i64:
3750 ; RV32-NEXT: addi sp, sp, -16
3751 ; RV32-NEXT: .cfi_def_cfa_offset 16
3752 ; RV32-NEXT: sw a1, 12(sp)
3753 ; RV32-NEXT: sw a0, 8(sp)
3754 ; RV32-NEXT: addi a0, sp, 8
3755 ; RV32-NEXT: vsetvli a1, zero, e64, m8, ta, ma
3756 ; RV32-NEXT: vlse64.v v24, (a0), zero
3757 ; RV32-NEXT: vsetvli zero, a2, e64, m8, ta, ma
3758 ; RV32-NEXT: vmslt.vv v16, v8, v24, v0.t
3759 ; RV32-NEXT: vmv1r.v v0, v16
3760 ; RV32-NEXT: addi sp, sp, 16
3763 ; RV64-LABEL: icmp_slt_vx_nxv8i64:
3765 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
3766 ; RV64-NEXT: vmslt.vx v16, v8, a0, v0.t
3767 ; RV64-NEXT: vmv1r.v v0, v16
3769 %elt.head = insertelement <vscale x 8 x i64> poison, i64 %b, i32 0
3770 %vb = shufflevector <vscale x 8 x i64> %elt.head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
3771 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i64(<vscale x 8 x i64> %va, <vscale x 8 x i64> %vb, metadata !"slt", <vscale x 8 x i1> %m, i32 %evl)
3772 ret <vscale x 8 x i1> %v
3775 define <vscale x 8 x i1> @icmp_slt_vx_swap_nxv8i64(<vscale x 8 x i64> %va, i64 %b, <vscale x 8 x i1> %m, i32 zeroext %evl) {
3776 ; RV32-LABEL: icmp_slt_vx_swap_nxv8i64:
3778 ; RV32-NEXT: addi sp, sp, -16
3779 ; RV32-NEXT: .cfi_def_cfa_offset 16
3780 ; RV32-NEXT: sw a1, 12(sp)
3781 ; RV32-NEXT: sw a0, 8(sp)
3782 ; RV32-NEXT: addi a0, sp, 8
3783 ; RV32-NEXT: vsetvli a1, zero, e64, m8, ta, ma
3784 ; RV32-NEXT: vlse64.v v24, (a0), zero
3785 ; RV32-NEXT: vsetvli zero, a2, e64, m8, ta, ma
3786 ; RV32-NEXT: vmslt.vv v16, v24, v8, v0.t
3787 ; RV32-NEXT: vmv1r.v v0, v16
3788 ; RV32-NEXT: addi sp, sp, 16
3791 ; RV64-LABEL: icmp_slt_vx_swap_nxv8i64:
3793 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
3794 ; RV64-NEXT: vmsgt.vx v16, v8, a0, v0.t
3795 ; RV64-NEXT: vmv1r.v v0, v16
3797 %elt.head = insertelement <vscale x 8 x i64> poison, i64 %b, i32 0
3798 %vb = shufflevector <vscale x 8 x i64> %elt.head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
3799 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i64(<vscale x 8 x i64> %vb, <vscale x 8 x i64> %va, metadata !"slt", <vscale x 8 x i1> %m, i32 %evl)
3800 ret <vscale x 8 x i1> %v
3803 define <vscale x 8 x i1> @icmp_slt_vi_nxv8i64(<vscale x 8 x i64> %va, <vscale x 8 x i1> %m, i32 zeroext %evl) {
3804 ; CHECK-LABEL: icmp_slt_vi_nxv8i64:
3806 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
3807 ; CHECK-NEXT: vmsle.vi v16, v8, 3, v0.t
3808 ; CHECK-NEXT: vmv1r.v v0, v16
3810 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i64(<vscale x 8 x i64> %va, <vscale x 8 x i64> splat (i64 4), metadata !"slt", <vscale x 8 x i1> %m, i32 %evl)
3811 ret <vscale x 8 x i1> %v
3814 define <vscale x 8 x i1> @icmp_slt_vi_swap_nxv8i64(<vscale x 8 x i64> %va, <vscale x 8 x i1> %m, i32 zeroext %evl) {
3815 ; CHECK-LABEL: icmp_slt_vi_swap_nxv8i64:
3817 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
3818 ; CHECK-NEXT: vmsgt.vi v16, v8, 4, v0.t
3819 ; CHECK-NEXT: vmv1r.v v0, v16
3821 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i64(<vscale x 8 x i64> splat (i64 4), <vscale x 8 x i64> %va, metadata !"slt", <vscale x 8 x i1> %m, i32 %evl)
3822 ret <vscale x 8 x i1> %v
3825 define <vscale x 8 x i1> @icmp_sle_vv_nxv8i64(<vscale x 8 x i64> %va, <vscale x 8 x i64> %vb, <vscale x 8 x i1> %m, i32 zeroext %evl) {
3826 ; CHECK-LABEL: icmp_sle_vv_nxv8i64:
3828 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
3829 ; CHECK-NEXT: vmsle.vv v24, v8, v16, v0.t
3830 ; CHECK-NEXT: vmv1r.v v0, v24
3832 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i64(<vscale x 8 x i64> %va, <vscale x 8 x i64> %vb, metadata !"sle", <vscale x 8 x i1> %m, i32 %evl)
3833 ret <vscale x 8 x i1> %v
3836 define <vscale x 8 x i1> @icmp_sle_vx_nxv8i64(<vscale x 8 x i64> %va, i64 %b, <vscale x 8 x i1> %m, i32 zeroext %evl) {
3837 ; RV32-LABEL: icmp_sle_vx_nxv8i64:
3839 ; RV32-NEXT: addi sp, sp, -16
3840 ; RV32-NEXT: .cfi_def_cfa_offset 16
3841 ; RV32-NEXT: sw a1, 12(sp)
3842 ; RV32-NEXT: sw a0, 8(sp)
3843 ; RV32-NEXT: addi a0, sp, 8
3844 ; RV32-NEXT: vsetvli a1, zero, e64, m8, ta, ma
3845 ; RV32-NEXT: vlse64.v v24, (a0), zero
3846 ; RV32-NEXT: vsetvli zero, a2, e64, m8, ta, ma
3847 ; RV32-NEXT: vmsle.vv v16, v8, v24, v0.t
3848 ; RV32-NEXT: vmv1r.v v0, v16
3849 ; RV32-NEXT: addi sp, sp, 16
3852 ; RV64-LABEL: icmp_sle_vx_nxv8i64:
3854 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
3855 ; RV64-NEXT: vmsle.vx v16, v8, a0, v0.t
3856 ; RV64-NEXT: vmv1r.v v0, v16
3858 %elt.head = insertelement <vscale x 8 x i64> poison, i64 %b, i32 0
3859 %vb = shufflevector <vscale x 8 x i64> %elt.head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
3860 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i64(<vscale x 8 x i64> %va, <vscale x 8 x i64> %vb, metadata !"sle", <vscale x 8 x i1> %m, i32 %evl)
3861 ret <vscale x 8 x i1> %v
3864 define <vscale x 8 x i1> @icmp_sle_vx_swap_nxv8i64(<vscale x 8 x i64> %va, i64 %b, <vscale x 8 x i1> %m, i32 zeroext %evl) {
3865 ; RV32-LABEL: icmp_sle_vx_swap_nxv8i64:
3867 ; RV32-NEXT: addi sp, sp, -16
3868 ; RV32-NEXT: .cfi_def_cfa_offset 16
3869 ; RV32-NEXT: sw a1, 12(sp)
3870 ; RV32-NEXT: sw a0, 8(sp)
3871 ; RV32-NEXT: addi a0, sp, 8
3872 ; RV32-NEXT: vsetvli a1, zero, e64, m8, ta, ma
3873 ; RV32-NEXT: vlse64.v v24, (a0), zero
3874 ; RV32-NEXT: vsetvli zero, a2, e64, m8, ta, ma
3875 ; RV32-NEXT: vmsle.vv v16, v24, v8, v0.t
3876 ; RV32-NEXT: vmv1r.v v0, v16
3877 ; RV32-NEXT: addi sp, sp, 16
3880 ; RV64-LABEL: icmp_sle_vx_swap_nxv8i64:
3882 ; RV64-NEXT: vsetvli a2, zero, e64, m8, ta, ma
3883 ; RV64-NEXT: vmv.v.x v24, a0
3884 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
3885 ; RV64-NEXT: vmsle.vv v16, v24, v8, v0.t
3886 ; RV64-NEXT: vmv1r.v v0, v16
3888 %elt.head = insertelement <vscale x 8 x i64> poison, i64 %b, i32 0
3889 %vb = shufflevector <vscale x 8 x i64> %elt.head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
3890 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i64(<vscale x 8 x i64> %vb, <vscale x 8 x i64> %va, metadata !"sle", <vscale x 8 x i1> %m, i32 %evl)
3891 ret <vscale x 8 x i1> %v
3894 define <vscale x 8 x i1> @icmp_sle_vi_nxv8i64(<vscale x 8 x i64> %va, <vscale x 8 x i1> %m, i32 zeroext %evl) {
3895 ; CHECK-LABEL: icmp_sle_vi_nxv8i64:
3897 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
3898 ; CHECK-NEXT: vmsle.vi v16, v8, 4, v0.t
3899 ; CHECK-NEXT: vmv1r.v v0, v16
3901 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i64(<vscale x 8 x i64> %va, <vscale x 8 x i64> splat (i64 4), metadata !"sle", <vscale x 8 x i1> %m, i32 %evl)
3902 ret <vscale x 8 x i1> %v
3905 define <vscale x 8 x i1> @icmp_sle_vi_swap_nxv8i64(<vscale x 8 x i64> %va, <vscale x 8 x i1> %m, i32 zeroext %evl) {
3906 ; CHECK-LABEL: icmp_sle_vi_swap_nxv8i64:
3908 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
3909 ; CHECK-NEXT: vmsgt.vi v16, v8, 3, v0.t
3910 ; CHECK-NEXT: vmv1r.v v0, v16
3912 %v = call <vscale x 8 x i1> @llvm.vp.icmp.nxv8i64(<vscale x 8 x i64> splat (i64 4), <vscale x 8 x i64> %va, metadata !"sle", <vscale x 8 x i1> %m, i32 %evl)
3913 ret <vscale x 8 x i1> %v