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 %elt.head = insertelement <vscale x 1 x i8> poison, i8 4, i32 0
53 %vb = shufflevector <vscale x 1 x i8> %elt.head, <vscale x 1 x i8> poison, <vscale x 1 x i32> zeroinitializer
54 %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)
55 ret <vscale x 1 x i1> %v
58 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) {
59 ; CHECK-LABEL: icmp_eq_vi_swap_nxv1i8:
61 ; CHECK-NEXT: vsetvli zero, a0, e8, mf8, ta, ma
62 ; CHECK-NEXT: vmseq.vi v0, v8, 4, v0.t
64 %elt.head = insertelement <vscale x 1 x i8> poison, i8 4, i32 0
65 %vb = shufflevector <vscale x 1 x i8> %elt.head, <vscale x 1 x i8> poison, <vscale x 1 x i32> zeroinitializer
66 %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)
67 ret <vscale x 1 x i1> %v
70 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) {
71 ; CHECK-LABEL: icmp_ne_vv_nxv1i8:
73 ; CHECK-NEXT: vsetvli zero, a0, e8, mf8, ta, ma
74 ; CHECK-NEXT: vmsne.vv v0, v8, v9, v0.t
76 %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)
77 ret <vscale x 1 x i1> %v
80 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) {
81 ; CHECK-LABEL: icmp_ne_vx_nxv1i8:
83 ; CHECK-NEXT: vsetvli zero, a1, e8, mf8, ta, ma
84 ; CHECK-NEXT: vmsne.vx v0, v8, a0, v0.t
86 %elt.head = insertelement <vscale x 1 x i8> poison, i8 %b, i32 0
87 %vb = shufflevector <vscale x 1 x i8> %elt.head, <vscale x 1 x i8> poison, <vscale x 1 x i32> zeroinitializer
88 %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)
89 ret <vscale x 1 x i1> %v
92 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) {
93 ; CHECK-LABEL: icmp_ne_vx_swap_nxv1i8:
95 ; CHECK-NEXT: vsetvli zero, a1, e8, mf8, ta, ma
96 ; CHECK-NEXT: vmsne.vx v0, v8, a0, v0.t
98 %elt.head = insertelement <vscale x 1 x i8> poison, i8 %b, i32 0
99 %vb = shufflevector <vscale x 1 x i8> %elt.head, <vscale x 1 x i8> poison, <vscale x 1 x i32> zeroinitializer
100 %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)
101 ret <vscale x 1 x i1> %v
104 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) {
105 ; CHECK-LABEL: icmp_ne_vi_nxv1i8:
107 ; CHECK-NEXT: vsetvli zero, a0, e8, mf8, ta, ma
108 ; CHECK-NEXT: vmsne.vi v0, v8, 4, v0.t
110 %elt.head = insertelement <vscale x 1 x i8> poison, i8 4, i32 0
111 %vb = shufflevector <vscale x 1 x i8> %elt.head, <vscale x 1 x i8> poison, <vscale x 1 x i32> zeroinitializer
112 %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)
113 ret <vscale x 1 x i1> %v
116 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) {
117 ; CHECK-LABEL: icmp_ne_vi_swap_nxv1i8:
119 ; CHECK-NEXT: vsetvli zero, a0, e8, mf8, ta, ma
120 ; CHECK-NEXT: vmsne.vi v0, v8, 4, v0.t
122 %elt.head = insertelement <vscale x 1 x i8> poison, i8 4, i32 0
123 %vb = shufflevector <vscale x 1 x i8> %elt.head, <vscale x 1 x i8> poison, <vscale x 1 x i32> zeroinitializer
124 %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)
125 ret <vscale x 1 x i1> %v
128 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) {
129 ; CHECK-LABEL: icmp_ugt_vv_nxv1i8:
131 ; CHECK-NEXT: vsetvli zero, a0, e8, mf8, ta, ma
132 ; CHECK-NEXT: vmsltu.vv v0, v9, v8, v0.t
134 %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)
135 ret <vscale x 1 x i1> %v
138 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) {
139 ; CHECK-LABEL: icmp_ugt_vx_nxv1i8:
141 ; CHECK-NEXT: vsetvli zero, a1, e8, mf8, ta, ma
142 ; CHECK-NEXT: vmsgtu.vx v0, v8, a0, v0.t
144 %elt.head = insertelement <vscale x 1 x i8> poison, i8 %b, i32 0
145 %vb = shufflevector <vscale x 1 x i8> %elt.head, <vscale x 1 x i8> poison, <vscale x 1 x i32> zeroinitializer
146 %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)
147 ret <vscale x 1 x i1> %v
150 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) {
151 ; CHECK-LABEL: icmp_ugt_vx_swap_nxv1i8:
153 ; CHECK-NEXT: vsetvli zero, a1, e8, mf8, ta, ma
154 ; CHECK-NEXT: vmsltu.vx v0, v8, a0, v0.t
156 %elt.head = insertelement <vscale x 1 x i8> poison, i8 %b, i32 0
157 %vb = shufflevector <vscale x 1 x i8> %elt.head, <vscale x 1 x i8> poison, <vscale x 1 x i32> zeroinitializer
158 %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)
159 ret <vscale x 1 x i1> %v
162 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) {
163 ; CHECK-LABEL: icmp_ugt_vi_nxv1i8:
165 ; CHECK-NEXT: vsetvli zero, a0, e8, mf8, ta, ma
166 ; CHECK-NEXT: vmsgtu.vi v0, v8, 4, v0.t
168 %elt.head = insertelement <vscale x 1 x i8> poison, i8 4, i32 0
169 %vb = shufflevector <vscale x 1 x i8> %elt.head, <vscale x 1 x i8> poison, <vscale x 1 x i32> zeroinitializer
170 %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)
171 ret <vscale x 1 x i1> %v
174 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) {
175 ; CHECK-LABEL: icmp_ugt_vi_swap_nxv1i8:
177 ; CHECK-NEXT: vsetvli zero, a0, e8, mf8, ta, ma
178 ; CHECK-NEXT: vmsleu.vi v0, v8, 3, v0.t
180 %elt.head = insertelement <vscale x 1 x i8> poison, i8 4, i32 0
181 %vb = shufflevector <vscale x 1 x i8> %elt.head, <vscale x 1 x i8> poison, <vscale x 1 x i32> zeroinitializer
182 %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)
183 ret <vscale x 1 x i1> %v
186 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) {
187 ; CHECK-LABEL: icmp_uge_vv_nxv1i8:
189 ; CHECK-NEXT: vsetvli zero, a0, e8, mf8, ta, ma
190 ; CHECK-NEXT: vmsleu.vv v0, v9, v8, v0.t
192 %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)
193 ret <vscale x 1 x i1> %v
196 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) {
197 ; CHECK-LABEL: icmp_uge_vx_nxv1i8:
199 ; CHECK-NEXT: vsetvli a2, zero, e8, mf8, ta, ma
200 ; CHECK-NEXT: vmv.v.x v9, a0
201 ; CHECK-NEXT: vsetvli zero, a1, e8, mf8, ta, ma
202 ; CHECK-NEXT: vmsleu.vv v0, v9, v8, 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> %va, <vscale x 1 x i8> %vb, 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_vx_swap_nxv1i8(<vscale x 1 x i8> %va, i8 %b, <vscale x 1 x i1> %m, i32 zeroext %evl) {
211 ; CHECK-LABEL: icmp_uge_vx_swap_nxv1i8:
213 ; CHECK-NEXT: vsetvli zero, a1, e8, mf8, ta, ma
214 ; CHECK-NEXT: vmsleu.vx v0, v8, a0, v0.t
216 %elt.head = insertelement <vscale x 1 x i8> poison, i8 %b, i32 0
217 %vb = shufflevector <vscale x 1 x i8> %elt.head, <vscale x 1 x i8> poison, <vscale x 1 x i32> zeroinitializer
218 %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)
219 ret <vscale x 1 x i1> %v
222 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) {
223 ; CHECK-LABEL: icmp_uge_vi_nxv1i8:
225 ; CHECK-NEXT: vsetvli zero, a0, e8, mf8, ta, ma
226 ; CHECK-NEXT: vmsgtu.vi v0, v8, 3, v0.t
228 %elt.head = insertelement <vscale x 1 x i8> poison, i8 4, i32 0
229 %vb = shufflevector <vscale x 1 x i8> %elt.head, <vscale x 1 x i8> poison, <vscale x 1 x i32> zeroinitializer
230 %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)
231 ret <vscale x 1 x i1> %v
234 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) {
235 ; CHECK-LABEL: icmp_uge_vi_swap_nxv1i8:
237 ; CHECK-NEXT: vsetvli zero, a0, e8, mf8, ta, ma
238 ; CHECK-NEXT: vmsleu.vi v0, v8, 4, v0.t
240 %elt.head = insertelement <vscale x 1 x i8> poison, i8 4, i32 0
241 %vb = shufflevector <vscale x 1 x i8> %elt.head, <vscale x 1 x i8> poison, <vscale x 1 x i32> zeroinitializer
242 %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)
243 ret <vscale x 1 x i1> %v
246 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) {
247 ; CHECK-LABEL: icmp_ult_vv_nxv1i8:
249 ; CHECK-NEXT: vsetvli zero, a0, e8, mf8, ta, ma
250 ; CHECK-NEXT: vmsltu.vv v0, v8, v9, v0.t
252 %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)
253 ret <vscale x 1 x i1> %v
256 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) {
257 ; CHECK-LABEL: icmp_ult_vx_nxv1i8:
259 ; CHECK-NEXT: vsetvli zero, a1, e8, mf8, ta, ma
260 ; CHECK-NEXT: vmsltu.vx v0, v8, a0, v0.t
262 %elt.head = insertelement <vscale x 1 x i8> poison, i8 %b, i32 0
263 %vb = shufflevector <vscale x 1 x i8> %elt.head, <vscale x 1 x i8> poison, <vscale x 1 x i32> zeroinitializer
264 %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)
265 ret <vscale x 1 x i1> %v
268 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) {
269 ; CHECK-LABEL: icmp_ult_vx_swap_nxv1i8:
271 ; CHECK-NEXT: vsetvli zero, a1, e8, mf8, ta, ma
272 ; CHECK-NEXT: vmsgtu.vx v0, v8, a0, v0.t
274 %elt.head = insertelement <vscale x 1 x i8> poison, i8 %b, i32 0
275 %vb = shufflevector <vscale x 1 x i8> %elt.head, <vscale x 1 x i8> poison, <vscale x 1 x i32> zeroinitializer
276 %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)
277 ret <vscale x 1 x i1> %v
280 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) {
281 ; CHECK-LABEL: icmp_ult_vi_nxv1i8:
283 ; CHECK-NEXT: vsetvli zero, a0, e8, mf8, ta, ma
284 ; CHECK-NEXT: vmsleu.vi v0, v8, 3, v0.t
286 %elt.head = insertelement <vscale x 1 x i8> poison, i8 4, i32 0
287 %vb = shufflevector <vscale x 1 x i8> %elt.head, <vscale x 1 x i8> poison, <vscale x 1 x i32> zeroinitializer
288 %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)
289 ret <vscale x 1 x i1> %v
292 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) {
293 ; CHECK-LABEL: icmp_ult_vi_swap_nxv1i8:
295 ; CHECK-NEXT: vsetvli zero, a0, e8, mf8, ta, ma
296 ; CHECK-NEXT: vmsgtu.vi v0, v8, 4, v0.t
298 %elt.head = insertelement <vscale x 1 x i8> poison, i8 4, i32 0
299 %vb = shufflevector <vscale x 1 x i8> %elt.head, <vscale x 1 x i8> poison, <vscale x 1 x i32> zeroinitializer
300 %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)
301 ret <vscale x 1 x i1> %v
304 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) {
305 ; CHECK-LABEL: icmp_sgt_vv_nxv1i8:
307 ; CHECK-NEXT: vsetvli zero, a0, e8, mf8, ta, ma
308 ; CHECK-NEXT: vmslt.vv v0, v9, v8, v0.t
310 %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)
311 ret <vscale x 1 x i1> %v
314 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) {
315 ; CHECK-LABEL: icmp_sgt_vx_nxv1i8:
317 ; CHECK-NEXT: vsetvli zero, a1, e8, mf8, ta, ma
318 ; CHECK-NEXT: vmsgt.vx v0, v8, a0, v0.t
320 %elt.head = insertelement <vscale x 1 x i8> poison, i8 %b, i32 0
321 %vb = shufflevector <vscale x 1 x i8> %elt.head, <vscale x 1 x i8> poison, <vscale x 1 x i32> zeroinitializer
322 %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)
323 ret <vscale x 1 x i1> %v
326 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) {
327 ; CHECK-LABEL: icmp_sgt_vx_swap_nxv1i8:
329 ; CHECK-NEXT: vsetvli zero, a1, e8, mf8, ta, ma
330 ; CHECK-NEXT: vmslt.vx v0, v8, a0, v0.t
332 %elt.head = insertelement <vscale x 1 x i8> poison, i8 %b, i32 0
333 %vb = shufflevector <vscale x 1 x i8> %elt.head, <vscale x 1 x i8> poison, <vscale x 1 x i32> zeroinitializer
334 %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)
335 ret <vscale x 1 x i1> %v
338 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) {
339 ; CHECK-LABEL: icmp_sgt_vi_nxv1i8:
341 ; CHECK-NEXT: vsetvli zero, a0, e8, mf8, ta, ma
342 ; CHECK-NEXT: vmsgt.vi v0, v8, 4, v0.t
344 %elt.head = insertelement <vscale x 1 x i8> poison, i8 4, i32 0
345 %vb = shufflevector <vscale x 1 x i8> %elt.head, <vscale x 1 x i8> poison, <vscale x 1 x i32> zeroinitializer
346 %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)
347 ret <vscale x 1 x i1> %v
350 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) {
351 ; CHECK-LABEL: icmp_sgt_vi_swap_nxv1i8:
353 ; CHECK-NEXT: vsetvli zero, a0, e8, mf8, ta, ma
354 ; CHECK-NEXT: vmsle.vi v0, v8, 3, v0.t
356 %elt.head = insertelement <vscale x 1 x i8> poison, i8 4, 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> %vb, <vscale x 1 x i8> %va, metadata !"sgt", <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_vv_nxv1i8(<vscale x 1 x i8> %va, <vscale x 1 x i8> %vb, <vscale x 1 x i1> %m, i32 zeroext %evl) {
363 ; CHECK-LABEL: icmp_sge_vv_nxv1i8:
365 ; CHECK-NEXT: vsetvli zero, a0, e8, mf8, ta, ma
366 ; CHECK-NEXT: vmsle.vv v0, v9, v8, v0.t
368 %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)
369 ret <vscale x 1 x i1> %v
372 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) {
373 ; CHECK-LABEL: icmp_sge_vx_nxv1i8:
375 ; CHECK-NEXT: vsetvli a2, zero, e8, mf8, ta, ma
376 ; CHECK-NEXT: vmv.v.x v9, a0
377 ; CHECK-NEXT: vsetvli zero, a1, e8, mf8, ta, ma
378 ; CHECK-NEXT: vmsle.vv v0, v9, v8, v0.t
380 %elt.head = insertelement <vscale x 1 x i8> poison, i8 %b, i32 0
381 %vb = shufflevector <vscale x 1 x i8> %elt.head, <vscale x 1 x i8> poison, <vscale x 1 x i32> zeroinitializer
382 %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)
383 ret <vscale x 1 x i1> %v
386 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) {
387 ; CHECK-LABEL: icmp_sge_vx_swap_nxv1i8:
389 ; CHECK-NEXT: vsetvli zero, a1, e8, mf8, ta, ma
390 ; CHECK-NEXT: vmsle.vx v0, v8, a0, v0.t
392 %elt.head = insertelement <vscale x 1 x i8> poison, i8 %b, i32 0
393 %vb = shufflevector <vscale x 1 x i8> %elt.head, <vscale x 1 x i8> poison, <vscale x 1 x i32> zeroinitializer
394 %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)
395 ret <vscale x 1 x i1> %v
398 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) {
399 ; CHECK-LABEL: icmp_sge_vi_nxv1i8:
401 ; CHECK-NEXT: vsetvli zero, a0, e8, mf8, ta, ma
402 ; CHECK-NEXT: vmsgt.vi v0, v8, 3, v0.t
404 %elt.head = insertelement <vscale x 1 x i8> poison, i8 4, i32 0
405 %vb = shufflevector <vscale x 1 x i8> %elt.head, <vscale x 1 x i8> poison, <vscale x 1 x i32> zeroinitializer
406 %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)
407 ret <vscale x 1 x i1> %v
410 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) {
411 ; CHECK-LABEL: icmp_sge_vi_swap_nxv1i8:
413 ; CHECK-NEXT: vsetvli zero, a0, e8, mf8, ta, ma
414 ; CHECK-NEXT: vmsle.vi v0, v8, 4, v0.t
416 %elt.head = insertelement <vscale x 1 x i8> poison, i8 4, i32 0
417 %vb = shufflevector <vscale x 1 x i8> %elt.head, <vscale x 1 x i8> poison, <vscale x 1 x i32> zeroinitializer
418 %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)
419 ret <vscale x 1 x i1> %v
422 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) {
423 ; CHECK-LABEL: icmp_slt_vv_nxv1i8:
425 ; CHECK-NEXT: vsetvli zero, a0, e8, mf8, ta, ma
426 ; CHECK-NEXT: vmslt.vv v0, v8, v9, v0.t
428 %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)
429 ret <vscale x 1 x i1> %v
432 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) {
433 ; CHECK-LABEL: icmp_slt_vx_nxv1i8:
435 ; CHECK-NEXT: vsetvli zero, a1, e8, mf8, ta, ma
436 ; CHECK-NEXT: vmslt.vx v0, v8, a0, v0.t
438 %elt.head = insertelement <vscale x 1 x i8> poison, i8 %b, i32 0
439 %vb = shufflevector <vscale x 1 x i8> %elt.head, <vscale x 1 x i8> poison, <vscale x 1 x i32> zeroinitializer
440 %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)
441 ret <vscale x 1 x i1> %v
444 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) {
445 ; CHECK-LABEL: icmp_slt_vx_swap_nxv1i8:
447 ; CHECK-NEXT: vsetvli zero, a1, e8, mf8, ta, ma
448 ; CHECK-NEXT: vmsgt.vx v0, v8, a0, v0.t
450 %elt.head = insertelement <vscale x 1 x i8> poison, i8 %b, i32 0
451 %vb = shufflevector <vscale x 1 x i8> %elt.head, <vscale x 1 x i8> poison, <vscale x 1 x i32> zeroinitializer
452 %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)
453 ret <vscale x 1 x i1> %v
456 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) {
457 ; CHECK-LABEL: icmp_slt_vi_nxv1i8:
459 ; CHECK-NEXT: vsetvli zero, a0, e8, mf8, ta, ma
460 ; CHECK-NEXT: vmsle.vi v0, v8, 3, v0.t
462 %elt.head = insertelement <vscale x 1 x i8> poison, i8 4, i32 0
463 %vb = shufflevector <vscale x 1 x i8> %elt.head, <vscale x 1 x i8> poison, <vscale x 1 x i32> zeroinitializer
464 %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)
465 ret <vscale x 1 x i1> %v
468 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) {
469 ; CHECK-LABEL: icmp_slt_vi_swap_nxv1i8:
471 ; CHECK-NEXT: vsetvli zero, a0, e8, mf8, ta, ma
472 ; CHECK-NEXT: vmsgt.vi v0, v8, 4, v0.t
474 %elt.head = insertelement <vscale x 1 x i8> poison, i8 4, i32 0
475 %vb = shufflevector <vscale x 1 x i8> %elt.head, <vscale x 1 x i8> poison, <vscale x 1 x i32> zeroinitializer
476 %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)
477 ret <vscale x 1 x i1> %v
480 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) {
481 ; CHECK-LABEL: icmp_sle_vv_nxv1i8:
483 ; CHECK-NEXT: vsetvli zero, a0, e8, mf8, ta, ma
484 ; CHECK-NEXT: vmsle.vv v0, v8, v9, v0.t
486 %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)
487 ret <vscale x 1 x i1> %v
490 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) {
491 ; CHECK-LABEL: icmp_sle_vx_nxv1i8:
493 ; CHECK-NEXT: vsetvli zero, a1, e8, mf8, ta, ma
494 ; CHECK-NEXT: vmsle.vx v0, v8, a0, v0.t
496 %elt.head = insertelement <vscale x 1 x i8> poison, i8 %b, i32 0
497 %vb = shufflevector <vscale x 1 x i8> %elt.head, <vscale x 1 x i8> poison, <vscale x 1 x i32> zeroinitializer
498 %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)
499 ret <vscale x 1 x i1> %v
502 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) {
503 ; CHECK-LABEL: icmp_sle_vx_swap_nxv1i8:
505 ; CHECK-NEXT: vsetvli a2, zero, e8, mf8, ta, ma
506 ; CHECK-NEXT: vmv.v.x v9, a0
507 ; CHECK-NEXT: vsetvli zero, a1, e8, mf8, ta, ma
508 ; CHECK-NEXT: vmsle.vv v0, v9, v8, v0.t
510 %elt.head = insertelement <vscale x 1 x i8> poison, i8 %b, i32 0
511 %vb = shufflevector <vscale x 1 x i8> %elt.head, <vscale x 1 x i8> poison, <vscale x 1 x i32> zeroinitializer
512 %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)
513 ret <vscale x 1 x i1> %v
516 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) {
517 ; CHECK-LABEL: icmp_sle_vi_nxv1i8:
519 ; CHECK-NEXT: vsetvli zero, a0, e8, mf8, ta, ma
520 ; CHECK-NEXT: vmsle.vi v0, v8, 4, v0.t
522 %elt.head = insertelement <vscale x 1 x i8> poison, i8 4, i32 0
523 %vb = shufflevector <vscale x 1 x i8> %elt.head, <vscale x 1 x i8> poison, <vscale x 1 x i32> zeroinitializer
524 %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)
525 ret <vscale x 1 x i1> %v
528 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) {
529 ; CHECK-LABEL: icmp_sle_vi_swap_nxv1i8:
531 ; CHECK-NEXT: vsetvli zero, a0, e8, mf8, ta, ma
532 ; CHECK-NEXT: vmsgt.vi v0, v8, 3, v0.t
534 %elt.head = insertelement <vscale x 1 x i8> poison, i8 4, i32 0
535 %vb = shufflevector <vscale x 1 x i8> %elt.head, <vscale x 1 x i8> poison, <vscale x 1 x i32> zeroinitializer
536 %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)
537 ret <vscale x 1 x i1> %v
540 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)
542 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) {
543 ; CHECK-LABEL: icmp_eq_vv_nxv3i8:
545 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
546 ; CHECK-NEXT: vmseq.vv v0, v8, v9, v0.t
548 %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)
549 ret <vscale x 3 x i1> %v
552 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) {
553 ; CHECK-LABEL: icmp_eq_vx_nxv3i8:
555 ; CHECK-NEXT: vsetvli zero, a1, e8, mf2, ta, ma
556 ; CHECK-NEXT: vmseq.vx v0, v8, a0, v0.t
558 %elt.head = insertelement <vscale x 3 x i8> poison, i8 %b, i32 0
559 %vb = shufflevector <vscale x 3 x i8> %elt.head, <vscale x 3 x i8> poison, <vscale x 3 x i32> zeroinitializer
560 %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)
561 ret <vscale x 3 x i1> %v
564 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) {
565 ; CHECK-LABEL: icmp_eq_vx_swap_nxv3i8:
567 ; CHECK-NEXT: vsetvli zero, a1, e8, mf2, ta, ma
568 ; CHECK-NEXT: vmseq.vx v0, v8, a0, v0.t
570 %elt.head = insertelement <vscale x 3 x i8> poison, i8 %b, i32 0
571 %vb = shufflevector <vscale x 3 x i8> %elt.head, <vscale x 3 x i8> poison, <vscale x 3 x i32> zeroinitializer
572 %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)
573 ret <vscale x 3 x i1> %v
576 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)
578 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) {
579 ; CHECK-LABEL: icmp_eq_vv_nxv8i7:
581 ; CHECK-NEXT: li a1, 127
582 ; CHECK-NEXT: vsetvli a2, zero, e8, m1, ta, ma
583 ; CHECK-NEXT: vand.vx v9, v9, a1
584 ; CHECK-NEXT: vand.vx v8, v8, a1
585 ; CHECK-NEXT: vsetvli zero, a0, e8, m1, ta, ma
586 ; CHECK-NEXT: vmseq.vv v0, v8, v9, v0.t
588 %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)
589 ret <vscale x 8 x i1> %v
592 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) {
593 ; CHECK-LABEL: icmp_eq_vx_nxv8i7:
595 ; CHECK-NEXT: li a2, 127
596 ; CHECK-NEXT: vsetvli a3, zero, e8, m1, ta, ma
597 ; CHECK-NEXT: vand.vx v8, v8, a2
598 ; CHECK-NEXT: vmv.v.x v9, a0
599 ; CHECK-NEXT: vand.vx v9, v9, a2
600 ; CHECK-NEXT: vsetvli zero, a1, e8, m1, ta, ma
601 ; CHECK-NEXT: vmseq.vv v0, v8, v9, v0.t
603 %elt.head = insertelement <vscale x 8 x i7> poison, i7 %b, i32 0
604 %vb = shufflevector <vscale x 8 x i7> %elt.head, <vscale x 8 x i7> poison, <vscale x 8 x i32> zeroinitializer
605 %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)
606 ret <vscale x 8 x i1> %v
609 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) {
610 ; CHECK-LABEL: icmp_eq_vx_swap_nxv8i7:
612 ; CHECK-NEXT: li a2, 127
613 ; CHECK-NEXT: vsetvli a3, zero, e8, m1, ta, ma
614 ; CHECK-NEXT: vand.vx v8, v8, a2
615 ; CHECK-NEXT: vmv.v.x v9, a0
616 ; CHECK-NEXT: vand.vx v9, v9, a2
617 ; CHECK-NEXT: vsetvli zero, a1, e8, m1, ta, ma
618 ; CHECK-NEXT: vmseq.vv v0, v9, v8, v0.t
620 %elt.head = insertelement <vscale x 8 x i7> poison, i7 %b, i32 0
621 %vb = shufflevector <vscale x 8 x i7> %elt.head, <vscale x 8 x i7> poison, <vscale x 8 x i32> zeroinitializer
622 %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)
623 ret <vscale x 8 x i1> %v
626 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)
628 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) {
629 ; CHECK-LABEL: icmp_eq_vv_nxv8i8:
631 ; CHECK-NEXT: vsetvli zero, a0, e8, m1, ta, ma
632 ; CHECK-NEXT: vmseq.vv v0, v8, v9, v0.t
634 %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)
635 ret <vscale x 8 x i1> %v
638 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) {
639 ; CHECK-LABEL: icmp_eq_vx_nxv8i8:
641 ; CHECK-NEXT: vsetvli zero, a1, e8, m1, ta, ma
642 ; CHECK-NEXT: vmseq.vx v0, v8, a0, v0.t
644 %elt.head = insertelement <vscale x 8 x i8> poison, i8 %b, i32 0
645 %vb = shufflevector <vscale x 8 x i8> %elt.head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
646 %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)
647 ret <vscale x 8 x i1> %v
650 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) {
651 ; CHECK-LABEL: icmp_eq_vx_swap_nxv8i8:
653 ; CHECK-NEXT: vsetvli zero, a1, e8, m1, ta, ma
654 ; CHECK-NEXT: vmseq.vx v0, v8, a0, v0.t
656 %elt.head = insertelement <vscale x 8 x i8> poison, i8 %b, i32 0
657 %vb = shufflevector <vscale x 8 x i8> %elt.head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
658 %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)
659 ret <vscale x 8 x i1> %v
662 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) {
663 ; CHECK-LABEL: icmp_eq_vi_nxv8i8:
665 ; CHECK-NEXT: vsetvli zero, a0, e8, m1, ta, ma
666 ; CHECK-NEXT: vmseq.vi v0, v8, 4, v0.t
668 %elt.head = insertelement <vscale x 8 x i8> poison, i8 4, i32 0
669 %vb = shufflevector <vscale x 8 x i8> %elt.head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
670 %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)
671 ret <vscale x 8 x i1> %v
674 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) {
675 ; CHECK-LABEL: icmp_eq_vi_swap_nxv8i8:
677 ; CHECK-NEXT: vsetvli zero, a0, e8, m1, ta, ma
678 ; CHECK-NEXT: vmseq.vi v0, v8, 4, v0.t
680 %elt.head = insertelement <vscale x 8 x i8> poison, i8 4, i32 0
681 %vb = shufflevector <vscale x 8 x i8> %elt.head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
682 %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)
683 ret <vscale x 8 x i1> %v
686 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) {
687 ; CHECK-LABEL: icmp_ne_vv_nxv8i8:
689 ; CHECK-NEXT: vsetvli zero, a0, e8, m1, ta, ma
690 ; CHECK-NEXT: vmsne.vv v0, v8, v9, v0.t
692 %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)
693 ret <vscale x 8 x i1> %v
696 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) {
697 ; CHECK-LABEL: icmp_ne_vx_nxv8i8:
699 ; CHECK-NEXT: vsetvli zero, a1, e8, m1, ta, ma
700 ; CHECK-NEXT: vmsne.vx v0, v8, a0, v0.t
702 %elt.head = insertelement <vscale x 8 x i8> poison, i8 %b, i32 0
703 %vb = shufflevector <vscale x 8 x i8> %elt.head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
704 %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)
705 ret <vscale x 8 x i1> %v
708 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) {
709 ; CHECK-LABEL: icmp_ne_vx_swap_nxv8i8:
711 ; CHECK-NEXT: vsetvli zero, a1, e8, m1, ta, ma
712 ; CHECK-NEXT: vmsne.vx v0, v8, a0, v0.t
714 %elt.head = insertelement <vscale x 8 x i8> poison, i8 %b, i32 0
715 %vb = shufflevector <vscale x 8 x i8> %elt.head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
716 %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)
717 ret <vscale x 8 x i1> %v
720 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) {
721 ; CHECK-LABEL: icmp_ne_vi_nxv8i8:
723 ; CHECK-NEXT: vsetvli zero, a0, e8, m1, ta, ma
724 ; CHECK-NEXT: vmsne.vi v0, v8, 4, v0.t
726 %elt.head = insertelement <vscale x 8 x i8> poison, i8 4, i32 0
727 %vb = shufflevector <vscale x 8 x i8> %elt.head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
728 %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)
729 ret <vscale x 8 x i1> %v
732 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) {
733 ; CHECK-LABEL: icmp_ne_vi_swap_nxv8i8:
735 ; CHECK-NEXT: vsetvli zero, a0, e8, m1, ta, ma
736 ; CHECK-NEXT: vmsne.vi v0, v8, 4, v0.t
738 %elt.head = insertelement <vscale x 8 x i8> poison, i8 4, i32 0
739 %vb = shufflevector <vscale x 8 x i8> %elt.head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
740 %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)
741 ret <vscale x 8 x i1> %v
744 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) {
745 ; CHECK-LABEL: icmp_ugt_vv_nxv8i8:
747 ; CHECK-NEXT: vsetvli zero, a0, e8, m1, ta, ma
748 ; CHECK-NEXT: vmsltu.vv v0, v9, v8, v0.t
750 %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)
751 ret <vscale x 8 x i1> %v
754 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) {
755 ; CHECK-LABEL: icmp_ugt_vx_nxv8i8:
757 ; CHECK-NEXT: vsetvli zero, a1, e8, m1, ta, ma
758 ; CHECK-NEXT: vmsgtu.vx v0, v8, a0, v0.t
760 %elt.head = insertelement <vscale x 8 x i8> poison, i8 %b, i32 0
761 %vb = shufflevector <vscale x 8 x i8> %elt.head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
762 %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)
763 ret <vscale x 8 x i1> %v
766 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) {
767 ; CHECK-LABEL: icmp_ugt_vx_swap_nxv8i8:
769 ; CHECK-NEXT: vsetvli zero, a1, e8, m1, ta, ma
770 ; CHECK-NEXT: vmsltu.vx v0, v8, a0, 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> %vb, <vscale x 8 x i8> %va, metadata !"ugt", <vscale x 8 x i1> %m, i32 %evl)
775 ret <vscale x 8 x i1> %v
778 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) {
779 ; CHECK-LABEL: icmp_ugt_vi_nxv8i8:
781 ; CHECK-NEXT: vsetvli zero, a0, e8, m1, ta, ma
782 ; CHECK-NEXT: vmsgtu.vi v0, v8, 4, v0.t
784 %elt.head = insertelement <vscale x 8 x i8> poison, i8 4, 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> %va, <vscale x 8 x i8> %vb, metadata !"ugt", <vscale x 8 x i1> %m, i32 %evl)
787 ret <vscale x 8 x i1> %v
790 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) {
791 ; CHECK-LABEL: icmp_ugt_vi_swap_nxv8i8:
793 ; CHECK-NEXT: vsetvli zero, a0, e8, m1, ta, ma
794 ; CHECK-NEXT: vmsleu.vi v0, v8, 3, v0.t
796 %elt.head = insertelement <vscale x 8 x i8> poison, i8 4, i32 0
797 %vb = shufflevector <vscale x 8 x i8> %elt.head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
798 %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)
799 ret <vscale x 8 x i1> %v
802 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) {
803 ; CHECK-LABEL: icmp_uge_vv_nxv8i8:
805 ; CHECK-NEXT: vsetvli zero, a0, e8, m1, ta, ma
806 ; CHECK-NEXT: vmsleu.vv v0, v9, v8, v0.t
808 %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)
809 ret <vscale x 8 x i1> %v
812 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) {
813 ; CHECK-LABEL: icmp_uge_vx_nxv8i8:
815 ; CHECK-NEXT: vsetvli a2, zero, e8, m1, ta, ma
816 ; CHECK-NEXT: vmv.v.x v9, a0
817 ; CHECK-NEXT: vsetvli zero, a1, e8, m1, ta, ma
818 ; CHECK-NEXT: vmsleu.vv v0, v9, v8, v0.t
820 %elt.head = insertelement <vscale x 8 x i8> poison, i8 %b, i32 0
821 %vb = shufflevector <vscale x 8 x i8> %elt.head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
822 %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)
823 ret <vscale x 8 x i1> %v
826 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) {
827 ; CHECK-LABEL: icmp_uge_vx_swap_nxv8i8:
829 ; CHECK-NEXT: vsetvli zero, a1, e8, m1, ta, ma
830 ; CHECK-NEXT: vmsleu.vx v0, v8, a0, v0.t
832 %elt.head = insertelement <vscale x 8 x i8> poison, i8 %b, i32 0
833 %vb = shufflevector <vscale x 8 x i8> %elt.head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
834 %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)
835 ret <vscale x 8 x i1> %v
838 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) {
839 ; CHECK-LABEL: icmp_uge_vi_nxv8i8:
841 ; CHECK-NEXT: vsetvli zero, a0, e8, m1, ta, ma
842 ; CHECK-NEXT: vmsgtu.vi v0, v8, 3, v0.t
844 %elt.head = insertelement <vscale x 8 x i8> poison, i8 4, i32 0
845 %vb = shufflevector <vscale x 8 x i8> %elt.head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
846 %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)
847 ret <vscale x 8 x i1> %v
850 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) {
851 ; CHECK-LABEL: icmp_uge_vi_swap_nxv8i8:
853 ; CHECK-NEXT: vsetvli zero, a0, e8, m1, ta, ma
854 ; CHECK-NEXT: vmsleu.vi v0, v8, 4, v0.t
856 %elt.head = insertelement <vscale x 8 x i8> poison, i8 4, i32 0
857 %vb = shufflevector <vscale x 8 x i8> %elt.head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
858 %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)
859 ret <vscale x 8 x i1> %v
862 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) {
863 ; CHECK-LABEL: icmp_ult_vv_nxv8i8:
865 ; CHECK-NEXT: vsetvli zero, a0, e8, m1, ta, ma
866 ; CHECK-NEXT: vmsltu.vv v0, v8, v9, v0.t
868 %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)
869 ret <vscale x 8 x i1> %v
872 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) {
873 ; CHECK-LABEL: icmp_ult_vx_nxv8i8:
875 ; CHECK-NEXT: vsetvli zero, a1, e8, m1, ta, ma
876 ; CHECK-NEXT: vmsltu.vx v0, v8, a0, v0.t
878 %elt.head = insertelement <vscale x 8 x i8> poison, i8 %b, i32 0
879 %vb = shufflevector <vscale x 8 x i8> %elt.head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
880 %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)
881 ret <vscale x 8 x i1> %v
884 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) {
885 ; CHECK-LABEL: icmp_ult_vx_swap_nxv8i8:
887 ; CHECK-NEXT: vsetvli zero, a1, e8, m1, ta, ma
888 ; CHECK-NEXT: vmsgtu.vx v0, v8, a0, v0.t
890 %elt.head = insertelement <vscale x 8 x i8> poison, i8 %b, i32 0
891 %vb = shufflevector <vscale x 8 x i8> %elt.head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
892 %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)
893 ret <vscale x 8 x i1> %v
896 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) {
897 ; CHECK-LABEL: icmp_ult_vi_nxv8i8:
899 ; CHECK-NEXT: vsetvli zero, a0, e8, m1, ta, ma
900 ; CHECK-NEXT: vmsleu.vi v0, v8, 3, v0.t
902 %elt.head = insertelement <vscale x 8 x i8> poison, i8 4, i32 0
903 %vb = shufflevector <vscale x 8 x i8> %elt.head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
904 %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)
905 ret <vscale x 8 x i1> %v
908 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) {
909 ; CHECK-LABEL: icmp_ult_vi_swap_nxv8i8:
911 ; CHECK-NEXT: vsetvli zero, a0, e8, m1, ta, ma
912 ; CHECK-NEXT: vmsgtu.vi v0, v8, 4, v0.t
914 %elt.head = insertelement <vscale x 8 x i8> poison, i8 4, i32 0
915 %vb = shufflevector <vscale x 8 x i8> %elt.head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
916 %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)
917 ret <vscale x 8 x i1> %v
920 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) {
921 ; CHECK-LABEL: icmp_sgt_vv_nxv8i8:
923 ; CHECK-NEXT: vsetvli zero, a0, e8, m1, ta, ma
924 ; CHECK-NEXT: vmslt.vv v0, v9, v8, v0.t
926 %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)
927 ret <vscale x 8 x i1> %v
930 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) {
931 ; CHECK-LABEL: icmp_sgt_vx_nxv8i8:
933 ; CHECK-NEXT: vsetvli zero, a1, e8, m1, ta, ma
934 ; CHECK-NEXT: vmsgt.vx v0, v8, a0, 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 !"sgt", <vscale x 8 x i1> %m, i32 %evl)
939 ret <vscale x 8 x i1> %v
942 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) {
943 ; CHECK-LABEL: icmp_sgt_vx_swap_nxv8i8:
945 ; CHECK-NEXT: vsetvli zero, a1, e8, m1, ta, ma
946 ; CHECK-NEXT: vmslt.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 !"sgt", <vscale x 8 x i1> %m, i32 %evl)
951 ret <vscale x 8 x i1> %v
954 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) {
955 ; CHECK-LABEL: icmp_sgt_vi_nxv8i8:
957 ; CHECK-NEXT: vsetvli zero, a0, e8, m1, ta, ma
958 ; CHECK-NEXT: vmsgt.vi v0, v8, 4, v0.t
960 %elt.head = insertelement <vscale x 8 x i8> poison, i8 4, i32 0
961 %vb = shufflevector <vscale x 8 x i8> %elt.head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
962 %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)
963 ret <vscale x 8 x i1> %v
966 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) {
967 ; CHECK-LABEL: icmp_sgt_vi_swap_nxv8i8:
969 ; CHECK-NEXT: vsetvli zero, a0, e8, m1, ta, ma
970 ; CHECK-NEXT: vmsle.vi v0, v8, 3, v0.t
972 %elt.head = insertelement <vscale x 8 x i8> poison, i8 4, i32 0
973 %vb = shufflevector <vscale x 8 x i8> %elt.head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
974 %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)
975 ret <vscale x 8 x i1> %v
978 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) {
979 ; CHECK-LABEL: icmp_sge_vv_nxv8i8:
981 ; CHECK-NEXT: vsetvli zero, a0, e8, m1, ta, ma
982 ; CHECK-NEXT: vmsle.vv v0, v9, v8, v0.t
984 %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)
985 ret <vscale x 8 x i1> %v
988 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) {
989 ; CHECK-LABEL: icmp_sge_vx_nxv8i8:
991 ; CHECK-NEXT: vsetvli a2, zero, e8, m1, ta, ma
992 ; CHECK-NEXT: vmv.v.x v9, a0
993 ; CHECK-NEXT: vsetvli zero, a1, e8, m1, ta, ma
994 ; CHECK-NEXT: vmsle.vv v0, v9, v8, v0.t
996 %elt.head = insertelement <vscale x 8 x i8> poison, i8 %b, i32 0
997 %vb = shufflevector <vscale x 8 x i8> %elt.head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
998 %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)
999 ret <vscale x 8 x i1> %v
1002 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) {
1003 ; CHECK-LABEL: icmp_sge_vx_swap_nxv8i8:
1005 ; CHECK-NEXT: vsetvli zero, a1, e8, m1, ta, ma
1006 ; CHECK-NEXT: vmsle.vx v0, v8, a0, v0.t
1008 %elt.head = insertelement <vscale x 8 x i8> poison, i8 %b, i32 0
1009 %vb = shufflevector <vscale x 8 x i8> %elt.head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
1010 %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)
1011 ret <vscale x 8 x i1> %v
1014 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) {
1015 ; CHECK-LABEL: icmp_sge_vi_nxv8i8:
1017 ; CHECK-NEXT: vsetvli zero, a0, e8, m1, ta, ma
1018 ; CHECK-NEXT: vmsgt.vi v0, v8, 3, v0.t
1020 %elt.head = insertelement <vscale x 8 x i8> poison, i8 4, i32 0
1021 %vb = shufflevector <vscale x 8 x i8> %elt.head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
1022 %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)
1023 ret <vscale x 8 x i1> %v
1026 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) {
1027 ; CHECK-LABEL: icmp_sge_vi_swap_nxv8i8:
1029 ; CHECK-NEXT: vsetvli zero, a0, e8, m1, ta, ma
1030 ; CHECK-NEXT: vmsle.vi v0, v8, 4, v0.t
1032 %elt.head = insertelement <vscale x 8 x i8> poison, i8 4, i32 0
1033 %vb = shufflevector <vscale x 8 x i8> %elt.head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
1034 %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)
1035 ret <vscale x 8 x i1> %v
1038 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) {
1039 ; CHECK-LABEL: icmp_slt_vv_nxv8i8:
1041 ; CHECK-NEXT: vsetvli zero, a0, e8, m1, ta, ma
1042 ; CHECK-NEXT: vmslt.vv v0, v8, v9, v0.t
1044 %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)
1045 ret <vscale x 8 x i1> %v
1048 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) {
1049 ; CHECK-LABEL: icmp_slt_vx_nxv8i8:
1051 ; CHECK-NEXT: vsetvli zero, a1, e8, m1, ta, ma
1052 ; CHECK-NEXT: vmslt.vx v0, v8, a0, v0.t
1054 %elt.head = insertelement <vscale x 8 x i8> poison, i8 %b, i32 0
1055 %vb = shufflevector <vscale x 8 x i8> %elt.head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
1056 %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)
1057 ret <vscale x 8 x i1> %v
1060 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) {
1061 ; CHECK-LABEL: icmp_slt_vx_swap_nxv8i8:
1063 ; CHECK-NEXT: vsetvli zero, a1, e8, m1, ta, ma
1064 ; CHECK-NEXT: vmsgt.vx v0, v8, a0, v0.t
1066 %elt.head = insertelement <vscale x 8 x i8> poison, i8 %b, i32 0
1067 %vb = shufflevector <vscale x 8 x i8> %elt.head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
1068 %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)
1069 ret <vscale x 8 x i1> %v
1072 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) {
1073 ; CHECK-LABEL: icmp_slt_vi_nxv8i8:
1075 ; CHECK-NEXT: vsetvli zero, a0, e8, m1, ta, ma
1076 ; CHECK-NEXT: vmsle.vi v0, v8, 3, v0.t
1078 %elt.head = insertelement <vscale x 8 x i8> poison, i8 4, i32 0
1079 %vb = shufflevector <vscale x 8 x i8> %elt.head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
1080 %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)
1081 ret <vscale x 8 x i1> %v
1084 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) {
1085 ; CHECK-LABEL: icmp_slt_vi_swap_nxv8i8:
1087 ; CHECK-NEXT: vsetvli zero, a0, e8, m1, ta, ma
1088 ; CHECK-NEXT: vmsgt.vi v0, v8, 4, v0.t
1090 %elt.head = insertelement <vscale x 8 x i8> poison, i8 4, i32 0
1091 %vb = shufflevector <vscale x 8 x i8> %elt.head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
1092 %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)
1093 ret <vscale x 8 x i1> %v
1096 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) {
1097 ; CHECK-LABEL: icmp_sle_vv_nxv8i8:
1099 ; CHECK-NEXT: vsetvli zero, a0, e8, m1, ta, ma
1100 ; CHECK-NEXT: vmsle.vv v0, v8, v9, v0.t
1102 %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)
1103 ret <vscale x 8 x i1> %v
1106 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) {
1107 ; CHECK-LABEL: icmp_sle_vx_nxv8i8:
1109 ; CHECK-NEXT: vsetvli zero, a1, e8, m1, ta, ma
1110 ; CHECK-NEXT: vmsle.vx v0, v8, a0, v0.t
1112 %elt.head = insertelement <vscale x 8 x i8> poison, i8 %b, i32 0
1113 %vb = shufflevector <vscale x 8 x i8> %elt.head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
1114 %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)
1115 ret <vscale x 8 x i1> %v
1118 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) {
1119 ; CHECK-LABEL: icmp_sle_vx_swap_nxv8i8:
1121 ; CHECK-NEXT: vsetvli a2, zero, e8, m1, ta, ma
1122 ; CHECK-NEXT: vmv.v.x v9, a0
1123 ; CHECK-NEXT: vsetvli zero, a1, e8, m1, ta, ma
1124 ; CHECK-NEXT: vmsle.vv v0, v9, v8, v0.t
1126 %elt.head = insertelement <vscale x 8 x i8> poison, i8 %b, i32 0
1127 %vb = shufflevector <vscale x 8 x i8> %elt.head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
1128 %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)
1129 ret <vscale x 8 x i1> %v
1132 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) {
1133 ; CHECK-LABEL: icmp_sle_vi_nxv8i8:
1135 ; CHECK-NEXT: vsetvli zero, a0, e8, m1, ta, ma
1136 ; CHECK-NEXT: vmsle.vi v0, v8, 4, v0.t
1138 %elt.head = insertelement <vscale x 8 x i8> poison, i8 4, i32 0
1139 %vb = shufflevector <vscale x 8 x i8> %elt.head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
1140 %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)
1141 ret <vscale x 8 x i1> %v
1144 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) {
1145 ; CHECK-LABEL: icmp_sle_vi_swap_nxv8i8:
1147 ; CHECK-NEXT: vsetvli zero, a0, e8, m1, ta, ma
1148 ; CHECK-NEXT: vmsgt.vi v0, v8, 3, v0.t
1150 %elt.head = insertelement <vscale x 8 x i8> poison, i8 4, i32 0
1151 %vb = shufflevector <vscale x 8 x i8> %elt.head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
1152 %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)
1153 ret <vscale x 8 x i1> %v
1156 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)
1158 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) {
1159 ; CHECK-LABEL: icmp_eq_vv_nxv128i8:
1161 ; CHECK-NEXT: addi sp, sp, -16
1162 ; CHECK-NEXT: .cfi_def_cfa_offset 16
1163 ; CHECK-NEXT: csrr a1, vlenb
1164 ; CHECK-NEXT: slli a1, a1, 4
1165 ; CHECK-NEXT: sub sp, sp, a1
1166 ; CHECK-NEXT: .cfi_escape 0x0f, 0x0d, 0x72, 0x00, 0x11, 0x10, 0x22, 0x11, 0x10, 0x92, 0xa2, 0x38, 0x00, 0x1e, 0x22 # sp + 16 + 16 * vlenb
1167 ; CHECK-NEXT: vmv1r.v v24, v0
1168 ; CHECK-NEXT: csrr a1, vlenb
1169 ; CHECK-NEXT: slli a1, a1, 3
1170 ; CHECK-NEXT: add a1, sp, a1
1171 ; CHECK-NEXT: addi a1, a1, 16
1172 ; CHECK-NEXT: vs8r.v v8, (a1) # Unknown-size Folded Spill
1173 ; CHECK-NEXT: csrr a1, vlenb
1174 ; CHECK-NEXT: slli a1, a1, 3
1175 ; CHECK-NEXT: add a4, a0, a1
1176 ; CHECK-NEXT: vl8r.v v8, (a4)
1177 ; CHECK-NEXT: vl8r.v v0, (a0)
1178 ; CHECK-NEXT: addi a0, sp, 16
1179 ; CHECK-NEXT: vs8r.v v0, (a0) # Unknown-size Folded Spill
1180 ; CHECK-NEXT: vsetvli a0, zero, e8, m8, ta, ma
1181 ; CHECK-NEXT: sub a0, a3, a1
1182 ; CHECK-NEXT: vlm.v v0, (a2)
1183 ; CHECK-NEXT: sltu a2, a3, a0
1184 ; CHECK-NEXT: addi a2, a2, -1
1185 ; CHECK-NEXT: and a0, a2, a0
1186 ; CHECK-NEXT: vsetvli zero, a0, e8, m8, ta, ma
1187 ; CHECK-NEXT: vmseq.vv v1, v16, v8, v0.t
1188 ; CHECK-NEXT: bltu a3, a1, .LBB96_2
1189 ; CHECK-NEXT: # %bb.1:
1190 ; CHECK-NEXT: mv a3, a1
1191 ; CHECK-NEXT: .LBB96_2:
1192 ; CHECK-NEXT: vsetvli zero, a3, e8, m8, ta, ma
1193 ; CHECK-NEXT: vmv1r.v v0, v24
1194 ; CHECK-NEXT: csrr a0, vlenb
1195 ; CHECK-NEXT: slli a0, a0, 3
1196 ; CHECK-NEXT: add a0, sp, a0
1197 ; CHECK-NEXT: addi a0, a0, 16
1198 ; CHECK-NEXT: vl8r.v v8, (a0) # Unknown-size Folded Reload
1199 ; CHECK-NEXT: addi a0, sp, 16
1200 ; CHECK-NEXT: vl8r.v v24, (a0) # Unknown-size Folded Reload
1201 ; CHECK-NEXT: vmseq.vv v16, v8, v24, v0.t
1202 ; CHECK-NEXT: vmv1r.v v0, v16
1203 ; CHECK-NEXT: vmv1r.v v8, v1
1204 ; CHECK-NEXT: csrr a0, vlenb
1205 ; CHECK-NEXT: slli a0, a0, 4
1206 ; CHECK-NEXT: add sp, sp, a0
1207 ; CHECK-NEXT: addi sp, sp, 16
1209 %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)
1210 ret <vscale x 128 x i1> %v
1213 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) {
1214 ; CHECK-LABEL: icmp_eq_vx_nxv128i8:
1216 ; CHECK-NEXT: vmv1r.v v24, v0
1217 ; CHECK-NEXT: vsetvli a3, zero, e8, m8, ta, ma
1218 ; CHECK-NEXT: vlm.v v0, (a1)
1219 ; CHECK-NEXT: csrr a1, vlenb
1220 ; CHECK-NEXT: slli a1, a1, 3
1221 ; CHECK-NEXT: sub a3, a2, a1
1222 ; CHECK-NEXT: sltu a4, a2, a3
1223 ; CHECK-NEXT: addi a4, a4, -1
1224 ; CHECK-NEXT: and a3, a4, a3
1225 ; CHECK-NEXT: vsetvli zero, a3, e8, m8, ta, ma
1226 ; CHECK-NEXT: vmseq.vx v25, v16, a0, v0.t
1227 ; CHECK-NEXT: bltu a2, a1, .LBB97_2
1228 ; CHECK-NEXT: # %bb.1:
1229 ; CHECK-NEXT: mv a2, a1
1230 ; CHECK-NEXT: .LBB97_2:
1231 ; CHECK-NEXT: vsetvli zero, a2, e8, m8, ta, ma
1232 ; CHECK-NEXT: vmv1r.v v0, v24
1233 ; CHECK-NEXT: vmseq.vx v16, v8, a0, v0.t
1234 ; CHECK-NEXT: vmv1r.v v0, v16
1235 ; CHECK-NEXT: vmv1r.v v8, v25
1237 %elt.head = insertelement <vscale x 128 x i8> poison, i8 %b, i8 0
1238 %vb = shufflevector <vscale x 128 x i8> %elt.head, <vscale x 128 x i8> poison, <vscale x 128 x i32> zeroinitializer
1239 %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)
1240 ret <vscale x 128 x i1> %v
1243 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) {
1244 ; CHECK-LABEL: icmp_eq_vx_swap_nxv128i8:
1246 ; CHECK-NEXT: vmv1r.v v24, v0
1247 ; CHECK-NEXT: vsetvli a3, zero, e8, m8, ta, ma
1248 ; CHECK-NEXT: vlm.v v0, (a1)
1249 ; CHECK-NEXT: csrr a1, vlenb
1250 ; CHECK-NEXT: slli a1, a1, 3
1251 ; CHECK-NEXT: sub a3, a2, a1
1252 ; CHECK-NEXT: sltu a4, a2, a3
1253 ; CHECK-NEXT: addi a4, a4, -1
1254 ; CHECK-NEXT: and a3, a4, a3
1255 ; CHECK-NEXT: vsetvli zero, a3, e8, m8, ta, ma
1256 ; CHECK-NEXT: vmseq.vx v25, v16, a0, v0.t
1257 ; CHECK-NEXT: bltu a2, a1, .LBB98_2
1258 ; CHECK-NEXT: # %bb.1:
1259 ; CHECK-NEXT: mv a2, a1
1260 ; CHECK-NEXT: .LBB98_2:
1261 ; CHECK-NEXT: vsetvli zero, a2, e8, m8, ta, ma
1262 ; CHECK-NEXT: vmv1r.v v0, v24
1263 ; CHECK-NEXT: vmseq.vx v16, v8, a0, v0.t
1264 ; CHECK-NEXT: vmv1r.v v0, v16
1265 ; CHECK-NEXT: vmv1r.v v8, v25
1267 %elt.head = insertelement <vscale x 128 x i8> poison, i8 %b, i8 0
1268 %vb = shufflevector <vscale x 128 x i8> %elt.head, <vscale x 128 x i8> poison, <vscale x 128 x i32> zeroinitializer
1269 %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)
1270 ret <vscale x 128 x i1> %v
1273 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)
1275 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) {
1276 ; CHECK-LABEL: icmp_eq_vv_nxv1i32:
1278 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
1279 ; CHECK-NEXT: vmseq.vv v0, v8, v9, v0.t
1281 %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)
1282 ret <vscale x 1 x i1> %v
1285 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) {
1286 ; CHECK-LABEL: icmp_eq_vx_nxv1i32:
1288 ; CHECK-NEXT: vsetvli zero, a1, e32, mf2, ta, ma
1289 ; CHECK-NEXT: vmseq.vx v0, v8, a0, v0.t
1291 %elt.head = insertelement <vscale x 1 x i32> poison, i32 %b, i32 0
1292 %vb = shufflevector <vscale x 1 x i32> %elt.head, <vscale x 1 x i32> poison, <vscale x 1 x i32> zeroinitializer
1293 %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)
1294 ret <vscale x 1 x i1> %v
1297 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) {
1298 ; CHECK-LABEL: icmp_eq_vx_swap_nxv1i32:
1300 ; CHECK-NEXT: vsetvli zero, a1, e32, mf2, ta, ma
1301 ; CHECK-NEXT: vmseq.vx v0, v8, a0, v0.t
1303 %elt.head = insertelement <vscale x 1 x i32> poison, i32 %b, i32 0
1304 %vb = shufflevector <vscale x 1 x i32> %elt.head, <vscale x 1 x i32> poison, <vscale x 1 x i32> zeroinitializer
1305 %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)
1306 ret <vscale x 1 x i1> %v
1309 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) {
1310 ; CHECK-LABEL: icmp_eq_vi_nxv1i32:
1312 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
1313 ; CHECK-NEXT: vmseq.vi v0, v8, 4, v0.t
1315 %elt.head = insertelement <vscale x 1 x i32> poison, i32 4, i32 0
1316 %vb = shufflevector <vscale x 1 x i32> %elt.head, <vscale x 1 x i32> poison, <vscale x 1 x i32> zeroinitializer
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 !"eq", <vscale x 1 x i1> %m, i32 %evl)
1318 ret <vscale x 1 x i1> %v
1321 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) {
1322 ; CHECK-LABEL: icmp_eq_vi_swap_nxv1i32:
1324 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
1325 ; CHECK-NEXT: vmseq.vi v0, v8, 4, v0.t
1327 %elt.head = insertelement <vscale x 1 x i32> poison, i32 4, 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> %vb, <vscale x 1 x i32> %va, metadata !"eq", <vscale x 1 x i1> %m, i32 %evl)
1330 ret <vscale x 1 x i1> %v
1333 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) {
1334 ; CHECK-LABEL: icmp_ne_vv_nxv1i32:
1336 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
1337 ; CHECK-NEXT: vmsne.vv v0, v8, v9, v0.t
1339 %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)
1340 ret <vscale x 1 x i1> %v
1343 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) {
1344 ; CHECK-LABEL: icmp_ne_vx_nxv1i32:
1346 ; CHECK-NEXT: vsetvli zero, a1, e32, mf2, ta, ma
1347 ; CHECK-NEXT: vmsne.vx v0, v8, a0, v0.t
1349 %elt.head = insertelement <vscale x 1 x i32> poison, i32 %b, i32 0
1350 %vb = shufflevector <vscale x 1 x i32> %elt.head, <vscale x 1 x i32> poison, <vscale x 1 x i32> zeroinitializer
1351 %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)
1352 ret <vscale x 1 x i1> %v
1355 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) {
1356 ; CHECK-LABEL: icmp_ne_vx_swap_nxv1i32:
1358 ; CHECK-NEXT: vsetvli zero, a1, e32, mf2, ta, ma
1359 ; CHECK-NEXT: vmsne.vx v0, v8, a0, v0.t
1361 %elt.head = insertelement <vscale x 1 x i32> poison, i32 %b, i32 0
1362 %vb = shufflevector <vscale x 1 x i32> %elt.head, <vscale x 1 x i32> poison, <vscale x 1 x i32> zeroinitializer
1363 %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)
1364 ret <vscale x 1 x i1> %v
1367 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) {
1368 ; CHECK-LABEL: icmp_ne_vi_nxv1i32:
1370 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
1371 ; CHECK-NEXT: vmsne.vi v0, v8, 4, v0.t
1373 %elt.head = insertelement <vscale x 1 x i32> poison, i32 4, i32 0
1374 %vb = shufflevector <vscale x 1 x i32> %elt.head, <vscale x 1 x i32> poison, <vscale x 1 x i32> zeroinitializer
1375 %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)
1376 ret <vscale x 1 x i1> %v
1379 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) {
1380 ; CHECK-LABEL: icmp_ne_vi_swap_nxv1i32:
1382 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
1383 ; CHECK-NEXT: vmsne.vi v0, v8, 4, v0.t
1385 %elt.head = insertelement <vscale x 1 x i32> poison, i32 4, i32 0
1386 %vb = shufflevector <vscale x 1 x i32> %elt.head, <vscale x 1 x i32> poison, <vscale x 1 x i32> zeroinitializer
1387 %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)
1388 ret <vscale x 1 x i1> %v
1391 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) {
1392 ; CHECK-LABEL: icmp_ugt_vv_nxv1i32:
1394 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
1395 ; CHECK-NEXT: vmsltu.vv v0, v9, v8, v0.t
1397 %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)
1398 ret <vscale x 1 x i1> %v
1401 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) {
1402 ; CHECK-LABEL: icmp_ugt_vx_nxv1i32:
1404 ; CHECK-NEXT: vsetvli zero, a1, e32, mf2, ta, ma
1405 ; CHECK-NEXT: vmsgtu.vx v0, v8, a0, v0.t
1407 %elt.head = insertelement <vscale x 1 x i32> poison, i32 %b, i32 0
1408 %vb = shufflevector <vscale x 1 x i32> %elt.head, <vscale x 1 x i32> poison, <vscale x 1 x i32> zeroinitializer
1409 %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)
1410 ret <vscale x 1 x i1> %v
1413 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) {
1414 ; CHECK-LABEL: icmp_ugt_vx_swap_nxv1i32:
1416 ; CHECK-NEXT: vsetvli zero, a1, e32, mf2, ta, ma
1417 ; CHECK-NEXT: vmsltu.vx v0, v8, a0, v0.t
1419 %elt.head = insertelement <vscale x 1 x i32> poison, i32 %b, i32 0
1420 %vb = shufflevector <vscale x 1 x i32> %elt.head, <vscale x 1 x i32> poison, <vscale x 1 x i32> zeroinitializer
1421 %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)
1422 ret <vscale x 1 x i1> %v
1425 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) {
1426 ; CHECK-LABEL: icmp_ugt_vi_nxv1i32:
1428 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
1429 ; CHECK-NEXT: vmsgtu.vi v0, v8, 4, v0.t
1431 %elt.head = insertelement <vscale x 1 x i32> poison, i32 4, i32 0
1432 %vb = shufflevector <vscale x 1 x i32> %elt.head, <vscale x 1 x i32> poison, <vscale x 1 x i32> zeroinitializer
1433 %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)
1434 ret <vscale x 1 x i1> %v
1437 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) {
1438 ; CHECK-LABEL: icmp_ugt_vi_swap_nxv1i32:
1440 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
1441 ; CHECK-NEXT: vmsleu.vi v0, v8, 3, v0.t
1443 %elt.head = insertelement <vscale x 1 x i32> poison, i32 4, i32 0
1444 %vb = shufflevector <vscale x 1 x i32> %elt.head, <vscale x 1 x i32> poison, <vscale x 1 x i32> zeroinitializer
1445 %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)
1446 ret <vscale x 1 x i1> %v
1449 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) {
1450 ; CHECK-LABEL: icmp_uge_vv_nxv1i32:
1452 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
1453 ; CHECK-NEXT: vmsleu.vv v0, v9, v8, v0.t
1455 %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)
1456 ret <vscale x 1 x i1> %v
1459 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) {
1460 ; CHECK-LABEL: icmp_uge_vx_nxv1i32:
1462 ; CHECK-NEXT: vsetvli a2, zero, e32, mf2, ta, ma
1463 ; CHECK-NEXT: vmv.v.x v9, a0
1464 ; CHECK-NEXT: vsetvli zero, a1, e32, mf2, ta, ma
1465 ; CHECK-NEXT: vmsleu.vv v0, v9, v8, v0.t
1467 %elt.head = insertelement <vscale x 1 x i32> poison, i32 %b, i32 0
1468 %vb = shufflevector <vscale x 1 x i32> %elt.head, <vscale x 1 x i32> poison, <vscale x 1 x i32> zeroinitializer
1469 %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)
1470 ret <vscale x 1 x i1> %v
1473 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) {
1474 ; CHECK-LABEL: icmp_uge_vx_swap_nxv1i32:
1476 ; CHECK-NEXT: vsetvli zero, a1, e32, mf2, ta, ma
1477 ; CHECK-NEXT: vmsleu.vx v0, v8, a0, v0.t
1479 %elt.head = insertelement <vscale x 1 x i32> poison, i32 %b, i32 0
1480 %vb = shufflevector <vscale x 1 x i32> %elt.head, <vscale x 1 x i32> poison, <vscale x 1 x i32> zeroinitializer
1481 %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)
1482 ret <vscale x 1 x i1> %v
1485 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) {
1486 ; CHECK-LABEL: icmp_uge_vi_nxv1i32:
1488 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
1489 ; CHECK-NEXT: vmsgtu.vi v0, v8, 3, v0.t
1491 %elt.head = insertelement <vscale x 1 x i32> poison, i32 4, 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 !"uge", <vscale x 1 x i1> %m, i32 %evl)
1494 ret <vscale x 1 x i1> %v
1497 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) {
1498 ; CHECK-LABEL: icmp_uge_vi_swap_nxv1i32:
1500 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
1501 ; CHECK-NEXT: vmsleu.vi v0, v8, 4, v0.t
1503 %elt.head = insertelement <vscale x 1 x i32> poison, i32 4, 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 !"uge", <vscale x 1 x i1> %m, i32 %evl)
1506 ret <vscale x 1 x i1> %v
1509 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) {
1510 ; CHECK-LABEL: icmp_ult_vv_nxv1i32:
1512 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
1513 ; CHECK-NEXT: vmsltu.vv v0, v8, v9, 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> %vb, metadata !"ult", <vscale x 1 x i1> %m, i32 %evl)
1516 ret <vscale x 1 x i1> %v
1519 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) {
1520 ; CHECK-LABEL: icmp_ult_vx_nxv1i32:
1522 ; CHECK-NEXT: vsetvli zero, a1, e32, mf2, ta, ma
1523 ; CHECK-NEXT: vmsltu.vx v0, v8, a0, v0.t
1525 %elt.head = insertelement <vscale x 1 x i32> poison, i32 %b, i32 0
1526 %vb = shufflevector <vscale x 1 x i32> %elt.head, <vscale x 1 x i32> poison, <vscale x 1 x i32> zeroinitializer
1527 %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)
1528 ret <vscale x 1 x i1> %v
1531 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) {
1532 ; CHECK-LABEL: icmp_ult_vx_swap_nxv1i32:
1534 ; CHECK-NEXT: vsetvli zero, a1, e32, mf2, ta, ma
1535 ; CHECK-NEXT: vmsgtu.vx v0, v8, a0, v0.t
1537 %elt.head = insertelement <vscale x 1 x i32> poison, i32 %b, i32 0
1538 %vb = shufflevector <vscale x 1 x i32> %elt.head, <vscale x 1 x i32> poison, <vscale x 1 x i32> zeroinitializer
1539 %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)
1540 ret <vscale x 1 x i1> %v
1543 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) {
1544 ; CHECK-LABEL: icmp_ult_vi_nxv1i32:
1546 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
1547 ; CHECK-NEXT: vmsleu.vi v0, v8, 3, v0.t
1549 %elt.head = insertelement <vscale x 1 x i32> poison, i32 4, i32 0
1550 %vb = shufflevector <vscale x 1 x i32> %elt.head, <vscale x 1 x i32> poison, <vscale x 1 x i32> zeroinitializer
1551 %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)
1552 ret <vscale x 1 x i1> %v
1555 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) {
1556 ; CHECK-LABEL: icmp_ult_vi_swap_nxv1i32:
1558 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
1559 ; CHECK-NEXT: vmsgtu.vi v0, v8, 4, v0.t
1561 %elt.head = insertelement <vscale x 1 x i32> poison, i32 4, i32 0
1562 %vb = shufflevector <vscale x 1 x i32> %elt.head, <vscale x 1 x i32> poison, <vscale x 1 x i32> zeroinitializer
1563 %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)
1564 ret <vscale x 1 x i1> %v
1567 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) {
1568 ; CHECK-LABEL: icmp_sgt_vv_nxv1i32:
1570 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
1571 ; CHECK-NEXT: vmslt.vv v0, v9, v8, v0.t
1573 %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)
1574 ret <vscale x 1 x i1> %v
1577 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) {
1578 ; CHECK-LABEL: icmp_sgt_vx_nxv1i32:
1580 ; CHECK-NEXT: vsetvli zero, a1, e32, mf2, ta, ma
1581 ; CHECK-NEXT: vmsgt.vx v0, v8, a0, v0.t
1583 %elt.head = insertelement <vscale x 1 x i32> poison, i32 %b, i32 0
1584 %vb = shufflevector <vscale x 1 x i32> %elt.head, <vscale x 1 x i32> poison, <vscale x 1 x i32> zeroinitializer
1585 %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)
1586 ret <vscale x 1 x i1> %v
1589 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) {
1590 ; CHECK-LABEL: icmp_sgt_vx_swap_nxv1i32:
1592 ; CHECK-NEXT: vsetvli zero, a1, e32, mf2, ta, ma
1593 ; CHECK-NEXT: vmslt.vx v0, v8, a0, v0.t
1595 %elt.head = insertelement <vscale x 1 x i32> poison, i32 %b, i32 0
1596 %vb = shufflevector <vscale x 1 x i32> %elt.head, <vscale x 1 x i32> poison, <vscale x 1 x i32> zeroinitializer
1597 %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)
1598 ret <vscale x 1 x i1> %v
1601 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) {
1602 ; CHECK-LABEL: icmp_sgt_vi_nxv1i32:
1604 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
1605 ; CHECK-NEXT: vmsgt.vi v0, v8, 4, v0.t
1607 %elt.head = insertelement <vscale x 1 x i32> poison, i32 4, i32 0
1608 %vb = shufflevector <vscale x 1 x i32> %elt.head, <vscale x 1 x i32> poison, <vscale x 1 x i32> zeroinitializer
1609 %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)
1610 ret <vscale x 1 x i1> %v
1613 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) {
1614 ; CHECK-LABEL: icmp_sgt_vi_swap_nxv1i32:
1616 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
1617 ; CHECK-NEXT: vmsle.vi v0, v8, 3, v0.t
1619 %elt.head = insertelement <vscale x 1 x i32> poison, i32 4, i32 0
1620 %vb = shufflevector <vscale x 1 x i32> %elt.head, <vscale x 1 x i32> poison, <vscale x 1 x i32> zeroinitializer
1621 %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)
1622 ret <vscale x 1 x i1> %v
1625 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) {
1626 ; CHECK-LABEL: icmp_sge_vv_nxv1i32:
1628 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
1629 ; CHECK-NEXT: vmsle.vv v0, v9, v8, v0.t
1631 %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)
1632 ret <vscale x 1 x i1> %v
1635 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) {
1636 ; CHECK-LABEL: icmp_sge_vx_nxv1i32:
1638 ; CHECK-NEXT: vsetvli a2, zero, e32, mf2, ta, ma
1639 ; CHECK-NEXT: vmv.v.x v9, a0
1640 ; CHECK-NEXT: vsetvli zero, a1, e32, mf2, ta, ma
1641 ; CHECK-NEXT: vmsle.vv v0, v9, v8, v0.t
1643 %elt.head = insertelement <vscale x 1 x i32> poison, i32 %b, i32 0
1644 %vb = shufflevector <vscale x 1 x i32> %elt.head, <vscale x 1 x i32> poison, <vscale x 1 x i32> zeroinitializer
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 !"sge", <vscale x 1 x i1> %m, i32 %evl)
1646 ret <vscale x 1 x i1> %v
1649 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) {
1650 ; CHECK-LABEL: icmp_sge_vx_swap_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> %vb, <vscale x 1 x i32> %va, metadata !"sge", <vscale x 1 x i1> %m, i32 %evl)
1658 ret <vscale x 1 x i1> %v
1661 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) {
1662 ; CHECK-LABEL: icmp_sge_vi_nxv1i32:
1664 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
1665 ; CHECK-NEXT: vmsgt.vi v0, v8, 3, v0.t
1667 %elt.head = insertelement <vscale x 1 x i32> poison, i32 4, i32 0
1668 %vb = shufflevector <vscale x 1 x i32> %elt.head, <vscale x 1 x i32> poison, <vscale x 1 x i32> zeroinitializer
1669 %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)
1670 ret <vscale x 1 x i1> %v
1673 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) {
1674 ; CHECK-LABEL: icmp_sge_vi_swap_nxv1i32:
1676 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
1677 ; CHECK-NEXT: vmsle.vi v0, v8, 4, v0.t
1679 %elt.head = insertelement <vscale x 1 x i32> poison, i32 4, i32 0
1680 %vb = shufflevector <vscale x 1 x i32> %elt.head, <vscale x 1 x i32> poison, <vscale x 1 x i32> zeroinitializer
1681 %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)
1682 ret <vscale x 1 x i1> %v
1685 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) {
1686 ; CHECK-LABEL: icmp_slt_vv_nxv1i32:
1688 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
1689 ; CHECK-NEXT: vmslt.vv v0, v8, v9, v0.t
1691 %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)
1692 ret <vscale x 1 x i1> %v
1695 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) {
1696 ; CHECK-LABEL: icmp_slt_vx_nxv1i32:
1698 ; CHECK-NEXT: vsetvli zero, a1, e32, mf2, ta, ma
1699 ; CHECK-NEXT: vmslt.vx v0, v8, a0, v0.t
1701 %elt.head = insertelement <vscale x 1 x i32> poison, i32 %b, i32 0
1702 %vb = shufflevector <vscale x 1 x i32> %elt.head, <vscale x 1 x i32> poison, <vscale x 1 x i32> zeroinitializer
1703 %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)
1704 ret <vscale x 1 x i1> %v
1707 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) {
1708 ; CHECK-LABEL: icmp_slt_vx_swap_nxv1i32:
1710 ; CHECK-NEXT: vsetvli zero, a1, e32, mf2, ta, ma
1711 ; CHECK-NEXT: vmsgt.vx v0, v8, a0, v0.t
1713 %elt.head = insertelement <vscale x 1 x i32> poison, i32 %b, i32 0
1714 %vb = shufflevector <vscale x 1 x i32> %elt.head, <vscale x 1 x i32> poison, <vscale x 1 x i32> zeroinitializer
1715 %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)
1716 ret <vscale x 1 x i1> %v
1719 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) {
1720 ; CHECK-LABEL: icmp_slt_vi_nxv1i32:
1722 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
1723 ; CHECK-NEXT: vmsle.vi v0, v8, 3, v0.t
1725 %elt.head = insertelement <vscale x 1 x i32> poison, i32 4, i32 0
1726 %vb = shufflevector <vscale x 1 x i32> %elt.head, <vscale x 1 x i32> poison, <vscale x 1 x i32> zeroinitializer
1727 %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)
1728 ret <vscale x 1 x i1> %v
1731 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) {
1732 ; CHECK-LABEL: icmp_slt_vi_swap_nxv1i32:
1734 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
1735 ; CHECK-NEXT: vmsgt.vi v0, v8, 4, v0.t
1737 %elt.head = insertelement <vscale x 1 x i32> poison, i32 4, i32 0
1738 %vb = shufflevector <vscale x 1 x i32> %elt.head, <vscale x 1 x i32> poison, <vscale x 1 x i32> zeroinitializer
1739 %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)
1740 ret <vscale x 1 x i1> %v
1743 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) {
1744 ; CHECK-LABEL: icmp_sle_vv_nxv1i32:
1746 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
1747 ; CHECK-NEXT: vmsle.vv v0, v8, v9, v0.t
1749 %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)
1750 ret <vscale x 1 x i1> %v
1753 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) {
1754 ; CHECK-LABEL: icmp_sle_vx_nxv1i32:
1756 ; CHECK-NEXT: vsetvli zero, a1, e32, mf2, ta, ma
1757 ; CHECK-NEXT: vmsle.vx v0, v8, a0, v0.t
1759 %elt.head = insertelement <vscale x 1 x i32> poison, i32 %b, i32 0
1760 %vb = shufflevector <vscale x 1 x i32> %elt.head, <vscale x 1 x i32> poison, <vscale x 1 x i32> zeroinitializer
1761 %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)
1762 ret <vscale x 1 x i1> %v
1765 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) {
1766 ; CHECK-LABEL: icmp_sle_vx_swap_nxv1i32:
1768 ; CHECK-NEXT: vsetvli a2, zero, e32, mf2, ta, ma
1769 ; CHECK-NEXT: vmv.v.x v9, a0
1770 ; CHECK-NEXT: vsetvli zero, a1, e32, mf2, ta, ma
1771 ; CHECK-NEXT: vmsle.vv v0, v9, v8, v0.t
1773 %elt.head = insertelement <vscale x 1 x i32> poison, i32 %b, i32 0
1774 %vb = shufflevector <vscale x 1 x i32> %elt.head, <vscale x 1 x i32> poison, <vscale x 1 x i32> zeroinitializer
1775 %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)
1776 ret <vscale x 1 x i1> %v
1779 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) {
1780 ; CHECK-LABEL: icmp_sle_vi_nxv1i32:
1782 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
1783 ; CHECK-NEXT: vmsle.vi v0, v8, 4, v0.t
1785 %elt.head = insertelement <vscale x 1 x i32> poison, i32 4, i32 0
1786 %vb = shufflevector <vscale x 1 x i32> %elt.head, <vscale x 1 x i32> poison, <vscale x 1 x i32> zeroinitializer
1787 %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)
1788 ret <vscale x 1 x i1> %v
1791 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) {
1792 ; CHECK-LABEL: icmp_sle_vi_swap_nxv1i32:
1794 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
1795 ; CHECK-NEXT: vmsgt.vi v0, v8, 3, v0.t
1797 %elt.head = insertelement <vscale x 1 x i32> poison, i32 4, i32 0
1798 %vb = shufflevector <vscale x 1 x i32> %elt.head, <vscale x 1 x i32> poison, <vscale x 1 x i32> zeroinitializer
1799 %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)
1800 ret <vscale x 1 x i1> %v
1803 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)
1805 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) {
1806 ; CHECK-LABEL: icmp_eq_vv_nxv8i32:
1808 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
1809 ; CHECK-NEXT: vmseq.vv v16, v8, v12, v0.t
1810 ; CHECK-NEXT: vmv1r.v v0, v16
1812 %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)
1813 ret <vscale x 8 x i1> %v
1816 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) {
1817 ; CHECK-LABEL: icmp_eq_vx_nxv8i32:
1819 ; CHECK-NEXT: vsetvli zero, a1, e32, m4, ta, ma
1820 ; CHECK-NEXT: vmseq.vx v12, v8, a0, v0.t
1821 ; CHECK-NEXT: vmv1r.v v0, v12
1823 %elt.head = insertelement <vscale x 8 x i32> poison, i32 %b, i32 0
1824 %vb = shufflevector <vscale x 8 x i32> %elt.head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
1825 %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)
1826 ret <vscale x 8 x i1> %v
1829 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) {
1830 ; CHECK-LABEL: icmp_eq_vx_swap_nxv8i32:
1832 ; CHECK-NEXT: vsetvli zero, a1, e32, m4, ta, ma
1833 ; CHECK-NEXT: vmseq.vx v12, v8, a0, v0.t
1834 ; CHECK-NEXT: vmv1r.v v0, v12
1836 %elt.head = insertelement <vscale x 8 x i32> poison, i32 %b, i32 0
1837 %vb = shufflevector <vscale x 8 x i32> %elt.head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
1838 %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)
1839 ret <vscale x 8 x i1> %v
1842 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) {
1843 ; CHECK-LABEL: icmp_eq_vi_nxv8i32:
1845 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
1846 ; CHECK-NEXT: vmseq.vi v12, v8, 4, v0.t
1847 ; CHECK-NEXT: vmv1r.v v0, v12
1849 %elt.head = insertelement <vscale x 8 x i32> poison, i32 4, i32 0
1850 %vb = shufflevector <vscale x 8 x i32> %elt.head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
1851 %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)
1852 ret <vscale x 8 x i1> %v
1855 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) {
1856 ; CHECK-LABEL: icmp_eq_vi_swap_nxv8i32:
1858 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
1859 ; CHECK-NEXT: vmseq.vi v12, v8, 4, v0.t
1860 ; CHECK-NEXT: vmv1r.v v0, v12
1862 %elt.head = insertelement <vscale x 8 x i32> poison, i32 4, i32 0
1863 %vb = shufflevector <vscale x 8 x i32> %elt.head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
1864 %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)
1865 ret <vscale x 8 x i1> %v
1868 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) {
1869 ; CHECK-LABEL: icmp_ne_vv_nxv8i32:
1871 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
1872 ; CHECK-NEXT: vmsne.vv v16, v8, v12, v0.t
1873 ; CHECK-NEXT: vmv1r.v v0, v16
1875 %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)
1876 ret <vscale x 8 x i1> %v
1879 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) {
1880 ; CHECK-LABEL: icmp_ne_vx_nxv8i32:
1882 ; CHECK-NEXT: vsetvli zero, a1, e32, m4, ta, ma
1883 ; CHECK-NEXT: vmsne.vx v12, v8, a0, v0.t
1884 ; CHECK-NEXT: vmv1r.v v0, v12
1886 %elt.head = insertelement <vscale x 8 x i32> poison, i32 %b, i32 0
1887 %vb = shufflevector <vscale x 8 x i32> %elt.head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
1888 %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)
1889 ret <vscale x 8 x i1> %v
1892 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) {
1893 ; CHECK-LABEL: icmp_ne_vx_swap_nxv8i32:
1895 ; CHECK-NEXT: vsetvli zero, a1, e32, m4, ta, ma
1896 ; CHECK-NEXT: vmsne.vx v12, v8, a0, v0.t
1897 ; CHECK-NEXT: vmv1r.v v0, v12
1899 %elt.head = insertelement <vscale x 8 x i32> poison, i32 %b, i32 0
1900 %vb = shufflevector <vscale x 8 x i32> %elt.head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
1901 %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)
1902 ret <vscale x 8 x i1> %v
1905 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) {
1906 ; CHECK-LABEL: icmp_ne_vi_nxv8i32:
1908 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
1909 ; CHECK-NEXT: vmsne.vi v12, v8, 4, v0.t
1910 ; CHECK-NEXT: vmv1r.v v0, v12
1912 %elt.head = insertelement <vscale x 8 x i32> poison, i32 4, i32 0
1913 %vb = shufflevector <vscale x 8 x i32> %elt.head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
1914 %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)
1915 ret <vscale x 8 x i1> %v
1918 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) {
1919 ; CHECK-LABEL: icmp_ne_vi_swap_nxv8i32:
1921 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
1922 ; CHECK-NEXT: vmsne.vi v12, v8, 4, v0.t
1923 ; CHECK-NEXT: vmv1r.v v0, v12
1925 %elt.head = insertelement <vscale x 8 x i32> poison, i32 4, i32 0
1926 %vb = shufflevector <vscale x 8 x i32> %elt.head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
1927 %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)
1928 ret <vscale x 8 x i1> %v
1931 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) {
1932 ; CHECK-LABEL: icmp_ugt_vv_nxv8i32:
1934 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
1935 ; CHECK-NEXT: vmsltu.vv v16, v12, v8, v0.t
1936 ; CHECK-NEXT: vmv1r.v v0, v16
1938 %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)
1939 ret <vscale x 8 x i1> %v
1942 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) {
1943 ; CHECK-LABEL: icmp_ugt_vx_nxv8i32:
1945 ; CHECK-NEXT: vsetvli zero, a1, e32, m4, ta, ma
1946 ; CHECK-NEXT: vmsgtu.vx v12, v8, a0, v0.t
1947 ; CHECK-NEXT: vmv1r.v v0, v12
1949 %elt.head = insertelement <vscale x 8 x i32> poison, i32 %b, i32 0
1950 %vb = shufflevector <vscale x 8 x i32> %elt.head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
1951 %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)
1952 ret <vscale x 8 x i1> %v
1955 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) {
1956 ; CHECK-LABEL: icmp_ugt_vx_swap_nxv8i32:
1958 ; CHECK-NEXT: vsetvli zero, a1, e32, m4, ta, ma
1959 ; CHECK-NEXT: vmsltu.vx v12, v8, a0, v0.t
1960 ; CHECK-NEXT: vmv1r.v v0, v12
1962 %elt.head = insertelement <vscale x 8 x i32> poison, i32 %b, i32 0
1963 %vb = shufflevector <vscale x 8 x i32> %elt.head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
1964 %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)
1965 ret <vscale x 8 x i1> %v
1968 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) {
1969 ; CHECK-LABEL: icmp_ugt_vi_nxv8i32:
1971 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
1972 ; CHECK-NEXT: vmsgtu.vi v12, v8, 4, v0.t
1973 ; CHECK-NEXT: vmv1r.v v0, v12
1975 %elt.head = insertelement <vscale x 8 x i32> poison, i32 4, i32 0
1976 %vb = shufflevector <vscale x 8 x i32> %elt.head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
1977 %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)
1978 ret <vscale x 8 x i1> %v
1981 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) {
1982 ; CHECK-LABEL: icmp_ugt_vi_swap_nxv8i32:
1984 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
1985 ; CHECK-NEXT: vmsleu.vi v12, v8, 3, v0.t
1986 ; CHECK-NEXT: vmv1r.v v0, v12
1988 %elt.head = insertelement <vscale x 8 x i32> poison, i32 4, i32 0
1989 %vb = shufflevector <vscale x 8 x i32> %elt.head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
1990 %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)
1991 ret <vscale x 8 x i1> %v
1994 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) {
1995 ; CHECK-LABEL: icmp_uge_vv_nxv8i32:
1997 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
1998 ; CHECK-NEXT: vmsleu.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 !"uge", <vscale x 8 x i1> %m, i32 %evl)
2002 ret <vscale x 8 x i1> %v
2005 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) {
2006 ; CHECK-LABEL: icmp_uge_vx_nxv8i32:
2008 ; CHECK-NEXT: vsetvli a2, zero, e32, m4, ta, ma
2009 ; CHECK-NEXT: vmv.v.x v16, a0
2010 ; CHECK-NEXT: vsetvli zero, a1, e32, m4, ta, ma
2011 ; CHECK-NEXT: vmsleu.vv v12, v16, v8, v0.t
2012 ; CHECK-NEXT: vmv1r.v v0, v12
2014 %elt.head = insertelement <vscale x 8 x i32> poison, i32 %b, i32 0
2015 %vb = shufflevector <vscale x 8 x i32> %elt.head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
2016 %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)
2017 ret <vscale x 8 x i1> %v
2020 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) {
2021 ; CHECK-LABEL: icmp_uge_vx_swap_nxv8i32:
2023 ; CHECK-NEXT: vsetvli zero, a1, e32, m4, ta, ma
2024 ; CHECK-NEXT: vmsleu.vx v12, v8, a0, v0.t
2025 ; CHECK-NEXT: vmv1r.v v0, v12
2027 %elt.head = insertelement <vscale x 8 x i32> poison, i32 %b, i32 0
2028 %vb = shufflevector <vscale x 8 x i32> %elt.head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
2029 %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)
2030 ret <vscale x 8 x i1> %v
2033 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) {
2034 ; CHECK-LABEL: icmp_uge_vi_nxv8i32:
2036 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
2037 ; CHECK-NEXT: vmsgtu.vi v12, v8, 3, v0.t
2038 ; CHECK-NEXT: vmv1r.v v0, v12
2040 %elt.head = insertelement <vscale x 8 x i32> poison, i32 4, i32 0
2041 %vb = shufflevector <vscale x 8 x i32> %elt.head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
2042 %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)
2043 ret <vscale x 8 x i1> %v
2046 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) {
2047 ; CHECK-LABEL: icmp_uge_vi_swap_nxv8i32:
2049 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
2050 ; CHECK-NEXT: vmsleu.vi v12, v8, 4, v0.t
2051 ; CHECK-NEXT: vmv1r.v v0, v12
2053 %elt.head = insertelement <vscale x 8 x i32> poison, i32 4, i32 0
2054 %vb = shufflevector <vscale x 8 x i32> %elt.head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
2055 %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)
2056 ret <vscale x 8 x i1> %v
2059 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) {
2060 ; CHECK-LABEL: icmp_ult_vv_nxv8i32:
2062 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
2063 ; CHECK-NEXT: vmsltu.vv v16, v8, v12, v0.t
2064 ; CHECK-NEXT: vmv1r.v v0, v16
2066 %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)
2067 ret <vscale x 8 x i1> %v
2070 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) {
2071 ; CHECK-LABEL: icmp_ult_vx_nxv8i32:
2073 ; CHECK-NEXT: vsetvli zero, a1, e32, m4, ta, ma
2074 ; CHECK-NEXT: vmsltu.vx v12, v8, a0, v0.t
2075 ; CHECK-NEXT: vmv1r.v v0, v12
2077 %elt.head = insertelement <vscale x 8 x i32> poison, i32 %b, i32 0
2078 %vb = shufflevector <vscale x 8 x i32> %elt.head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
2079 %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)
2080 ret <vscale x 8 x i1> %v
2083 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) {
2084 ; CHECK-LABEL: icmp_ult_vx_swap_nxv8i32:
2086 ; CHECK-NEXT: vsetvli zero, a1, e32, m4, ta, ma
2087 ; CHECK-NEXT: vmsgtu.vx v12, v8, a0, v0.t
2088 ; CHECK-NEXT: vmv1r.v v0, v12
2090 %elt.head = insertelement <vscale x 8 x i32> poison, i32 %b, i32 0
2091 %vb = shufflevector <vscale x 8 x i32> %elt.head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
2092 %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)
2093 ret <vscale x 8 x i1> %v
2096 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) {
2097 ; CHECK-LABEL: icmp_ult_vi_nxv8i32:
2099 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
2100 ; CHECK-NEXT: vmsleu.vi v12, v8, 3, v0.t
2101 ; CHECK-NEXT: vmv1r.v v0, v12
2103 %elt.head = insertelement <vscale x 8 x i32> poison, i32 4, i32 0
2104 %vb = shufflevector <vscale x 8 x i32> %elt.head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
2105 %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)
2106 ret <vscale x 8 x i1> %v
2109 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) {
2110 ; CHECK-LABEL: icmp_ult_vi_swap_nxv8i32:
2112 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
2113 ; CHECK-NEXT: vmsgtu.vi v12, v8, 4, v0.t
2114 ; CHECK-NEXT: vmv1r.v v0, v12
2116 %elt.head = insertelement <vscale x 8 x i32> poison, i32 4, i32 0
2117 %vb = shufflevector <vscale x 8 x i32> %elt.head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
2118 %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)
2119 ret <vscale x 8 x i1> %v
2122 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) {
2123 ; CHECK-LABEL: icmp_sgt_vv_nxv8i32:
2125 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
2126 ; CHECK-NEXT: vmslt.vv v16, v12, v8, v0.t
2127 ; CHECK-NEXT: vmv1r.v v0, v16
2129 %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)
2130 ret <vscale x 8 x i1> %v
2133 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) {
2134 ; CHECK-LABEL: icmp_sgt_vx_nxv8i32:
2136 ; CHECK-NEXT: vsetvli zero, a1, e32, m4, ta, ma
2137 ; CHECK-NEXT: vmsgt.vx v12, v8, a0, v0.t
2138 ; CHECK-NEXT: vmv1r.v v0, v12
2140 %elt.head = insertelement <vscale x 8 x i32> poison, i32 %b, i32 0
2141 %vb = shufflevector <vscale x 8 x i32> %elt.head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
2142 %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)
2143 ret <vscale x 8 x i1> %v
2146 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) {
2147 ; CHECK-LABEL: icmp_sgt_vx_swap_nxv8i32:
2149 ; CHECK-NEXT: vsetvli zero, a1, e32, m4, ta, ma
2150 ; CHECK-NEXT: vmslt.vx v12, v8, a0, v0.t
2151 ; CHECK-NEXT: vmv1r.v v0, v12
2153 %elt.head = insertelement <vscale x 8 x i32> poison, i32 %b, i32 0
2154 %vb = shufflevector <vscale x 8 x i32> %elt.head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
2155 %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)
2156 ret <vscale x 8 x i1> %v
2159 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) {
2160 ; CHECK-LABEL: icmp_sgt_vi_nxv8i32:
2162 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
2163 ; CHECK-NEXT: vmsgt.vi v12, v8, 4, v0.t
2164 ; CHECK-NEXT: vmv1r.v v0, v12
2166 %elt.head = insertelement <vscale x 8 x i32> poison, i32 4, i32 0
2167 %vb = shufflevector <vscale x 8 x i32> %elt.head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
2168 %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)
2169 ret <vscale x 8 x i1> %v
2172 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) {
2173 ; CHECK-LABEL: icmp_sgt_vi_swap_nxv8i32:
2175 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
2176 ; CHECK-NEXT: vmsle.vi v12, v8, 3, v0.t
2177 ; CHECK-NEXT: vmv1r.v v0, v12
2179 %elt.head = insertelement <vscale x 8 x i32> poison, i32 4, i32 0
2180 %vb = shufflevector <vscale x 8 x i32> %elt.head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
2181 %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)
2182 ret <vscale x 8 x i1> %v
2185 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) {
2186 ; CHECK-LABEL: icmp_sge_vv_nxv8i32:
2188 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
2189 ; CHECK-NEXT: vmsle.vv v16, v12, v8, v0.t
2190 ; CHECK-NEXT: vmv1r.v v0, v16
2192 %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)
2193 ret <vscale x 8 x i1> %v
2196 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) {
2197 ; CHECK-LABEL: icmp_sge_vx_nxv8i32:
2199 ; CHECK-NEXT: vsetvli a2, zero, e32, m4, ta, ma
2200 ; CHECK-NEXT: vmv.v.x v16, a0
2201 ; CHECK-NEXT: vsetvli zero, a1, e32, m4, ta, ma
2202 ; CHECK-NEXT: vmsle.vv v12, v16, v8, v0.t
2203 ; CHECK-NEXT: vmv1r.v v0, v12
2205 %elt.head = insertelement <vscale x 8 x i32> poison, i32 %b, i32 0
2206 %vb = shufflevector <vscale x 8 x i32> %elt.head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
2207 %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)
2208 ret <vscale x 8 x i1> %v
2211 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) {
2212 ; CHECK-LABEL: icmp_sge_vx_swap_nxv8i32:
2214 ; CHECK-NEXT: vsetvli zero, a1, e32, m4, ta, ma
2215 ; CHECK-NEXT: vmsle.vx v12, v8, a0, v0.t
2216 ; CHECK-NEXT: vmv1r.v v0, v12
2218 %elt.head = insertelement <vscale x 8 x i32> poison, i32 %b, i32 0
2219 %vb = shufflevector <vscale x 8 x i32> %elt.head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
2220 %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)
2221 ret <vscale x 8 x i1> %v
2224 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) {
2225 ; CHECK-LABEL: icmp_sge_vi_nxv8i32:
2227 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
2228 ; CHECK-NEXT: vmsgt.vi v12, v8, 3, v0.t
2229 ; CHECK-NEXT: vmv1r.v v0, v12
2231 %elt.head = insertelement <vscale x 8 x i32> poison, i32 4, i32 0
2232 %vb = shufflevector <vscale x 8 x i32> %elt.head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
2233 %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)
2234 ret <vscale x 8 x i1> %v
2237 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) {
2238 ; CHECK-LABEL: icmp_sge_vi_swap_nxv8i32:
2240 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
2241 ; CHECK-NEXT: vmsle.vi v12, v8, 4, v0.t
2242 ; CHECK-NEXT: vmv1r.v v0, v12
2244 %elt.head = insertelement <vscale x 8 x i32> poison, i32 4, i32 0
2245 %vb = shufflevector <vscale x 8 x i32> %elt.head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
2246 %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)
2247 ret <vscale x 8 x i1> %v
2250 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) {
2251 ; CHECK-LABEL: icmp_slt_vv_nxv8i32:
2253 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
2254 ; CHECK-NEXT: vmslt.vv v16, v8, v12, v0.t
2255 ; CHECK-NEXT: vmv1r.v v0, v16
2257 %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)
2258 ret <vscale x 8 x i1> %v
2261 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) {
2262 ; CHECK-LABEL: icmp_slt_vx_nxv8i32:
2264 ; CHECK-NEXT: vsetvli zero, a1, e32, m4, ta, ma
2265 ; CHECK-NEXT: vmslt.vx v12, v8, a0, v0.t
2266 ; CHECK-NEXT: vmv1r.v v0, v12
2268 %elt.head = insertelement <vscale x 8 x i32> poison, i32 %b, i32 0
2269 %vb = shufflevector <vscale x 8 x i32> %elt.head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
2270 %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)
2271 ret <vscale x 8 x i1> %v
2274 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) {
2275 ; CHECK-LABEL: icmp_slt_vx_swap_nxv8i32:
2277 ; CHECK-NEXT: vsetvli zero, a1, e32, m4, ta, ma
2278 ; CHECK-NEXT: vmsgt.vx v12, v8, a0, v0.t
2279 ; CHECK-NEXT: vmv1r.v v0, v12
2281 %elt.head = insertelement <vscale x 8 x i32> poison, i32 %b, i32 0
2282 %vb = shufflevector <vscale x 8 x i32> %elt.head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
2283 %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)
2284 ret <vscale x 8 x i1> %v
2287 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) {
2288 ; CHECK-LABEL: icmp_slt_vi_nxv8i32:
2290 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
2291 ; CHECK-NEXT: vmsle.vi v12, v8, 3, v0.t
2292 ; CHECK-NEXT: vmv1r.v v0, v12
2294 %elt.head = insertelement <vscale x 8 x i32> poison, i32 4, i32 0
2295 %vb = shufflevector <vscale x 8 x i32> %elt.head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
2296 %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)
2297 ret <vscale x 8 x i1> %v
2300 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) {
2301 ; CHECK-LABEL: icmp_slt_vi_swap_nxv8i32:
2303 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
2304 ; CHECK-NEXT: vmsgt.vi v12, v8, 4, v0.t
2305 ; CHECK-NEXT: vmv1r.v v0, v12
2307 %elt.head = insertelement <vscale x 8 x i32> poison, i32 4, i32 0
2308 %vb = shufflevector <vscale x 8 x i32> %elt.head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
2309 %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)
2310 ret <vscale x 8 x i1> %v
2313 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) {
2314 ; CHECK-LABEL: icmp_sle_vv_nxv8i32:
2316 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
2317 ; CHECK-NEXT: vmsle.vv v16, v8, v12, v0.t
2318 ; CHECK-NEXT: vmv1r.v v0, v16
2320 %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)
2321 ret <vscale x 8 x i1> %v
2324 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) {
2325 ; CHECK-LABEL: icmp_sle_vx_nxv8i32:
2327 ; CHECK-NEXT: vsetvli zero, a1, e32, m4, ta, ma
2328 ; CHECK-NEXT: vmsle.vx v12, v8, a0, v0.t
2329 ; CHECK-NEXT: vmv1r.v v0, v12
2331 %elt.head = insertelement <vscale x 8 x i32> poison, i32 %b, i32 0
2332 %vb = shufflevector <vscale x 8 x i32> %elt.head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
2333 %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)
2334 ret <vscale x 8 x i1> %v
2337 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) {
2338 ; CHECK-LABEL: icmp_sle_vx_swap_nxv8i32:
2340 ; CHECK-NEXT: vsetvli a2, zero, e32, m4, ta, ma
2341 ; CHECK-NEXT: vmv.v.x v16, a0
2342 ; CHECK-NEXT: vsetvli zero, a1, e32, m4, ta, ma
2343 ; CHECK-NEXT: vmsle.vv v12, v16, v8, v0.t
2344 ; CHECK-NEXT: vmv1r.v v0, v12
2346 %elt.head = insertelement <vscale x 8 x i32> poison, i32 %b, i32 0
2347 %vb = shufflevector <vscale x 8 x i32> %elt.head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
2348 %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)
2349 ret <vscale x 8 x i1> %v
2352 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) {
2353 ; CHECK-LABEL: icmp_sle_vi_nxv8i32:
2355 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
2356 ; CHECK-NEXT: vmsle.vi v12, v8, 4, v0.t
2357 ; CHECK-NEXT: vmv1r.v v0, v12
2359 %elt.head = insertelement <vscale x 8 x i32> poison, i32 4, i32 0
2360 %vb = shufflevector <vscale x 8 x i32> %elt.head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
2361 %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)
2362 ret <vscale x 8 x i1> %v
2365 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) {
2366 ; CHECK-LABEL: icmp_sle_vi_swap_nxv8i32:
2368 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
2369 ; CHECK-NEXT: vmsgt.vi v12, v8, 3, v0.t
2370 ; CHECK-NEXT: vmv1r.v v0, v12
2372 %elt.head = insertelement <vscale x 8 x i32> poison, i32 4, i32 0
2373 %vb = shufflevector <vscale x 8 x i32> %elt.head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
2374 %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)
2375 ret <vscale x 8 x i1> %v
2378 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)
2380 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) {
2381 ; CHECK-LABEL: icmp_eq_vv_nxv32i32:
2383 ; CHECK-NEXT: addi sp, sp, -16
2384 ; CHECK-NEXT: .cfi_def_cfa_offset 16
2385 ; CHECK-NEXT: csrr a1, vlenb
2386 ; CHECK-NEXT: slli a1, a1, 4
2387 ; CHECK-NEXT: sub sp, sp, a1
2388 ; CHECK-NEXT: .cfi_escape 0x0f, 0x0d, 0x72, 0x00, 0x11, 0x10, 0x22, 0x11, 0x10, 0x92, 0xa2, 0x38, 0x00, 0x1e, 0x22 # sp + 16 + 16 * vlenb
2389 ; CHECK-NEXT: vmv1r.v v24, v0
2390 ; CHECK-NEXT: csrr a1, vlenb
2391 ; CHECK-NEXT: slli a1, a1, 3
2392 ; CHECK-NEXT: add a1, sp, a1
2393 ; CHECK-NEXT: addi a1, a1, 16
2394 ; CHECK-NEXT: vs8r.v v8, (a1) # Unknown-size Folded Spill
2395 ; CHECK-NEXT: csrr a1, vlenb
2396 ; CHECK-NEXT: vsetvli a3, zero, e8, mf2, ta, ma
2397 ; CHECK-NEXT: slli a3, a1, 3
2398 ; CHECK-NEXT: add a3, a0, a3
2399 ; CHECK-NEXT: vl8re32.v v8, (a3)
2400 ; CHECK-NEXT: slli a3, a1, 1
2401 ; CHECK-NEXT: sub a4, a2, a3
2402 ; CHECK-NEXT: sltu a5, a2, a4
2403 ; CHECK-NEXT: addi a5, a5, -1
2404 ; CHECK-NEXT: and a4, a5, a4
2405 ; CHECK-NEXT: srli a1, a1, 2
2406 ; CHECK-NEXT: vl8re32.v v0, (a0)
2407 ; CHECK-NEXT: addi a0, sp, 16
2408 ; CHECK-NEXT: vs8r.v v0, (a0) # Unknown-size Folded Spill
2409 ; CHECK-NEXT: vslidedown.vx v0, v24, a1
2410 ; CHECK-NEXT: vsetvli zero, a4, e32, m8, ta, ma
2411 ; CHECK-NEXT: vmseq.vv v1, v16, v8, v0.t
2412 ; CHECK-NEXT: bltu a2, a3, .LBB189_2
2413 ; CHECK-NEXT: # %bb.1:
2414 ; CHECK-NEXT: mv a2, a3
2415 ; CHECK-NEXT: .LBB189_2:
2416 ; CHECK-NEXT: vsetvli zero, a2, e32, m8, ta, ma
2417 ; CHECK-NEXT: vmv1r.v v0, v24
2418 ; CHECK-NEXT: csrr a0, vlenb
2419 ; CHECK-NEXT: slli a0, a0, 3
2420 ; CHECK-NEXT: add a0, sp, a0
2421 ; CHECK-NEXT: addi a0, a0, 16
2422 ; CHECK-NEXT: vl8r.v v8, (a0) # Unknown-size Folded Reload
2423 ; CHECK-NEXT: addi a0, sp, 16
2424 ; CHECK-NEXT: vl8r.v v24, (a0) # Unknown-size Folded Reload
2425 ; CHECK-NEXT: vmseq.vv v16, v8, v24, v0.t
2426 ; CHECK-NEXT: add a0, a1, a1
2427 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, tu, ma
2428 ; CHECK-NEXT: vslideup.vx v16, v1, a1
2429 ; CHECK-NEXT: vmv1r.v v0, v16
2430 ; CHECK-NEXT: csrr a0, vlenb
2431 ; CHECK-NEXT: slli a0, a0, 4
2432 ; CHECK-NEXT: add sp, sp, a0
2433 ; CHECK-NEXT: addi sp, sp, 16
2435 %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)
2436 ret <vscale x 32 x i1> %v
2439 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) {
2440 ; CHECK-LABEL: icmp_eq_vx_nxv32i32:
2442 ; CHECK-NEXT: vmv1r.v v24, v0
2443 ; CHECK-NEXT: csrr a3, vlenb
2444 ; CHECK-NEXT: srli a2, a3, 2
2445 ; CHECK-NEXT: vsetvli a4, zero, e8, mf2, ta, ma
2446 ; CHECK-NEXT: vslidedown.vx v0, v0, a2
2447 ; CHECK-NEXT: slli a3, a3, 1
2448 ; CHECK-NEXT: sub a4, a1, a3
2449 ; CHECK-NEXT: sltu a5, a1, a4
2450 ; CHECK-NEXT: addi a5, a5, -1
2451 ; CHECK-NEXT: and a4, a5, a4
2452 ; CHECK-NEXT: vsetvli zero, a4, e32, m8, ta, ma
2453 ; CHECK-NEXT: vmseq.vx v25, v16, a0, v0.t
2454 ; CHECK-NEXT: bltu a1, a3, .LBB190_2
2455 ; CHECK-NEXT: # %bb.1:
2456 ; CHECK-NEXT: mv a1, a3
2457 ; CHECK-NEXT: .LBB190_2:
2458 ; CHECK-NEXT: vsetvli zero, a1, e32, m8, ta, ma
2459 ; CHECK-NEXT: vmv1r.v v0, v24
2460 ; CHECK-NEXT: vmseq.vx v16, v8, a0, v0.t
2461 ; CHECK-NEXT: add a0, a2, a2
2462 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, tu, ma
2463 ; CHECK-NEXT: vslideup.vx v16, v25, a2
2464 ; CHECK-NEXT: vmv1r.v v0, v16
2466 %elt.head = insertelement <vscale x 32 x i32> poison, i32 %b, i32 0
2467 %vb = shufflevector <vscale x 32 x i32> %elt.head, <vscale x 32 x i32> poison, <vscale x 32 x i32> zeroinitializer
2468 %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)
2469 ret <vscale x 32 x i1> %v
2472 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) {
2473 ; CHECK-LABEL: icmp_eq_vx_swap_nxv32i32:
2475 ; CHECK-NEXT: vmv1r.v v24, v0
2476 ; CHECK-NEXT: csrr a3, vlenb
2477 ; CHECK-NEXT: srli a2, a3, 2
2478 ; CHECK-NEXT: vsetvli a4, zero, e8, mf2, ta, ma
2479 ; CHECK-NEXT: vslidedown.vx v0, v0, a2
2480 ; CHECK-NEXT: slli a3, a3, 1
2481 ; CHECK-NEXT: sub a4, a1, a3
2482 ; CHECK-NEXT: sltu a5, a1, a4
2483 ; CHECK-NEXT: addi a5, a5, -1
2484 ; CHECK-NEXT: and a4, a5, a4
2485 ; CHECK-NEXT: vsetvli zero, a4, e32, m8, ta, ma
2486 ; CHECK-NEXT: vmseq.vx v25, v16, a0, v0.t
2487 ; CHECK-NEXT: bltu a1, a3, .LBB191_2
2488 ; CHECK-NEXT: # %bb.1:
2489 ; CHECK-NEXT: mv a1, a3
2490 ; CHECK-NEXT: .LBB191_2:
2491 ; CHECK-NEXT: vsetvli zero, a1, e32, m8, ta, ma
2492 ; CHECK-NEXT: vmv1r.v v0, v24
2493 ; CHECK-NEXT: vmseq.vx v16, v8, a0, v0.t
2494 ; CHECK-NEXT: add a0, a2, a2
2495 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, tu, ma
2496 ; CHECK-NEXT: vslideup.vx v16, v25, a2
2497 ; CHECK-NEXT: vmv1r.v v0, v16
2499 %elt.head = insertelement <vscale x 32 x i32> poison, i32 %b, i32 0
2500 %vb = shufflevector <vscale x 32 x i32> %elt.head, <vscale x 32 x i32> poison, <vscale x 32 x i32> zeroinitializer
2501 %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)
2502 ret <vscale x 32 x i1> %v
2505 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)
2507 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) {
2508 ; CHECK-LABEL: icmp_eq_vv_nxv1i64:
2510 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
2511 ; CHECK-NEXT: vmseq.vv v0, v8, v9, 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> %vb, metadata !"eq", <vscale x 1 x i1> %m, i32 %evl)
2514 ret <vscale x 1 x i1> %v
2517 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) {
2518 ; RV32-LABEL: icmp_eq_vx_nxv1i64:
2520 ; RV32-NEXT: addi sp, sp, -16
2521 ; RV32-NEXT: .cfi_def_cfa_offset 16
2522 ; RV32-NEXT: sw a1, 12(sp)
2523 ; RV32-NEXT: sw a0, 8(sp)
2524 ; RV32-NEXT: addi a0, sp, 8
2525 ; RV32-NEXT: vsetvli a1, zero, e64, m1, ta, ma
2526 ; RV32-NEXT: vlse64.v v9, (a0), zero
2527 ; RV32-NEXT: vsetvli zero, a2, e64, m1, ta, ma
2528 ; RV32-NEXT: vmseq.vv v0, v8, v9, v0.t
2529 ; RV32-NEXT: addi sp, sp, 16
2532 ; RV64-LABEL: icmp_eq_vx_nxv1i64:
2534 ; RV64-NEXT: vsetvli zero, a1, e64, m1, ta, ma
2535 ; RV64-NEXT: vmseq.vx v0, v8, a0, v0.t
2537 %elt.head = insertelement <vscale x 1 x i64> poison, i64 %b, i32 0
2538 %vb = shufflevector <vscale x 1 x i64> %elt.head, <vscale x 1 x i64> poison, <vscale x 1 x i32> zeroinitializer
2539 %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)
2540 ret <vscale x 1 x i1> %v
2543 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) {
2544 ; RV32-LABEL: icmp_eq_vx_swap_nxv1i64:
2546 ; RV32-NEXT: addi sp, sp, -16
2547 ; RV32-NEXT: .cfi_def_cfa_offset 16
2548 ; RV32-NEXT: sw a1, 12(sp)
2549 ; RV32-NEXT: sw a0, 8(sp)
2550 ; RV32-NEXT: addi a0, sp, 8
2551 ; RV32-NEXT: vsetvli a1, zero, e64, m1, ta, ma
2552 ; RV32-NEXT: vlse64.v v9, (a0), zero
2553 ; RV32-NEXT: vsetvli zero, a2, e64, m1, ta, ma
2554 ; RV32-NEXT: vmseq.vv v0, v9, v8, v0.t
2555 ; RV32-NEXT: addi sp, sp, 16
2558 ; RV64-LABEL: icmp_eq_vx_swap_nxv1i64:
2560 ; RV64-NEXT: vsetvli zero, a1, e64, m1, ta, ma
2561 ; RV64-NEXT: vmseq.vx v0, v8, a0, v0.t
2563 %elt.head = insertelement <vscale x 1 x i64> poison, i64 %b, i32 0
2564 %vb = shufflevector <vscale x 1 x i64> %elt.head, <vscale x 1 x i64> poison, <vscale x 1 x i32> zeroinitializer
2565 %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)
2566 ret <vscale x 1 x i1> %v
2569 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) {
2570 ; CHECK-LABEL: icmp_eq_vi_nxv1i64:
2572 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
2573 ; CHECK-NEXT: vmseq.vi v0, v8, 4, v0.t
2575 %elt.head = insertelement <vscale x 1 x i64> poison, i64 4, i32 0
2576 %vb = shufflevector <vscale x 1 x i64> %elt.head, <vscale x 1 x i64> poison, <vscale x 1 x i32> zeroinitializer
2577 %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)
2578 ret <vscale x 1 x i1> %v
2581 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) {
2582 ; CHECK-LABEL: icmp_eq_vi_swap_nxv1i64:
2584 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
2585 ; CHECK-NEXT: vmseq.vi v0, v8, 4, v0.t
2587 %elt.head = insertelement <vscale x 1 x i64> poison, i64 4, i32 0
2588 %vb = shufflevector <vscale x 1 x i64> %elt.head, <vscale x 1 x i64> poison, <vscale x 1 x i32> zeroinitializer
2589 %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)
2590 ret <vscale x 1 x i1> %v
2593 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) {
2594 ; CHECK-LABEL: icmp_ne_vv_nxv1i64:
2596 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
2597 ; CHECK-NEXT: vmsne.vv v0, v8, v9, v0.t
2599 %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)
2600 ret <vscale x 1 x i1> %v
2603 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) {
2604 ; RV32-LABEL: icmp_ne_vx_nxv1i64:
2606 ; RV32-NEXT: addi sp, sp, -16
2607 ; RV32-NEXT: .cfi_def_cfa_offset 16
2608 ; RV32-NEXT: sw a1, 12(sp)
2609 ; RV32-NEXT: sw a0, 8(sp)
2610 ; RV32-NEXT: addi a0, sp, 8
2611 ; RV32-NEXT: vsetvli a1, zero, e64, m1, ta, ma
2612 ; RV32-NEXT: vlse64.v v9, (a0), zero
2613 ; RV32-NEXT: vsetvli zero, a2, e64, m1, ta, ma
2614 ; RV32-NEXT: vmsne.vv v0, v8, v9, v0.t
2615 ; RV32-NEXT: addi sp, sp, 16
2618 ; RV64-LABEL: icmp_ne_vx_nxv1i64:
2620 ; RV64-NEXT: vsetvli zero, a1, e64, m1, ta, ma
2621 ; RV64-NEXT: vmsne.vx v0, v8, a0, v0.t
2623 %elt.head = insertelement <vscale x 1 x i64> poison, i64 %b, i32 0
2624 %vb = shufflevector <vscale x 1 x i64> %elt.head, <vscale x 1 x i64> poison, <vscale x 1 x i32> zeroinitializer
2625 %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)
2626 ret <vscale x 1 x i1> %v
2629 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) {
2630 ; RV32-LABEL: icmp_ne_vx_swap_nxv1i64:
2632 ; RV32-NEXT: addi sp, sp, -16
2633 ; RV32-NEXT: .cfi_def_cfa_offset 16
2634 ; RV32-NEXT: sw a1, 12(sp)
2635 ; RV32-NEXT: sw a0, 8(sp)
2636 ; RV32-NEXT: addi a0, sp, 8
2637 ; RV32-NEXT: vsetvli a1, zero, e64, m1, ta, ma
2638 ; RV32-NEXT: vlse64.v v9, (a0), zero
2639 ; RV32-NEXT: vsetvli zero, a2, e64, m1, ta, ma
2640 ; RV32-NEXT: vmsne.vv v0, v9, v8, v0.t
2641 ; RV32-NEXT: addi sp, sp, 16
2644 ; RV64-LABEL: icmp_ne_vx_swap_nxv1i64:
2646 ; RV64-NEXT: vsetvli zero, a1, e64, m1, ta, ma
2647 ; RV64-NEXT: vmsne.vx v0, v8, a0, v0.t
2649 %elt.head = insertelement <vscale x 1 x i64> poison, i64 %b, i32 0
2650 %vb = shufflevector <vscale x 1 x i64> %elt.head, <vscale x 1 x i64> poison, <vscale x 1 x i32> zeroinitializer
2651 %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)
2652 ret <vscale x 1 x i1> %v
2655 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) {
2656 ; CHECK-LABEL: icmp_ne_vi_nxv1i64:
2658 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
2659 ; CHECK-NEXT: vmsne.vi v0, v8, 4, v0.t
2661 %elt.head = insertelement <vscale x 1 x i64> poison, i64 4, i32 0
2662 %vb = shufflevector <vscale x 1 x i64> %elt.head, <vscale x 1 x i64> poison, <vscale x 1 x i32> zeroinitializer
2663 %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)
2664 ret <vscale x 1 x i1> %v
2667 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) {
2668 ; CHECK-LABEL: icmp_ne_vi_swap_nxv1i64:
2670 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
2671 ; CHECK-NEXT: vmsne.vi v0, v8, 4, v0.t
2673 %elt.head = insertelement <vscale x 1 x i64> poison, i64 4, i32 0
2674 %vb = shufflevector <vscale x 1 x i64> %elt.head, <vscale x 1 x i64> poison, <vscale x 1 x i32> zeroinitializer
2675 %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)
2676 ret <vscale x 1 x i1> %v
2679 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) {
2680 ; CHECK-LABEL: icmp_ugt_vv_nxv1i64:
2682 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
2683 ; CHECK-NEXT: vmsltu.vv v0, v9, v8, v0.t
2685 %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)
2686 ret <vscale x 1 x i1> %v
2689 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) {
2690 ; RV32-LABEL: icmp_ugt_vx_nxv1i64:
2692 ; RV32-NEXT: addi sp, sp, -16
2693 ; RV32-NEXT: .cfi_def_cfa_offset 16
2694 ; RV32-NEXT: sw a1, 12(sp)
2695 ; RV32-NEXT: sw a0, 8(sp)
2696 ; RV32-NEXT: addi a0, sp, 8
2697 ; RV32-NEXT: vsetvli a1, zero, e64, m1, ta, ma
2698 ; RV32-NEXT: vlse64.v v9, (a0), zero
2699 ; RV32-NEXT: vsetvli zero, a2, e64, m1, ta, ma
2700 ; RV32-NEXT: vmsltu.vv v0, v9, v8, v0.t
2701 ; RV32-NEXT: addi sp, sp, 16
2704 ; RV64-LABEL: icmp_ugt_vx_nxv1i64:
2706 ; RV64-NEXT: vsetvli zero, a1, e64, m1, ta, ma
2707 ; RV64-NEXT: vmsgtu.vx v0, v8, a0, v0.t
2709 %elt.head = insertelement <vscale x 1 x i64> poison, i64 %b, i32 0
2710 %vb = shufflevector <vscale x 1 x i64> %elt.head, <vscale x 1 x i64> poison, <vscale x 1 x i32> zeroinitializer
2711 %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)
2712 ret <vscale x 1 x i1> %v
2715 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) {
2716 ; RV32-LABEL: icmp_ugt_vx_swap_nxv1i64:
2718 ; RV32-NEXT: addi sp, sp, -16
2719 ; RV32-NEXT: .cfi_def_cfa_offset 16
2720 ; RV32-NEXT: sw a1, 12(sp)
2721 ; RV32-NEXT: sw a0, 8(sp)
2722 ; RV32-NEXT: addi a0, sp, 8
2723 ; RV32-NEXT: vsetvli a1, zero, e64, m1, ta, ma
2724 ; RV32-NEXT: vlse64.v v9, (a0), zero
2725 ; RV32-NEXT: vsetvli zero, a2, e64, m1, ta, ma
2726 ; RV32-NEXT: vmsltu.vv v0, v8, v9, v0.t
2727 ; RV32-NEXT: addi sp, sp, 16
2730 ; RV64-LABEL: icmp_ugt_vx_swap_nxv1i64:
2732 ; RV64-NEXT: vsetvli zero, a1, e64, m1, ta, ma
2733 ; RV64-NEXT: vmsltu.vx v0, v8, a0, v0.t
2735 %elt.head = insertelement <vscale x 1 x i64> poison, i64 %b, i32 0
2736 %vb = shufflevector <vscale x 1 x i64> %elt.head, <vscale x 1 x i64> poison, <vscale x 1 x i32> zeroinitializer
2737 %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)
2738 ret <vscale x 1 x i1> %v
2741 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) {
2742 ; CHECK-LABEL: icmp_ugt_vi_nxv1i64:
2744 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
2745 ; CHECK-NEXT: vmsgtu.vi v0, v8, 4, v0.t
2747 %elt.head = insertelement <vscale x 1 x i64> poison, i64 4, i32 0
2748 %vb = shufflevector <vscale x 1 x i64> %elt.head, <vscale x 1 x i64> poison, <vscale x 1 x i32> zeroinitializer
2749 %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)
2750 ret <vscale x 1 x i1> %v
2753 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) {
2754 ; CHECK-LABEL: icmp_ugt_vi_swap_nxv1i64:
2756 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
2757 ; CHECK-NEXT: vmsleu.vi v0, v8, 3, v0.t
2759 %elt.head = insertelement <vscale x 1 x i64> poison, i64 4, i32 0
2760 %vb = shufflevector <vscale x 1 x i64> %elt.head, <vscale x 1 x i64> poison, <vscale x 1 x i32> zeroinitializer
2761 %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)
2762 ret <vscale x 1 x i1> %v
2765 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) {
2766 ; CHECK-LABEL: icmp_uge_vv_nxv1i64:
2768 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
2769 ; CHECK-NEXT: vmsleu.vv v0, v9, v8, v0.t
2771 %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)
2772 ret <vscale x 1 x i1> %v
2775 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) {
2776 ; RV32-LABEL: icmp_uge_vx_nxv1i64:
2778 ; RV32-NEXT: addi sp, sp, -16
2779 ; RV32-NEXT: .cfi_def_cfa_offset 16
2780 ; RV32-NEXT: sw a1, 12(sp)
2781 ; RV32-NEXT: sw a0, 8(sp)
2782 ; RV32-NEXT: addi a0, sp, 8
2783 ; RV32-NEXT: vsetvli a1, zero, e64, m1, ta, ma
2784 ; RV32-NEXT: vlse64.v v9, (a0), zero
2785 ; RV32-NEXT: vsetvli zero, a2, e64, m1, ta, ma
2786 ; RV32-NEXT: vmsleu.vv v0, v9, v8, v0.t
2787 ; RV32-NEXT: addi sp, sp, 16
2790 ; RV64-LABEL: icmp_uge_vx_nxv1i64:
2792 ; RV64-NEXT: vsetvli a2, zero, e64, m1, ta, ma
2793 ; RV64-NEXT: vmv.v.x v9, a0
2794 ; RV64-NEXT: vsetvli zero, a1, e64, m1, ta, ma
2795 ; RV64-NEXT: vmsleu.vv v0, v9, v8, v0.t
2797 %elt.head = insertelement <vscale x 1 x i64> poison, i64 %b, i32 0
2798 %vb = shufflevector <vscale x 1 x i64> %elt.head, <vscale x 1 x i64> poison, <vscale x 1 x i32> zeroinitializer
2799 %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)
2800 ret <vscale x 1 x i1> %v
2803 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) {
2804 ; RV32-LABEL: icmp_uge_vx_swap_nxv1i64:
2806 ; RV32-NEXT: addi sp, sp, -16
2807 ; RV32-NEXT: .cfi_def_cfa_offset 16
2808 ; RV32-NEXT: sw a1, 12(sp)
2809 ; RV32-NEXT: sw a0, 8(sp)
2810 ; RV32-NEXT: addi a0, sp, 8
2811 ; RV32-NEXT: vsetvli a1, zero, e64, m1, ta, ma
2812 ; RV32-NEXT: vlse64.v v9, (a0), zero
2813 ; RV32-NEXT: vsetvli zero, a2, e64, m1, ta, ma
2814 ; RV32-NEXT: vmsleu.vv v0, v8, v9, v0.t
2815 ; RV32-NEXT: addi sp, sp, 16
2818 ; RV64-LABEL: icmp_uge_vx_swap_nxv1i64:
2820 ; RV64-NEXT: vsetvli zero, a1, e64, m1, ta, ma
2821 ; RV64-NEXT: vmsleu.vx v0, v8, a0, v0.t
2823 %elt.head = insertelement <vscale x 1 x i64> poison, i64 %b, i32 0
2824 %vb = shufflevector <vscale x 1 x i64> %elt.head, <vscale x 1 x i64> poison, <vscale x 1 x i32> zeroinitializer
2825 %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)
2826 ret <vscale x 1 x i1> %v
2829 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) {
2830 ; CHECK-LABEL: icmp_uge_vi_nxv1i64:
2832 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
2833 ; CHECK-NEXT: vmsgtu.vi v0, v8, 3, v0.t
2835 %elt.head = insertelement <vscale x 1 x i64> poison, i64 4, i32 0
2836 %vb = shufflevector <vscale x 1 x i64> %elt.head, <vscale x 1 x i64> poison, <vscale x 1 x i32> zeroinitializer
2837 %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)
2838 ret <vscale x 1 x i1> %v
2841 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) {
2842 ; CHECK-LABEL: icmp_uge_vi_swap_nxv1i64:
2844 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
2845 ; CHECK-NEXT: vmsleu.vi v0, v8, 4, v0.t
2847 %elt.head = insertelement <vscale x 1 x i64> poison, i64 4, i32 0
2848 %vb = shufflevector <vscale x 1 x i64> %elt.head, <vscale x 1 x i64> poison, <vscale x 1 x i32> zeroinitializer
2849 %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)
2850 ret <vscale x 1 x i1> %v
2853 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) {
2854 ; CHECK-LABEL: icmp_ult_vv_nxv1i64:
2856 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
2857 ; CHECK-NEXT: vmsltu.vv v0, v8, v9, v0.t
2859 %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)
2860 ret <vscale x 1 x i1> %v
2863 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) {
2864 ; RV32-LABEL: icmp_ult_vx_nxv1i64:
2866 ; RV32-NEXT: addi sp, sp, -16
2867 ; RV32-NEXT: .cfi_def_cfa_offset 16
2868 ; RV32-NEXT: sw a1, 12(sp)
2869 ; RV32-NEXT: sw a0, 8(sp)
2870 ; RV32-NEXT: addi a0, sp, 8
2871 ; RV32-NEXT: vsetvli a1, zero, e64, m1, ta, ma
2872 ; RV32-NEXT: vlse64.v v9, (a0), zero
2873 ; RV32-NEXT: vsetvli zero, a2, e64, m1, ta, ma
2874 ; RV32-NEXT: vmsltu.vv v0, v8, v9, v0.t
2875 ; RV32-NEXT: addi sp, sp, 16
2878 ; RV64-LABEL: icmp_ult_vx_nxv1i64:
2880 ; RV64-NEXT: vsetvli zero, a1, e64, m1, ta, ma
2881 ; RV64-NEXT: vmsltu.vx v0, v8, a0, v0.t
2883 %elt.head = insertelement <vscale x 1 x i64> poison, i64 %b, i32 0
2884 %vb = shufflevector <vscale x 1 x i64> %elt.head, <vscale x 1 x i64> poison, <vscale x 1 x i32> zeroinitializer
2885 %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)
2886 ret <vscale x 1 x i1> %v
2889 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) {
2890 ; RV32-LABEL: icmp_ult_vx_swap_nxv1i64:
2892 ; RV32-NEXT: addi sp, sp, -16
2893 ; RV32-NEXT: .cfi_def_cfa_offset 16
2894 ; RV32-NEXT: sw a1, 12(sp)
2895 ; RV32-NEXT: sw a0, 8(sp)
2896 ; RV32-NEXT: addi a0, sp, 8
2897 ; RV32-NEXT: vsetvli a1, zero, e64, m1, ta, ma
2898 ; RV32-NEXT: vlse64.v v9, (a0), zero
2899 ; RV32-NEXT: vsetvli zero, a2, e64, m1, ta, ma
2900 ; RV32-NEXT: vmsltu.vv v0, v9, v8, v0.t
2901 ; RV32-NEXT: addi sp, sp, 16
2904 ; RV64-LABEL: icmp_ult_vx_swap_nxv1i64:
2906 ; RV64-NEXT: vsetvli zero, a1, e64, m1, ta, ma
2907 ; RV64-NEXT: vmsgtu.vx v0, v8, a0, v0.t
2909 %elt.head = insertelement <vscale x 1 x i64> poison, i64 %b, i32 0
2910 %vb = shufflevector <vscale x 1 x i64> %elt.head, <vscale x 1 x i64> poison, <vscale x 1 x i32> zeroinitializer
2911 %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)
2912 ret <vscale x 1 x i1> %v
2915 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) {
2916 ; CHECK-LABEL: icmp_ult_vi_nxv1i64:
2918 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
2919 ; CHECK-NEXT: vmsleu.vi v0, v8, 3, v0.t
2921 %elt.head = insertelement <vscale x 1 x i64> poison, i64 4, i32 0
2922 %vb = shufflevector <vscale x 1 x i64> %elt.head, <vscale x 1 x i64> poison, <vscale x 1 x i32> zeroinitializer
2923 %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)
2924 ret <vscale x 1 x i1> %v
2927 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) {
2928 ; CHECK-LABEL: icmp_ult_vi_swap_nxv1i64:
2930 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
2931 ; CHECK-NEXT: vmsgtu.vi v0, v8, 4, v0.t
2933 %elt.head = insertelement <vscale x 1 x i64> poison, i64 4, i32 0
2934 %vb = shufflevector <vscale x 1 x i64> %elt.head, <vscale x 1 x i64> poison, <vscale x 1 x i32> zeroinitializer
2935 %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)
2936 ret <vscale x 1 x i1> %v
2939 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) {
2940 ; CHECK-LABEL: icmp_sgt_vv_nxv1i64:
2942 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
2943 ; CHECK-NEXT: vmslt.vv v0, v9, v8, v0.t
2945 %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)
2946 ret <vscale x 1 x i1> %v
2949 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) {
2950 ; RV32-LABEL: icmp_sgt_vx_nxv1i64:
2952 ; RV32-NEXT: addi sp, sp, -16
2953 ; RV32-NEXT: .cfi_def_cfa_offset 16
2954 ; RV32-NEXT: sw a1, 12(sp)
2955 ; RV32-NEXT: sw a0, 8(sp)
2956 ; RV32-NEXT: addi a0, sp, 8
2957 ; RV32-NEXT: vsetvli a1, zero, e64, m1, ta, ma
2958 ; RV32-NEXT: vlse64.v v9, (a0), zero
2959 ; RV32-NEXT: vsetvli zero, a2, e64, m1, ta, ma
2960 ; RV32-NEXT: vmslt.vv v0, v9, v8, v0.t
2961 ; RV32-NEXT: addi sp, sp, 16
2964 ; RV64-LABEL: icmp_sgt_vx_nxv1i64:
2966 ; RV64-NEXT: vsetvli zero, a1, e64, m1, ta, ma
2967 ; RV64-NEXT: vmsgt.vx v0, v8, a0, v0.t
2969 %elt.head = insertelement <vscale x 1 x i64> poison, i64 %b, i32 0
2970 %vb = shufflevector <vscale x 1 x i64> %elt.head, <vscale x 1 x i64> poison, <vscale x 1 x i32> zeroinitializer
2971 %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)
2972 ret <vscale x 1 x i1> %v
2975 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) {
2976 ; RV32-LABEL: icmp_sgt_vx_swap_nxv1i64:
2978 ; RV32-NEXT: addi sp, sp, -16
2979 ; RV32-NEXT: .cfi_def_cfa_offset 16
2980 ; RV32-NEXT: sw a1, 12(sp)
2981 ; RV32-NEXT: sw a0, 8(sp)
2982 ; RV32-NEXT: addi a0, sp, 8
2983 ; RV32-NEXT: vsetvli a1, zero, e64, m1, ta, ma
2984 ; RV32-NEXT: vlse64.v v9, (a0), zero
2985 ; RV32-NEXT: vsetvli zero, a2, e64, m1, ta, ma
2986 ; RV32-NEXT: vmslt.vv v0, v8, v9, v0.t
2987 ; RV32-NEXT: addi sp, sp, 16
2990 ; RV64-LABEL: icmp_sgt_vx_swap_nxv1i64:
2992 ; RV64-NEXT: vsetvli zero, a1, e64, m1, ta, ma
2993 ; RV64-NEXT: vmslt.vx v0, v8, a0, v0.t
2995 %elt.head = insertelement <vscale x 1 x i64> poison, i64 %b, i32 0
2996 %vb = shufflevector <vscale x 1 x i64> %elt.head, <vscale x 1 x i64> poison, <vscale x 1 x i32> zeroinitializer
2997 %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)
2998 ret <vscale x 1 x i1> %v
3001 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) {
3002 ; CHECK-LABEL: icmp_sgt_vi_nxv1i64:
3004 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
3005 ; CHECK-NEXT: vmsgt.vi v0, v8, 4, v0.t
3007 %elt.head = insertelement <vscale x 1 x i64> poison, i64 4, i32 0
3008 %vb = shufflevector <vscale x 1 x i64> %elt.head, <vscale x 1 x i64> poison, <vscale x 1 x i32> zeroinitializer
3009 %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)
3010 ret <vscale x 1 x i1> %v
3013 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) {
3014 ; CHECK-LABEL: icmp_sgt_vi_swap_nxv1i64:
3016 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
3017 ; CHECK-NEXT: vmsle.vi v0, v8, 3, v0.t
3019 %elt.head = insertelement <vscale x 1 x i64> poison, i64 4, i32 0
3020 %vb = shufflevector <vscale x 1 x i64> %elt.head, <vscale x 1 x i64> poison, <vscale x 1 x i32> zeroinitializer
3021 %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)
3022 ret <vscale x 1 x i1> %v
3025 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) {
3026 ; CHECK-LABEL: icmp_sge_vv_nxv1i64:
3028 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
3029 ; CHECK-NEXT: vmsle.vv v0, v9, v8, v0.t
3031 %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)
3032 ret <vscale x 1 x i1> %v
3035 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) {
3036 ; RV32-LABEL: icmp_sge_vx_nxv1i64:
3038 ; RV32-NEXT: addi sp, sp, -16
3039 ; RV32-NEXT: .cfi_def_cfa_offset 16
3040 ; RV32-NEXT: sw a1, 12(sp)
3041 ; RV32-NEXT: sw a0, 8(sp)
3042 ; RV32-NEXT: addi a0, sp, 8
3043 ; RV32-NEXT: vsetvli a1, zero, e64, m1, ta, ma
3044 ; RV32-NEXT: vlse64.v v9, (a0), zero
3045 ; RV32-NEXT: vsetvli zero, a2, e64, m1, ta, ma
3046 ; RV32-NEXT: vmsle.vv v0, v9, v8, v0.t
3047 ; RV32-NEXT: addi sp, sp, 16
3050 ; RV64-LABEL: icmp_sge_vx_nxv1i64:
3052 ; RV64-NEXT: vsetvli a2, zero, e64, m1, ta, ma
3053 ; RV64-NEXT: vmv.v.x v9, a0
3054 ; RV64-NEXT: vsetvli zero, a1, e64, m1, ta, ma
3055 ; RV64-NEXT: vmsle.vv v0, v9, v8, v0.t
3057 %elt.head = insertelement <vscale x 1 x i64> poison, i64 %b, i32 0
3058 %vb = shufflevector <vscale x 1 x i64> %elt.head, <vscale x 1 x i64> poison, <vscale x 1 x i32> zeroinitializer
3059 %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)
3060 ret <vscale x 1 x i1> %v
3063 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) {
3064 ; RV32-LABEL: icmp_sge_vx_swap_nxv1i64:
3066 ; RV32-NEXT: addi sp, sp, -16
3067 ; RV32-NEXT: .cfi_def_cfa_offset 16
3068 ; RV32-NEXT: sw a1, 12(sp)
3069 ; RV32-NEXT: sw a0, 8(sp)
3070 ; RV32-NEXT: addi a0, sp, 8
3071 ; RV32-NEXT: vsetvli a1, zero, e64, m1, ta, ma
3072 ; RV32-NEXT: vlse64.v v9, (a0), zero
3073 ; RV32-NEXT: vsetvli zero, a2, e64, m1, ta, ma
3074 ; RV32-NEXT: vmsle.vv v0, v8, v9, v0.t
3075 ; RV32-NEXT: addi sp, sp, 16
3078 ; RV64-LABEL: icmp_sge_vx_swap_nxv1i64:
3080 ; RV64-NEXT: vsetvli zero, a1, e64, m1, ta, ma
3081 ; RV64-NEXT: vmsle.vx v0, v8, a0, v0.t
3083 %elt.head = insertelement <vscale x 1 x i64> poison, i64 %b, i32 0
3084 %vb = shufflevector <vscale x 1 x i64> %elt.head, <vscale x 1 x i64> poison, <vscale x 1 x i32> zeroinitializer
3085 %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)
3086 ret <vscale x 1 x i1> %v
3089 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) {
3090 ; CHECK-LABEL: icmp_sge_vi_nxv1i64:
3092 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
3093 ; CHECK-NEXT: vmsgt.vi v0, v8, 3, v0.t
3095 %elt.head = insertelement <vscale x 1 x i64> poison, i64 4, i32 0
3096 %vb = shufflevector <vscale x 1 x i64> %elt.head, <vscale x 1 x i64> poison, <vscale x 1 x i32> zeroinitializer
3097 %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)
3098 ret <vscale x 1 x i1> %v
3101 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) {
3102 ; CHECK-LABEL: icmp_sge_vi_swap_nxv1i64:
3104 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
3105 ; CHECK-NEXT: vmsle.vi v0, v8, 4, v0.t
3107 %elt.head = insertelement <vscale x 1 x i64> poison, i64 4, i32 0
3108 %vb = shufflevector <vscale x 1 x i64> %elt.head, <vscale x 1 x i64> poison, <vscale x 1 x i32> zeroinitializer
3109 %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)
3110 ret <vscale x 1 x i1> %v
3113 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) {
3114 ; CHECK-LABEL: icmp_slt_vv_nxv1i64:
3116 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
3117 ; CHECK-NEXT: vmslt.vv v0, v8, v9, v0.t
3119 %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)
3120 ret <vscale x 1 x i1> %v
3123 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) {
3124 ; RV32-LABEL: icmp_slt_vx_nxv1i64:
3126 ; RV32-NEXT: addi sp, sp, -16
3127 ; RV32-NEXT: .cfi_def_cfa_offset 16
3128 ; RV32-NEXT: sw a1, 12(sp)
3129 ; RV32-NEXT: sw a0, 8(sp)
3130 ; RV32-NEXT: addi a0, sp, 8
3131 ; RV32-NEXT: vsetvli a1, zero, e64, m1, ta, ma
3132 ; RV32-NEXT: vlse64.v v9, (a0), zero
3133 ; RV32-NEXT: vsetvli zero, a2, e64, m1, ta, ma
3134 ; RV32-NEXT: vmslt.vv v0, v8, v9, v0.t
3135 ; RV32-NEXT: addi sp, sp, 16
3138 ; RV64-LABEL: icmp_slt_vx_nxv1i64:
3140 ; RV64-NEXT: vsetvli zero, a1, e64, m1, ta, ma
3141 ; RV64-NEXT: vmslt.vx v0, v8, a0, v0.t
3143 %elt.head = insertelement <vscale x 1 x i64> poison, i64 %b, i32 0
3144 %vb = shufflevector <vscale x 1 x i64> %elt.head, <vscale x 1 x i64> poison, <vscale x 1 x i32> zeroinitializer
3145 %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)
3146 ret <vscale x 1 x i1> %v
3149 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) {
3150 ; RV32-LABEL: icmp_slt_vx_swap_nxv1i64:
3152 ; RV32-NEXT: addi sp, sp, -16
3153 ; RV32-NEXT: .cfi_def_cfa_offset 16
3154 ; RV32-NEXT: sw a1, 12(sp)
3155 ; RV32-NEXT: sw a0, 8(sp)
3156 ; RV32-NEXT: addi a0, sp, 8
3157 ; RV32-NEXT: vsetvli a1, zero, e64, m1, ta, ma
3158 ; RV32-NEXT: vlse64.v v9, (a0), zero
3159 ; RV32-NEXT: vsetvli zero, a2, e64, m1, ta, ma
3160 ; RV32-NEXT: vmslt.vv v0, v9, v8, v0.t
3161 ; RV32-NEXT: addi sp, sp, 16
3164 ; RV64-LABEL: icmp_slt_vx_swap_nxv1i64:
3166 ; RV64-NEXT: vsetvli zero, a1, e64, m1, ta, ma
3167 ; RV64-NEXT: vmsgt.vx v0, v8, a0, v0.t
3169 %elt.head = insertelement <vscale x 1 x i64> poison, i64 %b, i32 0
3170 %vb = shufflevector <vscale x 1 x i64> %elt.head, <vscale x 1 x i64> poison, <vscale x 1 x i32> zeroinitializer
3171 %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)
3172 ret <vscale x 1 x i1> %v
3175 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) {
3176 ; CHECK-LABEL: icmp_slt_vi_nxv1i64:
3178 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
3179 ; CHECK-NEXT: vmsle.vi v0, v8, 3, v0.t
3181 %elt.head = insertelement <vscale x 1 x i64> poison, i64 4, i32 0
3182 %vb = shufflevector <vscale x 1 x i64> %elt.head, <vscale x 1 x i64> poison, <vscale x 1 x i32> zeroinitializer
3183 %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)
3184 ret <vscale x 1 x i1> %v
3187 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) {
3188 ; CHECK-LABEL: icmp_slt_vi_swap_nxv1i64:
3190 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
3191 ; CHECK-NEXT: vmsgt.vi v0, v8, 4, v0.t
3193 %elt.head = insertelement <vscale x 1 x i64> poison, i64 4, i32 0
3194 %vb = shufflevector <vscale x 1 x i64> %elt.head, <vscale x 1 x i64> poison, <vscale x 1 x i32> zeroinitializer
3195 %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)
3196 ret <vscale x 1 x i1> %v
3199 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) {
3200 ; CHECK-LABEL: icmp_sle_vv_nxv1i64:
3202 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
3203 ; CHECK-NEXT: vmsle.vv v0, v8, v9, v0.t
3205 %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)
3206 ret <vscale x 1 x i1> %v
3209 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) {
3210 ; RV32-LABEL: icmp_sle_vx_nxv1i64:
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, m1, ta, ma
3218 ; RV32-NEXT: vlse64.v v9, (a0), zero
3219 ; RV32-NEXT: vsetvli zero, a2, e64, m1, ta, ma
3220 ; RV32-NEXT: vmsle.vv v0, v8, v9, v0.t
3221 ; RV32-NEXT: addi sp, sp, 16
3224 ; RV64-LABEL: icmp_sle_vx_nxv1i64:
3226 ; RV64-NEXT: vsetvli zero, a1, e64, m1, ta, ma
3227 ; RV64-NEXT: vmsle.vx v0, v8, a0, v0.t
3229 %elt.head = insertelement <vscale x 1 x i64> poison, i64 %b, i32 0
3230 %vb = shufflevector <vscale x 1 x i64> %elt.head, <vscale x 1 x i64> poison, <vscale x 1 x i32> zeroinitializer
3231 %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)
3232 ret <vscale x 1 x i1> %v
3235 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) {
3236 ; RV32-LABEL: icmp_sle_vx_swap_nxv1i64:
3238 ; RV32-NEXT: addi sp, sp, -16
3239 ; RV32-NEXT: .cfi_def_cfa_offset 16
3240 ; RV32-NEXT: sw a1, 12(sp)
3241 ; RV32-NEXT: sw a0, 8(sp)
3242 ; RV32-NEXT: addi a0, sp, 8
3243 ; RV32-NEXT: vsetvli a1, zero, e64, m1, ta, ma
3244 ; RV32-NEXT: vlse64.v v9, (a0), zero
3245 ; RV32-NEXT: vsetvli zero, a2, e64, m1, ta, ma
3246 ; RV32-NEXT: vmsle.vv v0, v9, v8, v0.t
3247 ; RV32-NEXT: addi sp, sp, 16
3250 ; RV64-LABEL: icmp_sle_vx_swap_nxv1i64:
3252 ; RV64-NEXT: vsetvli a2, zero, e64, m1, ta, ma
3253 ; RV64-NEXT: vmv.v.x v9, a0
3254 ; RV64-NEXT: vsetvli zero, a1, e64, m1, ta, ma
3255 ; RV64-NEXT: vmsle.vv v0, v9, v8, v0.t
3257 %elt.head = insertelement <vscale x 1 x i64> poison, i64 %b, i32 0
3258 %vb = shufflevector <vscale x 1 x i64> %elt.head, <vscale x 1 x i64> poison, <vscale x 1 x i32> zeroinitializer
3259 %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)
3260 ret <vscale x 1 x i1> %v
3263 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) {
3264 ; CHECK-LABEL: icmp_sle_vi_nxv1i64:
3266 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
3267 ; CHECK-NEXT: vmsle.vi v0, v8, 4, v0.t
3269 %elt.head = insertelement <vscale x 1 x i64> poison, i64 4, i32 0
3270 %vb = shufflevector <vscale x 1 x i64> %elt.head, <vscale x 1 x i64> poison, <vscale x 1 x i32> zeroinitializer
3271 %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)
3272 ret <vscale x 1 x i1> %v
3275 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) {
3276 ; CHECK-LABEL: icmp_sle_vi_swap_nxv1i64:
3278 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
3279 ; CHECK-NEXT: vmsgt.vi v0, v8, 3, v0.t
3281 %elt.head = insertelement <vscale x 1 x i64> poison, i64 4, i32 0
3282 %vb = shufflevector <vscale x 1 x i64> %elt.head, <vscale x 1 x i64> poison, <vscale x 1 x i32> zeroinitializer
3283 %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)
3284 ret <vscale x 1 x i1> %v
3287 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)
3289 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) {
3290 ; CHECK-LABEL: icmp_eq_vv_nxv8i64:
3292 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
3293 ; CHECK-NEXT: vmseq.vv v24, v8, v16, v0.t
3294 ; CHECK-NEXT: vmv1r.v v0, v24
3296 %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)
3297 ret <vscale x 8 x i1> %v
3300 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) {
3301 ; RV32-LABEL: icmp_eq_vx_nxv8i64:
3303 ; RV32-NEXT: addi sp, sp, -16
3304 ; RV32-NEXT: .cfi_def_cfa_offset 16
3305 ; RV32-NEXT: sw a1, 12(sp)
3306 ; RV32-NEXT: sw a0, 8(sp)
3307 ; RV32-NEXT: addi a0, sp, 8
3308 ; RV32-NEXT: vsetvli a1, zero, e64, m8, ta, ma
3309 ; RV32-NEXT: vlse64.v v24, (a0), zero
3310 ; RV32-NEXT: vsetvli zero, a2, e64, m8, ta, ma
3311 ; RV32-NEXT: vmseq.vv v16, v8, v24, v0.t
3312 ; RV32-NEXT: vmv1r.v v0, v16
3313 ; RV32-NEXT: addi sp, sp, 16
3316 ; RV64-LABEL: icmp_eq_vx_nxv8i64:
3318 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
3319 ; RV64-NEXT: vmseq.vx v16, v8, a0, v0.t
3320 ; RV64-NEXT: vmv1r.v v0, v16
3322 %elt.head = insertelement <vscale x 8 x i64> poison, i64 %b, i32 0
3323 %vb = shufflevector <vscale x 8 x i64> %elt.head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
3324 %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)
3325 ret <vscale x 8 x i1> %v
3328 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) {
3329 ; RV32-LABEL: icmp_eq_vx_swap_nxv8i64:
3331 ; RV32-NEXT: addi sp, sp, -16
3332 ; RV32-NEXT: .cfi_def_cfa_offset 16
3333 ; RV32-NEXT: sw a1, 12(sp)
3334 ; RV32-NEXT: sw a0, 8(sp)
3335 ; RV32-NEXT: addi a0, sp, 8
3336 ; RV32-NEXT: vsetvli a1, zero, e64, m8, ta, ma
3337 ; RV32-NEXT: vlse64.v v24, (a0), zero
3338 ; RV32-NEXT: vsetvli zero, a2, e64, m8, ta, ma
3339 ; RV32-NEXT: vmseq.vv v16, v24, v8, v0.t
3340 ; RV32-NEXT: vmv1r.v v0, v16
3341 ; RV32-NEXT: addi sp, sp, 16
3344 ; RV64-LABEL: icmp_eq_vx_swap_nxv8i64:
3346 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
3347 ; RV64-NEXT: vmseq.vx v16, v8, a0, v0.t
3348 ; RV64-NEXT: vmv1r.v v0, v16
3350 %elt.head = insertelement <vscale x 8 x i64> poison, i64 %b, i32 0
3351 %vb = shufflevector <vscale x 8 x i64> %elt.head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
3352 %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)
3353 ret <vscale x 8 x i1> %v
3356 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) {
3357 ; CHECK-LABEL: icmp_eq_vi_nxv8i64:
3359 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
3360 ; CHECK-NEXT: vmseq.vi v16, v8, 4, v0.t
3361 ; CHECK-NEXT: vmv1r.v v0, v16
3363 %elt.head = insertelement <vscale x 8 x i64> poison, i64 4, i32 0
3364 %vb = shufflevector <vscale x 8 x i64> %elt.head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
3365 %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)
3366 ret <vscale x 8 x i1> %v
3369 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) {
3370 ; CHECK-LABEL: icmp_eq_vi_swap_nxv8i64:
3372 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
3373 ; CHECK-NEXT: vmseq.vi v16, v8, 4, v0.t
3374 ; CHECK-NEXT: vmv1r.v v0, v16
3376 %elt.head = insertelement <vscale x 8 x i64> poison, i64 4, i32 0
3377 %vb = shufflevector <vscale x 8 x i64> %elt.head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
3378 %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)
3379 ret <vscale x 8 x i1> %v
3382 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) {
3383 ; CHECK-LABEL: icmp_ne_vv_nxv8i64:
3385 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
3386 ; CHECK-NEXT: vmsne.vv v24, v8, v16, v0.t
3387 ; CHECK-NEXT: vmv1r.v v0, v24
3389 %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)
3390 ret <vscale x 8 x i1> %v
3393 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) {
3394 ; RV32-LABEL: icmp_ne_vx_nxv8i64:
3396 ; RV32-NEXT: addi sp, sp, -16
3397 ; RV32-NEXT: .cfi_def_cfa_offset 16
3398 ; RV32-NEXT: sw a1, 12(sp)
3399 ; RV32-NEXT: sw a0, 8(sp)
3400 ; RV32-NEXT: addi a0, sp, 8
3401 ; RV32-NEXT: vsetvli a1, zero, e64, m8, ta, ma
3402 ; RV32-NEXT: vlse64.v v24, (a0), zero
3403 ; RV32-NEXT: vsetvli zero, a2, e64, m8, ta, ma
3404 ; RV32-NEXT: vmsne.vv v16, v8, v24, v0.t
3405 ; RV32-NEXT: vmv1r.v v0, v16
3406 ; RV32-NEXT: addi sp, sp, 16
3409 ; RV64-LABEL: icmp_ne_vx_nxv8i64:
3411 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
3412 ; RV64-NEXT: vmsne.vx v16, v8, a0, v0.t
3413 ; RV64-NEXT: vmv1r.v v0, v16
3415 %elt.head = insertelement <vscale x 8 x i64> poison, i64 %b, i32 0
3416 %vb = shufflevector <vscale x 8 x i64> %elt.head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
3417 %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)
3418 ret <vscale x 8 x i1> %v
3421 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) {
3422 ; RV32-LABEL: icmp_ne_vx_swap_nxv8i64:
3424 ; RV32-NEXT: addi sp, sp, -16
3425 ; RV32-NEXT: .cfi_def_cfa_offset 16
3426 ; RV32-NEXT: sw a1, 12(sp)
3427 ; RV32-NEXT: sw a0, 8(sp)
3428 ; RV32-NEXT: addi a0, sp, 8
3429 ; RV32-NEXT: vsetvli a1, zero, e64, m8, ta, ma
3430 ; RV32-NEXT: vlse64.v v24, (a0), zero
3431 ; RV32-NEXT: vsetvli zero, a2, e64, m8, ta, ma
3432 ; RV32-NEXT: vmsne.vv v16, v24, v8, v0.t
3433 ; RV32-NEXT: vmv1r.v v0, v16
3434 ; RV32-NEXT: addi sp, sp, 16
3437 ; RV64-LABEL: icmp_ne_vx_swap_nxv8i64:
3439 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
3440 ; RV64-NEXT: vmsne.vx v16, v8, a0, v0.t
3441 ; RV64-NEXT: vmv1r.v v0, v16
3443 %elt.head = insertelement <vscale x 8 x i64> poison, i64 %b, i32 0
3444 %vb = shufflevector <vscale x 8 x i64> %elt.head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
3445 %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)
3446 ret <vscale x 8 x i1> %v
3449 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) {
3450 ; CHECK-LABEL: icmp_ne_vi_nxv8i64:
3452 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
3453 ; CHECK-NEXT: vmsne.vi v16, v8, 4, v0.t
3454 ; CHECK-NEXT: vmv1r.v v0, v16
3456 %elt.head = insertelement <vscale x 8 x i64> poison, i64 4, i32 0
3457 %vb = shufflevector <vscale x 8 x i64> %elt.head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
3458 %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)
3459 ret <vscale x 8 x i1> %v
3462 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) {
3463 ; CHECK-LABEL: icmp_ne_vi_swap_nxv8i64:
3465 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
3466 ; CHECK-NEXT: vmsne.vi v16, v8, 4, v0.t
3467 ; CHECK-NEXT: vmv1r.v v0, v16
3469 %elt.head = insertelement <vscale x 8 x i64> poison, i64 4, i32 0
3470 %vb = shufflevector <vscale x 8 x i64> %elt.head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
3471 %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)
3472 ret <vscale x 8 x i1> %v
3475 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) {
3476 ; CHECK-LABEL: icmp_ugt_vv_nxv8i64:
3478 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
3479 ; CHECK-NEXT: vmsltu.vv v24, v16, v8, v0.t
3480 ; CHECK-NEXT: vmv1r.v v0, v24
3482 %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)
3483 ret <vscale x 8 x i1> %v
3486 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) {
3487 ; RV32-LABEL: icmp_ugt_vx_nxv8i64:
3489 ; RV32-NEXT: addi sp, sp, -16
3490 ; RV32-NEXT: .cfi_def_cfa_offset 16
3491 ; RV32-NEXT: sw a1, 12(sp)
3492 ; RV32-NEXT: sw a0, 8(sp)
3493 ; RV32-NEXT: addi a0, sp, 8
3494 ; RV32-NEXT: vsetvli a1, zero, e64, m8, ta, ma
3495 ; RV32-NEXT: vlse64.v v24, (a0), zero
3496 ; RV32-NEXT: vsetvli zero, a2, e64, m8, ta, ma
3497 ; RV32-NEXT: vmsltu.vv v16, v24, v8, v0.t
3498 ; RV32-NEXT: vmv1r.v v0, v16
3499 ; RV32-NEXT: addi sp, sp, 16
3502 ; RV64-LABEL: icmp_ugt_vx_nxv8i64:
3504 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
3505 ; RV64-NEXT: vmsgtu.vx v16, v8, a0, v0.t
3506 ; RV64-NEXT: vmv1r.v v0, v16
3508 %elt.head = insertelement <vscale x 8 x i64> poison, i64 %b, i32 0
3509 %vb = shufflevector <vscale x 8 x i64> %elt.head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
3510 %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)
3511 ret <vscale x 8 x i1> %v
3514 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) {
3515 ; RV32-LABEL: icmp_ugt_vx_swap_nxv8i64:
3517 ; RV32-NEXT: addi sp, sp, -16
3518 ; RV32-NEXT: .cfi_def_cfa_offset 16
3519 ; RV32-NEXT: sw a1, 12(sp)
3520 ; RV32-NEXT: sw a0, 8(sp)
3521 ; RV32-NEXT: addi a0, sp, 8
3522 ; RV32-NEXT: vsetvli a1, zero, e64, m8, ta, ma
3523 ; RV32-NEXT: vlse64.v v24, (a0), zero
3524 ; RV32-NEXT: vsetvli zero, a2, e64, m8, ta, ma
3525 ; RV32-NEXT: vmsltu.vv v16, v8, v24, v0.t
3526 ; RV32-NEXT: vmv1r.v v0, v16
3527 ; RV32-NEXT: addi sp, sp, 16
3530 ; RV64-LABEL: icmp_ugt_vx_swap_nxv8i64:
3532 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
3533 ; RV64-NEXT: vmsltu.vx v16, v8, a0, v0.t
3534 ; RV64-NEXT: vmv1r.v v0, v16
3536 %elt.head = insertelement <vscale x 8 x i64> poison, i64 %b, i32 0
3537 %vb = shufflevector <vscale x 8 x i64> %elt.head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
3538 %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)
3539 ret <vscale x 8 x i1> %v
3542 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) {
3543 ; CHECK-LABEL: icmp_ugt_vi_nxv8i64:
3545 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
3546 ; CHECK-NEXT: vmsgtu.vi v16, v8, 4, v0.t
3547 ; CHECK-NEXT: vmv1r.v v0, v16
3549 %elt.head = insertelement <vscale x 8 x i64> poison, i64 4, i32 0
3550 %vb = shufflevector <vscale x 8 x i64> %elt.head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
3551 %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)
3552 ret <vscale x 8 x i1> %v
3555 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) {
3556 ; CHECK-LABEL: icmp_ugt_vi_swap_nxv8i64:
3558 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
3559 ; CHECK-NEXT: vmsleu.vi v16, v8, 3, v0.t
3560 ; CHECK-NEXT: vmv1r.v v0, v16
3562 %elt.head = insertelement <vscale x 8 x i64> poison, i64 4, i32 0
3563 %vb = shufflevector <vscale x 8 x i64> %elt.head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
3564 %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)
3565 ret <vscale x 8 x i1> %v
3568 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) {
3569 ; CHECK-LABEL: icmp_uge_vv_nxv8i64:
3571 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
3572 ; CHECK-NEXT: vmsleu.vv v24, v16, v8, v0.t
3573 ; CHECK-NEXT: vmv1r.v v0, v24
3575 %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)
3576 ret <vscale x 8 x i1> %v
3579 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) {
3580 ; RV32-LABEL: icmp_uge_vx_nxv8i64:
3582 ; RV32-NEXT: addi sp, sp, -16
3583 ; RV32-NEXT: .cfi_def_cfa_offset 16
3584 ; RV32-NEXT: sw a1, 12(sp)
3585 ; RV32-NEXT: sw a0, 8(sp)
3586 ; RV32-NEXT: addi a0, sp, 8
3587 ; RV32-NEXT: vsetvli a1, zero, e64, m8, ta, ma
3588 ; RV32-NEXT: vlse64.v v24, (a0), zero
3589 ; RV32-NEXT: vsetvli zero, a2, e64, m8, ta, ma
3590 ; RV32-NEXT: vmsleu.vv v16, v24, v8, v0.t
3591 ; RV32-NEXT: vmv1r.v v0, v16
3592 ; RV32-NEXT: addi sp, sp, 16
3595 ; RV64-LABEL: icmp_uge_vx_nxv8i64:
3597 ; RV64-NEXT: vsetvli a2, zero, e64, m8, ta, ma
3598 ; RV64-NEXT: vmv.v.x v24, a0
3599 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
3600 ; RV64-NEXT: vmsleu.vv v16, v24, v8, v0.t
3601 ; RV64-NEXT: vmv1r.v v0, v16
3603 %elt.head = insertelement <vscale x 8 x i64> poison, i64 %b, i32 0
3604 %vb = shufflevector <vscale x 8 x i64> %elt.head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
3605 %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)
3606 ret <vscale x 8 x i1> %v
3609 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) {
3610 ; RV32-LABEL: icmp_uge_vx_swap_nxv8i64:
3612 ; RV32-NEXT: addi sp, sp, -16
3613 ; RV32-NEXT: .cfi_def_cfa_offset 16
3614 ; RV32-NEXT: sw a1, 12(sp)
3615 ; RV32-NEXT: sw a0, 8(sp)
3616 ; RV32-NEXT: addi a0, sp, 8
3617 ; RV32-NEXT: vsetvli a1, zero, e64, m8, ta, ma
3618 ; RV32-NEXT: vlse64.v v24, (a0), zero
3619 ; RV32-NEXT: vsetvli zero, a2, e64, m8, ta, ma
3620 ; RV32-NEXT: vmsleu.vv v16, v8, v24, v0.t
3621 ; RV32-NEXT: vmv1r.v v0, v16
3622 ; RV32-NEXT: addi sp, sp, 16
3625 ; RV64-LABEL: icmp_uge_vx_swap_nxv8i64:
3627 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
3628 ; RV64-NEXT: vmsleu.vx v16, v8, a0, v0.t
3629 ; RV64-NEXT: vmv1r.v v0, v16
3631 %elt.head = insertelement <vscale x 8 x i64> poison, i64 %b, i32 0
3632 %vb = shufflevector <vscale x 8 x i64> %elt.head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
3633 %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)
3634 ret <vscale x 8 x i1> %v
3637 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) {
3638 ; CHECK-LABEL: icmp_uge_vi_nxv8i64:
3640 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
3641 ; CHECK-NEXT: vmsgtu.vi v16, v8, 3, v0.t
3642 ; CHECK-NEXT: vmv1r.v v0, v16
3644 %elt.head = insertelement <vscale x 8 x i64> poison, i64 4, i32 0
3645 %vb = shufflevector <vscale x 8 x i64> %elt.head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
3646 %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)
3647 ret <vscale x 8 x i1> %v
3650 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) {
3651 ; CHECK-LABEL: icmp_uge_vi_swap_nxv8i64:
3653 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
3654 ; CHECK-NEXT: vmsleu.vi v16, v8, 4, v0.t
3655 ; CHECK-NEXT: vmv1r.v v0, v16
3657 %elt.head = insertelement <vscale x 8 x i64> poison, i64 4, i32 0
3658 %vb = shufflevector <vscale x 8 x i64> %elt.head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
3659 %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)
3660 ret <vscale x 8 x i1> %v
3663 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) {
3664 ; CHECK-LABEL: icmp_ult_vv_nxv8i64:
3666 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
3667 ; CHECK-NEXT: vmsltu.vv v24, v8, v16, v0.t
3668 ; CHECK-NEXT: vmv1r.v v0, v24
3670 %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)
3671 ret <vscale x 8 x i1> %v
3674 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) {
3675 ; RV32-LABEL: icmp_ult_vx_nxv8i64:
3677 ; RV32-NEXT: addi sp, sp, -16
3678 ; RV32-NEXT: .cfi_def_cfa_offset 16
3679 ; RV32-NEXT: sw a1, 12(sp)
3680 ; RV32-NEXT: sw a0, 8(sp)
3681 ; RV32-NEXT: addi a0, sp, 8
3682 ; RV32-NEXT: vsetvli a1, zero, e64, m8, ta, ma
3683 ; RV32-NEXT: vlse64.v v24, (a0), zero
3684 ; RV32-NEXT: vsetvli zero, a2, e64, m8, ta, ma
3685 ; RV32-NEXT: vmsltu.vv v16, v8, v24, v0.t
3686 ; RV32-NEXT: vmv1r.v v0, v16
3687 ; RV32-NEXT: addi sp, sp, 16
3690 ; RV64-LABEL: icmp_ult_vx_nxv8i64:
3692 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
3693 ; RV64-NEXT: vmsltu.vx v16, v8, a0, v0.t
3694 ; RV64-NEXT: vmv1r.v v0, v16
3696 %elt.head = insertelement <vscale x 8 x i64> poison, i64 %b, i32 0
3697 %vb = shufflevector <vscale x 8 x i64> %elt.head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
3698 %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)
3699 ret <vscale x 8 x i1> %v
3702 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) {
3703 ; RV32-LABEL: icmp_ult_vx_swap_nxv8i64:
3705 ; RV32-NEXT: addi sp, sp, -16
3706 ; RV32-NEXT: .cfi_def_cfa_offset 16
3707 ; RV32-NEXT: sw a1, 12(sp)
3708 ; RV32-NEXT: sw a0, 8(sp)
3709 ; RV32-NEXT: addi a0, sp, 8
3710 ; RV32-NEXT: vsetvli a1, zero, e64, m8, ta, ma
3711 ; RV32-NEXT: vlse64.v v24, (a0), zero
3712 ; RV32-NEXT: vsetvli zero, a2, e64, m8, ta, ma
3713 ; RV32-NEXT: vmsltu.vv v16, v24, v8, v0.t
3714 ; RV32-NEXT: vmv1r.v v0, v16
3715 ; RV32-NEXT: addi sp, sp, 16
3718 ; RV64-LABEL: icmp_ult_vx_swap_nxv8i64:
3720 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
3721 ; RV64-NEXT: vmsgtu.vx v16, v8, a0, v0.t
3722 ; RV64-NEXT: vmv1r.v v0, v16
3724 %elt.head = insertelement <vscale x 8 x i64> poison, i64 %b, i32 0
3725 %vb = shufflevector <vscale x 8 x i64> %elt.head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
3726 %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)
3727 ret <vscale x 8 x i1> %v
3730 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) {
3731 ; CHECK-LABEL: icmp_ult_vi_nxv8i64:
3733 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
3734 ; CHECK-NEXT: vmsleu.vi v16, v8, 3, v0.t
3735 ; CHECK-NEXT: vmv1r.v v0, v16
3737 %elt.head = insertelement <vscale x 8 x i64> poison, i64 4, i32 0
3738 %vb = shufflevector <vscale x 8 x i64> %elt.head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
3739 %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)
3740 ret <vscale x 8 x i1> %v
3743 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) {
3744 ; CHECK-LABEL: icmp_ult_vi_swap_nxv8i64:
3746 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
3747 ; CHECK-NEXT: vmsgtu.vi v16, v8, 4, v0.t
3748 ; CHECK-NEXT: vmv1r.v v0, v16
3750 %elt.head = insertelement <vscale x 8 x i64> poison, i64 4, i32 0
3751 %vb = shufflevector <vscale x 8 x i64> %elt.head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
3752 %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)
3753 ret <vscale x 8 x i1> %v
3756 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) {
3757 ; CHECK-LABEL: icmp_sgt_vv_nxv8i64:
3759 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
3760 ; CHECK-NEXT: vmslt.vv v24, v16, v8, v0.t
3761 ; CHECK-NEXT: vmv1r.v v0, v24
3763 %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)
3764 ret <vscale x 8 x i1> %v
3767 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) {
3768 ; RV32-LABEL: icmp_sgt_vx_nxv8i64:
3770 ; RV32-NEXT: addi sp, sp, -16
3771 ; RV32-NEXT: .cfi_def_cfa_offset 16
3772 ; RV32-NEXT: sw a1, 12(sp)
3773 ; RV32-NEXT: sw a0, 8(sp)
3774 ; RV32-NEXT: addi a0, sp, 8
3775 ; RV32-NEXT: vsetvli a1, zero, e64, m8, ta, ma
3776 ; RV32-NEXT: vlse64.v v24, (a0), zero
3777 ; RV32-NEXT: vsetvli zero, a2, e64, m8, ta, ma
3778 ; RV32-NEXT: vmslt.vv v16, v24, v8, v0.t
3779 ; RV32-NEXT: vmv1r.v v0, v16
3780 ; RV32-NEXT: addi sp, sp, 16
3783 ; RV64-LABEL: icmp_sgt_vx_nxv8i64:
3785 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
3786 ; RV64-NEXT: vmsgt.vx v16, v8, a0, v0.t
3787 ; RV64-NEXT: vmv1r.v v0, v16
3789 %elt.head = insertelement <vscale x 8 x i64> poison, i64 %b, i32 0
3790 %vb = shufflevector <vscale x 8 x i64> %elt.head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
3791 %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)
3792 ret <vscale x 8 x i1> %v
3795 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) {
3796 ; RV32-LABEL: icmp_sgt_vx_swap_nxv8i64:
3798 ; RV32-NEXT: addi sp, sp, -16
3799 ; RV32-NEXT: .cfi_def_cfa_offset 16
3800 ; RV32-NEXT: sw a1, 12(sp)
3801 ; RV32-NEXT: sw a0, 8(sp)
3802 ; RV32-NEXT: addi a0, sp, 8
3803 ; RV32-NEXT: vsetvli a1, zero, e64, m8, ta, ma
3804 ; RV32-NEXT: vlse64.v v24, (a0), zero
3805 ; RV32-NEXT: vsetvli zero, a2, e64, m8, ta, ma
3806 ; RV32-NEXT: vmslt.vv v16, v8, v24, v0.t
3807 ; RV32-NEXT: vmv1r.v v0, v16
3808 ; RV32-NEXT: addi sp, sp, 16
3811 ; RV64-LABEL: icmp_sgt_vx_swap_nxv8i64:
3813 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
3814 ; RV64-NEXT: vmslt.vx v16, v8, a0, v0.t
3815 ; RV64-NEXT: vmv1r.v v0, v16
3817 %elt.head = insertelement <vscale x 8 x i64> poison, i64 %b, i32 0
3818 %vb = shufflevector <vscale x 8 x i64> %elt.head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
3819 %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)
3820 ret <vscale x 8 x i1> %v
3823 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) {
3824 ; CHECK-LABEL: icmp_sgt_vi_nxv8i64:
3826 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
3827 ; CHECK-NEXT: vmsgt.vi v16, v8, 4, v0.t
3828 ; CHECK-NEXT: vmv1r.v v0, v16
3830 %elt.head = insertelement <vscale x 8 x i64> poison, i64 4, i32 0
3831 %vb = shufflevector <vscale x 8 x i64> %elt.head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
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 !"sgt", <vscale x 8 x i1> %m, i32 %evl)
3833 ret <vscale x 8 x i1> %v
3836 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) {
3837 ; CHECK-LABEL: icmp_sgt_vi_swap_nxv8i64:
3839 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
3840 ; CHECK-NEXT: vmsle.vi v16, v8, 3, v0.t
3841 ; CHECK-NEXT: vmv1r.v v0, v16
3843 %elt.head = insertelement <vscale x 8 x i64> poison, i64 4, i32 0
3844 %vb = shufflevector <vscale x 8 x i64> %elt.head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
3845 %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)
3846 ret <vscale x 8 x i1> %v
3849 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) {
3850 ; CHECK-LABEL: icmp_sge_vv_nxv8i64:
3852 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
3853 ; CHECK-NEXT: vmsle.vv v24, v16, v8, v0.t
3854 ; CHECK-NEXT: vmv1r.v v0, v24
3856 %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)
3857 ret <vscale x 8 x i1> %v
3860 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) {
3861 ; RV32-LABEL: icmp_sge_vx_nxv8i64:
3863 ; RV32-NEXT: addi sp, sp, -16
3864 ; RV32-NEXT: .cfi_def_cfa_offset 16
3865 ; RV32-NEXT: sw a1, 12(sp)
3866 ; RV32-NEXT: sw a0, 8(sp)
3867 ; RV32-NEXT: addi a0, sp, 8
3868 ; RV32-NEXT: vsetvli a1, zero, e64, m8, ta, ma
3869 ; RV32-NEXT: vlse64.v v24, (a0), zero
3870 ; RV32-NEXT: vsetvli zero, a2, e64, m8, ta, ma
3871 ; RV32-NEXT: vmsle.vv v16, v24, v8, v0.t
3872 ; RV32-NEXT: vmv1r.v v0, v16
3873 ; RV32-NEXT: addi sp, sp, 16
3876 ; RV64-LABEL: icmp_sge_vx_nxv8i64:
3878 ; RV64-NEXT: vsetvli a2, zero, e64, m8, ta, ma
3879 ; RV64-NEXT: vmv.v.x v24, a0
3880 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
3881 ; RV64-NEXT: vmsle.vv v16, v24, v8, v0.t
3882 ; RV64-NEXT: vmv1r.v v0, v16
3884 %elt.head = insertelement <vscale x 8 x i64> poison, i64 %b, i32 0
3885 %vb = shufflevector <vscale x 8 x i64> %elt.head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
3886 %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)
3887 ret <vscale x 8 x i1> %v
3890 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) {
3891 ; RV32-LABEL: icmp_sge_vx_swap_nxv8i64:
3893 ; RV32-NEXT: addi sp, sp, -16
3894 ; RV32-NEXT: .cfi_def_cfa_offset 16
3895 ; RV32-NEXT: sw a1, 12(sp)
3896 ; RV32-NEXT: sw a0, 8(sp)
3897 ; RV32-NEXT: addi a0, sp, 8
3898 ; RV32-NEXT: vsetvli a1, zero, e64, m8, ta, ma
3899 ; RV32-NEXT: vlse64.v v24, (a0), zero
3900 ; RV32-NEXT: vsetvli zero, a2, e64, m8, ta, ma
3901 ; RV32-NEXT: vmsle.vv v16, v8, v24, v0.t
3902 ; RV32-NEXT: vmv1r.v v0, v16
3903 ; RV32-NEXT: addi sp, sp, 16
3906 ; RV64-LABEL: icmp_sge_vx_swap_nxv8i64:
3908 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
3909 ; RV64-NEXT: vmsle.vx v16, v8, a0, v0.t
3910 ; RV64-NEXT: vmv1r.v v0, v16
3912 %elt.head = insertelement <vscale x 8 x i64> poison, i64 %b, i32 0
3913 %vb = shufflevector <vscale x 8 x i64> %elt.head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
3914 %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)
3915 ret <vscale x 8 x i1> %v
3918 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) {
3919 ; CHECK-LABEL: icmp_sge_vi_nxv8i64:
3921 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
3922 ; CHECK-NEXT: vmsgt.vi v16, v8, 3, v0.t
3923 ; CHECK-NEXT: vmv1r.v v0, v16
3925 %elt.head = insertelement <vscale x 8 x i64> poison, i64 4, i32 0
3926 %vb = shufflevector <vscale x 8 x i64> %elt.head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
3927 %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)
3928 ret <vscale x 8 x i1> %v
3931 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) {
3932 ; CHECK-LABEL: icmp_sge_vi_swap_nxv8i64:
3934 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
3935 ; CHECK-NEXT: vmsle.vi v16, v8, 4, v0.t
3936 ; CHECK-NEXT: vmv1r.v v0, v16
3938 %elt.head = insertelement <vscale x 8 x i64> poison, i64 4, i32 0
3939 %vb = shufflevector <vscale x 8 x i64> %elt.head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
3940 %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)
3941 ret <vscale x 8 x i1> %v
3944 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) {
3945 ; CHECK-LABEL: icmp_slt_vv_nxv8i64:
3947 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
3948 ; CHECK-NEXT: vmslt.vv v24, v8, v16, v0.t
3949 ; CHECK-NEXT: vmv1r.v v0, v24
3951 %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)
3952 ret <vscale x 8 x i1> %v
3955 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) {
3956 ; RV32-LABEL: icmp_slt_vx_nxv8i64:
3958 ; RV32-NEXT: addi sp, sp, -16
3959 ; RV32-NEXT: .cfi_def_cfa_offset 16
3960 ; RV32-NEXT: sw a1, 12(sp)
3961 ; RV32-NEXT: sw a0, 8(sp)
3962 ; RV32-NEXT: addi a0, sp, 8
3963 ; RV32-NEXT: vsetvli a1, zero, e64, m8, ta, ma
3964 ; RV32-NEXT: vlse64.v v24, (a0), zero
3965 ; RV32-NEXT: vsetvli zero, a2, e64, m8, ta, ma
3966 ; RV32-NEXT: vmslt.vv v16, v8, v24, v0.t
3967 ; RV32-NEXT: vmv1r.v v0, v16
3968 ; RV32-NEXT: addi sp, sp, 16
3971 ; RV64-LABEL: icmp_slt_vx_nxv8i64:
3973 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
3974 ; RV64-NEXT: vmslt.vx v16, v8, a0, v0.t
3975 ; RV64-NEXT: vmv1r.v v0, v16
3977 %elt.head = insertelement <vscale x 8 x i64> poison, i64 %b, i32 0
3978 %vb = shufflevector <vscale x 8 x i64> %elt.head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
3979 %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)
3980 ret <vscale x 8 x i1> %v
3983 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) {
3984 ; RV32-LABEL: icmp_slt_vx_swap_nxv8i64:
3986 ; RV32-NEXT: addi sp, sp, -16
3987 ; RV32-NEXT: .cfi_def_cfa_offset 16
3988 ; RV32-NEXT: sw a1, 12(sp)
3989 ; RV32-NEXT: sw a0, 8(sp)
3990 ; RV32-NEXT: addi a0, sp, 8
3991 ; RV32-NEXT: vsetvli a1, zero, e64, m8, ta, ma
3992 ; RV32-NEXT: vlse64.v v24, (a0), zero
3993 ; RV32-NEXT: vsetvli zero, a2, e64, m8, ta, ma
3994 ; RV32-NEXT: vmslt.vv v16, v24, v8, v0.t
3995 ; RV32-NEXT: vmv1r.v v0, v16
3996 ; RV32-NEXT: addi sp, sp, 16
3999 ; RV64-LABEL: icmp_slt_vx_swap_nxv8i64:
4001 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
4002 ; RV64-NEXT: vmsgt.vx v16, v8, a0, v0.t
4003 ; RV64-NEXT: vmv1r.v v0, v16
4005 %elt.head = insertelement <vscale x 8 x i64> poison, i64 %b, i32 0
4006 %vb = shufflevector <vscale x 8 x i64> %elt.head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
4007 %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)
4008 ret <vscale x 8 x i1> %v
4011 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) {
4012 ; CHECK-LABEL: icmp_slt_vi_nxv8i64:
4014 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
4015 ; CHECK-NEXT: vmsle.vi v16, v8, 3, v0.t
4016 ; CHECK-NEXT: vmv1r.v v0, v16
4018 %elt.head = insertelement <vscale x 8 x i64> poison, i64 4, i32 0
4019 %vb = shufflevector <vscale x 8 x i64> %elt.head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
4020 %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)
4021 ret <vscale x 8 x i1> %v
4024 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) {
4025 ; CHECK-LABEL: icmp_slt_vi_swap_nxv8i64:
4027 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
4028 ; CHECK-NEXT: vmsgt.vi v16, v8, 4, v0.t
4029 ; CHECK-NEXT: vmv1r.v v0, v16
4031 %elt.head = insertelement <vscale x 8 x i64> poison, i64 4, i32 0
4032 %vb = shufflevector <vscale x 8 x i64> %elt.head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
4033 %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)
4034 ret <vscale x 8 x i1> %v
4037 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) {
4038 ; CHECK-LABEL: icmp_sle_vv_nxv8i64:
4040 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
4041 ; CHECK-NEXT: vmsle.vv v24, v8, v16, v0.t
4042 ; CHECK-NEXT: vmv1r.v v0, v24
4044 %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)
4045 ret <vscale x 8 x i1> %v
4048 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) {
4049 ; RV32-LABEL: icmp_sle_vx_nxv8i64:
4051 ; RV32-NEXT: addi sp, sp, -16
4052 ; RV32-NEXT: .cfi_def_cfa_offset 16
4053 ; RV32-NEXT: sw a1, 12(sp)
4054 ; RV32-NEXT: sw a0, 8(sp)
4055 ; RV32-NEXT: addi a0, sp, 8
4056 ; RV32-NEXT: vsetvli a1, zero, e64, m8, ta, ma
4057 ; RV32-NEXT: vlse64.v v24, (a0), zero
4058 ; RV32-NEXT: vsetvli zero, a2, e64, m8, ta, ma
4059 ; RV32-NEXT: vmsle.vv v16, v8, v24, v0.t
4060 ; RV32-NEXT: vmv1r.v v0, v16
4061 ; RV32-NEXT: addi sp, sp, 16
4064 ; RV64-LABEL: icmp_sle_vx_nxv8i64:
4066 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
4067 ; RV64-NEXT: vmsle.vx v16, v8, a0, v0.t
4068 ; RV64-NEXT: vmv1r.v v0, v16
4070 %elt.head = insertelement <vscale x 8 x i64> poison, i64 %b, i32 0
4071 %vb = shufflevector <vscale x 8 x i64> %elt.head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
4072 %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)
4073 ret <vscale x 8 x i1> %v
4076 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) {
4077 ; RV32-LABEL: icmp_sle_vx_swap_nxv8i64:
4079 ; RV32-NEXT: addi sp, sp, -16
4080 ; RV32-NEXT: .cfi_def_cfa_offset 16
4081 ; RV32-NEXT: sw a1, 12(sp)
4082 ; RV32-NEXT: sw a0, 8(sp)
4083 ; RV32-NEXT: addi a0, sp, 8
4084 ; RV32-NEXT: vsetvli a1, zero, e64, m8, ta, ma
4085 ; RV32-NEXT: vlse64.v v24, (a0), zero
4086 ; RV32-NEXT: vsetvli zero, a2, e64, m8, ta, ma
4087 ; RV32-NEXT: vmsle.vv v16, v24, v8, v0.t
4088 ; RV32-NEXT: vmv1r.v v0, v16
4089 ; RV32-NEXT: addi sp, sp, 16
4092 ; RV64-LABEL: icmp_sle_vx_swap_nxv8i64:
4094 ; RV64-NEXT: vsetvli a2, zero, e64, m8, ta, ma
4095 ; RV64-NEXT: vmv.v.x v24, a0
4096 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
4097 ; RV64-NEXT: vmsle.vv v16, v24, v8, v0.t
4098 ; RV64-NEXT: vmv1r.v v0, v16
4100 %elt.head = insertelement <vscale x 8 x i64> poison, i64 %b, i32 0
4101 %vb = shufflevector <vscale x 8 x i64> %elt.head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
4102 %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)
4103 ret <vscale x 8 x i1> %v
4106 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) {
4107 ; CHECK-LABEL: icmp_sle_vi_nxv8i64:
4109 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
4110 ; CHECK-NEXT: vmsle.vi v16, v8, 4, v0.t
4111 ; CHECK-NEXT: vmv1r.v v0, v16
4113 %elt.head = insertelement <vscale x 8 x i64> poison, i64 4, i32 0
4114 %vb = shufflevector <vscale x 8 x i64> %elt.head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
4115 %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)
4116 ret <vscale x 8 x i1> %v
4119 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) {
4120 ; CHECK-LABEL: icmp_sle_vi_swap_nxv8i64:
4122 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
4123 ; CHECK-NEXT: vmsgt.vi v16, v8, 3, v0.t
4124 ; CHECK-NEXT: vmv1r.v v0, v16
4126 %elt.head = insertelement <vscale x 8 x i64> poison, i64 4, i32 0
4127 %vb = shufflevector <vscale x 8 x i64> %elt.head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
4128 %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)
4129 ret <vscale x 8 x i1> %v