1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=riscv32 -mattr=+v -verify-machineinstrs < %s \
3 ; RUN: | FileCheck %s --check-prefixes=CHECK,RV32
4 ; RUN: llc -mtriple=riscv64 -mattr=+v -verify-machineinstrs < %s \
5 ; RUN: | FileCheck %s --check-prefixes=CHECK,RV64
7 define <vscale x 1 x i8> @vmerge_vv_nxv1i8(<vscale x 1 x i8> %va, <vscale x 1 x i8> %vb, <vscale x 1 x i1> %cond) {
8 ; CHECK-LABEL: vmerge_vv_nxv1i8:
10 ; CHECK-NEXT: vsetvli a0, zero, e8, mf8, ta, ma
11 ; CHECK-NEXT: vmerge.vvm v8, v9, v8, v0
13 %vc = select <vscale x 1 x i1> %cond, <vscale x 1 x i8> %va, <vscale x 1 x i8> %vb
14 ret <vscale x 1 x i8> %vc
17 define <vscale x 1 x i8> @vmerge_xv_nxv1i8(<vscale x 1 x i8> %va, i8 signext %b, <vscale x 1 x i1> %cond) {
18 ; CHECK-LABEL: vmerge_xv_nxv1i8:
20 ; CHECK-NEXT: vsetvli a1, zero, e8, mf8, ta, ma
21 ; CHECK-NEXT: vmerge.vxm v8, v8, a0, v0
23 %head = insertelement <vscale x 1 x i8> poison, i8 %b, i32 0
24 %splat = shufflevector <vscale x 1 x i8> %head, <vscale x 1 x i8> poison, <vscale x 1 x i32> zeroinitializer
25 %vc = select <vscale x 1 x i1> %cond, <vscale x 1 x i8> %splat, <vscale x 1 x i8> %va
26 ret <vscale x 1 x i8> %vc
29 define <vscale x 1 x i8> @vmerge_iv_nxv1i8(<vscale x 1 x i8> %va, <vscale x 1 x i1> %cond) {
30 ; CHECK-LABEL: vmerge_iv_nxv1i8:
32 ; CHECK-NEXT: vsetvli a0, zero, e8, mf8, ta, ma
33 ; CHECK-NEXT: vmerge.vim v8, v8, 3, v0
35 %vc = select <vscale x 1 x i1> %cond, <vscale x 1 x i8> splat (i8 3), <vscale x 1 x i8> %va
36 ret <vscale x 1 x i8> %vc
39 define <vscale x 2 x i8> @vmerge_vv_nxv2i8(<vscale x 2 x i8> %va, <vscale x 2 x i8> %vb, <vscale x 2 x i1> %cond) {
40 ; CHECK-LABEL: vmerge_vv_nxv2i8:
42 ; CHECK-NEXT: vsetvli a0, zero, e8, mf4, ta, ma
43 ; CHECK-NEXT: vmerge.vvm v8, v9, v8, v0
45 %vc = select <vscale x 2 x i1> %cond, <vscale x 2 x i8> %va, <vscale x 2 x i8> %vb
46 ret <vscale x 2 x i8> %vc
49 define <vscale x 2 x i8> @vmerge_xv_nxv2i8(<vscale x 2 x i8> %va, i8 signext %b, <vscale x 2 x i1> %cond) {
50 ; CHECK-LABEL: vmerge_xv_nxv2i8:
52 ; CHECK-NEXT: vsetvli a1, zero, e8, mf4, ta, ma
53 ; CHECK-NEXT: vmerge.vxm v8, v8, a0, v0
55 %head = insertelement <vscale x 2 x i8> poison, i8 %b, i32 0
56 %splat = shufflevector <vscale x 2 x i8> %head, <vscale x 2 x i8> poison, <vscale x 2 x i32> zeroinitializer
57 %vc = select <vscale x 2 x i1> %cond, <vscale x 2 x i8> %splat, <vscale x 2 x i8> %va
58 ret <vscale x 2 x i8> %vc
61 define <vscale x 2 x i8> @vmerge_iv_nxv2i8(<vscale x 2 x i8> %va, <vscale x 2 x i1> %cond) {
62 ; CHECK-LABEL: vmerge_iv_nxv2i8:
64 ; CHECK-NEXT: vsetvli a0, zero, e8, mf4, ta, ma
65 ; CHECK-NEXT: vmerge.vim v8, v8, 3, v0
67 %vc = select <vscale x 2 x i1> %cond, <vscale x 2 x i8> splat (i8 3), <vscale x 2 x i8> %va
68 ret <vscale x 2 x i8> %vc
71 define <vscale x 3 x i8> @vmerge_vv_nxv3i8(<vscale x 3 x i8> %va, <vscale x 3 x i8> %vb, <vscale x 3 x i1> %cond) {
72 ; CHECK-LABEL: vmerge_vv_nxv3i8:
74 ; CHECK-NEXT: vsetvli a0, zero, e8, mf2, ta, ma
75 ; CHECK-NEXT: vmerge.vvm v8, v9, v8, v0
77 %vc = select <vscale x 3 x i1> %cond, <vscale x 3 x i8> %va, <vscale x 3 x i8> %vb
78 ret <vscale x 3 x i8> %vc
81 define <vscale x 3 x i8> @vmerge_xv_nxv3i8(<vscale x 3 x i8> %va, i8 signext %b, <vscale x 3 x i1> %cond) {
82 ; CHECK-LABEL: vmerge_xv_nxv3i8:
84 ; CHECK-NEXT: vsetvli a1, zero, e8, mf2, ta, ma
85 ; CHECK-NEXT: vmerge.vxm v8, v8, a0, v0
87 %head = insertelement <vscale x 3 x i8> poison, i8 %b, i32 0
88 %splat = shufflevector <vscale x 3 x i8> %head, <vscale x 3 x i8> poison, <vscale x 3 x i32> zeroinitializer
89 %vc = select <vscale x 3 x i1> %cond, <vscale x 3 x i8> %splat, <vscale x 3 x i8> %va
90 ret <vscale x 3 x i8> %vc
93 define <vscale x 3 x i8> @vmerge_iv_nxv3i8(<vscale x 3 x i8> %va, <vscale x 3 x i1> %cond) {
94 ; CHECK-LABEL: vmerge_iv_nxv3i8:
96 ; CHECK-NEXT: vsetvli a0, zero, e8, mf2, ta, ma
97 ; CHECK-NEXT: vmerge.vim v8, v8, 3, v0
99 %vc = select <vscale x 3 x i1> %cond, <vscale x 3 x i8> splat (i8 3), <vscale x 3 x i8> %va
100 ret <vscale x 3 x i8> %vc
103 define <vscale x 4 x i8> @vmerge_vv_nxv4i8(<vscale x 4 x i8> %va, <vscale x 4 x i8> %vb, <vscale x 4 x i1> %cond) {
104 ; CHECK-LABEL: vmerge_vv_nxv4i8:
106 ; CHECK-NEXT: vsetvli a0, zero, e8, mf2, ta, ma
107 ; CHECK-NEXT: vmerge.vvm v8, v9, v8, v0
109 %vc = select <vscale x 4 x i1> %cond, <vscale x 4 x i8> %va, <vscale x 4 x i8> %vb
110 ret <vscale x 4 x i8> %vc
113 define <vscale x 4 x i8> @vmerge_xv_nxv4i8(<vscale x 4 x i8> %va, i8 signext %b, <vscale x 4 x i1> %cond) {
114 ; CHECK-LABEL: vmerge_xv_nxv4i8:
116 ; CHECK-NEXT: vsetvli a1, zero, e8, mf2, ta, ma
117 ; CHECK-NEXT: vmerge.vxm v8, v8, a0, v0
119 %head = insertelement <vscale x 4 x i8> poison, i8 %b, i32 0
120 %splat = shufflevector <vscale x 4 x i8> %head, <vscale x 4 x i8> poison, <vscale x 4 x i32> zeroinitializer
121 %vc = select <vscale x 4 x i1> %cond, <vscale x 4 x i8> %splat, <vscale x 4 x i8> %va
122 ret <vscale x 4 x i8> %vc
125 define <vscale x 4 x i8> @vmerge_iv_nxv4i8(<vscale x 4 x i8> %va, <vscale x 4 x i1> %cond) {
126 ; CHECK-LABEL: vmerge_iv_nxv4i8:
128 ; CHECK-NEXT: vsetvli a0, zero, e8, mf2, ta, ma
129 ; CHECK-NEXT: vmerge.vim v8, v8, 3, v0
131 %vc = select <vscale x 4 x i1> %cond, <vscale x 4 x i8> splat (i8 3), <vscale x 4 x i8> %va
132 ret <vscale x 4 x i8> %vc
135 define <vscale x 8 x i8> @vmerge_vv_nxv8i8(<vscale x 8 x i8> %va, <vscale x 8 x i8> %vb, <vscale x 8 x i1> %cond) {
136 ; CHECK-LABEL: vmerge_vv_nxv8i8:
138 ; CHECK-NEXT: vsetvli a0, zero, e8, m1, ta, ma
139 ; CHECK-NEXT: vmerge.vvm v8, v9, v8, v0
141 %vc = select <vscale x 8 x i1> %cond, <vscale x 8 x i8> %va, <vscale x 8 x i8> %vb
142 ret <vscale x 8 x i8> %vc
145 define <vscale x 8 x i8> @vmerge_xv_nxv8i8(<vscale x 8 x i8> %va, i8 signext %b, <vscale x 8 x i1> %cond) {
146 ; CHECK-LABEL: vmerge_xv_nxv8i8:
148 ; CHECK-NEXT: vsetvli a1, zero, e8, m1, ta, ma
149 ; CHECK-NEXT: vmerge.vxm v8, v8, a0, v0
151 %head = insertelement <vscale x 8 x i8> poison, i8 %b, i32 0
152 %splat = shufflevector <vscale x 8 x i8> %head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
153 %vc = select <vscale x 8 x i1> %cond, <vscale x 8 x i8> %splat, <vscale x 8 x i8> %va
154 ret <vscale x 8 x i8> %vc
157 define <vscale x 8 x i8> @vmerge_iv_nxv8i8(<vscale x 8 x i8> %va, <vscale x 8 x i1> %cond) {
158 ; CHECK-LABEL: vmerge_iv_nxv8i8:
160 ; CHECK-NEXT: vsetvli a0, zero, e8, m1, ta, ma
161 ; CHECK-NEXT: vmerge.vim v8, v8, 3, v0
163 %vc = select <vscale x 8 x i1> %cond, <vscale x 8 x i8> splat (i8 3), <vscale x 8 x i8> %va
164 ret <vscale x 8 x i8> %vc
167 define <vscale x 16 x i8> @vmerge_vv_nxv16i8(<vscale x 16 x i8> %va, <vscale x 16 x i8> %vb, <vscale x 16 x i1> %cond) {
168 ; CHECK-LABEL: vmerge_vv_nxv16i8:
170 ; CHECK-NEXT: vsetvli a0, zero, e8, m2, ta, ma
171 ; CHECK-NEXT: vmerge.vvm v8, v10, v8, v0
173 %vc = select <vscale x 16 x i1> %cond, <vscale x 16 x i8> %va, <vscale x 16 x i8> %vb
174 ret <vscale x 16 x i8> %vc
177 define <vscale x 16 x i8> @vmerge_xv_nxv16i8(<vscale x 16 x i8> %va, i8 signext %b, <vscale x 16 x i1> %cond) {
178 ; CHECK-LABEL: vmerge_xv_nxv16i8:
180 ; CHECK-NEXT: vsetvli a1, zero, e8, m2, ta, ma
181 ; CHECK-NEXT: vmerge.vxm v8, v8, a0, v0
183 %head = insertelement <vscale x 16 x i8> poison, i8 %b, i32 0
184 %splat = shufflevector <vscale x 16 x i8> %head, <vscale x 16 x i8> poison, <vscale x 16 x i32> zeroinitializer
185 %vc = select <vscale x 16 x i1> %cond, <vscale x 16 x i8> %splat, <vscale x 16 x i8> %va
186 ret <vscale x 16 x i8> %vc
189 define <vscale x 16 x i8> @vmerge_iv_nxv16i8(<vscale x 16 x i8> %va, <vscale x 16 x i1> %cond) {
190 ; CHECK-LABEL: vmerge_iv_nxv16i8:
192 ; CHECK-NEXT: vsetvli a0, zero, e8, m2, ta, ma
193 ; CHECK-NEXT: vmerge.vim v8, v8, 3, v0
195 %vc = select <vscale x 16 x i1> %cond, <vscale x 16 x i8> splat (i8 3), <vscale x 16 x i8> %va
196 ret <vscale x 16 x i8> %vc
199 define <vscale x 32 x i8> @vmerge_vv_nxv32i8(<vscale x 32 x i8> %va, <vscale x 32 x i8> %vb, <vscale x 32 x i1> %cond) {
200 ; CHECK-LABEL: vmerge_vv_nxv32i8:
202 ; CHECK-NEXT: vsetvli a0, zero, e8, m4, ta, ma
203 ; CHECK-NEXT: vmerge.vvm v8, v12, v8, v0
205 %vc = select <vscale x 32 x i1> %cond, <vscale x 32 x i8> %va, <vscale x 32 x i8> %vb
206 ret <vscale x 32 x i8> %vc
209 define <vscale x 32 x i8> @vmerge_xv_nxv32i8(<vscale x 32 x i8> %va, i8 signext %b, <vscale x 32 x i1> %cond) {
210 ; CHECK-LABEL: vmerge_xv_nxv32i8:
212 ; CHECK-NEXT: vsetvli a1, zero, e8, m4, ta, ma
213 ; CHECK-NEXT: vmerge.vxm v8, v8, a0, v0
215 %head = insertelement <vscale x 32 x i8> poison, i8 %b, i32 0
216 %splat = shufflevector <vscale x 32 x i8> %head, <vscale x 32 x i8> poison, <vscale x 32 x i32> zeroinitializer
217 %vc = select <vscale x 32 x i1> %cond, <vscale x 32 x i8> %splat, <vscale x 32 x i8> %va
218 ret <vscale x 32 x i8> %vc
221 define <vscale x 32 x i8> @vmerge_iv_nxv32i8(<vscale x 32 x i8> %va, <vscale x 32 x i1> %cond) {
222 ; CHECK-LABEL: vmerge_iv_nxv32i8:
224 ; CHECK-NEXT: vsetvli a0, zero, e8, m4, ta, ma
225 ; CHECK-NEXT: vmerge.vim v8, v8, 3, v0
227 %vc = select <vscale x 32 x i1> %cond, <vscale x 32 x i8> splat (i8 3), <vscale x 32 x i8> %va
228 ret <vscale x 32 x i8> %vc
231 define <vscale x 64 x i8> @vmerge_vv_nxv64i8(<vscale x 64 x i8> %va, <vscale x 64 x i8> %vb, <vscale x 64 x i1> %cond) {
232 ; CHECK-LABEL: vmerge_vv_nxv64i8:
234 ; CHECK-NEXT: vsetvli a0, zero, e8, m8, ta, ma
235 ; CHECK-NEXT: vmerge.vvm v8, v16, v8, v0
237 %vc = select <vscale x 64 x i1> %cond, <vscale x 64 x i8> %va, <vscale x 64 x i8> %vb
238 ret <vscale x 64 x i8> %vc
241 define <vscale x 64 x i8> @vmerge_xv_nxv64i8(<vscale x 64 x i8> %va, i8 signext %b, <vscale x 64 x i1> %cond) {
242 ; CHECK-LABEL: vmerge_xv_nxv64i8:
244 ; CHECK-NEXT: vsetvli a1, zero, e8, m8, ta, ma
245 ; CHECK-NEXT: vmerge.vxm v8, v8, a0, v0
247 %head = insertelement <vscale x 64 x i8> poison, i8 %b, i32 0
248 %splat = shufflevector <vscale x 64 x i8> %head, <vscale x 64 x i8> poison, <vscale x 64 x i32> zeroinitializer
249 %vc = select <vscale x 64 x i1> %cond, <vscale x 64 x i8> %splat, <vscale x 64 x i8> %va
250 ret <vscale x 64 x i8> %vc
253 define <vscale x 64 x i8> @vmerge_iv_nxv64i8(<vscale x 64 x i8> %va, <vscale x 64 x i1> %cond) {
254 ; CHECK-LABEL: vmerge_iv_nxv64i8:
256 ; CHECK-NEXT: vsetvli a0, zero, e8, m8, ta, ma
257 ; CHECK-NEXT: vmerge.vim v8, v8, 3, v0
259 %vc = select <vscale x 64 x i1> %cond, <vscale x 64 x i8> splat (i8 3), <vscale x 64 x i8> %va
260 ret <vscale x 64 x i8> %vc
263 define <vscale x 1 x i16> @vmerge_vv_nxv1i16(<vscale x 1 x i16> %va, <vscale x 1 x i16> %vb, <vscale x 1 x i1> %cond) {
264 ; CHECK-LABEL: vmerge_vv_nxv1i16:
266 ; CHECK-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
267 ; CHECK-NEXT: vmerge.vvm v8, v9, v8, v0
269 %vc = select <vscale x 1 x i1> %cond, <vscale x 1 x i16> %va, <vscale x 1 x i16> %vb
270 ret <vscale x 1 x i16> %vc
273 define <vscale x 1 x i16> @vmerge_xv_nxv1i16(<vscale x 1 x i16> %va, i16 signext %b, <vscale x 1 x i1> %cond) {
274 ; CHECK-LABEL: vmerge_xv_nxv1i16:
276 ; CHECK-NEXT: vsetvli a1, zero, e16, mf4, ta, ma
277 ; CHECK-NEXT: vmerge.vxm v8, v8, a0, v0
279 %head = insertelement <vscale x 1 x i16> poison, i16 %b, i32 0
280 %splat = shufflevector <vscale x 1 x i16> %head, <vscale x 1 x i16> poison, <vscale x 1 x i32> zeroinitializer
281 %vc = select <vscale x 1 x i1> %cond, <vscale x 1 x i16> %splat, <vscale x 1 x i16> %va
282 ret <vscale x 1 x i16> %vc
285 define <vscale x 1 x i16> @vmerge_iv_nxv1i16(<vscale x 1 x i16> %va, <vscale x 1 x i1> %cond) {
286 ; CHECK-LABEL: vmerge_iv_nxv1i16:
288 ; CHECK-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
289 ; CHECK-NEXT: vmerge.vim v8, v8, 3, v0
291 %vc = select <vscale x 1 x i1> %cond, <vscale x 1 x i16> splat (i16 3), <vscale x 1 x i16> %va
292 ret <vscale x 1 x i16> %vc
295 define <vscale x 2 x i16> @vmerge_vv_nxv2i16(<vscale x 2 x i16> %va, <vscale x 2 x i16> %vb, <vscale x 2 x i1> %cond) {
296 ; CHECK-LABEL: vmerge_vv_nxv2i16:
298 ; CHECK-NEXT: vsetvli a0, zero, e16, mf2, ta, ma
299 ; CHECK-NEXT: vmerge.vvm v8, v9, v8, v0
301 %vc = select <vscale x 2 x i1> %cond, <vscale x 2 x i16> %va, <vscale x 2 x i16> %vb
302 ret <vscale x 2 x i16> %vc
305 define <vscale x 2 x i16> @vmerge_xv_nxv2i16(<vscale x 2 x i16> %va, i16 signext %b, <vscale x 2 x i1> %cond) {
306 ; CHECK-LABEL: vmerge_xv_nxv2i16:
308 ; CHECK-NEXT: vsetvli a1, zero, e16, mf2, ta, ma
309 ; CHECK-NEXT: vmerge.vxm v8, v8, a0, v0
311 %head = insertelement <vscale x 2 x i16> poison, i16 %b, i32 0
312 %splat = shufflevector <vscale x 2 x i16> %head, <vscale x 2 x i16> poison, <vscale x 2 x i32> zeroinitializer
313 %vc = select <vscale x 2 x i1> %cond, <vscale x 2 x i16> %splat, <vscale x 2 x i16> %va
314 ret <vscale x 2 x i16> %vc
317 define <vscale x 2 x i16> @vmerge_iv_nxv2i16(<vscale x 2 x i16> %va, <vscale x 2 x i1> %cond) {
318 ; CHECK-LABEL: vmerge_iv_nxv2i16:
320 ; CHECK-NEXT: vsetvli a0, zero, e16, mf2, ta, ma
321 ; CHECK-NEXT: vmerge.vim v8, v8, 3, v0
323 %vc = select <vscale x 2 x i1> %cond, <vscale x 2 x i16> splat (i16 3), <vscale x 2 x i16> %va
324 ret <vscale x 2 x i16> %vc
327 define <vscale x 4 x i16> @vmerge_vv_nxv4i16(<vscale x 4 x i16> %va, <vscale x 4 x i16> %vb, <vscale x 4 x i1> %cond) {
328 ; CHECK-LABEL: vmerge_vv_nxv4i16:
330 ; CHECK-NEXT: vsetvli a0, zero, e16, m1, ta, ma
331 ; CHECK-NEXT: vmerge.vvm v8, v9, v8, v0
333 %vc = select <vscale x 4 x i1> %cond, <vscale x 4 x i16> %va, <vscale x 4 x i16> %vb
334 ret <vscale x 4 x i16> %vc
337 define <vscale x 4 x i16> @vmerge_xv_nxv4i16(<vscale x 4 x i16> %va, i16 signext %b, <vscale x 4 x i1> %cond) {
338 ; CHECK-LABEL: vmerge_xv_nxv4i16:
340 ; CHECK-NEXT: vsetvli a1, zero, e16, m1, ta, ma
341 ; CHECK-NEXT: vmerge.vxm v8, v8, a0, v0
343 %head = insertelement <vscale x 4 x i16> poison, i16 %b, i32 0
344 %splat = shufflevector <vscale x 4 x i16> %head, <vscale x 4 x i16> poison, <vscale x 4 x i32> zeroinitializer
345 %vc = select <vscale x 4 x i1> %cond, <vscale x 4 x i16> %splat, <vscale x 4 x i16> %va
346 ret <vscale x 4 x i16> %vc
349 define <vscale x 4 x i16> @vmerge_iv_nxv4i16(<vscale x 4 x i16> %va, <vscale x 4 x i1> %cond) {
350 ; CHECK-LABEL: vmerge_iv_nxv4i16:
352 ; CHECK-NEXT: vsetvli a0, zero, e16, m1, ta, ma
353 ; CHECK-NEXT: vmerge.vim v8, v8, 3, v0
355 %vc = select <vscale x 4 x i1> %cond, <vscale x 4 x i16> splat (i16 3), <vscale x 4 x i16> %va
356 ret <vscale x 4 x i16> %vc
359 define <vscale x 8 x i16> @vmerge_vv_nxv8i16(<vscale x 8 x i16> %va, <vscale x 8 x i16> %vb, <vscale x 8 x i1> %cond) {
360 ; CHECK-LABEL: vmerge_vv_nxv8i16:
362 ; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma
363 ; CHECK-NEXT: vmerge.vvm v8, v10, v8, v0
365 %vc = select <vscale x 8 x i1> %cond, <vscale x 8 x i16> %va, <vscale x 8 x i16> %vb
366 ret <vscale x 8 x i16> %vc
369 define <vscale x 8 x i16> @vmerge_xv_nxv8i16(<vscale x 8 x i16> %va, i16 signext %b, <vscale x 8 x i1> %cond) {
370 ; CHECK-LABEL: vmerge_xv_nxv8i16:
372 ; CHECK-NEXT: vsetvli a1, zero, e16, m2, ta, ma
373 ; CHECK-NEXT: vmerge.vxm v8, v8, a0, v0
375 %head = insertelement <vscale x 8 x i16> poison, i16 %b, i32 0
376 %splat = shufflevector <vscale x 8 x i16> %head, <vscale x 8 x i16> poison, <vscale x 8 x i32> zeroinitializer
377 %vc = select <vscale x 8 x i1> %cond, <vscale x 8 x i16> %splat, <vscale x 8 x i16> %va
378 ret <vscale x 8 x i16> %vc
381 define <vscale x 8 x i16> @vmerge_iv_nxv8i16(<vscale x 8 x i16> %va, <vscale x 8 x i1> %cond) {
382 ; CHECK-LABEL: vmerge_iv_nxv8i16:
384 ; CHECK-NEXT: vsetvli a0, zero, e16, m2, ta, ma
385 ; CHECK-NEXT: vmerge.vim v8, v8, 3, v0
387 %vc = select <vscale x 8 x i1> %cond, <vscale x 8 x i16> splat (i16 3), <vscale x 8 x i16> %va
388 ret <vscale x 8 x i16> %vc
391 define <vscale x 16 x i16> @vmerge_vv_nxv16i16(<vscale x 16 x i16> %va, <vscale x 16 x i16> %vb, <vscale x 16 x i1> %cond) {
392 ; CHECK-LABEL: vmerge_vv_nxv16i16:
394 ; CHECK-NEXT: vsetvli a0, zero, e16, m4, ta, ma
395 ; CHECK-NEXT: vmerge.vvm v8, v12, v8, v0
397 %vc = select <vscale x 16 x i1> %cond, <vscale x 16 x i16> %va, <vscale x 16 x i16> %vb
398 ret <vscale x 16 x i16> %vc
401 define <vscale x 16 x i16> @vmerge_xv_nxv16i16(<vscale x 16 x i16> %va, i16 signext %b, <vscale x 16 x i1> %cond) {
402 ; CHECK-LABEL: vmerge_xv_nxv16i16:
404 ; CHECK-NEXT: vsetvli a1, zero, e16, m4, ta, ma
405 ; CHECK-NEXT: vmerge.vxm v8, v8, a0, v0
407 %head = insertelement <vscale x 16 x i16> poison, i16 %b, i32 0
408 %splat = shufflevector <vscale x 16 x i16> %head, <vscale x 16 x i16> poison, <vscale x 16 x i32> zeroinitializer
409 %vc = select <vscale x 16 x i1> %cond, <vscale x 16 x i16> %splat, <vscale x 16 x i16> %va
410 ret <vscale x 16 x i16> %vc
413 define <vscale x 16 x i16> @vmerge_iv_nxv16i16(<vscale x 16 x i16> %va, <vscale x 16 x i1> %cond) {
414 ; CHECK-LABEL: vmerge_iv_nxv16i16:
416 ; CHECK-NEXT: vsetvli a0, zero, e16, m4, ta, ma
417 ; CHECK-NEXT: vmerge.vim v8, v8, 3, v0
419 %vc = select <vscale x 16 x i1> %cond, <vscale x 16 x i16> splat (i16 3), <vscale x 16 x i16> %va
420 ret <vscale x 16 x i16> %vc
423 define <vscale x 32 x i16> @vmerge_vv_nxv32i16(<vscale x 32 x i16> %va, <vscale x 32 x i16> %vb, <vscale x 32 x i1> %cond) {
424 ; CHECK-LABEL: vmerge_vv_nxv32i16:
426 ; CHECK-NEXT: vsetvli a0, zero, e16, m8, ta, ma
427 ; CHECK-NEXT: vmerge.vvm v8, v16, v8, v0
429 %vc = select <vscale x 32 x i1> %cond, <vscale x 32 x i16> %va, <vscale x 32 x i16> %vb
430 ret <vscale x 32 x i16> %vc
433 define <vscale x 32 x i16> @vmerge_xv_nxv32i16(<vscale x 32 x i16> %va, i16 signext %b, <vscale x 32 x i1> %cond) {
434 ; CHECK-LABEL: vmerge_xv_nxv32i16:
436 ; CHECK-NEXT: vsetvli a1, zero, e16, m8, ta, ma
437 ; CHECK-NEXT: vmerge.vxm v8, v8, a0, v0
439 %head = insertelement <vscale x 32 x i16> poison, i16 %b, i32 0
440 %splat = shufflevector <vscale x 32 x i16> %head, <vscale x 32 x i16> poison, <vscale x 32 x i32> zeroinitializer
441 %vc = select <vscale x 32 x i1> %cond, <vscale x 32 x i16> %splat, <vscale x 32 x i16> %va
442 ret <vscale x 32 x i16> %vc
445 define <vscale x 32 x i16> @vmerge_iv_nxv32i16(<vscale x 32 x i16> %va, <vscale x 32 x i1> %cond) {
446 ; CHECK-LABEL: vmerge_iv_nxv32i16:
448 ; CHECK-NEXT: vsetvli a0, zero, e16, m8, ta, ma
449 ; CHECK-NEXT: vmerge.vim v8, v8, 3, v0
451 %vc = select <vscale x 32 x i1> %cond, <vscale x 32 x i16> splat (i16 3), <vscale x 32 x i16> %va
452 ret <vscale x 32 x i16> %vc
455 define <vscale x 1 x i32> @vmerge_vv_nxv1i32(<vscale x 1 x i32> %va, <vscale x 1 x i32> %vb, <vscale x 1 x i1> %cond) {
456 ; CHECK-LABEL: vmerge_vv_nxv1i32:
458 ; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma
459 ; CHECK-NEXT: vmerge.vvm v8, v9, v8, v0
461 %vc = select <vscale x 1 x i1> %cond, <vscale x 1 x i32> %va, <vscale x 1 x i32> %vb
462 ret <vscale x 1 x i32> %vc
465 define <vscale x 1 x i32> @vmerge_xv_nxv1i32(<vscale x 1 x i32> %va, i32 signext %b, <vscale x 1 x i1> %cond) {
466 ; CHECK-LABEL: vmerge_xv_nxv1i32:
468 ; CHECK-NEXT: vsetvli a1, zero, e32, mf2, ta, ma
469 ; CHECK-NEXT: vmerge.vxm v8, v8, a0, v0
471 %head = insertelement <vscale x 1 x i32> poison, i32 %b, i32 0
472 %splat = shufflevector <vscale x 1 x i32> %head, <vscale x 1 x i32> poison, <vscale x 1 x i32> zeroinitializer
473 %vc = select <vscale x 1 x i1> %cond, <vscale x 1 x i32> %splat, <vscale x 1 x i32> %va
474 ret <vscale x 1 x i32> %vc
477 define <vscale x 1 x i32> @vmerge_iv_nxv1i32(<vscale x 1 x i32> %va, <vscale x 1 x i1> %cond) {
478 ; CHECK-LABEL: vmerge_iv_nxv1i32:
480 ; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma
481 ; CHECK-NEXT: vmerge.vim v8, v8, 3, v0
483 %vc = select <vscale x 1 x i1> %cond, <vscale x 1 x i32> splat (i32 3), <vscale x 1 x i32> %va
484 ret <vscale x 1 x i32> %vc
487 define <vscale x 2 x i32> @vmerge_vv_nxv2i32(<vscale x 2 x i32> %va, <vscale x 2 x i32> %vb, <vscale x 2 x i1> %cond) {
488 ; CHECK-LABEL: vmerge_vv_nxv2i32:
490 ; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma
491 ; CHECK-NEXT: vmerge.vvm v8, v9, v8, v0
493 %vc = select <vscale x 2 x i1> %cond, <vscale x 2 x i32> %va, <vscale x 2 x i32> %vb
494 ret <vscale x 2 x i32> %vc
497 define <vscale x 2 x i32> @vmerge_xv_nxv2i32(<vscale x 2 x i32> %va, i32 signext %b, <vscale x 2 x i1> %cond) {
498 ; CHECK-LABEL: vmerge_xv_nxv2i32:
500 ; CHECK-NEXT: vsetvli a1, zero, e32, m1, ta, ma
501 ; CHECK-NEXT: vmerge.vxm v8, v8, a0, v0
503 %head = insertelement <vscale x 2 x i32> poison, i32 %b, i32 0
504 %splat = shufflevector <vscale x 2 x i32> %head, <vscale x 2 x i32> poison, <vscale x 2 x i32> zeroinitializer
505 %vc = select <vscale x 2 x i1> %cond, <vscale x 2 x i32> %splat, <vscale x 2 x i32> %va
506 ret <vscale x 2 x i32> %vc
509 define <vscale x 2 x i32> @vmerge_iv_nxv2i32(<vscale x 2 x i32> %va, <vscale x 2 x i1> %cond) {
510 ; CHECK-LABEL: vmerge_iv_nxv2i32:
512 ; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma
513 ; CHECK-NEXT: vmerge.vim v8, v8, 3, v0
515 %vc = select <vscale x 2 x i1> %cond, <vscale x 2 x i32> splat (i32 3), <vscale x 2 x i32> %va
516 ret <vscale x 2 x i32> %vc
519 define <vscale x 4 x i32> @vmerge_vv_nxv4i32(<vscale x 4 x i32> %va, <vscale x 4 x i32> %vb, <vscale x 4 x i1> %cond) {
520 ; CHECK-LABEL: vmerge_vv_nxv4i32:
522 ; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma
523 ; CHECK-NEXT: vmerge.vvm v8, v10, v8, v0
525 %vc = select <vscale x 4 x i1> %cond, <vscale x 4 x i32> %va, <vscale x 4 x i32> %vb
526 ret <vscale x 4 x i32> %vc
529 define <vscale x 4 x i32> @vmerge_xv_nxv4i32(<vscale x 4 x i32> %va, i32 signext %b, <vscale x 4 x i1> %cond) {
530 ; CHECK-LABEL: vmerge_xv_nxv4i32:
532 ; CHECK-NEXT: vsetvli a1, zero, e32, m2, ta, ma
533 ; CHECK-NEXT: vmerge.vxm v8, v8, a0, v0
535 %head = insertelement <vscale x 4 x i32> poison, i32 %b, i32 0
536 %splat = shufflevector <vscale x 4 x i32> %head, <vscale x 4 x i32> poison, <vscale x 4 x i32> zeroinitializer
537 %vc = select <vscale x 4 x i1> %cond, <vscale x 4 x i32> %splat, <vscale x 4 x i32> %va
538 ret <vscale x 4 x i32> %vc
541 define <vscale x 4 x i32> @vmerge_iv_nxv4i32(<vscale x 4 x i32> %va, <vscale x 4 x i1> %cond) {
542 ; CHECK-LABEL: vmerge_iv_nxv4i32:
544 ; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma
545 ; CHECK-NEXT: vmerge.vim v8, v8, 3, v0
547 %vc = select <vscale x 4 x i1> %cond, <vscale x 4 x i32> splat (i32 3), <vscale x 4 x i32> %va
548 ret <vscale x 4 x i32> %vc
551 define <vscale x 8 x i32> @vmerge_vv_nxv8i32(<vscale x 8 x i32> %va, <vscale x 8 x i32> %vb, <vscale x 8 x i1> %cond) {
552 ; CHECK-LABEL: vmerge_vv_nxv8i32:
554 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
555 ; CHECK-NEXT: vmerge.vvm v8, v12, v8, v0
557 %vc = select <vscale x 8 x i1> %cond, <vscale x 8 x i32> %va, <vscale x 8 x i32> %vb
558 ret <vscale x 8 x i32> %vc
561 define <vscale x 8 x i32> @vmerge_xv_nxv8i32(<vscale x 8 x i32> %va, i32 signext %b, <vscale x 8 x i1> %cond) {
562 ; CHECK-LABEL: vmerge_xv_nxv8i32:
564 ; CHECK-NEXT: vsetvli a1, zero, e32, m4, ta, ma
565 ; CHECK-NEXT: vmerge.vxm v8, v8, a0, v0
567 %head = insertelement <vscale x 8 x i32> poison, i32 %b, i32 0
568 %splat = shufflevector <vscale x 8 x i32> %head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
569 %vc = select <vscale x 8 x i1> %cond, <vscale x 8 x i32> %splat, <vscale x 8 x i32> %va
570 ret <vscale x 8 x i32> %vc
573 define <vscale x 8 x i32> @vmerge_iv_nxv8i32(<vscale x 8 x i32> %va, <vscale x 8 x i1> %cond) {
574 ; CHECK-LABEL: vmerge_iv_nxv8i32:
576 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
577 ; CHECK-NEXT: vmerge.vim v8, v8, 3, v0
579 %vc = select <vscale x 8 x i1> %cond, <vscale x 8 x i32> splat (i32 3), <vscale x 8 x i32> %va
580 ret <vscale x 8 x i32> %vc
583 define <vscale x 16 x i32> @vmerge_vv_nxv16i32(<vscale x 16 x i32> %va, <vscale x 16 x i32> %vb, <vscale x 16 x i1> %cond) {
584 ; CHECK-LABEL: vmerge_vv_nxv16i32:
586 ; CHECK-NEXT: vsetvli a0, zero, e32, m8, ta, ma
587 ; CHECK-NEXT: vmerge.vvm v8, v16, v8, v0
589 %vc = select <vscale x 16 x i1> %cond, <vscale x 16 x i32> %va, <vscale x 16 x i32> %vb
590 ret <vscale x 16 x i32> %vc
593 define <vscale x 16 x i32> @vmerge_xv_nxv16i32(<vscale x 16 x i32> %va, i32 signext %b, <vscale x 16 x i1> %cond) {
594 ; CHECK-LABEL: vmerge_xv_nxv16i32:
596 ; CHECK-NEXT: vsetvli a1, zero, e32, m8, ta, ma
597 ; CHECK-NEXT: vmerge.vxm v8, v8, a0, v0
599 %head = insertelement <vscale x 16 x i32> poison, i32 %b, i32 0
600 %splat = shufflevector <vscale x 16 x i32> %head, <vscale x 16 x i32> poison, <vscale x 16 x i32> zeroinitializer
601 %vc = select <vscale x 16 x i1> %cond, <vscale x 16 x i32> %splat, <vscale x 16 x i32> %va
602 ret <vscale x 16 x i32> %vc
605 define <vscale x 16 x i32> @vmerge_iv_nxv16i32(<vscale x 16 x i32> %va, <vscale x 16 x i1> %cond) {
606 ; CHECK-LABEL: vmerge_iv_nxv16i32:
608 ; CHECK-NEXT: vsetvli a0, zero, e32, m8, ta, ma
609 ; CHECK-NEXT: vmerge.vim v8, v8, 3, v0
611 %vc = select <vscale x 16 x i1> %cond, <vscale x 16 x i32> splat (i32 3), <vscale x 16 x i32> %va
612 ret <vscale x 16 x i32> %vc
615 define <vscale x 1 x i64> @vmerge_vv_nxv1i64(<vscale x 1 x i64> %va, <vscale x 1 x i64> %vb, <vscale x 1 x i1> %cond) {
616 ; CHECK-LABEL: vmerge_vv_nxv1i64:
618 ; CHECK-NEXT: vsetvli a0, zero, e64, m1, ta, ma
619 ; CHECK-NEXT: vmerge.vvm v8, v9, v8, v0
621 %vc = select <vscale x 1 x i1> %cond, <vscale x 1 x i64> %va, <vscale x 1 x i64> %vb
622 ret <vscale x 1 x i64> %vc
625 define <vscale x 1 x i64> @vmerge_xv_nxv1i64(<vscale x 1 x i64> %va, i64 %b, <vscale x 1 x i1> %cond) {
626 ; RV32-LABEL: vmerge_xv_nxv1i64:
628 ; RV32-NEXT: addi sp, sp, -16
629 ; RV32-NEXT: .cfi_def_cfa_offset 16
630 ; RV32-NEXT: sw a0, 8(sp)
631 ; RV32-NEXT: sw a1, 12(sp)
632 ; RV32-NEXT: addi a0, sp, 8
633 ; RV32-NEXT: vsetvli a1, zero, e64, m1, ta, mu
634 ; RV32-NEXT: vlse64.v v8, (a0), zero, v0.t
635 ; RV32-NEXT: addi sp, sp, 16
636 ; RV32-NEXT: .cfi_def_cfa_offset 0
639 ; RV64-LABEL: vmerge_xv_nxv1i64:
641 ; RV64-NEXT: vsetvli a1, zero, e64, m1, ta, ma
642 ; RV64-NEXT: vmerge.vxm v8, v8, a0, v0
644 %head = insertelement <vscale x 1 x i64> poison, i64 %b, i32 0
645 %splat = shufflevector <vscale x 1 x i64> %head, <vscale x 1 x i64> poison, <vscale x 1 x i32> zeroinitializer
646 %vc = select <vscale x 1 x i1> %cond, <vscale x 1 x i64> %splat, <vscale x 1 x i64> %va
647 ret <vscale x 1 x i64> %vc
650 define <vscale x 1 x i64> @vmerge_iv_nxv1i64(<vscale x 1 x i64> %va, <vscale x 1 x i1> %cond) {
651 ; CHECK-LABEL: vmerge_iv_nxv1i64:
653 ; CHECK-NEXT: vsetvli a0, zero, e64, m1, ta, ma
654 ; CHECK-NEXT: vmerge.vim v8, v8, 3, v0
656 %vc = select <vscale x 1 x i1> %cond, <vscale x 1 x i64> splat (i64 3), <vscale x 1 x i64> %va
657 ret <vscale x 1 x i64> %vc
660 define <vscale x 2 x i64> @vmerge_vv_nxv2i64(<vscale x 2 x i64> %va, <vscale x 2 x i64> %vb, <vscale x 2 x i1> %cond) {
661 ; CHECK-LABEL: vmerge_vv_nxv2i64:
663 ; CHECK-NEXT: vsetvli a0, zero, e64, m2, ta, ma
664 ; CHECK-NEXT: vmerge.vvm v8, v10, v8, v0
666 %vc = select <vscale x 2 x i1> %cond, <vscale x 2 x i64> %va, <vscale x 2 x i64> %vb
667 ret <vscale x 2 x i64> %vc
670 define <vscale x 2 x i64> @vmerge_xv_nxv2i64(<vscale x 2 x i64> %va, i64 %b, <vscale x 2 x i1> %cond) {
671 ; RV32-LABEL: vmerge_xv_nxv2i64:
673 ; RV32-NEXT: addi sp, sp, -16
674 ; RV32-NEXT: .cfi_def_cfa_offset 16
675 ; RV32-NEXT: sw a0, 8(sp)
676 ; RV32-NEXT: sw a1, 12(sp)
677 ; RV32-NEXT: addi a0, sp, 8
678 ; RV32-NEXT: vsetvli a1, zero, e64, m2, ta, mu
679 ; RV32-NEXT: vlse64.v v8, (a0), zero, v0.t
680 ; RV32-NEXT: addi sp, sp, 16
681 ; RV32-NEXT: .cfi_def_cfa_offset 0
684 ; RV64-LABEL: vmerge_xv_nxv2i64:
686 ; RV64-NEXT: vsetvli a1, zero, e64, m2, ta, ma
687 ; RV64-NEXT: vmerge.vxm v8, v8, a0, v0
689 %head = insertelement <vscale x 2 x i64> poison, i64 %b, i32 0
690 %splat = shufflevector <vscale x 2 x i64> %head, <vscale x 2 x i64> poison, <vscale x 2 x i32> zeroinitializer
691 %vc = select <vscale x 2 x i1> %cond, <vscale x 2 x i64> %splat, <vscale x 2 x i64> %va
692 ret <vscale x 2 x i64> %vc
695 define <vscale x 2 x i64> @vmerge_iv_nxv2i64(<vscale x 2 x i64> %va, <vscale x 2 x i1> %cond) {
696 ; CHECK-LABEL: vmerge_iv_nxv2i64:
698 ; CHECK-NEXT: vsetvli a0, zero, e64, m2, ta, ma
699 ; CHECK-NEXT: vmerge.vim v8, v8, 3, v0
701 %vc = select <vscale x 2 x i1> %cond, <vscale x 2 x i64> splat (i64 3), <vscale x 2 x i64> %va
702 ret <vscale x 2 x i64> %vc
705 define <vscale x 4 x i64> @vmerge_vv_nxv4i64(<vscale x 4 x i64> %va, <vscale x 4 x i64> %vb, <vscale x 4 x i1> %cond) {
706 ; CHECK-LABEL: vmerge_vv_nxv4i64:
708 ; CHECK-NEXT: vsetvli a0, zero, e64, m4, ta, ma
709 ; CHECK-NEXT: vmerge.vvm v8, v12, v8, v0
711 %vc = select <vscale x 4 x i1> %cond, <vscale x 4 x i64> %va, <vscale x 4 x i64> %vb
712 ret <vscale x 4 x i64> %vc
715 define <vscale x 4 x i64> @vmerge_xv_nxv4i64(<vscale x 4 x i64> %va, i64 %b, <vscale x 4 x i1> %cond) {
716 ; RV32-LABEL: vmerge_xv_nxv4i64:
718 ; RV32-NEXT: addi sp, sp, -16
719 ; RV32-NEXT: .cfi_def_cfa_offset 16
720 ; RV32-NEXT: sw a0, 8(sp)
721 ; RV32-NEXT: sw a1, 12(sp)
722 ; RV32-NEXT: addi a0, sp, 8
723 ; RV32-NEXT: vsetvli a1, zero, e64, m4, ta, mu
724 ; RV32-NEXT: vlse64.v v8, (a0), zero, v0.t
725 ; RV32-NEXT: addi sp, sp, 16
726 ; RV32-NEXT: .cfi_def_cfa_offset 0
729 ; RV64-LABEL: vmerge_xv_nxv4i64:
731 ; RV64-NEXT: vsetvli a1, zero, e64, m4, ta, ma
732 ; RV64-NEXT: vmerge.vxm v8, v8, a0, v0
734 %head = insertelement <vscale x 4 x i64> poison, i64 %b, i32 0
735 %splat = shufflevector <vscale x 4 x i64> %head, <vscale x 4 x i64> poison, <vscale x 4 x i32> zeroinitializer
736 %vc = select <vscale x 4 x i1> %cond, <vscale x 4 x i64> %splat, <vscale x 4 x i64> %va
737 ret <vscale x 4 x i64> %vc
740 define <vscale x 4 x i64> @vmerge_iv_nxv4i64(<vscale x 4 x i64> %va, <vscale x 4 x i1> %cond) {
741 ; CHECK-LABEL: vmerge_iv_nxv4i64:
743 ; CHECK-NEXT: vsetvli a0, zero, e64, m4, ta, ma
744 ; CHECK-NEXT: vmerge.vim v8, v8, 3, v0
746 %vc = select <vscale x 4 x i1> %cond, <vscale x 4 x i64> splat (i64 3), <vscale x 4 x i64> %va
747 ret <vscale x 4 x i64> %vc
750 define <vscale x 8 x i64> @vmerge_vv_nxv8i64(<vscale x 8 x i64> %va, <vscale x 8 x i64> %vb, <vscale x 8 x i1> %cond) {
751 ; CHECK-LABEL: vmerge_vv_nxv8i64:
753 ; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma
754 ; CHECK-NEXT: vmerge.vvm v8, v16, v8, v0
756 %vc = select <vscale x 8 x i1> %cond, <vscale x 8 x i64> %va, <vscale x 8 x i64> %vb
757 ret <vscale x 8 x i64> %vc
760 define <vscale x 8 x i64> @vmerge_xv_nxv8i64(<vscale x 8 x i64> %va, i64 %b, <vscale x 8 x i1> %cond) {
761 ; RV32-LABEL: vmerge_xv_nxv8i64:
763 ; RV32-NEXT: addi sp, sp, -16
764 ; RV32-NEXT: .cfi_def_cfa_offset 16
765 ; RV32-NEXT: sw a0, 8(sp)
766 ; RV32-NEXT: sw a1, 12(sp)
767 ; RV32-NEXT: addi a0, sp, 8
768 ; RV32-NEXT: vsetvli a1, zero, e64, m8, ta, mu
769 ; RV32-NEXT: vlse64.v v8, (a0), zero, v0.t
770 ; RV32-NEXT: addi sp, sp, 16
771 ; RV32-NEXT: .cfi_def_cfa_offset 0
774 ; RV64-LABEL: vmerge_xv_nxv8i64:
776 ; RV64-NEXT: vsetvli a1, zero, e64, m8, ta, ma
777 ; RV64-NEXT: vmerge.vxm v8, v8, a0, v0
779 %head = insertelement <vscale x 8 x i64> poison, i64 %b, i32 0
780 %splat = shufflevector <vscale x 8 x i64> %head, <vscale x 8 x i64> poison, <vscale x 8 x i32> zeroinitializer
781 %vc = select <vscale x 8 x i1> %cond, <vscale x 8 x i64> %splat, <vscale x 8 x i64> %va
782 ret <vscale x 8 x i64> %vc
785 define <vscale x 8 x i64> @vmerge_iv_nxv8i64(<vscale x 8 x i64> %va, <vscale x 8 x i1> %cond) {
786 ; CHECK-LABEL: vmerge_iv_nxv8i64:
788 ; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma
789 ; CHECK-NEXT: vmerge.vim v8, v8, 3, v0
791 %vc = select <vscale x 8 x i1> %cond, <vscale x 8 x i64> splat (i64 3), <vscale x 8 x i64> %va
792 ret <vscale x 8 x i64> %vc
795 define <vscale x 8 x i64> @vmerge_truelhs_nxv8i64_0(<vscale x 8 x i64> %va, <vscale x 8 x i64> %vb) {
796 ; CHECK-LABEL: vmerge_truelhs_nxv8i64_0:
799 %vc = select <vscale x 8 x i1> splat (i1 1), <vscale x 8 x i64> %va, <vscale x 8 x i64> %vb
800 ret <vscale x 8 x i64> %vc
803 define <vscale x 8 x i64> @vmerge_falselhs_nxv8i64_0(<vscale x 8 x i64> %va, <vscale x 8 x i64> %vb) {
804 ; CHECK-LABEL: vmerge_falselhs_nxv8i64_0:
806 ; CHECK-NEXT: vmv8r.v v8, v16
808 %vc = select <vscale x 8 x i1> zeroinitializer, <vscale x 8 x i64> %va, <vscale x 8 x i64> %vb
809 ret <vscale x 8 x i64> %vc