1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=thumbv8.1m.main-none-none-eabi -mattr=+mve -verify-machineinstrs %s -o - | FileCheck %s
4 define arm_aapcs_vfpcc i32 @build_v2i_v4i1_1() {
5 ; CHECK-LABEL: build_v2i_v4i1_1:
7 ; CHECK-NEXT: movw r0, #65535
9 %r = call i32 @llvm.arm.mve.pred.v2i.v4i1(<4 x i1> <i1 1, i1 1, i1 1, i1 1>)
12 define arm_aapcs_vfpcc i32 @build_v2i_v4i1_0() {
13 ; CHECK-LABEL: build_v2i_v4i1_0:
15 ; CHECK-NEXT: movs r0, #0
17 %r = call i32 @llvm.arm.mve.pred.v2i.v4i1(<4 x i1> <i1 0, i1 0, i1 0, i1 0>)
20 define arm_aapcs_vfpcc i32 @build_v2i_v4i1_5() {
21 ; CHECK-LABEL: build_v2i_v4i1_5:
23 ; CHECK-NEXT: movw r0, #61680
25 %r = call i32 @llvm.arm.mve.pred.v2i.v4i1(<4 x i1> <i1 0, i1 1, i1 0, i1 1>)
29 define arm_aapcs_vfpcc i32 @build_v2i_v8i1_1() {
30 ; CHECK-LABEL: build_v2i_v8i1_1:
32 ; CHECK-NEXT: movw r0, #65535
34 %r = call i32 @llvm.arm.mve.pred.v2i.v8i1(<8 x i1> <i1 1, i1 1, i1 1, i1 1, i1 1, i1 1, i1 1, i1 1>)
37 define arm_aapcs_vfpcc i32 @build_v2i_v8i1_0() {
38 ; CHECK-LABEL: build_v2i_v8i1_0:
40 ; CHECK-NEXT: movs r0, #0
42 %r = call i32 @llvm.arm.mve.pred.v2i.v8i1(<8 x i1> <i1 0, i1 0, i1 0, i1 0, i1 0, i1 0, i1 0, i1 0>)
45 define arm_aapcs_vfpcc i32 @build_v2i_v8i1_5() {
46 ; CHECK-LABEL: build_v2i_v8i1_5:
48 ; CHECK-NEXT: movw r0, #52428
50 %r = call i32 @llvm.arm.mve.pred.v2i.v8i1(<8 x i1> <i1 0, i1 1, i1 0, i1 1, i1 0, i1 1, i1 0, i1 1>)
54 define arm_aapcs_vfpcc i32 @build_v2i_v16i1_1() {
55 ; CHECK-LABEL: build_v2i_v16i1_1:
57 ; CHECK-NEXT: movw r0, #65535
59 %r = call i32 @llvm.arm.mve.pred.v2i.v16i1(<16 x i1> <i1 1, i1 1, i1 1, i1 1, i1 1, i1 1, i1 1, i1 1, i1 1, i1 1, i1 1, i1 1, i1 1, i1 1, i1 1, i1 1>)
62 define arm_aapcs_vfpcc i32 @build_v2i_v16i1_0() {
63 ; CHECK-LABEL: build_v2i_v16i1_0:
65 ; CHECK-NEXT: movs r0, #0
67 %r = call i32 @llvm.arm.mve.pred.v2i.v16i1(<16 x i1> <i1 0, i1 0, i1 0, i1 0, i1 0, i1 0, i1 0, i1 0, i1 0, i1 0, i1 0, i1 0, i1 0, i1 0, i1 0, i1 0>)
70 define arm_aapcs_vfpcc i32 @build_v2i_v16i1_5() {
71 ; CHECK-LABEL: build_v2i_v16i1_5:
73 ; CHECK-NEXT: movw r0, #43690
75 %r = call i32 @llvm.arm.mve.pred.v2i.v16i1(<16 x i1> <i1 0, i1 1, i1 0, i1 1, i1 0, i1 1, i1 0, i1 1, i1 0, i1 1, i1 0, i1 1, i1 0, i1 1, i1 0, i1 1>)
81 define arm_aapcs_vfpcc <4 x i32> @build_i2v_v4i1_1() {
82 ; CHECK-LABEL: build_i2v_v4i1_1:
84 ; CHECK-NEXT: movw r0, #65535
85 ; CHECK-NEXT: vmov.i32 q0, #0x0
86 ; CHECK-NEXT: vmsr p0, r0
87 ; CHECK-NEXT: vmov.i8 q1, #0xff
88 ; CHECK-NEXT: vpsel q0, q1, q0
90 %c = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 65535)
91 %r = select <4 x i1> %c, <4 x i32> <i32 4294967295, i32 4294967295, i32 4294967295, i32 4294967295>, <4 x i32> <i32 0, i32 0, i32 0, i32 0>
94 define arm_aapcs_vfpcc <4 x i32> @build_i2v_v4i1_0() {
95 ; CHECK-LABEL: build_i2v_v4i1_0:
97 ; CHECK-NEXT: movs r0, #0
98 ; CHECK-NEXT: vmov.i32 q0, #0x0
99 ; CHECK-NEXT: vmsr p0, r0
100 ; CHECK-NEXT: vmov.i8 q1, #0xff
101 ; CHECK-NEXT: vpsel q0, q1, q0
103 %c = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 0)
104 %r = select <4 x i1> %c, <4 x i32> <i32 4294967295, i32 4294967295, i32 4294967295, i32 4294967295>, <4 x i32> <i32 0, i32 0, i32 0, i32 0>
107 define arm_aapcs_vfpcc <4 x i32> @build_i2v_v4i1_5() {
108 ; CHECK-LABEL: build_i2v_v4i1_5:
110 ; CHECK-NEXT: movw r0, #61680
111 ; CHECK-NEXT: vmov.i32 q0, #0x0
112 ; CHECK-NEXT: vmsr p0, r0
113 ; CHECK-NEXT: vmov.i8 q1, #0xff
114 ; CHECK-NEXT: vpsel q0, q1, q0
116 %c = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 61680)
117 %r = select <4 x i1> %c, <4 x i32> <i32 4294967295, i32 4294967295, i32 4294967295, i32 4294967295>, <4 x i32> <i32 0, i32 0, i32 0, i32 0>
121 define arm_aapcs_vfpcc <8 x i16> @build_i2v_v8i1_1() {
122 ; CHECK-LABEL: build_i2v_v8i1_1:
124 ; CHECK-NEXT: movw r0, #65535
125 ; CHECK-NEXT: vmov.i32 q0, #0x0
126 ; CHECK-NEXT: vmsr p0, r0
127 ; CHECK-NEXT: vmov.i8 q1, #0xff
128 ; CHECK-NEXT: vpsel q0, q1, q0
130 %c = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 65535)
131 %r = select <8 x i1> %c, <8 x i16> <i16 65535, i16 65535, i16 65535, i16 65535, i16 65535, i16 65535, i16 65535, i16 65535>, <8 x i16> <i16 0, i16 0, i16 0, i16 0, i16 0, i16 0, i16 0, i16 0>
134 define arm_aapcs_vfpcc <8 x i16> @build_i2v_v8i1_0() {
135 ; CHECK-LABEL: build_i2v_v8i1_0:
137 ; CHECK-NEXT: movs r0, #0
138 ; CHECK-NEXT: vmov.i32 q0, #0x0
139 ; CHECK-NEXT: vmsr p0, r0
140 ; CHECK-NEXT: vmov.i8 q1, #0xff
141 ; CHECK-NEXT: vpsel q0, q1, q0
143 %c = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 0)
144 %r = select <8 x i1> %c, <8 x i16> <i16 65535, i16 65535, i16 65535, i16 65535, i16 65535, i16 65535, i16 65535, i16 65535>, <8 x i16> <i16 0, i16 0, i16 0, i16 0, i16 0, i16 0, i16 0, i16 0>
147 define arm_aapcs_vfpcc <8 x i16> @build_i2v_v8i1_5() {
148 ; CHECK-LABEL: build_i2v_v8i1_5:
150 ; CHECK-NEXT: movw r0, #52428
151 ; CHECK-NEXT: vmov.i32 q0, #0x0
152 ; CHECK-NEXT: vmsr p0, r0
153 ; CHECK-NEXT: vmov.i8 q1, #0xff
154 ; CHECK-NEXT: vpsel q0, q1, q0
156 %c = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 52428)
157 %r = select <8 x i1> %c, <8 x i16> <i16 65535, i16 65535, i16 65535, i16 65535, i16 65535, i16 65535, i16 65535, i16 65535>, <8 x i16> <i16 0, i16 0, i16 0, i16 0, i16 0, i16 0, i16 0, i16 0>
161 define arm_aapcs_vfpcc <16 x i8> @build_i2v_v16i1_1() {
162 ; CHECK-LABEL: build_i2v_v16i1_1:
164 ; CHECK-NEXT: movw r0, #65535
165 ; CHECK-NEXT: vmov.i32 q0, #0x0
166 ; CHECK-NEXT: vmsr p0, r0
167 ; CHECK-NEXT: vmov.i8 q1, #0xff
168 ; CHECK-NEXT: vpsel q0, q1, q0
170 %c = call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 65535)
171 %r = select <16 x i1> %c, <16 x i8> <i8 255, i8 255, i8 255, i8 255, i8 255, i8 255, i8 255, i8 255, i8 255, i8 255, i8 255, i8 255, i8 255, i8 255, i8 255, i8 255>, <16 x i8> <i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0>
174 define arm_aapcs_vfpcc <16 x i8> @build_i2v_v16i1_0() {
175 ; CHECK-LABEL: build_i2v_v16i1_0:
177 ; CHECK-NEXT: movs r0, #0
178 ; CHECK-NEXT: vmov.i32 q0, #0x0
179 ; CHECK-NEXT: vmsr p0, r0
180 ; CHECK-NEXT: vmov.i8 q1, #0xff
181 ; CHECK-NEXT: vpsel q0, q1, q0
183 %c = call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 0)
184 %r = select <16 x i1> %c, <16 x i8> <i8 255, i8 255, i8 255, i8 255, i8 255, i8 255, i8 255, i8 255, i8 255, i8 255, i8 255, i8 255, i8 255, i8 255, i8 255, i8 255>, <16 x i8> <i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0>
187 define arm_aapcs_vfpcc <16 x i8> @build_i2v_v16i1_5() {
188 ; CHECK-LABEL: build_i2v_v16i1_5:
190 ; CHECK-NEXT: movw r0, #43690
191 ; CHECK-NEXT: vmov.i32 q0, #0x0
192 ; CHECK-NEXT: vmsr p0, r0
193 ; CHECK-NEXT: vmov.i8 q1, #0xff
194 ; CHECK-NEXT: vpsel q0, q1, q0
196 %c = call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 43690)
197 %r = select <16 x i1> %c, <16 x i8> <i8 255, i8 255, i8 255, i8 255, i8 255, i8 255, i8 255, i8 255, i8 255, i8 255, i8 255, i8 255, i8 255, i8 255, i8 255, i8 255>, <16 x i8> <i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0>
202 define arm_aapcs_vfpcc i32 @build_i2v2i_v4i1_5() {
203 ; CHECK-LABEL: build_i2v2i_v4i1_5:
205 ; CHECK-NEXT: movw r0, #61680
207 %c = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 61680)
208 %r = call i32 @llvm.arm.mve.pred.v2i.v4i1(<4 x i1> %c)
211 define arm_aapcs_vfpcc i32 @build_i2v2i_v8i1_5() {
212 ; CHECK-LABEL: build_i2v2i_v8i1_5:
214 ; CHECK-NEXT: movw r0, #52428
216 %c = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 52428)
217 %r = call i32 @llvm.arm.mve.pred.v2i.v8i1(<8 x i1> %c)
220 define arm_aapcs_vfpcc i32 @build_i2v2i_v16i1_5() {
221 ; CHECK-LABEL: build_i2v2i_v16i1_5:
223 ; CHECK-NEXT: movw r0, #43690
225 %c = call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 43690)
226 %r = call i32 @llvm.arm.mve.pred.v2i.v16i1(<16 x i1> %c)
231 define arm_aapcs_vfpcc <4 x i32> @build_v2i2v_v4i1_v4i1_5() {
232 ; CHECK-LABEL: build_v2i2v_v4i1_v4i1_5:
234 ; CHECK-NEXT: movw r0, #61680
235 ; CHECK-NEXT: vmov.i32 q0, #0x0
236 ; CHECK-NEXT: vmsr p0, r0
237 ; CHECK-NEXT: vmov.i8 q1, #0xff
238 ; CHECK-NEXT: vpsel q0, q1, q0
240 %b = call i32 @llvm.arm.mve.pred.v2i.v4i1(<4 x i1> <i1 0, i1 1, i1 0, i1 1>)
241 %c = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 %b)
242 %r = select <4 x i1> %c, <4 x i32> <i32 4294967295, i32 4294967295, i32 4294967295, i32 4294967295>, <4 x i32> <i32 0, i32 0, i32 0, i32 0>
245 define arm_aapcs_vfpcc <4 x i32> @build_v2i2v_v8i1_v4i1_5() {
246 ; CHECK-LABEL: build_v2i2v_v8i1_v4i1_5:
248 ; CHECK-NEXT: movw r0, #52428
249 ; CHECK-NEXT: vmov.i32 q0, #0x0
250 ; CHECK-NEXT: vmsr p0, r0
251 ; CHECK-NEXT: vmov.i8 q1, #0xff
252 ; CHECK-NEXT: vpsel q0, q1, q0
254 %b = call i32 @llvm.arm.mve.pred.v2i.v8i1(<8 x i1> <i1 0, i1 1, i1 0, i1 1, i1 0, i1 1, i1 0, i1 1>)
255 %c = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 %b)
256 %r = select <4 x i1> %c, <4 x i32> <i32 4294967295, i32 4294967295, i32 4294967295, i32 4294967295>, <4 x i32> <i32 0, i32 0, i32 0, i32 0>
259 define arm_aapcs_vfpcc <4 x i32> @build_v2i2v_v16i1_v4i1_5() {
260 ; CHECK-LABEL: build_v2i2v_v16i1_v4i1_5:
262 ; CHECK-NEXT: movw r0, #43690
263 ; CHECK-NEXT: vmov.i32 q0, #0x0
264 ; CHECK-NEXT: vmsr p0, r0
265 ; CHECK-NEXT: vmov.i8 q1, #0xff
266 ; CHECK-NEXT: vpsel q0, q1, q0
268 %b = call i32 @llvm.arm.mve.pred.v2i.v16i1(<16 x i1> <i1 0, i1 1, i1 0, i1 1, i1 0, i1 1, i1 0, i1 1, i1 0, i1 1, i1 0, i1 1, i1 0, i1 1, i1 0, i1 1>)
269 %c = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 %b)
270 %r = select <4 x i1> %c, <4 x i32> <i32 4294967295, i32 4294967295, i32 4294967295, i32 4294967295>, <4 x i32> <i32 0, i32 0, i32 0, i32 0>
274 define arm_aapcs_vfpcc <8 x i16> @build_v2i2v_v4i1_v8i1_5() {
275 ; CHECK-LABEL: build_v2i2v_v4i1_v8i1_5:
277 ; CHECK-NEXT: movw r0, #61680
278 ; CHECK-NEXT: vmov.i32 q0, #0x0
279 ; CHECK-NEXT: vmsr p0, r0
280 ; CHECK-NEXT: vmov.i8 q1, #0xff
281 ; CHECK-NEXT: vpsel q0, q1, q0
283 %b = call i32 @llvm.arm.mve.pred.v2i.v4i1(<4 x i1> <i1 0, i1 1, i1 0, i1 1>)
284 %c = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 %b)
285 %r = select <8 x i1> %c, <8 x i16> <i16 65535, i16 65535, i16 65535, i16 65535, i16 65535, i16 65535, i16 65535, i16 65535>, <8 x i16> <i16 0, i16 0, i16 0, i16 0, i16 0, i16 0, i16 0, i16 0>
288 define arm_aapcs_vfpcc <8 x i16> @build_v2i2v_v8i1_v8i1_5() {
289 ; CHECK-LABEL: build_v2i2v_v8i1_v8i1_5:
291 ; CHECK-NEXT: movw r0, #52428
292 ; CHECK-NEXT: vmov.i32 q0, #0x0
293 ; CHECK-NEXT: vmsr p0, r0
294 ; CHECK-NEXT: vmov.i8 q1, #0xff
295 ; CHECK-NEXT: vpsel q0, q1, q0
297 %b = call i32 @llvm.arm.mve.pred.v2i.v8i1(<8 x i1> <i1 0, i1 1, i1 0, i1 1, i1 0, i1 1, i1 0, i1 1>)
298 %c = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 %b)
299 %r = select <8 x i1> %c, <8 x i16> <i16 65535, i16 65535, i16 65535, i16 65535, i16 65535, i16 65535, i16 65535, i16 65535>, <8 x i16> <i16 0, i16 0, i16 0, i16 0, i16 0, i16 0, i16 0, i16 0>
302 define arm_aapcs_vfpcc <8 x i16> @build_v2i2v_v16i1_v8i1_5() {
303 ; CHECK-LABEL: build_v2i2v_v16i1_v8i1_5:
305 ; CHECK-NEXT: movw r0, #43690
306 ; CHECK-NEXT: vmov.i32 q0, #0x0
307 ; CHECK-NEXT: vmsr p0, r0
308 ; CHECK-NEXT: vmov.i8 q1, #0xff
309 ; CHECK-NEXT: vpsel q0, q1, q0
311 %b = call i32 @llvm.arm.mve.pred.v2i.v16i1(<16 x i1> <i1 0, i1 1, i1 0, i1 1, i1 0, i1 1, i1 0, i1 1, i1 0, i1 1, i1 0, i1 1, i1 0, i1 1, i1 0, i1 1>)
312 %c = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 %b)
313 %r = select <8 x i1> %c, <8 x i16> <i16 65535, i16 65535, i16 65535, i16 65535, i16 65535, i16 65535, i16 65535, i16 65535>, <8 x i16> <i16 0, i16 0, i16 0, i16 0, i16 0, i16 0, i16 0, i16 0>
317 define arm_aapcs_vfpcc <16 x i8> @build_v2i2v_v4i1_v16i1_5() {
318 ; CHECK-LABEL: build_v2i2v_v4i1_v16i1_5:
320 ; CHECK-NEXT: movw r0, #61680
321 ; CHECK-NEXT: vmov.i32 q0, #0x0
322 ; CHECK-NEXT: vmsr p0, r0
323 ; CHECK-NEXT: vmov.i8 q1, #0xff
324 ; CHECK-NEXT: vpsel q0, q1, q0
326 %b = call i32 @llvm.arm.mve.pred.v2i.v4i1(<4 x i1> <i1 0, i1 1, i1 0, i1 1>)
327 %c = call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 %b)
328 %r = select <16 x i1> %c, <16 x i8> <i8 255, i8 255, i8 255, i8 255, i8 255, i8 255, i8 255, i8 255, i8 255, i8 255, i8 255, i8 255, i8 255, i8 255, i8 255, i8 255>, <16 x i8> <i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0>
331 define arm_aapcs_vfpcc <16 x i8> @build_v2i2v_v8i1_v16i1_5() {
332 ; CHECK-LABEL: build_v2i2v_v8i1_v16i1_5:
334 ; CHECK-NEXT: movw r0, #52428
335 ; CHECK-NEXT: vmov.i32 q0, #0x0
336 ; CHECK-NEXT: vmsr p0, r0
337 ; CHECK-NEXT: vmov.i8 q1, #0xff
338 ; CHECK-NEXT: vpsel q0, q1, q0
340 %b = call i32 @llvm.arm.mve.pred.v2i.v8i1(<8 x i1> <i1 0, i1 1, i1 0, i1 1, i1 0, i1 1, i1 0, i1 1>)
341 %c = call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 %b)
342 %r = select <16 x i1> %c, <16 x i8> <i8 255, i8 255, i8 255, i8 255, i8 255, i8 255, i8 255, i8 255, i8 255, i8 255, i8 255, i8 255, i8 255, i8 255, i8 255, i8 255>, <16 x i8> <i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0>
345 define arm_aapcs_vfpcc <16 x i8> @build_v2i2v_v16i1_v16i1_5() {
346 ; CHECK-LABEL: build_v2i2v_v16i1_v16i1_5:
348 ; CHECK-NEXT: movw r0, #43690
349 ; CHECK-NEXT: vmov.i32 q0, #0x0
350 ; CHECK-NEXT: vmsr p0, r0
351 ; CHECK-NEXT: vmov.i8 q1, #0xff
352 ; CHECK-NEXT: vpsel q0, q1, q0
354 %b = call i32 @llvm.arm.mve.pred.v2i.v16i1(<16 x i1> <i1 0, i1 1, i1 0, i1 1, i1 0, i1 1, i1 0, i1 1, i1 0, i1 1, i1 0, i1 1, i1 0, i1 1, i1 0, i1 1>)
355 %c = call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 %b)
356 %r = select <16 x i1> %c, <16 x i8> <i8 255, i8 255, i8 255, i8 255, i8 255, i8 255, i8 255, i8 255, i8 255, i8 255, i8 255, i8 255, i8 255, i8 255, i8 255, i8 255>, <16 x i8> <i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0>
360 declare i32 @llvm.arm.mve.pred.v2i.v4i1(<4 x i1>)
361 declare i32 @llvm.arm.mve.pred.v2i.v8i1(<8 x i1>)
362 declare i32 @llvm.arm.mve.pred.v2i.v16i1(<16 x i1>)
364 declare <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32)
365 declare <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32)
366 declare <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32)