1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=arm-eabi -mattr=+neon,+fullfp16 %s -o - | FileCheck --check-prefixes=CHECK,CHECK-LE %s
3 ; RUN: llc -mtriple=armeb-eabi -mattr=+neon,+fullfp16 %s -o - | FileCheck --check-prefixes=CHECK,CHECK-BE %s
5 define arm_aapcs_vfpcc <8 x i8> @v_movi8() nounwind {
6 ; CHECK-LABEL: v_movi8:
8 ; CHECK-NEXT: vmov.i8 d0, #0x8
9 ; CHECK-NEXT: mov pc, lr
10 ret <8 x i8> < i8 8, i8 8, i8 8, i8 8, i8 8, i8 8, i8 8, i8 8 >
13 define arm_aapcs_vfpcc <4 x i16> @v_movi16a() nounwind {
14 ; CHECK-LABEL: v_movi16a:
16 ; CHECK-NEXT: vmov.i16 d0, #0x10
17 ; CHECK-NEXT: mov pc, lr
18 ret <4 x i16> < i16 16, i16 16, i16 16, i16 16 >
21 define arm_aapcs_vfpcc <4 x i16> @v_movi16b() nounwind {
22 ; CHECK-LABEL: v_movi16b:
24 ; CHECK-NEXT: vmov.i16 d0, #0x1000
25 ; CHECK-NEXT: mov pc, lr
26 ret <4 x i16> < i16 4096, i16 4096, i16 4096, i16 4096 >
29 define arm_aapcs_vfpcc <4 x i16> @v_mvni16a() nounwind {
30 ; CHECK-LABEL: v_mvni16a:
32 ; CHECK-NEXT: vmvn.i16 d0, #0x10
33 ; CHECK-NEXT: mov pc, lr
34 ret <4 x i16> < i16 65519, i16 65519, i16 65519, i16 65519 >
37 define arm_aapcs_vfpcc <4 x i16> @v_mvni16b() nounwind {
38 ; CHECK-LABEL: v_mvni16b:
40 ; CHECK-NEXT: vmvn.i16 d0, #0x1000
41 ; CHECK-NEXT: mov pc, lr
42 ret <4 x i16> < i16 61439, i16 61439, i16 61439, i16 61439 >
45 define arm_aapcs_vfpcc <2 x i32> @v_movi32a() nounwind {
46 ; CHECK-LABEL: v_movi32a:
48 ; CHECK-NEXT: vmov.i32 d0, #0x20
49 ; CHECK-NEXT: mov pc, lr
50 ret <2 x i32> < i32 32, i32 32 >
53 define arm_aapcs_vfpcc <2 x i32> @v_movi32b() nounwind {
54 ; CHECK-LABEL: v_movi32b:
56 ; CHECK-NEXT: vmov.i32 d0, #0x2000
57 ; CHECK-NEXT: mov pc, lr
58 ret <2 x i32> < i32 8192, i32 8192 >
61 define arm_aapcs_vfpcc <2 x i32> @v_movi32c() nounwind {
62 ; CHECK-LABEL: v_movi32c:
64 ; CHECK-NEXT: vmov.i32 d0, #0x200000
65 ; CHECK-NEXT: mov pc, lr
66 ret <2 x i32> < i32 2097152, i32 2097152 >
69 define arm_aapcs_vfpcc <2 x i32> @v_movi32d() nounwind {
70 ; CHECK-LABEL: v_movi32d:
72 ; CHECK-NEXT: vmov.i32 d0, #0x20000000
73 ; CHECK-NEXT: mov pc, lr
74 ret <2 x i32> < i32 536870912, i32 536870912 >
77 define arm_aapcs_vfpcc <2 x i32> @v_movi32e() nounwind {
78 ; CHECK-LABEL: v_movi32e:
80 ; CHECK-NEXT: vmov.i32 d0, #0x20ff
81 ; CHECK-NEXT: mov pc, lr
82 ret <2 x i32> < i32 8447, i32 8447 >
85 define arm_aapcs_vfpcc <2 x i32> @v_movi32f() nounwind {
86 ; CHECK-LABEL: v_movi32f:
88 ; CHECK-NEXT: vmov.i32 d0, #0x20ffff
89 ; CHECK-NEXT: mov pc, lr
90 ret <2 x i32> < i32 2162687, i32 2162687 >
93 define arm_aapcs_vfpcc <2 x i32> @v_mvni32a() nounwind {
94 ; CHECK-LABEL: v_mvni32a:
96 ; CHECK-NEXT: vmvn.i32 d0, #0x20
97 ; CHECK-NEXT: mov pc, lr
98 ret <2 x i32> < i32 4294967263, i32 4294967263 >
101 define arm_aapcs_vfpcc <2 x i32> @v_mvni32b() nounwind {
102 ; CHECK-LABEL: v_mvni32b:
104 ; CHECK-NEXT: vmvn.i32 d0, #0x2000
105 ; CHECK-NEXT: mov pc, lr
106 ret <2 x i32> < i32 4294959103, i32 4294959103 >
109 define arm_aapcs_vfpcc <2 x i32> @v_mvni32c() nounwind {
110 ; CHECK-LABEL: v_mvni32c:
112 ; CHECK-NEXT: vmvn.i32 d0, #0x200000
113 ; CHECK-NEXT: mov pc, lr
114 ret <2 x i32> < i32 4292870143, i32 4292870143 >
117 define arm_aapcs_vfpcc <2 x i32> @v_mvni32d() nounwind {
118 ; CHECK-LABEL: v_mvni32d:
120 ; CHECK-NEXT: vmvn.i32 d0, #0x20000000
121 ; CHECK-NEXT: mov pc, lr
122 ret <2 x i32> < i32 3758096383, i32 3758096383 >
125 define arm_aapcs_vfpcc <2 x i32> @v_mvni32e() nounwind {
126 ; CHECK-LABEL: v_mvni32e:
128 ; CHECK-NEXT: vmvn.i32 d0, #0x20ff
129 ; CHECK-NEXT: mov pc, lr
130 ret <2 x i32> < i32 4294958848, i32 4294958848 >
133 define arm_aapcs_vfpcc <2 x i32> @v_mvni32f() nounwind {
134 ; CHECK-LABEL: v_mvni32f:
136 ; CHECK-NEXT: vmvn.i32 d0, #0x20ffff
137 ; CHECK-NEXT: mov pc, lr
138 ret <2 x i32> < i32 4292804608, i32 4292804608 >
141 define arm_aapcs_vfpcc <1 x i64> @v_movi64() nounwind {
142 ; CHECK-LABEL: v_movi64:
144 ; CHECK-NEXT: vmov.i64 d0, #0xff0000ff0000ffff
145 ; CHECK-NEXT: mov pc, lr
146 ret <1 x i64> < i64 18374687574888349695 >
149 define arm_aapcs_vfpcc <16 x i8> @v_movQi8() nounwind {
150 ; CHECK-LABEL: v_movQi8:
152 ; CHECK-NEXT: vmov.i8 q0, #0x8
153 ; CHECK-NEXT: mov pc, lr
154 ret <16 x i8> < i8 8, i8 8, i8 8, i8 8, i8 8, i8 8, i8 8, i8 8, i8 8, i8 8, i8 8, i8 8, i8 8, i8 8, i8 8, i8 8 >
157 define arm_aapcs_vfpcc <8 x i16> @v_movQi16a() nounwind {
158 ; CHECK-LABEL: v_movQi16a:
160 ; CHECK-NEXT: vmov.i16 q0, #0x10
161 ; CHECK-NEXT: mov pc, lr
162 ret <8 x i16> < i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16 >
165 define arm_aapcs_vfpcc <8 x i16> @v_movQi16b() nounwind {
166 ; CHECK-LABEL: v_movQi16b:
168 ; CHECK-NEXT: vmov.i16 q0, #0x1000
169 ; CHECK-NEXT: mov pc, lr
170 ret <8 x i16> < i16 4096, i16 4096, i16 4096, i16 4096, i16 4096, i16 4096, i16 4096, i16 4096 >
173 define arm_aapcs_vfpcc <4 x i32> @v_movQi32a() nounwind {
174 ; CHECK-LABEL: v_movQi32a:
176 ; CHECK-NEXT: vmov.i32 q0, #0x20
177 ; CHECK-NEXT: mov pc, lr
178 ret <4 x i32> < i32 32, i32 32, i32 32, i32 32 >
181 define arm_aapcs_vfpcc <4 x i32> @v_movQi32b() nounwind {
182 ; CHECK-LABEL: v_movQi32b:
184 ; CHECK-NEXT: vmov.i32 q0, #0x2000
185 ; CHECK-NEXT: mov pc, lr
186 ret <4 x i32> < i32 8192, i32 8192, i32 8192, i32 8192 >
189 define arm_aapcs_vfpcc <4 x i32> @v_movQi32c() nounwind {
190 ; CHECK-LABEL: v_movQi32c:
192 ; CHECK-NEXT: vmov.i32 q0, #0x200000
193 ; CHECK-NEXT: mov pc, lr
194 ret <4 x i32> < i32 2097152, i32 2097152, i32 2097152, i32 2097152 >
197 define arm_aapcs_vfpcc <4 x i32> @v_movQi32d() nounwind {
198 ; CHECK-LABEL: v_movQi32d:
200 ; CHECK-NEXT: vmov.i32 q0, #0x20000000
201 ; CHECK-NEXT: mov pc, lr
202 ret <4 x i32> < i32 536870912, i32 536870912, i32 536870912, i32 536870912 >
205 define arm_aapcs_vfpcc <4 x i32> @v_movQi32e() nounwind {
206 ; CHECK-LABEL: v_movQi32e:
208 ; CHECK-NEXT: vmov.i32 q0, #0x20ff
209 ; CHECK-NEXT: mov pc, lr
210 ret <4 x i32> < i32 8447, i32 8447, i32 8447, i32 8447 >
213 define arm_aapcs_vfpcc <4 x i32> @v_movQi32f() nounwind {
214 ; CHECK-LABEL: v_movQi32f:
216 ; CHECK-NEXT: vmov.i32 q0, #0x20ffff
217 ; CHECK-NEXT: mov pc, lr
218 ret <4 x i32> < i32 2162687, i32 2162687, i32 2162687, i32 2162687 >
221 define arm_aapcs_vfpcc <2 x i64> @v_movQi64() nounwind {
222 ; CHECK-LABEL: v_movQi64:
224 ; CHECK-NEXT: vmov.i64 q0, #0xff0000ff0000ffff
225 ; CHECK-NEXT: mov pc, lr
226 ret <2 x i64> < i64 18374687574888349695, i64 18374687574888349695 >
229 ; Check for correct assembler printing for immediate values.
230 %struct.int8x8_t = type { <8 x i8> }
231 define arm_aapcs_vfpcc void @vdupn128(ptr noalias nocapture sret(%struct.int8x8_t) %agg.result) nounwind {
232 ; CHECK-LABEL: vdupn128:
233 ; CHECK: @ %bb.0: @ %entry
234 ; CHECK-NEXT: vmov.i8 d16, #0x80
235 ; CHECK-NEXT: vstr d16, [r0]
236 ; CHECK-NEXT: mov pc, lr
238 %0 = getelementptr inbounds %struct.int8x8_t, ptr %agg.result, i32 0, i32 0 ; <ptr> [#uses=1]
239 store <8 x i8> <i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128>, ptr %0, align 8
243 define arm_aapcs_vfpcc void @vdupnneg75(ptr noalias nocapture sret(%struct.int8x8_t) %agg.result) nounwind {
244 ; CHECK-LABEL: vdupnneg75:
245 ; CHECK: @ %bb.0: @ %entry
246 ; CHECK-NEXT: vmov.i8 d16, #0xb5
247 ; CHECK-NEXT: vstr d16, [r0]
248 ; CHECK-NEXT: mov pc, lr
250 %0 = getelementptr inbounds %struct.int8x8_t, ptr %agg.result, i32 0, i32 0 ; <ptr> [#uses=1]
251 store <8 x i8> <i8 -75, i8 -75, i8 -75, i8 -75, i8 -75, i8 -75, i8 -75, i8 -75>, ptr %0, align 8
255 define arm_aapcs_vfpcc <8 x i16> @vmovls8(ptr %A) nounwind {
256 ; CHECK-LE-LABEL: vmovls8:
258 ; CHECK-LE-NEXT: vld1.8 {d16}, [r0:64]
259 ; CHECK-LE-NEXT: vmovl.s8 q0, d16
260 ; CHECK-LE-NEXT: mov pc, lr
262 ; CHECK-BE-LABEL: vmovls8:
264 ; CHECK-BE-NEXT: vld1.8 {d16}, [r0:64]
265 ; CHECK-BE-NEXT: vmovl.s8 q8, d16
266 ; CHECK-BE-NEXT: vrev64.16 q0, q8
267 ; CHECK-BE-NEXT: mov pc, lr
268 %tmp1 = load <8 x i8>, ptr %A
269 %tmp2 = sext <8 x i8> %tmp1 to <8 x i16>
273 define arm_aapcs_vfpcc <4 x i32> @vmovls16(ptr %A) nounwind {
274 ; CHECK-LE-LABEL: vmovls16:
276 ; CHECK-LE-NEXT: vld1.16 {d16}, [r0:64]
277 ; CHECK-LE-NEXT: vmovl.s16 q0, d16
278 ; CHECK-LE-NEXT: mov pc, lr
280 ; CHECK-BE-LABEL: vmovls16:
282 ; CHECK-BE-NEXT: vld1.16 {d16}, [r0:64]
283 ; CHECK-BE-NEXT: vmovl.s16 q8, d16
284 ; CHECK-BE-NEXT: vrev64.32 q0, q8
285 ; CHECK-BE-NEXT: mov pc, lr
286 %tmp1 = load <4 x i16>, ptr %A
287 %tmp2 = sext <4 x i16> %tmp1 to <4 x i32>
291 define arm_aapcs_vfpcc <2 x i64> @vmovls32(ptr %A) nounwind {
292 ; CHECK-LABEL: vmovls32:
294 ; CHECK-NEXT: vld1.32 {d16}, [r0:64]
295 ; CHECK-NEXT: vmovl.s32 q0, d16
296 ; CHECK-NEXT: mov pc, lr
297 %tmp1 = load <2 x i32>, ptr %A
298 %tmp2 = sext <2 x i32> %tmp1 to <2 x i64>
302 define arm_aapcs_vfpcc <8 x i16> @vmovlu8(ptr %A) nounwind {
303 ; CHECK-LE-LABEL: vmovlu8:
305 ; CHECK-LE-NEXT: vld1.8 {d16}, [r0:64]
306 ; CHECK-LE-NEXT: vmovl.u8 q0, d16
307 ; CHECK-LE-NEXT: mov pc, lr
309 ; CHECK-BE-LABEL: vmovlu8:
311 ; CHECK-BE-NEXT: vld1.8 {d16}, [r0:64]
312 ; CHECK-BE-NEXT: vmovl.u8 q8, d16
313 ; CHECK-BE-NEXT: vrev64.16 q0, q8
314 ; CHECK-BE-NEXT: mov pc, lr
315 %tmp1 = load <8 x i8>, ptr %A
316 %tmp2 = zext <8 x i8> %tmp1 to <8 x i16>
320 define arm_aapcs_vfpcc <4 x i32> @vmovlu16(ptr %A) nounwind {
321 ; CHECK-LE-LABEL: vmovlu16:
323 ; CHECK-LE-NEXT: vld1.16 {d16}, [r0:64]
324 ; CHECK-LE-NEXT: vmovl.u16 q0, d16
325 ; CHECK-LE-NEXT: mov pc, lr
327 ; CHECK-BE-LABEL: vmovlu16:
329 ; CHECK-BE-NEXT: vld1.16 {d16}, [r0:64]
330 ; CHECK-BE-NEXT: vmovl.u16 q8, d16
331 ; CHECK-BE-NEXT: vrev64.32 q0, q8
332 ; CHECK-BE-NEXT: mov pc, lr
333 %tmp1 = load <4 x i16>, ptr %A
334 %tmp2 = zext <4 x i16> %tmp1 to <4 x i32>
338 define arm_aapcs_vfpcc <2 x i64> @vmovlu32(ptr %A) nounwind {
339 ; CHECK-LABEL: vmovlu32:
341 ; CHECK-NEXT: vld1.32 {d16}, [r0:64]
342 ; CHECK-NEXT: vmovl.u32 q0, d16
343 ; CHECK-NEXT: mov pc, lr
344 %tmp1 = load <2 x i32>, ptr %A
345 %tmp2 = zext <2 x i32> %tmp1 to <2 x i64>
349 define arm_aapcs_vfpcc <8 x i8> @vmovni16(ptr %A) nounwind {
350 ; CHECK-LE-LABEL: vmovni16:
352 ; CHECK-LE-NEXT: vld1.64 {d16, d17}, [r0]
353 ; CHECK-LE-NEXT: vmovn.i16 d0, q8
354 ; CHECK-LE-NEXT: mov pc, lr
356 ; CHECK-BE-LABEL: vmovni16:
358 ; CHECK-BE-NEXT: vld1.64 {d16, d17}, [r0]
359 ; CHECK-BE-NEXT: vrev64.16 q8, q8
360 ; CHECK-BE-NEXT: vmovn.i16 d16, q8
361 ; CHECK-BE-NEXT: vrev64.8 d0, d16
362 ; CHECK-BE-NEXT: mov pc, lr
363 %tmp1 = load <8 x i16>, ptr %A
364 %tmp2 = trunc <8 x i16> %tmp1 to <8 x i8>
368 define arm_aapcs_vfpcc <4 x i16> @vmovni32(ptr %A) nounwind {
369 ; CHECK-LE-LABEL: vmovni32:
371 ; CHECK-LE-NEXT: vld1.64 {d16, d17}, [r0]
372 ; CHECK-LE-NEXT: vmovn.i32 d0, q8
373 ; CHECK-LE-NEXT: mov pc, lr
375 ; CHECK-BE-LABEL: vmovni32:
377 ; CHECK-BE-NEXT: vld1.64 {d16, d17}, [r0]
378 ; CHECK-BE-NEXT: vrev64.32 q8, q8
379 ; CHECK-BE-NEXT: vmovn.i32 d16, q8
380 ; CHECK-BE-NEXT: vrev64.16 d0, d16
381 ; CHECK-BE-NEXT: mov pc, lr
382 %tmp1 = load <4 x i32>, ptr %A
383 %tmp2 = trunc <4 x i32> %tmp1 to <4 x i16>
387 define arm_aapcs_vfpcc <2 x i32> @vmovni64(ptr %A) nounwind {
388 ; CHECK-LE-LABEL: vmovni64:
390 ; CHECK-LE-NEXT: vld1.64 {d16, d17}, [r0]
391 ; CHECK-LE-NEXT: vmovn.i64 d0, q8
392 ; CHECK-LE-NEXT: mov pc, lr
394 ; CHECK-BE-LABEL: vmovni64:
396 ; CHECK-BE-NEXT: vld1.64 {d16, d17}, [r0]
397 ; CHECK-BE-NEXT: vmovn.i64 d16, q8
398 ; CHECK-BE-NEXT: vrev64.32 d0, d16
399 ; CHECK-BE-NEXT: mov pc, lr
400 %tmp1 = load <2 x i64>, ptr %A
401 %tmp2 = trunc <2 x i64> %tmp1 to <2 x i32>
405 define arm_aapcs_vfpcc <8 x i8> @vqmovns16(ptr %A) nounwind {
406 ; CHECK-LE-LABEL: vqmovns16:
408 ; CHECK-LE-NEXT: vld1.64 {d16, d17}, [r0]
409 ; CHECK-LE-NEXT: vqmovn.s16 d0, q8
410 ; CHECK-LE-NEXT: mov pc, lr
412 ; CHECK-BE-LABEL: vqmovns16:
414 ; CHECK-BE-NEXT: vld1.64 {d16, d17}, [r0]
415 ; CHECK-BE-NEXT: vrev64.16 q8, q8
416 ; CHECK-BE-NEXT: vqmovn.s16 d16, q8
417 ; CHECK-BE-NEXT: vrev64.8 d0, d16
418 ; CHECK-BE-NEXT: mov pc, lr
419 %tmp1 = load <8 x i16>, ptr %A
420 %tmp2 = call <8 x i8> @llvm.arm.neon.vqmovns.v8i8(<8 x i16> %tmp1)
424 define arm_aapcs_vfpcc <4 x i16> @vqmovns32(ptr %A) nounwind {
425 ; CHECK-LE-LABEL: vqmovns32:
427 ; CHECK-LE-NEXT: vld1.64 {d16, d17}, [r0]
428 ; CHECK-LE-NEXT: vqmovn.s32 d0, q8
429 ; CHECK-LE-NEXT: mov pc, lr
431 ; CHECK-BE-LABEL: vqmovns32:
433 ; CHECK-BE-NEXT: vld1.64 {d16, d17}, [r0]
434 ; CHECK-BE-NEXT: vrev64.32 q8, q8
435 ; CHECK-BE-NEXT: vqmovn.s32 d16, q8
436 ; CHECK-BE-NEXT: vrev64.16 d0, d16
437 ; CHECK-BE-NEXT: mov pc, lr
438 %tmp1 = load <4 x i32>, ptr %A
439 %tmp2 = call <4 x i16> @llvm.arm.neon.vqmovns.v4i16(<4 x i32> %tmp1)
443 define arm_aapcs_vfpcc <2 x i32> @vqmovns64(ptr %A) nounwind {
444 ; CHECK-LE-LABEL: vqmovns64:
446 ; CHECK-LE-NEXT: vld1.64 {d16, d17}, [r0]
447 ; CHECK-LE-NEXT: vqmovn.s64 d0, q8
448 ; CHECK-LE-NEXT: mov pc, lr
450 ; CHECK-BE-LABEL: vqmovns64:
452 ; CHECK-BE-NEXT: vld1.64 {d16, d17}, [r0]
453 ; CHECK-BE-NEXT: vqmovn.s64 d16, q8
454 ; CHECK-BE-NEXT: vrev64.32 d0, d16
455 ; CHECK-BE-NEXT: mov pc, lr
456 %tmp1 = load <2 x i64>, ptr %A
457 %tmp2 = call <2 x i32> @llvm.arm.neon.vqmovns.v2i32(<2 x i64> %tmp1)
461 define arm_aapcs_vfpcc <8 x i8> @vqmovnu16(ptr %A) nounwind {
462 ; CHECK-LE-LABEL: vqmovnu16:
464 ; CHECK-LE-NEXT: vld1.64 {d16, d17}, [r0]
465 ; CHECK-LE-NEXT: vqmovn.u16 d0, q8
466 ; CHECK-LE-NEXT: mov pc, lr
468 ; CHECK-BE-LABEL: vqmovnu16:
470 ; CHECK-BE-NEXT: vld1.64 {d16, d17}, [r0]
471 ; CHECK-BE-NEXT: vrev64.16 q8, q8
472 ; CHECK-BE-NEXT: vqmovn.u16 d16, q8
473 ; CHECK-BE-NEXT: vrev64.8 d0, d16
474 ; CHECK-BE-NEXT: mov pc, lr
475 %tmp1 = load <8 x i16>, ptr %A
476 %tmp2 = call <8 x i8> @llvm.arm.neon.vqmovnu.v8i8(<8 x i16> %tmp1)
480 define arm_aapcs_vfpcc <4 x i16> @vqmovnu32(ptr %A) nounwind {
481 ; CHECK-LE-LABEL: vqmovnu32:
483 ; CHECK-LE-NEXT: vld1.64 {d16, d17}, [r0]
484 ; CHECK-LE-NEXT: vqmovn.u32 d0, q8
485 ; CHECK-LE-NEXT: mov pc, lr
487 ; CHECK-BE-LABEL: vqmovnu32:
489 ; CHECK-BE-NEXT: vld1.64 {d16, d17}, [r0]
490 ; CHECK-BE-NEXT: vrev64.32 q8, q8
491 ; CHECK-BE-NEXT: vqmovn.u32 d16, q8
492 ; CHECK-BE-NEXT: vrev64.16 d0, d16
493 ; CHECK-BE-NEXT: mov pc, lr
494 %tmp1 = load <4 x i32>, ptr %A
495 %tmp2 = call <4 x i16> @llvm.arm.neon.vqmovnu.v4i16(<4 x i32> %tmp1)
499 define arm_aapcs_vfpcc <2 x i32> @vqmovnu64(ptr %A) nounwind {
500 ; CHECK-LE-LABEL: vqmovnu64:
502 ; CHECK-LE-NEXT: vld1.64 {d16, d17}, [r0]
503 ; CHECK-LE-NEXT: vqmovn.u64 d0, q8
504 ; CHECK-LE-NEXT: mov pc, lr
506 ; CHECK-BE-LABEL: vqmovnu64:
508 ; CHECK-BE-NEXT: vld1.64 {d16, d17}, [r0]
509 ; CHECK-BE-NEXT: vqmovn.u64 d16, q8
510 ; CHECK-BE-NEXT: vrev64.32 d0, d16
511 ; CHECK-BE-NEXT: mov pc, lr
512 %tmp1 = load <2 x i64>, ptr %A
513 %tmp2 = call <2 x i32> @llvm.arm.neon.vqmovnu.v2i32(<2 x i64> %tmp1)
517 define arm_aapcs_vfpcc <8 x i8> @vqmovuns16(ptr %A) nounwind {
518 ; CHECK-LE-LABEL: vqmovuns16:
520 ; CHECK-LE-NEXT: vld1.64 {d16, d17}, [r0]
521 ; CHECK-LE-NEXT: vqmovun.s16 d0, q8
522 ; CHECK-LE-NEXT: mov pc, lr
524 ; CHECK-BE-LABEL: vqmovuns16:
526 ; CHECK-BE-NEXT: vld1.64 {d16, d17}, [r0]
527 ; CHECK-BE-NEXT: vrev64.16 q8, q8
528 ; CHECK-BE-NEXT: vqmovun.s16 d16, q8
529 ; CHECK-BE-NEXT: vrev64.8 d0, d16
530 ; CHECK-BE-NEXT: mov pc, lr
531 %tmp1 = load <8 x i16>, ptr %A
532 %tmp2 = call <8 x i8> @llvm.arm.neon.vqmovnsu.v8i8(<8 x i16> %tmp1)
536 define arm_aapcs_vfpcc <4 x i16> @vqmovuns32(ptr %A) nounwind {
537 ; CHECK-LE-LABEL: vqmovuns32:
539 ; CHECK-LE-NEXT: vld1.64 {d16, d17}, [r0]
540 ; CHECK-LE-NEXT: vqmovun.s32 d0, q8
541 ; CHECK-LE-NEXT: mov pc, lr
543 ; CHECK-BE-LABEL: vqmovuns32:
545 ; CHECK-BE-NEXT: vld1.64 {d16, d17}, [r0]
546 ; CHECK-BE-NEXT: vrev64.32 q8, q8
547 ; CHECK-BE-NEXT: vqmovun.s32 d16, q8
548 ; CHECK-BE-NEXT: vrev64.16 d0, d16
549 ; CHECK-BE-NEXT: mov pc, lr
550 %tmp1 = load <4 x i32>, ptr %A
551 %tmp2 = call <4 x i16> @llvm.arm.neon.vqmovnsu.v4i16(<4 x i32> %tmp1)
555 define arm_aapcs_vfpcc <2 x i32> @vqmovuns64(ptr %A) nounwind {
556 ; CHECK-LE-LABEL: vqmovuns64:
558 ; CHECK-LE-NEXT: vld1.64 {d16, d17}, [r0]
559 ; CHECK-LE-NEXT: vqmovun.s64 d0, q8
560 ; CHECK-LE-NEXT: mov pc, lr
562 ; CHECK-BE-LABEL: vqmovuns64:
564 ; CHECK-BE-NEXT: vld1.64 {d16, d17}, [r0]
565 ; CHECK-BE-NEXT: vqmovun.s64 d16, q8
566 ; CHECK-BE-NEXT: vrev64.32 d0, d16
567 ; CHECK-BE-NEXT: mov pc, lr
568 %tmp1 = load <2 x i64>, ptr %A
569 %tmp2 = call <2 x i32> @llvm.arm.neon.vqmovnsu.v2i32(<2 x i64> %tmp1)
573 declare <8 x i8> @llvm.arm.neon.vqmovns.v8i8(<8 x i16>) nounwind readnone
574 declare <4 x i16> @llvm.arm.neon.vqmovns.v4i16(<4 x i32>) nounwind readnone
575 declare <2 x i32> @llvm.arm.neon.vqmovns.v2i32(<2 x i64>) nounwind readnone
577 declare <8 x i8> @llvm.arm.neon.vqmovnu.v8i8(<8 x i16>) nounwind readnone
578 declare <4 x i16> @llvm.arm.neon.vqmovnu.v4i16(<4 x i32>) nounwind readnone
579 declare <2 x i32> @llvm.arm.neon.vqmovnu.v2i32(<2 x i64>) nounwind readnone
581 declare <8 x i8> @llvm.arm.neon.vqmovnsu.v8i8(<8 x i16>) nounwind readnone
582 declare <4 x i16> @llvm.arm.neon.vqmovnsu.v4i16(<4 x i32>) nounwind readnone
583 declare <2 x i32> @llvm.arm.neon.vqmovnsu.v2i32(<2 x i64>) nounwind readnone
585 ; Truncating vector stores are not supported. The following should not crash.
587 define arm_aapcs_vfpcc void @noTruncStore(ptr %a, ptr %b) nounwind {
588 ; CHECK-LE-LABEL: noTruncStore:
590 ; CHECK-LE-NEXT: vld1.64 {d16, d17}, [r0:128]
591 ; CHECK-LE-NEXT: vmovn.i32 d16, q8
592 ; CHECK-LE-NEXT: vstr d16, [r1]
593 ; CHECK-LE-NEXT: mov pc, lr
595 ; CHECK-BE-LABEL: noTruncStore:
597 ; CHECK-BE-NEXT: vld1.64 {d16, d17}, [r0:128]
598 ; CHECK-BE-NEXT: vrev64.32 q8, q8
599 ; CHECK-BE-NEXT: vmovn.i32 d16, q8
600 ; CHECK-BE-NEXT: vrev64.16 d16, d16
601 ; CHECK-BE-NEXT: vstr d16, [r1]
602 ; CHECK-BE-NEXT: mov pc, lr
603 %tmp1 = load <4 x i32>, ptr %a, align 16
604 %tmp2 = trunc <4 x i32> %tmp1 to <4 x i16>
605 store <4 x i16> %tmp2, ptr %b, align 8
609 ; Use vmov.f32 to materialize f32 immediate splats
611 define arm_aapcs_vfpcc void @v_mov_v2f32(ptr nocapture %p) nounwind {
612 ; CHECK-LABEL: v_mov_v2f32:
613 ; CHECK: @ %bb.0: @ %entry
614 ; CHECK-NEXT: vmov.f32 d16, #-1.600000e+01
615 ; CHECK-NEXT: vstr d16, [r0]
616 ; CHECK-NEXT: mov pc, lr
618 store <2 x float> <float -1.600000e+01, float -1.600000e+01>, ptr %p, align 4
622 define arm_aapcs_vfpcc void @v_mov_v4f32(ptr nocapture %p) nounwind {
623 ; CHECK-LE-LABEL: v_mov_v4f32:
624 ; CHECK-LE: @ %bb.0: @ %entry
625 ; CHECK-LE-NEXT: vmov.f32 q8, #3.100000e+01
626 ; CHECK-LE-NEXT: vst1.32 {d16, d17}, [r0]
627 ; CHECK-LE-NEXT: mov pc, lr
629 ; CHECK-BE-LABEL: v_mov_v4f32:
630 ; CHECK-BE: @ %bb.0: @ %entry
631 ; CHECK-BE-NEXT: vmov.f32 q8, #3.100000e+01
632 ; CHECK-BE-NEXT: vstmia r0, {d16, d17}
633 ; CHECK-BE-NEXT: mov pc, lr
635 store <4 x float> <float 3.100000e+01, float 3.100000e+01, float 3.100000e+01, float 3.100000e+01>, ptr %p, align 4
639 define arm_aapcs_vfpcc void @v_mov_v4f32_undef(ptr nocapture %p) nounwind {
640 ; CHECK-LE-LABEL: v_mov_v4f32_undef:
641 ; CHECK-LE: @ %bb.0: @ %entry
642 ; CHECK-LE-NEXT: vmov.f32 q8, #1.000000e+00
643 ; CHECK-LE-NEXT: vld1.64 {d18, d19}, [r0]
644 ; CHECK-LE-NEXT: vadd.f32 q8, q9, q8
645 ; CHECK-LE-NEXT: vst1.64 {d16, d17}, [r0]
646 ; CHECK-LE-NEXT: mov pc, lr
648 ; CHECK-BE-LABEL: v_mov_v4f32_undef:
649 ; CHECK-BE: @ %bb.0: @ %entry
650 ; CHECK-BE-NEXT: vld1.64 {d16, d17}, [r0]
651 ; CHECK-BE-NEXT: vmov.f32 q9, #1.000000e+00
652 ; CHECK-BE-NEXT: vrev64.32 q8, q8
653 ; CHECK-BE-NEXT: vadd.f32 q8, q8, q9
654 ; CHECK-BE-NEXT: vrev64.32 q8, q8
655 ; CHECK-BE-NEXT: vst1.64 {d16, d17}, [r0]
656 ; CHECK-BE-NEXT: mov pc, lr
658 %a = load <4 x float> , ptr %p
659 %b = fadd <4 x float> %a, <float undef, float 1.0, float 1.0, float 1.0>
660 store <4 x float> %b, ptr %p
664 ; Vector any_extends must be selected as either vmovl.u or vmovl.s.
666 define arm_aapcs_vfpcc void @any_extend(<4 x i1> %x, <4 x i32> %y) nounwind ssp {
667 ; CHECK-LE-LABEL: any_extend:
668 ; CHECK-LE: @ %bb.0: @ %entry
669 ; CHECK-LE-NEXT: vmov.i16 d16, #0x1
670 ; CHECK-LE-NEXT: vand d16, d0, d16
671 ; CHECK-LE-NEXT: vmovl.u16 q8, d16
672 ; CHECK-LE-NEXT: vsub.i32 q8, q8, q1
673 ; CHECK-LE-NEXT: vmovn.i32 d16, q8
674 ; CHECK-LE-NEXT: vst1.16 {d16}, [r0]
676 ; CHECK-BE-LABEL: any_extend:
677 ; CHECK-BE: @ %bb.0: @ %entry
678 ; CHECK-BE-NEXT: vmov.i16 d16, #0x1
679 ; CHECK-BE-NEXT: vrev64.16 d17, d0
680 ; CHECK-BE-NEXT: vrev64.32 q9, q1
681 ; CHECK-BE-NEXT: vand d16, d17, d16
682 ; CHECK-BE-NEXT: vmovl.u16 q8, d16
683 ; CHECK-BE-NEXT: vsub.i32 q8, q8, q9
684 ; CHECK-BE-NEXT: vmovn.i32 d16, q8
685 ; CHECK-BE-NEXT: vst1.16 {d16}, [r0]
687 %and.i186 = zext <4 x i1> %x to <4 x i32>
688 %add.i185 = sub <4 x i32> %and.i186, %y
689 %sub.i = sub <4 x i32> %add.i185, zeroinitializer
690 %add.i = add <4 x i32> %sub.i, zeroinitializer
691 %vmovn.i = trunc <4 x i32> %add.i to <4 x i16>
692 tail call void @llvm.arm.neon.vst1.p0.v4i16(ptr undef, <4 x i16> %vmovn.i, i32 2)
696 define arm_aapcs_vfpcc void @v_movi8_sti8(ptr %p) {
697 ; CHECK-LABEL: v_movi8_sti8:
699 ; CHECK-NEXT: vmov.i8 d16, #0x1
700 ; CHECK-NEXT: vst1.8 {d16}, [r0]
701 ; CHECK-NEXT: mov pc, lr
702 call void @llvm.arm.neon.vst1.p0.v8i8(ptr %p, <8 x i8> <i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1>, i32 1)
706 define arm_aapcs_vfpcc void @v_movi8_sti16(ptr %p) {
707 ; CHECK-LABEL: v_movi8_sti16:
709 ; CHECK-NEXT: vmov.i8 d16, #0x1
710 ; CHECK-NEXT: vst1.16 {d16}, [r0]
711 ; CHECK-NEXT: mov pc, lr
712 %val = bitcast <8 x i8> <i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1> to <4 x i16>
713 call void @llvm.arm.neon.vst1.p0.v4i16(ptr %p, <4 x i16> %val, i32 2)
717 define arm_aapcs_vfpcc void @v_movi8_stf16(ptr %p) {
718 ; CHECK-LABEL: v_movi8_stf16:
720 ; CHECK-NEXT: vmov.i8 d16, #0x1
721 ; CHECK-NEXT: vst1.16 {d16}, [r0]
722 ; CHECK-NEXT: mov pc, lr
723 %val = bitcast <8 x i8> <i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1> to <4 x half>
724 call void @llvm.arm.neon.vst1.p0.v4f16(ptr %p, <4 x half> %val, i32 2)
728 define arm_aapcs_vfpcc void @v_movi8_sti32(ptr %p) {
729 ; CHECK-LABEL: v_movi8_sti32:
731 ; CHECK-NEXT: vmov.i8 d16, #0x1
732 ; CHECK-NEXT: vst1.32 {d16}, [r0]
733 ; CHECK-NEXT: mov pc, lr
734 %val = bitcast <8 x i8> <i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1> to <2 x i32>
735 call void @llvm.arm.neon.vst1.p0.v2i32(ptr %p, <2 x i32> %val, i32 4)
739 define arm_aapcs_vfpcc void @v_movi8_stf32(ptr %p) {
740 ; CHECK-LABEL: v_movi8_stf32:
742 ; CHECK-NEXT: vmov.i8 d16, #0x1
743 ; CHECK-NEXT: vst1.32 {d16}, [r0]
744 ; CHECK-NEXT: mov pc, lr
745 %val = bitcast <8 x i8> <i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1> to <2 x float>
746 call void @llvm.arm.neon.vst1.p0.v2f32(ptr %p, <2 x float> %val, i32 4)
750 define arm_aapcs_vfpcc void @v_movi8_sti64(ptr %p) {
751 ; CHECK-LABEL: v_movi8_sti64:
753 ; CHECK-NEXT: vmov.i8 d16, #0x1
754 ; CHECK-NEXT: vst1.64 {d16}, [r0:64]
755 ; CHECK-NEXT: mov pc, lr
756 %val = bitcast <8 x i8> <i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1> to <1 x i64>
757 call void @llvm.arm.neon.vst1.p0.v1i64(ptr %p, <1 x i64> %val, i32 8)
761 define arm_aapcs_vfpcc void @v_movi16_sti16(ptr %p) {
762 ; CHECK-LABEL: v_movi16_sti16:
764 ; CHECK-NEXT: vmov.i16 d16, #0x1
765 ; CHECK-NEXT: vst1.16 {d16}, [r0]
766 ; CHECK-NEXT: mov pc, lr
767 call void @llvm.arm.neon.vst1.p0.v4i16(ptr %p, <4 x i16> <i16 1, i16 1, i16 1, i16 1>, i32 2)
771 define arm_aapcs_vfpcc void @v_movi16_stf16(ptr %p) {
772 ; CHECK-LABEL: v_movi16_stf16:
774 ; CHECK-NEXT: vmov.i16 d16, #0x1
775 ; CHECK-NEXT: vst1.16 {d16}, [r0]
776 ; CHECK-NEXT: mov pc, lr
777 %val = bitcast <4 x i16> <i16 1, i16 1, i16 1, i16 1> to <4 x half>
778 call void @llvm.arm.neon.vst1.p0.v4f16(ptr %p, <4 x half> %val, i32 2)
782 define arm_aapcs_vfpcc void @v_movi16_sti32(ptr %p) {
783 ; CHECK-LABEL: v_movi16_sti32:
785 ; CHECK-NEXT: vmov.i16 d16, #0x1
786 ; CHECK-NEXT: vst1.32 {d16}, [r0]
787 ; CHECK-NEXT: mov pc, lr
788 %val = bitcast <4 x i16> <i16 1, i16 1, i16 1, i16 1> to <2 x i32>
789 call void @llvm.arm.neon.vst1.p0.v2i32(ptr %p, <2 x i32> %val, i32 4)
793 define arm_aapcs_vfpcc void @v_movi16_stf32(ptr %p) {
794 ; CHECK-LABEL: v_movi16_stf32:
796 ; CHECK-NEXT: vmov.i16 d16, #0x1
797 ; CHECK-NEXT: vst1.32 {d16}, [r0]
798 ; CHECK-NEXT: mov pc, lr
799 %val = bitcast <4 x i16> <i16 1, i16 1, i16 1, i16 1> to <2 x float>
800 call void @llvm.arm.neon.vst1.p0.v2f32(ptr %p, <2 x float> %val, i32 4)
804 define arm_aapcs_vfpcc void @v_movi16_sti64(ptr %p) {
805 ; CHECK-LABEL: v_movi16_sti64:
807 ; CHECK-NEXT: vmov.i16 d16, #0x1
808 ; CHECK-NEXT: vst1.64 {d16}, [r0:64]
809 ; CHECK-NEXT: mov pc, lr
810 %val = bitcast <4 x i16> <i16 1, i16 1, i16 1, i16 1> to <1 x i64>
811 call void @llvm.arm.neon.vst1.p0.v1i64(ptr %p, <1 x i64> %val, i32 8)
815 define arm_aapcs_vfpcc void @v_movi32_sti32(ptr %p) {
816 ; CHECK-LABEL: v_movi32_sti32:
818 ; CHECK-NEXT: vmov.i32 d16, #0x1
819 ; CHECK-NEXT: vst1.32 {d16}, [r0]
820 ; CHECK-NEXT: mov pc, lr
821 call void @llvm.arm.neon.vst1.p0.v2i32(ptr %p, <2 x i32> <i32 1, i32 1>, i32 4)
825 define arm_aapcs_vfpcc void @v_movi32_stf32(ptr %p) {
826 ; CHECK-LABEL: v_movi32_stf32:
828 ; CHECK-NEXT: vmov.i32 d16, #0x1
829 ; CHECK-NEXT: vst1.32 {d16}, [r0]
830 ; CHECK-NEXT: mov pc, lr
831 %val = bitcast <2 x i32> <i32 1, i32 1> to <2 x float>
832 call void @llvm.arm.neon.vst1.p0.v2f32(ptr %p, <2 x float> %val, i32 4)
836 define arm_aapcs_vfpcc void @v_movi32_sti64(ptr %p) {
837 ; CHECK-LABEL: v_movi32_sti64:
839 ; CHECK-NEXT: vmov.i32 d16, #0x1
840 ; CHECK-NEXT: vst1.64 {d16}, [r0:64]
841 ; CHECK-NEXT: mov pc, lr
842 %val = bitcast <2 x i32> <i32 1, i32 1> to <1 x i64>
843 call void @llvm.arm.neon.vst1.p0.v1i64(ptr %p, <1 x i64> %val, i32 8)
847 define arm_aapcs_vfpcc void @v_movf32_stf32(ptr %p) {
848 ; CHECK-LABEL: v_movf32_stf32:
850 ; CHECK-NEXT: vmov.f32 d16, #1.000000e+00
851 ; CHECK-NEXT: vst1.32 {d16}, [r0]
852 ; CHECK-NEXT: mov pc, lr
853 call void @llvm.arm.neon.vst1.p0.v2f32(ptr %p, <2 x float> <float 1.0, float 1.0>, i32 4)
857 define arm_aapcs_vfpcc void@v_movf32_sti32(ptr %p) {
858 ; FIXME: We should use vmov.f32 instead of mov then vdup
859 ; CHECK-LABEL: v_movf32_sti32:
861 ; CHECK-NEXT: mov r1, #1065353216
862 ; CHECK-NEXT: vdup.32 d16, r1
863 ; CHECK-NEXT: vst1.32 {d16}, [r0]
864 ; CHECK-NEXT: mov pc, lr
865 %val = bitcast <2 x float> <float 1.0, float 1.0> to <2 x i32>
866 call void @llvm.arm.neon.vst1.p0.v2i32(ptr %p, <2 x i32> %val, i32 4)
870 define arm_aapcs_vfpcc void @v_movf32_sti64(ptr %p) {
871 ; CHECK-LE-LABEL: v_movf32_sti64:
873 ; CHECK-LE-NEXT: mov r1, #1065353216
874 ; CHECK-LE-NEXT: vdup.32 d16, r1
875 ; CHECK-LE-NEXT: vst1.64 {d16}, [r0:64]
876 ; CHECK-LE-NEXT: mov pc, lr
878 ; FIXME: vrev is not needed here
879 ; CHECK-BE-LABEL: v_movf32_sti64:
881 ; CHECK-BE-NEXT: mov r1, #1065353216
882 ; CHECK-BE-NEXT: vdup.32 d16, r1
883 ; CHECK-BE-NEXT: vrev64.32 d16, d16
884 ; CHECK-BE-NEXT: vst1.64 {d16}, [r0:64]
885 ; CHECK-BE-NEXT: mov pc, lr
886 %val = bitcast <2 x float> <float 1.0, float 1.0> to <1 x i64>
887 call void @llvm.arm.neon.vst1.p0.v1i64(ptr %p, <1 x i64> %val, i32 8)
891 define arm_aapcs_vfpcc void @v_movi64_sti64(ptr %p) {
892 ; CHECK-LABEL: v_movi64_sti64:
894 ; CHECK-NEXT: vmov.i64 d16, #0xff
895 ; CHECK-NEXT: vst1.64 {d16}, [r0:64]
896 ; CHECK-NEXT: mov pc, lr
897 call void @llvm.arm.neon.vst1.p0.v1i64(ptr %p, <1 x i64> <i64 255>, i32 8)
901 define arm_aapcs_vfpcc void @v_movQi8_sti8(ptr %p) {
902 ; CHECK-LABEL: v_movQi8_sti8:
904 ; CHECK-NEXT: vmov.i8 q8, #0x1
905 ; CHECK-NEXT: vst1.8 {d16, d17}, [r0]
906 ; CHECK-NEXT: mov pc, lr
907 call void @llvm.arm.neon.vst1.p0.v16i8(ptr %p, <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>, i32 1)
911 define arm_aapcs_vfpcc void @v_movQi8_sti16(ptr %p) {
912 ; CHECK-LABEL: v_movQi8_sti16:
914 ; CHECK-NEXT: vmov.i8 q8, #0x1
915 ; CHECK-NEXT: vst1.16 {d16, d17}, [r0]
916 ; CHECK-NEXT: mov pc, lr
917 %val = bitcast <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> to <8 x i16>
918 call void @llvm.arm.neon.vst1.p0.v8i16(ptr %p, <8 x i16> %val, i32 2)
922 define arm_aapcs_vfpcc void @v_movQi8_stf16(ptr %p) {
923 ; CHECK-LABEL: v_movQi8_stf16:
925 ; CHECK-NEXT: vmov.i8 q8, #0x1
926 ; CHECK-NEXT: vst1.16 {d16, d17}, [r0]
927 ; CHECK-NEXT: mov pc, lr
928 %val = bitcast <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> to <8 x half>
929 call void @llvm.arm.neon.vst1.p0.v8f16(ptr %p, <8 x half> %val, i32 2)
933 define arm_aapcs_vfpcc void @v_movQi8_sti32(ptr %p) {
934 ; CHECK-LABEL: v_movQi8_sti32:
936 ; CHECK-NEXT: vmov.i8 q8, #0x1
937 ; CHECK-NEXT: vst1.32 {d16, d17}, [r0]
938 ; CHECK-NEXT: mov pc, lr
939 %val = bitcast <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> to <4 x i32>
940 call void @llvm.arm.neon.vst1.p0.v4i32(ptr %p, <4 x i32> %val, i32 4)
944 define arm_aapcs_vfpcc void @v_movQi8_stf32(ptr %p) {
945 ; CHECK-LABEL: v_movQi8_stf32:
947 ; CHECK-NEXT: vmov.i8 q8, #0x1
948 ; CHECK-NEXT: vst1.32 {d16, d17}, [r0]
949 ; CHECK-NEXT: mov pc, lr
950 %val = bitcast <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> to <4 x float>
951 call void @llvm.arm.neon.vst1.p0.v4f32(ptr %p, <4 x float> %val, i32 4)
955 define arm_aapcs_vfpcc void @v_movQi8_sti64(ptr %p) {
956 ; CHECK-LABEL: v_movQi8_sti64:
958 ; CHECK-NEXT: vmov.i8 q8, #0x1
959 ; CHECK-NEXT: vst1.64 {d16, d17}, [r0:64]
960 ; CHECK-NEXT: mov pc, lr
961 %val = bitcast <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> to <2 x i64>
962 call void @llvm.arm.neon.vst1.p0.v2i64(ptr %p, <2 x i64> %val, i32 8)
966 define arm_aapcs_vfpcc void @v_movQi16_sti16(ptr %p) {
967 ; CHECK-LABEL: v_movQi16_sti16:
969 ; CHECK-NEXT: vmov.i16 q8, #0x1
970 ; CHECK-NEXT: vst1.16 {d16, d17}, [r0]
971 ; CHECK-NEXT: mov pc, lr
972 call void @llvm.arm.neon.vst1.p0.v8i16(ptr %p, <8 x i16> <i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1>, i32 2)
976 define arm_aapcs_vfpcc void @v_movQi16_stf16(ptr %p) {
977 ; CHECK-LABEL: v_movQi16_stf16:
979 ; CHECK-NEXT: vmov.i16 q8, #0x1
980 ; CHECK-NEXT: vst1.16 {d16, d17}, [r0]
981 ; CHECK-NEXT: mov pc, lr
982 %val = bitcast <8 x i16> <i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1> to <8 x half>
983 call void @llvm.arm.neon.vst1.p0.v8f16(ptr %p, <8 x half> %val, i32 2)
987 define arm_aapcs_vfpcc void @v_movQi16_sti32(ptr %p) {
988 ; CHECK-LABEL: v_movQi16_sti32:
990 ; CHECK-NEXT: vmov.i16 q8, #0x1
991 ; CHECK-NEXT: vst1.32 {d16, d17}, [r0]
992 ; CHECK-NEXT: mov pc, lr
993 %val = bitcast <8 x i16> <i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1> to <4 x i32>
994 call void @llvm.arm.neon.vst1.p0.v4i32(ptr %p, <4 x i32> %val, i32 4)
998 define arm_aapcs_vfpcc void @v_movQi16_stf32(ptr %p) {
999 ; CHECK-LABEL: v_movQi16_stf32:
1001 ; CHECK-NEXT: vmov.i16 q8, #0x1
1002 ; CHECK-NEXT: vst1.32 {d16, d17}, [r0]
1003 ; CHECK-NEXT: mov pc, lr
1004 %val = bitcast <8 x i16> <i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1> to <4 x float>
1005 call void @llvm.arm.neon.vst1.p0.v4f32(ptr %p, <4 x float> %val, i32 4)
1009 define arm_aapcs_vfpcc void @v_movQi16_sti64(ptr %p) {
1010 ; CHECK-LABEL: v_movQi16_sti64:
1012 ; CHECK-NEXT: vmov.i16 q8, #0x1
1013 ; CHECK-NEXT: vst1.64 {d16, d17}, [r0:64]
1014 ; CHECK-NEXT: mov pc, lr
1015 %val = bitcast <8 x i16> <i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1> to <2 x i64>
1016 call void @llvm.arm.neon.vst1.p0.v2i64(ptr %p, <2 x i64> %val, i32 8)
1020 define arm_aapcs_vfpcc void @v_movQi32_sti32(ptr %p) {
1021 ; CHECK-LABEL: v_movQi32_sti32:
1023 ; CHECK-NEXT: vmov.i32 q8, #0x1
1024 ; CHECK-NEXT: vst1.32 {d16, d17}, [r0]
1025 ; CHECK-NEXT: mov pc, lr
1026 call void @llvm.arm.neon.vst1.p0.v4i32(ptr %p, <4 x i32> <i32 1, i32 1, i32 1, i32 1>, i32 4)
1030 define arm_aapcs_vfpcc void @v_movQi32_stf32(ptr %p) {
1031 ; CHECK-LABEL: v_movQi32_stf32:
1033 ; CHECK-NEXT: vmov.i32 q8, #0x1
1034 ; CHECK-NEXT: vst1.32 {d16, d17}, [r0]
1035 ; CHECK-NEXT: mov pc, lr
1036 %val = bitcast <4 x i32> <i32 1, i32 1, i32 1, i32 1> to <4 x float>
1037 call void @llvm.arm.neon.vst1.p0.v4f32(ptr %p, <4 x float> %val, i32 4)
1041 define arm_aapcs_vfpcc void @v_movQi32_sti64(ptr %p) {
1042 ; CHECK-LABEL: v_movQi32_sti64:
1044 ; CHECK-NEXT: vmov.i32 q8, #0x1
1045 ; CHECK-NEXT: vst1.64 {d16, d17}, [r0:64]
1046 ; CHECK-NEXT: mov pc, lr
1047 %val = bitcast <4 x i32> <i32 1, i32 1, i32 1, i32 1> to <2 x i64>
1048 call void @llvm.arm.neon.vst1.p0.v2i64(ptr %p, <2 x i64> %val, i32 8)
1052 define arm_aapcs_vfpcc void @v_movQf32_stf32(ptr %p) {
1053 ; CHECK-LABEL: v_movQf32_stf32:
1055 ; CHECK-NEXT: vmov.f32 q8, #1.000000e+00
1056 ; CHECK-NEXT: vst1.32 {d16, d17}, [r0]
1057 ; CHECK-NEXT: mov pc, lr
1058 call void @llvm.arm.neon.vst1.p0.v4f32(ptr %p, <4 x float> <float 1.0, float 1.0, float 1.0, float 1.0>, i32 4)
1062 define arm_aapcs_vfpcc void @v_movQf32_sti32(ptr %p) {
1063 ; FIXME: We should use vmov.f32 instead of mov then vdup
1064 ; CHECK-LABEL: v_movQf32_sti32:
1066 ; CHECK-NEXT: mov r1, #1065353216
1067 ; CHECK-NEXT: vdup.32 q8, r1
1068 ; CHECK-NEXT: vst1.32 {d16, d17}, [r0]
1069 ; CHECK-NEXT: mov pc, lr
1070 %val = bitcast <4 x float> <float 1.0, float 1.0, float 1.0, float 1.0> to <4 x i32>
1071 call void @llvm.arm.neon.vst1.p0.v4i32(ptr %p, <4 x i32> %val, i32 4)
1075 define arm_aapcs_vfpcc void @v_movQf32_sti64(ptr %p) {
1076 ; CHECK-LE-LABEL: v_movQf32_sti64:
1077 ; CHECK-LE: @ %bb.0:
1078 ; CHECK-LE-NEXT: mov r1, #1065353216
1079 ; CHECK-LE-NEXT: vdup.32 q8, r1
1080 ; CHECK-LE-NEXT: vst1.64 {d16, d17}, [r0:64]
1081 ; CHECK-LE-NEXT: mov pc, lr
1083 ; FIXME: vrev is not needed here
1084 ; CHECK-BE-LABEL: v_movQf32_sti64:
1085 ; CHECK-BE: @ %bb.0:
1086 ; CHECK-BE-NEXT: mov r1, #1065353216
1087 ; CHECK-BE-NEXT: vdup.32 q8, r1
1088 ; CHECK-BE-NEXT: vrev64.32 q8, q8
1089 ; CHECK-BE-NEXT: vst1.64 {d16, d17}, [r0:64]
1090 ; CHECK-BE-NEXT: mov pc, lr
1091 %val = bitcast <4 x float> <float 1.0, float 1.0, float 1.0, float 1.0> to <2 x i64>
1092 call void @llvm.arm.neon.vst1.p0.v2i64(ptr %p, <2 x i64> %val, i32 8)
1096 define arm_aapcs_vfpcc void @v_movQi64_sti64(ptr %p) {
1097 ; CHECK-LABEL: v_movQi64_sti64:
1099 ; CHECK-NEXT: vmov.i64 q8, #0xff
1100 ; CHECK-NEXT: vst1.64 {d16, d17}, [r0:64]
1101 ; CHECK-NEXT: mov pc, lr
1102 call void @llvm.arm.neon.vst1.p0.v2i64(ptr %p, <2 x i64> <i64 255, i64 255>, i32 8)
1106 define arm_aapcs_vfpcc void @v_mvni16_sti16(ptr %p) {
1107 ; CHECK-LABEL: v_mvni16_sti16:
1109 ; CHECK-NEXT: vmvn.i16 d16, #0xfe
1110 ; CHECK-NEXT: vst1.16 {d16}, [r0]
1111 ; CHECK-NEXT: mov pc, lr
1112 call void @llvm.arm.neon.vst1.p0.v4i16(ptr %p, <4 x i16> <i16 65281, i16 65281, i16 65281, i16 65281>, i32 2)
1116 define arm_aapcs_vfpcc void @v_mvni16_stf16(ptr %p) {
1117 ; CHECK-LABEL: v_mvni16_stf16:
1119 ; CHECK-NEXT: vmvn.i16 d16, #0xfe
1120 ; CHECK-NEXT: vst1.16 {d16}, [r0]
1121 ; CHECK-NEXT: mov pc, lr
1122 %val = bitcast <4 x i16> <i16 65281, i16 65281, i16 65281, i16 65281> to <4 x half>
1123 call void @llvm.arm.neon.vst1.p0.v4f16(ptr %p, <4 x half> %val, i32 2)
1127 define arm_aapcs_vfpcc void @v_mvni16_sti32(ptr %p) {
1128 ; CHECK-LABEL: v_mvni16_sti32:
1130 ; CHECK-NEXT: vmvn.i16 d16, #0xfe
1131 ; CHECK-NEXT: vst1.32 {d16}, [r0]
1132 ; CHECK-NEXT: mov pc, lr
1133 %val = bitcast <4 x i16> <i16 65281, i16 65281, i16 65281, i16 65281> to <2 x i32>
1134 call void @llvm.arm.neon.vst1.p0.v2i32(ptr %p, <2 x i32> %val, i32 4)
1138 define arm_aapcs_vfpcc void @v_mvni16_stf32(ptr %p) {
1139 ; CHECK-LABEL: v_mvni16_stf32:
1141 ; CHECK-NEXT: vmvn.i16 d16, #0xfe
1142 ; CHECK-NEXT: vst1.32 {d16}, [r0]
1143 ; CHECK-NEXT: mov pc, lr
1144 %val = bitcast <4 x i16> <i16 65281, i16 65281, i16 65281, i16 65281> to <2 x float>
1145 call void @llvm.arm.neon.vst1.p0.v2f32(ptr %p, <2 x float> %val, i32 4)
1149 define arm_aapcs_vfpcc void @v_mvni16_sti64(ptr %p) {
1150 ; CHECK-LABEL: v_mvni16_sti64:
1152 ; CHECK-NEXT: vmvn.i16 d16, #0xfe
1153 ; CHECK-NEXT: vst1.64 {d16}, [r0:64]
1154 ; CHECK-NEXT: mov pc, lr
1155 %val = bitcast <4 x i16> <i16 65281, i16 65281, i16 65281, i16 65281> to <1 x i64>
1156 call void @llvm.arm.neon.vst1.p0.v1i64(ptr %p, <1 x i64> %val, i32 8)
1160 define arm_aapcs_vfpcc void @v_mvni32_sti32(ptr %p) {
1161 ; CHECK-LABEL: v_mvni32_sti32:
1163 ; CHECK-NEXT: vmvn.i32 d16, #0xfe
1164 ; CHECK-NEXT: vst1.32 {d16}, [r0]
1165 ; CHECK-NEXT: mov pc, lr
1166 call void @llvm.arm.neon.vst1.p0.v2i32(ptr %p, <2 x i32> <i32 4294967041, i32 4294967041>, i32 4)
1170 define arm_aapcs_vfpcc void @v_mvni32_stf32(ptr %p) {
1171 ; CHECK-LABEL: v_mvni32_stf32:
1173 ; CHECK-NEXT: vmvn.i32 d16, #0xfe
1174 ; CHECK-NEXT: vst1.32 {d16}, [r0]
1175 ; CHECK-NEXT: mov pc, lr
1176 %val = bitcast <2 x i32> <i32 4294967041, i32 4294967041> to <2 x float>
1177 call void @llvm.arm.neon.vst1.p0.v2f32(ptr %p, <2 x float> %val, i32 4)
1181 define arm_aapcs_vfpcc void @v_mvni32_sti64(ptr %p) {
1182 ; CHECK-LABEL: v_mvni32_sti64:
1184 ; CHECK-NEXT: vmvn.i32 d16, #0xfe
1185 ; CHECK-NEXT: vst1.64 {d16}, [r0:64]
1186 ; CHECK-NEXT: mov pc, lr
1187 %val = bitcast <2 x i32> <i32 4294967041, i32 4294967041> to <1 x i64>
1188 call void @llvm.arm.neon.vst1.p0.v1i64(ptr %p, <1 x i64> %val, i32 8)
1193 define arm_aapcs_vfpcc void @v_mvnQi16_sti16(ptr %p) {
1194 ; CHECK-LABEL: v_mvnQi16_sti16:
1196 ; CHECK-NEXT: vmvn.i16 q8, #0xfe
1197 ; CHECK-NEXT: vst1.16 {d16, d17}, [r0]
1198 ; CHECK-NEXT: mov pc, lr
1199 call void @llvm.arm.neon.vst1.p0.v8i16(ptr %p, <8 x i16> <i16 65281, i16 65281, i16 65281, i16 65281, i16 65281, i16 65281, i16 65281, i16 65281>, i32 2)
1203 define arm_aapcs_vfpcc void @v_mvnQi16_stf16(ptr %p) {
1204 ; CHECK-LABEL: v_mvnQi16_stf16:
1206 ; CHECK-NEXT: vmvn.i16 q8, #0xfe
1207 ; CHECK-NEXT: vst1.16 {d16, d17}, [r0]
1208 ; CHECK-NEXT: mov pc, lr
1209 %val = bitcast <8 x i16> <i16 65281, i16 65281, i16 65281, i16 65281, i16 65281, i16 65281, i16 65281, i16 65281> to <8 x half>
1210 call void @llvm.arm.neon.vst1.p0.v8f16(ptr %p, <8 x half> %val, i32 2)
1214 define arm_aapcs_vfpcc void @v_mvnQi16_sti32(ptr %p) {
1215 ; CHECK-LABEL: v_mvnQi16_sti32:
1217 ; CHECK-NEXT: vmvn.i16 q8, #0xfe
1218 ; CHECK-NEXT: vst1.32 {d16, d17}, [r0]
1219 ; CHECK-NEXT: mov pc, lr
1220 %val = bitcast <8 x i16> <i16 65281, i16 65281, i16 65281, i16 65281, i16 65281, i16 65281, i16 65281, i16 65281> to <4 x i32>
1221 call void @llvm.arm.neon.vst1.p0.v4i32(ptr %p, <4 x i32> %val, i32 4)
1225 define arm_aapcs_vfpcc void @v_mvnQi16_stf32(ptr %p) {
1226 ; CHECK-LABEL: v_mvnQi16_stf32:
1228 ; CHECK-NEXT: vmvn.i16 q8, #0xfe
1229 ; CHECK-NEXT: vst1.32 {d16, d17}, [r0]
1230 ; CHECK-NEXT: mov pc, lr
1231 %val = bitcast <8 x i16> <i16 65281, i16 65281, i16 65281, i16 65281, i16 65281, i16 65281, i16 65281, i16 65281> to <4 x float>
1232 call void @llvm.arm.neon.vst1.p0.v4f32(ptr %p, <4 x float> %val, i32 4)
1236 define arm_aapcs_vfpcc void @v_mvnQi16_sti64(ptr %p) {
1237 ; CHECK-LABEL: v_mvnQi16_sti64:
1239 ; CHECK-NEXT: vmvn.i16 q8, #0xfe
1240 ; CHECK-NEXT: vst1.64 {d16, d17}, [r0:64]
1241 ; CHECK-NEXT: mov pc, lr
1242 %val = bitcast <8 x i16> <i16 65281, i16 65281, i16 65281, i16 65281, i16 65281, i16 65281, i16 65281, i16 65281> to <2 x i64>
1243 call void @llvm.arm.neon.vst1.p0.v2i64(ptr %p, <2 x i64> %val, i32 8)
1247 define arm_aapcs_vfpcc void @v_mvnQi32_sti32(ptr %p) {
1248 ; CHECK-LABEL: v_mvnQi32_sti32:
1250 ; CHECK-NEXT: vmvn.i32 q8, #0xfe
1251 ; CHECK-NEXT: vst1.32 {d16, d17}, [r0]
1252 ; CHECK-NEXT: mov pc, lr
1253 call void @llvm.arm.neon.vst1.p0.v4i32(ptr %p, <4 x i32> <i32 4294967041, i32 4294967041, i32 4294967041, i32 4294967041>, i32 4)
1257 define arm_aapcs_vfpcc void @v_mvnQi32_stf32(ptr %p) {
1258 ; CHECK-LABEL: v_mvnQi32_stf32:
1260 ; CHECK-NEXT: vmvn.i32 q8, #0xfe
1261 ; CHECK-NEXT: vst1.32 {d16, d17}, [r0]
1262 ; CHECK-NEXT: mov pc, lr
1263 %val = bitcast <4 x i32> <i32 4294967041, i32 4294967041, i32 4294967041, i32 4294967041> to <4 x float>
1264 call void @llvm.arm.neon.vst1.p0.v4f32(ptr %p, <4 x float> %val, i32 4)
1268 define arm_aapcs_vfpcc void @v_mvnQi32_sti64(ptr %p) {
1269 ; CHECK-LABEL: v_mvnQi32_sti64:
1271 ; CHECK-NEXT: vmvn.i32 q8, #0xfe
1272 ; CHECK-NEXT: vst1.64 {d16, d17}, [r0:64]
1273 ; CHECK-NEXT: mov pc, lr
1274 %val = bitcast <4 x i32> <i32 4294967041, i32 4294967041, i32 4294967041, i32 4294967041> to <2 x i64>
1275 call void @llvm.arm.neon.vst1.p0.v2i64(ptr %p, <2 x i64> %val, i32 8)
1279 declare void @llvm.arm.neon.vst1.p0.v8i8(ptr, <8 x i8>, i32) nounwind
1280 declare void @llvm.arm.neon.vst1.p0.v4i16(ptr, <4 x i16>, i32) nounwind
1281 declare void @llvm.arm.neon.vst1.p0.v4f16(ptr, <4 x half>, i32) nounwind
1282 declare void @llvm.arm.neon.vst1.p0.v2i32(ptr, <2 x i32>, i32) nounwind
1283 declare void @llvm.arm.neon.vst1.p0.v2f32(ptr, <2 x float>, i32) nounwind
1284 declare void @llvm.arm.neon.vst1.p0.v1i64(ptr, <1 x i64>, i32) nounwind
1286 declare void @llvm.arm.neon.vst1.p0.v16i8(ptr, <16 x i8>, i32) nounwind
1287 declare void @llvm.arm.neon.vst1.p0.v8i16(ptr, <8 x i16>, i32) nounwind
1288 declare void @llvm.arm.neon.vst1.p0.v8f16(ptr, <8 x half>, i32) nounwind
1289 declare void @llvm.arm.neon.vst1.p0.v4i32(ptr, <4 x i32>, i32) nounwind
1290 declare void @llvm.arm.neon.vst1.p0.v4f32(ptr, <4 x float>, i32) nounwind
1291 declare void @llvm.arm.neon.vst1.p0.v2i64(ptr, <2 x i64>, i32) nounwind