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 --check-prefix=CHECK --check-prefix=CHECKLE
3 ; RUN: llc -mtriple=thumbv8.1m.main-none-none-eabi -mattr=+mve.fp -verify-machineinstrs %s -o - | FileCheck %s --check-prefix=CHECK --check-prefix=CHECKLE
4 ; RUN: llc -mtriple=thumbebv8.1m.main-none-none-eabi -mattr=+mve.fp -verify-machineinstrs %s -o - | FileCheck %s --check-prefix=CHECK --check-prefix=CHECKBE
6 define arm_aapcs_vfpcc <16 x i8> @mov_int8_1() {
7 ; CHECK-LABEL: mov_int8_1:
8 ; CHECK: @ %bb.0: @ %entry
9 ; CHECK-NEXT: vmov.i8 q0, #0x1
12 ret <16 x i8> <i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1>
15 define arm_aapcs_vfpcc <16 x i8> @mov_int8_m1() {
16 ; CHECK-LABEL: mov_int8_m1:
17 ; CHECK: @ %bb.0: @ %entry
18 ; CHECK-NEXT: vmov.i8 q0, #0xff
21 ret <16 x i8> <i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1>
24 ; This has 0x01020304 or 0x04030201 vdup.32'd to q reg depending on endianness.
25 ; The big endian is different as there is an implicit vrev64.8 out of the
26 ; function, which gets constant folded away.
27 define arm_aapcs_vfpcc <16 x i8> @mov_int8_1234() {
28 ; CHECKLE-LABEL: mov_int8_1234:
29 ; CHECKLE: @ %bb.0: @ %entry
30 ; CHECKLE-NEXT: movw r0, #513
31 ; CHECKLE-NEXT: movt r0, #1027
32 ; CHECKLE-NEXT: vdup.32 q0, r0
35 ; CHECKBE-LABEL: mov_int8_1234:
36 ; CHECKBE: @ %bb.0: @ %entry
37 ; CHECKBE-NEXT: movw r0, #772
38 ; CHECKBE-NEXT: movt r0, #258
39 ; CHECKBE-NEXT: vdup.32 q0, r0
42 ret <16 x i8> <i8 1, i8 2, i8 3, i8 4, i8 1, i8 2, i8 3, i8 4, i8 1, i8 2, i8 3, i8 4, i8 1, i8 2, i8 3, i8 4>
45 define arm_aapcs_vfpcc <8 x i16> @mov_int16_1() {
46 ; CHECK-LABEL: mov_int16_1:
47 ; CHECK: @ %bb.0: @ %entry
48 ; CHECK-NEXT: vmov.i16 q0, #0x1
51 ret <8 x i16> <i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1>
54 define arm_aapcs_vfpcc <8 x i16> @mov_int16_m1() {
55 ; CHECK-LABEL: mov_int16_m1:
56 ; CHECK: @ %bb.0: @ %entry
57 ; CHECK-NEXT: vmov.i8 q0, #0xff
60 ret <8 x i16> <i16 -1, i16 -1, i16 -1, i16 -1, i16 -1, i16 -1, i16 -1, i16 -1>
63 define arm_aapcs_vfpcc <8 x i16> @mov_int16_256() {
64 ; CHECK-LABEL: mov_int16_256:
65 ; CHECK: @ %bb.0: @ %entry
66 ; CHECK-NEXT: vmov.i16 q0, #0x100
69 ret <8 x i16> <i16 256, i16 256, i16 256, i16 256, i16 256, i16 256, i16 256, i16 256>
72 define arm_aapcs_vfpcc <8 x i16> @mov_int16_257() {
73 ; CHECK-LABEL: mov_int16_257:
74 ; CHECK: @ %bb.0: @ %entry
75 ; CHECK-NEXT: vmov.i8 q0, #0x1
78 ret <8 x i16> <i16 257, i16 257, i16 257, i16 257, i16 257, i16 257, i16 257, i16 257>
81 define arm_aapcs_vfpcc <8 x i16> @mov_int16_258() {
82 ; CHECK-LABEL: mov_int16_258:
83 ; CHECK: @ %bb.0: @ %entry
84 ; CHECK-NEXT: mov.w r0, #258
85 ; CHECK-NEXT: vdup.16 q0, r0
88 ret <8 x i16> <i16 258, i16 258, i16 258, i16 258, i16 258, i16 258, i16 258, i16 258>
91 define arm_aapcs_vfpcc <4 x i32> @mov_int32_1() {
92 ; CHECK-LABEL: mov_int32_1:
93 ; CHECK: @ %bb.0: @ %entry
94 ; CHECK-NEXT: vmov.i32 q0, #0x1
97 ret <4 x i32> <i32 1, i32 1, i32 1, i32 1>
100 define arm_aapcs_vfpcc <4 x i32> @mov_int32_256() {
101 ; CHECK-LABEL: mov_int32_256:
102 ; CHECK: @ %bb.0: @ %entry
103 ; CHECK-NEXT: vmov.i32 q0, #0x100
106 ret <4 x i32> <i32 256, i32 256, i32 256, i32 256>
109 define arm_aapcs_vfpcc <4 x i32> @mov_int32_65536() {
110 ; CHECK-LABEL: mov_int32_65536:
111 ; CHECK: @ %bb.0: @ %entry
112 ; CHECK-NEXT: vmov.i32 q0, #0x10000
115 ret <4 x i32> <i32 65536, i32 65536, i32 65536, i32 65536>
118 define arm_aapcs_vfpcc <4 x i32> @mov_int32_16777216() {
119 ; CHECK-LABEL: mov_int32_16777216:
120 ; CHECK: @ %bb.0: @ %entry
121 ; CHECK-NEXT: vmov.i32 q0, #0x1000000
124 ret <4 x i32> <i32 16777216, i32 16777216, i32 16777216, i32 16777216>
127 define arm_aapcs_vfpcc <4 x i32> @mov_int32_16777217() {
128 ; CHECK-LABEL: mov_int32_16777217:
129 ; CHECK: @ %bb.0: @ %entry
130 ; CHECK-NEXT: movs r0, #1
131 ; CHECK-NEXT: movt r0, #256
132 ; CHECK-NEXT: vdup.32 q0, r0
135 ret <4 x i32> <i32 16777217, i32 16777217, i32 16777217, i32 16777217>
138 define arm_aapcs_vfpcc <4 x i32> @mov_int32_17919() {
139 ; CHECK-LABEL: mov_int32_17919:
140 ; CHECK: @ %bb.0: @ %entry
141 ; CHECK-NEXT: vmov.i32 q0, #0x45ff
144 ret <4 x i32> <i32 17919, i32 17919, i32 17919, i32 17919>
147 define arm_aapcs_vfpcc <4 x i32> @mov_int32_4587519() {
148 ; CHECK-LABEL: mov_int32_4587519:
149 ; CHECK: @ %bb.0: @ %entry
150 ; CHECK-NEXT: vmov.i32 q0, #0x45ffff
153 ret <4 x i32> <i32 4587519, i32 4587519, i32 4587519, i32 4587519>
156 define arm_aapcs_vfpcc <4 x i32> @mov_int32_m1() {
157 ; CHECK-LABEL: mov_int32_m1:
158 ; CHECK: @ %bb.0: @ %entry
159 ; CHECK-NEXT: vmov.i8 q0, #0xff
162 ret <4 x i32> <i32 -1, i32 -1, i32 -1, i32 -1>
165 define arm_aapcs_vfpcc <4 x i32> @mov_int32_4294901760() {
166 ; CHECK-LABEL: mov_int32_4294901760:
167 ; CHECK: @ %bb.0: @ %entry
168 ; CHECK-NEXT: vmvn.i32 q0, #0xffff
171 ret <4 x i32> <i32 4294901760, i32 4294901760, i32 4294901760, i32 4294901760>
174 define arm_aapcs_vfpcc <4 x i32> @mov_int32_4278190335() {
175 ; CHECK-LABEL: mov_int32_4278190335:
176 ; CHECK: @ %bb.0: @ %entry
177 ; CHECK-NEXT: movs r0, #255
178 ; CHECK-NEXT: movt r0, #65280
179 ; CHECK-NEXT: vdup.32 q0, r0
182 ret <4 x i32> <i32 4278190335, i32 4278190335, i32 4278190335, i32 4278190335>
185 define arm_aapcs_vfpcc <4 x i32> @mov_int32_4278255615() {
186 ; CHECK-LABEL: mov_int32_4278255615:
187 ; CHECK: @ %bb.0: @ %entry
188 ; CHECK-NEXT: vmvn.i32 q0, #0xff0000
191 ret <4 x i32> <i32 4278255615, i32 4278255615, i32 4278255615, i32 4278255615>
194 define arm_aapcs_vfpcc <4 x i32> @mov_int32_16908546() {
195 ; CHECK-LABEL: mov_int32_16908546:
196 ; CHECK: @ %bb.0: @ %entry
197 ; CHECK-NEXT: mov.w r0, #258
198 ; CHECK-NEXT: vdup.16 q0, r0
201 ret <4 x i32> <i32 16908546, i32 16908546, i32 16908546, i32 16908546>
204 define arm_aapcs_vfpcc <2 x i64> @mov_int64_1() {
205 ; CHECKLE-LABEL: mov_int64_1:
206 ; CHECKLE: @ %bb.0: @ %entry
207 ; CHECKLE-NEXT: adr r0, .LCPI20_0
208 ; CHECKLE-NEXT: vldrw.u32 q0, [r0]
209 ; CHECKLE-NEXT: bx lr
210 ; CHECKLE-NEXT: .p2align 4
211 ; CHECKLE-NEXT: @ %bb.1:
212 ; CHECKLE-NEXT: .LCPI20_0:
213 ; CHECKLE-NEXT: .long 1 @ double 4.9406564584124654E-324
214 ; CHECKLE-NEXT: .long 0
215 ; CHECKLE-NEXT: .long 1 @ double 4.9406564584124654E-324
216 ; CHECKLE-NEXT: .long 0
218 ; CHECKBE-LABEL: mov_int64_1:
219 ; CHECKBE: @ %bb.0: @ %entry
220 ; CHECKBE-NEXT: adr r0, .LCPI20_0
221 ; CHECKBE-NEXT: vldrb.u8 q1, [r0]
222 ; CHECKBE-NEXT: vrev64.8 q0, q1
223 ; CHECKBE-NEXT: bx lr
224 ; CHECKBE-NEXT: .p2align 4
225 ; CHECKBE-NEXT: @ %bb.1:
226 ; CHECKBE-NEXT: .LCPI20_0:
227 ; CHECKBE-NEXT: .long 0 @ double 4.9406564584124654E-324
228 ; CHECKBE-NEXT: .long 1
229 ; CHECKBE-NEXT: .long 0 @ double 4.9406564584124654E-324
230 ; CHECKBE-NEXT: .long 1
232 ret <2 x i64> <i64 1, i64 1>
235 define arm_aapcs_vfpcc <2 x i64> @mov_int64_ff() {
236 ; CHECK-LABEL: mov_int64_ff:
237 ; CHECK: @ %bb.0: @ %entry
238 ; CHECK-NEXT: vmov.i64 q0, #0xff
241 ret <2 x i64> < i64 255, i64 255 >
244 define arm_aapcs_vfpcc <2 x i64> @mov_int64_m1() {
245 ; CHECK-LABEL: mov_int64_m1:
246 ; CHECK: @ %bb.0: @ %entry
247 ; CHECK-NEXT: vmov.i8 q0, #0xff
250 ret <2 x i64> < i64 -1, i64 -1 >
253 define arm_aapcs_vfpcc <2 x i64> @mov_int64_ff0000ff0000ffff() {
254 ; CHECK-LABEL: mov_int64_ff0000ff0000ffff:
255 ; CHECK: @ %bb.0: @ %entry
256 ; CHECK-NEXT: vmov.i64 q0, #0xff0000ff0000ffff
259 ret <2 x i64> < i64 18374687574888349695, i64 18374687574888349695 >
262 define arm_aapcs_vfpcc <2 x i64> @mov_int64_f_0() {
263 ; CHECKLE-LABEL: mov_int64_f_0:
264 ; CHECKLE: @ %bb.0: @ %entry
265 ; CHECKLE-NEXT: adr r0, .LCPI24_0
266 ; CHECKLE-NEXT: vldrw.u32 q0, [r0]
267 ; CHECKLE-NEXT: bx lr
268 ; CHECKLE-NEXT: .p2align 4
269 ; CHECKLE-NEXT: @ %bb.1:
270 ; CHECKLE-NEXT: .LCPI24_0:
271 ; CHECKLE-NEXT: .long 255 @ double 1.2598673968951787E-321
272 ; CHECKLE-NEXT: .long 0
273 ; CHECKLE-NEXT: .long 0 @ double 0
274 ; CHECKLE-NEXT: .long 0
276 ; CHECKBE-LABEL: mov_int64_f_0:
277 ; CHECKBE: @ %bb.0: @ %entry
278 ; CHECKBE-NEXT: adr r0, .LCPI24_0
279 ; CHECKBE-NEXT: vldrb.u8 q1, [r0]
280 ; CHECKBE-NEXT: vrev64.8 q0, q1
281 ; CHECKBE-NEXT: bx lr
282 ; CHECKBE-NEXT: .p2align 4
283 ; CHECKBE-NEXT: @ %bb.1:
284 ; CHECKBE-NEXT: .LCPI24_0:
285 ; CHECKBE-NEXT: .long 0 @ double 1.2598673968951787E-321
286 ; CHECKBE-NEXT: .long 255
287 ; CHECKBE-NEXT: .long 0 @ double 0
288 ; CHECKBE-NEXT: .long 0
290 ret <2 x i64> < i64 255, i64 0 >
293 define arm_aapcs_vfpcc <16 x i8> @mov_int64_0f000f0f() {
294 ; CHECKLE-LABEL: mov_int64_0f000f0f:
295 ; CHECKLE: @ %bb.0: @ %entry
296 ; CHECKLE-NEXT: vmov.i64 q0, #0xff000000ff00ff
297 ; CHECKLE-NEXT: bx lr
299 ; CHECKBE-LABEL: mov_int64_0f000f0f:
300 ; CHECKBE: @ %bb.0: @ %entry
301 ; CHECKBE-NEXT: vmov.i64 q0, #0xff00ff000000ff00
302 ; CHECKBE-NEXT: bx lr
304 ret <16 x i8> <i8 -1, i8 0, i8 -1, i8 0, i8 0, i8 0, i8 -1, i8 0, i8 -1, i8 0, i8 -1, i8 0, i8 0, i8 0, i8 -1, i8 0>
307 define arm_aapcs_vfpcc <8 x i16> @mov_int64_ff00ffff() {
308 ; CHECKLE-LABEL: mov_int64_ff00ffff:
309 ; CHECKLE: @ %bb.0: @ %entry
310 ; CHECKLE-NEXT: vmov.i64 q0, #0xffffffff0000ffff
311 ; CHECKLE-NEXT: bx lr
313 ; CHECKBE-LABEL: mov_int64_ff00ffff:
314 ; CHECKBE: @ %bb.0: @ %entry
315 ; CHECKBE-NEXT: vmov.i64 q0, #0xffff0000ffffffff
316 ; CHECKBE-NEXT: bx lr
318 ret <8 x i16> <i16 -1, i16 0, i16 -1, i16 -1, i16 -1, i16 0, i16 -1, i16 -1>
321 define arm_aapcs_vfpcc <16 x i8> @mov_int64_0f0f0f0f0f0f0f0f() {
322 ; CHECKLE-LABEL: mov_int64_0f0f0f0f0f0f0f0f:
323 ; CHECKLE: @ %bb.0: @ %entry
324 ; CHECKLE-NEXT: vmov.i16 q0, #0xff
325 ; CHECKLE-NEXT: bx lr
327 ; CHECKBE-LABEL: mov_int64_0f0f0f0f0f0f0f0f:
328 ; CHECKBE: @ %bb.0: @ %entry
329 ; CHECKBE-NEXT: vmov.i16 q0, #0xff00
330 ; CHECKBE-NEXT: bx lr
332 ret <16 x i8> <i8 -1, i8 0, i8 -1, i8 0, i8 -1, i8 0, i8 -1, i8 0, i8 -1, i8 0, i8 -1, i8 0, i8 -1, i8 0, i8 -1, i8 0>
335 define arm_aapcs_vfpcc <4 x float> @mov_float_1() {
336 ; CHECK-LABEL: mov_float_1:
337 ; CHECK: @ %bb.0: @ %entry
338 ; CHECK-NEXT: mov.w r0, #1065353216
339 ; CHECK-NEXT: vdup.32 q0, r0
342 ret <4 x float> <float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00>
345 define arm_aapcs_vfpcc <4 x float> @mov_float_m3() {
346 ; CHECK-LABEL: mov_float_m3:
347 ; CHECK: @ %bb.0: @ %entry
348 ; CHECK-NEXT: movs r0, #0
349 ; CHECK-NEXT: movt r0, #49216
350 ; CHECK-NEXT: vdup.32 q0, r0
353 ret <4 x float> <float -3.000000e+00, float -3.000000e+00, float -3.000000e+00, float -3.000000e+00>
356 define arm_aapcs_vfpcc <8 x half> @mov_float16_1() {
357 ; CHECK-LABEL: mov_float16_1:
358 ; CHECK: @ %bb.0: @ %entry
359 ; CHECK-NEXT: vmov.i16 q0, #0x3c00
363 ret <8 x half> <half 1.000000e+00, half 1.000000e+00, half 1.000000e+00, half 1.000000e+00, half 1.000000e+00, half 1.000000e+00, half 1.000000e+00, half 1.000000e+00>
366 define arm_aapcs_vfpcc <8 x half> @mov_float16_m3() {
367 ; CHECK-LABEL: mov_float16_m3:
368 ; CHECK: @ %bb.0: @ %entry
369 ; CHECK-NEXT: vmov.i16 q0, #0xc200
373 ret <8 x half> <half -3.000000e+00, half -3.000000e+00, half -3.000000e+00, half -3.000000e+00, half -3.000000e+00, half -3.000000e+00, half -3.000000e+00, half -3.000000e+00>
376 define arm_aapcs_vfpcc <2 x double> @mov_double_1() {
377 ; CHECKLE-LABEL: mov_double_1:
378 ; CHECKLE: @ %bb.0: @ %entry
379 ; CHECKLE-NEXT: adr r0, .LCPI32_0
380 ; CHECKLE-NEXT: vldrw.u32 q0, [r0]
381 ; CHECKLE-NEXT: bx lr
382 ; CHECKLE-NEXT: .p2align 4
383 ; CHECKLE-NEXT: @ %bb.1:
384 ; CHECKLE-NEXT: .LCPI32_0:
385 ; CHECKLE-NEXT: .long 0 @ double 1
386 ; CHECKLE-NEXT: .long 1072693248
387 ; CHECKLE-NEXT: .long 0 @ double 1
388 ; CHECKLE-NEXT: .long 1072693248
390 ; CHECKBE-LABEL: mov_double_1:
391 ; CHECKBE: @ %bb.0: @ %entry
392 ; CHECKBE-NEXT: adr r0, .LCPI32_0
393 ; CHECKBE-NEXT: vldrb.u8 q1, [r0]
394 ; CHECKBE-NEXT: vrev64.8 q0, q1
395 ; CHECKBE-NEXT: bx lr
396 ; CHECKBE-NEXT: .p2align 4
397 ; CHECKBE-NEXT: @ %bb.1:
398 ; CHECKBE-NEXT: .LCPI32_0:
399 ; CHECKBE-NEXT: .long 1072693248 @ double 1
400 ; CHECKBE-NEXT: .long 0
401 ; CHECKBE-NEXT: .long 1072693248 @ double 1
402 ; CHECKBE-NEXT: .long 0
404 ret <2 x double> <double 1.000000e+00, double 1.000000e+00>
407 define arm_aapcs_vfpcc <16 x i8> @test(<16 x i8> %i) {
408 ; CHECKLE-LABEL: test:
409 ; CHECKLE: @ %bb.0: @ %entry
410 ; CHECKLE-NEXT: vmov.i64 q1, #0xff000000ff00ff
411 ; CHECKLE-NEXT: vorr q0, q0, q1
412 ; CHECKLE-NEXT: bx lr
414 ; CHECKBE-LABEL: test:
415 ; CHECKBE: @ %bb.0: @ %entry
416 ; CHECKBE-NEXT: vmov.i64 q1, #0xff00ff000000ff00
417 ; CHECKBE-NEXT: vrev64.8 q2, q1
418 ; CHECKBE-NEXT: vrev64.8 q1, q0
419 ; CHECKBE-NEXT: vorr q1, q1, q2
420 ; CHECKBE-NEXT: vrev64.8 q0, q1
421 ; CHECKBE-NEXT: bx lr
423 %o = or <16 x i8> %i, <i8 -1, i8 0, i8 -1, i8 0, i8 0, i8 0, i8 -1, i8 0, i8 -1, i8 0, i8 -1, i8 0, i8 0, i8 0, i8 -1, i8 0>
427 define arm_aapcs_vfpcc <8 x i16> @test2(<8 x i16> %i) {
428 ; CHECKLE-LABEL: test2:
429 ; CHECKLE: @ %bb.0: @ %entry
430 ; CHECKLE-NEXT: vmov.i64 q1, #0xffffffff0000ffff
431 ; CHECKLE-NEXT: vorr q0, q0, q1
432 ; CHECKLE-NEXT: bx lr
434 ; CHECKBE-LABEL: test2:
435 ; CHECKBE: @ %bb.0: @ %entry
436 ; CHECKBE-NEXT: vmov.i64 q1, #0xffff0000ffffffff
437 ; CHECKBE-NEXT: vrev64.16 q2, q1
438 ; CHECKBE-NEXT: vrev64.16 q1, q0
439 ; CHECKBE-NEXT: vorr q1, q1, q2
440 ; CHECKBE-NEXT: vrev64.16 q0, q1
441 ; CHECKBE-NEXT: bx lr
443 %o = or <8 x i16> %i, <i16 -1, i16 0, i16 -1, i16 -1, i16 -1, i16 0, i16 -1, i16 -1>
447 define arm_aapcs_vfpcc <4 x i32> @i1and_vmov(<4 x i32> %a, <4 x i32> %b, i32 %c) {
448 ; CHECKLE-LABEL: i1and_vmov:
449 ; CHECKLE: @ %bb.0: @ %entry
450 ; CHECKLE-NEXT: cmp r0, #0
451 ; CHECKLE-NEXT: mov.w r1, #15
452 ; CHECKLE-NEXT: csetm r0, eq
453 ; CHECKLE-NEXT: ands r0, r1
454 ; CHECKLE-NEXT: vmsr p0, r0
455 ; CHECKLE-NEXT: vpsel q0, q0, q1
456 ; CHECKLE-NEXT: bx lr
458 ; CHECKBE-LABEL: i1and_vmov:
459 ; CHECKBE: @ %bb.0: @ %entry
460 ; CHECKBE-NEXT: cmp r0, #0
461 ; CHECKBE-NEXT: mov.w r1, #15
462 ; CHECKBE-NEXT: csetm r0, eq
463 ; CHECKBE-NEXT: vrev64.32 q2, q1
464 ; CHECKBE-NEXT: ands r0, r1
465 ; CHECKBE-NEXT: vrev64.32 q1, q0
466 ; CHECKBE-NEXT: vmsr p0, r0
467 ; CHECKBE-NEXT: vpsel q1, q1, q2
468 ; CHECKBE-NEXT: vrev64.32 q0, q1
469 ; CHECKBE-NEXT: bx lr
471 %c1 = icmp eq i32 %c, zeroinitializer
472 %broadcast.splatinsert1967 = insertelement <4 x i1> undef, i1 %c1, i32 0
473 %broadcast.splat1968 = shufflevector <4 x i1> %broadcast.splatinsert1967, <4 x i1> undef, <4 x i32> zeroinitializer
474 %l699 = and <4 x i1> %broadcast.splat1968, <i1 true, i1 false, i1 false, i1 false>
475 %s = select <4 x i1> %l699, <4 x i32> %a, <4 x i32> %b
479 define arm_aapcs_vfpcc <4 x i32> @i1or_vmov(<4 x i32> %a, <4 x i32> %b, i32 %c) {
480 ; CHECKLE-LABEL: i1or_vmov:
481 ; CHECKLE: @ %bb.0: @ %entry
482 ; CHECKLE-NEXT: cmp r0, #0
483 ; CHECKLE-NEXT: mov.w r1, #15
484 ; CHECKLE-NEXT: csetm r0, eq
485 ; CHECKLE-NEXT: orrs r0, r1
486 ; CHECKLE-NEXT: vmsr p0, r0
487 ; CHECKLE-NEXT: vpsel q0, q0, q1
488 ; CHECKLE-NEXT: bx lr
490 ; CHECKBE-LABEL: i1or_vmov:
491 ; CHECKBE: @ %bb.0: @ %entry
492 ; CHECKBE-NEXT: cmp r0, #0
493 ; CHECKBE-NEXT: mov.w r1, #15
494 ; CHECKBE-NEXT: csetm r0, eq
495 ; CHECKBE-NEXT: vrev64.32 q2, q1
496 ; CHECKBE-NEXT: orrs r0, r1
497 ; CHECKBE-NEXT: vrev64.32 q1, q0
498 ; CHECKBE-NEXT: vmsr p0, r0
499 ; CHECKBE-NEXT: vpsel q1, q1, q2
500 ; CHECKBE-NEXT: vrev64.32 q0, q1
501 ; CHECKBE-NEXT: bx lr
503 %c1 = icmp eq i32 %c, zeroinitializer
504 %broadcast.splatinsert1967 = insertelement <4 x i1> undef, i1 %c1, i32 0
505 %broadcast.splat1968 = shufflevector <4 x i1> %broadcast.splatinsert1967, <4 x i1> undef, <4 x i32> zeroinitializer
506 %l699 = or <4 x i1> %broadcast.splat1968, <i1 true, i1 false, i1 false, i1 false>
507 %s = select <4 x i1> %l699, <4 x i32> %a, <4 x i32> %b
511 define arm_aapcs_vfpcc <2 x i64> @v2i1and_vmov(<2 x i64> %a, <2 x i64> %b, i32 %c) {
512 ; CHECK-LABEL: v2i1and_vmov:
513 ; CHECK: @ %bb.0: @ %entry
514 ; CHECK-NEXT: cmp r0, #0
515 ; CHECK-NEXT: mov.w r1, #0
516 ; CHECK-NEXT: csetm r0, eq
517 ; CHECK-NEXT: bfi r1, r0, #0, #8
518 ; CHECK-NEXT: vmsr p0, r1
519 ; CHECK-NEXT: vpsel q0, q0, q1
522 %c1 = icmp eq i32 %c, zeroinitializer
523 %broadcast.splatinsert1967 = insertelement <2 x i1> undef, i1 %c1, i32 0
524 %broadcast.splat1968 = shufflevector <2 x i1> %broadcast.splatinsert1967, <2 x i1> undef, <2 x i32> zeroinitializer
525 %l699 = and <2 x i1> %broadcast.splat1968, <i1 true, i1 false>
526 %s = select <2 x i1> %l699, <2 x i64> %a, <2 x i64> %b
530 define arm_aapcs_vfpcc <2 x i64> @v2i1or_vmov(<2 x i64> %a, <2 x i64> %b, i32 %c) {
531 ; CHECK-LABEL: v2i1or_vmov:
532 ; CHECK: @ %bb.0: @ %entry
533 ; CHECK-NEXT: cmp r0, #0
534 ; CHECK-NEXT: mov.w r1, #255
535 ; CHECK-NEXT: csetm r0, eq
536 ; CHECK-NEXT: bfi r1, r0, #8, #8
537 ; CHECK-NEXT: vmsr p0, r1
538 ; CHECK-NEXT: vpsel q0, q0, q1
541 %c1 = icmp eq i32 %c, zeroinitializer
542 %broadcast.splatinsert1967 = insertelement <2 x i1> undef, i1 %c1, i32 0
543 %broadcast.splat1968 = shufflevector <2 x i1> %broadcast.splatinsert1967, <2 x i1> undef, <2 x i32> zeroinitializer
544 %l699 = or <2 x i1> %broadcast.splat1968, <i1 true, i1 false>
545 %s = select <2 x i1> %l699, <2 x i64> %a, <2 x i64> %b