1 ;RUN: llc -mtriple=arm-eabi -mattr=+v7 -mattr=+neon %s -o - | FileCheck %s
6 define void @v64_v8i8_1(i8* noalias nocapture %out, i8* noalias nocapture %in) nounwind {
7 ;CHECK-LABEL: v64_v8i8_1:
9 %po = getelementptr i8, i8* %out, i32 0
10 %pi = getelementptr i8, i8* %in, i32 0
11 %vi = bitcast i8* %pi to <8 x i8>*
12 %vo = bitcast i8* %po to <8 x i8>*
14 %v1 = load <8 x i8>, <8 x i8>* %vi, align 1
16 store <8 x i8> %v1, <8 x i8>* %vo, align 1
24 define void @v64_v4i16_1(i8* noalias nocapture %out, i8* noalias nocapture %in) nounwind {
25 ;CHECK-LABEL: v64_v4i16_1:
27 %po = getelementptr i8, i8* %out, i32 0
28 %pi = getelementptr i8, i8* %in, i32 0
29 %vi = bitcast i8* %pi to <4 x i16>*
30 %vo = bitcast i8* %po to <4 x i16>*
32 %v1 = load <4 x i16>, <4 x i16>* %vi, align 1
34 store <4 x i16> %v1, <4 x i16>* %vo, align 1
42 define void @v64_v2i32_1(i8* noalias nocapture %out, i8* noalias nocapture %in) nounwind {
43 ;CHECK-LABEL: v64_v2i32_1:
45 %po = getelementptr i8, i8* %out, i32 0
46 %pi = getelementptr i8, i8* %in, i32 0
47 %vi = bitcast i8* %pi to <2 x i32>*
48 %vo = bitcast i8* %po to <2 x i32>*
50 %v1 = load <2 x i32>, <2 x i32>* %vi, align 1
52 store <2 x i32> %v1, <2 x i32>* %vo, align 1
60 define void @v64_v2f32_1(i8* noalias nocapture %out, i8* noalias nocapture %in) nounwind {
61 ;CHECK-LABEL: v64_v2f32_1:
63 %po = getelementptr i8, i8* %out, i32 0
64 %pi = getelementptr i8, i8* %in, i32 0
65 %vi = bitcast i8* %pi to <2 x float>*
66 %vo = bitcast i8* %po to <2 x float>*
68 %v1 = load <2 x float>, <2 x float>* %vi, align 1
70 store <2 x float> %v1, <2 x float>* %vo, align 1
78 define void @v128_v16i8_1(i8* noalias nocapture %out, i8* noalias nocapture %in) nounwind {
79 ;CHECK-LABEL: v128_v16i8_1:
81 %po = getelementptr i8, i8* %out, i32 0
82 %pi = getelementptr i8, i8* %in, i32 0
83 %vi = bitcast i8* %pi to <16 x i8>*
84 %vo = bitcast i8* %po to <16 x i8>*
86 %v1 = load <16 x i8>, <16 x i8>* %vi, align 1
88 store <16 x i8> %v1, <16 x i8>* %vo, align 1
96 define void @v128_v8i16_1(i8* noalias nocapture %out, i8* noalias nocapture %in) nounwind {
97 ;CHECK-LABEL: v128_v8i16_1:
99 %po = getelementptr i8, i8* %out, i32 0
100 %pi = getelementptr i8, i8* %in, i32 0
101 %vi = bitcast i8* %pi to <8 x i16>*
102 %vo = bitcast i8* %po to <8 x i16>*
104 %v1 = load <8 x i16>, <8 x i16>* %vi, align 1
106 store <8 x i16> %v1, <8 x i16>* %vo, align 1
114 define void @v128_v4i32_1(i8* noalias nocapture %out, i8* noalias nocapture %in) nounwind {
115 ;CHECK-LABEL: v128_v4i32_1:
117 %po = getelementptr i8, i8* %out, i32 0
118 %pi = getelementptr i8, i8* %in, i32 0
119 %vi = bitcast i8* %pi to <4 x i32>*
120 %vo = bitcast i8* %po to <4 x i32>*
122 %v1 = load <4 x i32>, <4 x i32>* %vi, align 1
124 store <4 x i32> %v1, <4 x i32>* %vo, align 1
132 define void @v128_v2i64_1(i8* noalias nocapture %out, i8* noalias nocapture %in) nounwind {
133 ;CHECK-LABEL: v128_v2i64_1:
135 %po = getelementptr i8, i8* %out, i32 0
136 %pi = getelementptr i8, i8* %in, i32 0
137 %vi = bitcast i8* %pi to <2 x i64>*
138 %vo = bitcast i8* %po to <2 x i64>*
140 %v1 = load <2 x i64>, <2 x i64>* %vi, align 1
142 store <2 x i64> %v1, <2 x i64>* %vo, align 1
150 define void @v128_v4f32_1(i8* noalias nocapture %out, i8* noalias nocapture %in) nounwind {
151 ;CHECK-LABEL: v128_v4f32_1:
153 %po = getelementptr i8, i8* %out, i32 0
154 %pi = getelementptr i8, i8* %in, i32 0
155 %vi = bitcast i8* %pi to <4 x float>*
156 %vo = bitcast i8* %po to <4 x float>*
158 %v1 = load <4 x float>, <4 x float>* %vi, align 1
160 store <4 x float> %v1, <4 x float>* %vo, align 1
168 define void @v64_v8i8_2(i8* noalias nocapture %out, i8* noalias nocapture %in) nounwind {
169 ;CHECK-LABEL: v64_v8i8_2:
171 %po = getelementptr i8, i8* %out, i32 0
172 %pi = getelementptr i8, i8* %in, i32 0
173 %vi = bitcast i8* %pi to <8 x i8>*
174 %vo = bitcast i8* %po to <8 x i8>*
176 %v1 = load <8 x i8>, <8 x i8>* %vi, align 2
178 store <8 x i8> %v1, <8 x i8>* %vo, align 2
186 define void @v64_v4i16_2(i8* noalias nocapture %out, i8* noalias nocapture %in) nounwind {
187 ;CHECK-LABEL: v64_v4i16_2:
189 %po = getelementptr i8, i8* %out, i32 0
190 %pi = getelementptr i8, i8* %in, i32 0
191 %vi = bitcast i8* %pi to <4 x i16>*
192 %vo = bitcast i8* %po to <4 x i16>*
194 %v1 = load <4 x i16>, <4 x i16>* %vi, align 2
196 store <4 x i16> %v1, <4 x i16>* %vo, align 2
204 define void @v64_v2i32_2(i8* noalias nocapture %out, i8* noalias nocapture %in) nounwind {
205 ;CHECK-LABEL: v64_v2i32_2:
207 %po = getelementptr i8, i8* %out, i32 0
208 %pi = getelementptr i8, i8* %in, i32 0
209 %vi = bitcast i8* %pi to <2 x i32>*
210 %vo = bitcast i8* %po to <2 x i32>*
212 %v1 = load <2 x i32>, <2 x i32>* %vi, align 2
214 store <2 x i32> %v1, <2 x i32>* %vo, align 2
222 define void @v64_v2f32_2(i8* noalias nocapture %out, i8* noalias nocapture %in) nounwind {
223 ;CHECK-LABEL: v64_v2f32_2:
225 %po = getelementptr i8, i8* %out, i32 0
226 %pi = getelementptr i8, i8* %in, i32 0
227 %vi = bitcast i8* %pi to <2 x float>*
228 %vo = bitcast i8* %po to <2 x float>*
230 %v1 = load <2 x float>, <2 x float>* %vi, align 2
232 store <2 x float> %v1, <2 x float>* %vo, align 2
240 define void @v128_v16i8_2(i8* noalias nocapture %out, i8* noalias nocapture %in) nounwind {
241 ;CHECK-LABEL: v128_v16i8_2:
243 %po = getelementptr i8, i8* %out, i32 0
244 %pi = getelementptr i8, i8* %in, i32 0
245 %vi = bitcast i8* %pi to <16 x i8>*
246 %vo = bitcast i8* %po to <16 x i8>*
248 %v1 = load <16 x i8>, <16 x i8>* %vi, align 2
250 store <16 x i8> %v1, <16 x i8>* %vo, align 2
258 define void @v128_v8i16_2(i8* noalias nocapture %out, i8* noalias nocapture %in) nounwind {
259 ;CHECK-LABEL: v128_v8i16_2:
261 %po = getelementptr i8, i8* %out, i32 0
262 %pi = getelementptr i8, i8* %in, i32 0
263 %vi = bitcast i8* %pi to <8 x i16>*
264 %vo = bitcast i8* %po to <8 x i16>*
266 %v1 = load <8 x i16>, <8 x i16>* %vi, align 2
268 store <8 x i16> %v1, <8 x i16>* %vo, align 2
276 define void @v128_v4i32_2(i8* noalias nocapture %out, i8* noalias nocapture %in) nounwind {
277 ;CHECK-LABEL: v128_v4i32_2:
279 %po = getelementptr i8, i8* %out, i32 0
280 %pi = getelementptr i8, i8* %in, i32 0
281 %vi = bitcast i8* %pi to <4 x i32>*
282 %vo = bitcast i8* %po to <4 x i32>*
284 %v1 = load <4 x i32>, <4 x i32>* %vi, align 2
286 store <4 x i32> %v1, <4 x i32>* %vo, align 2
294 define void @v128_v2i64_2(i8* noalias nocapture %out, i8* noalias nocapture %in) nounwind {
295 ;CHECK-LABEL: v128_v2i64_2:
297 %po = getelementptr i8, i8* %out, i32 0
298 %pi = getelementptr i8, i8* %in, i32 0
299 %vi = bitcast i8* %pi to <2 x i64>*
300 %vo = bitcast i8* %po to <2 x i64>*
302 %v1 = load <2 x i64>, <2 x i64>* %vi, align 2
304 store <2 x i64> %v1, <2 x i64>* %vo, align 2
312 define void @v128_v4f32_2(i8* noalias nocapture %out, i8* noalias nocapture %in) nounwind {
313 ;CHECK-LABEL: v128_v4f32_2:
315 %po = getelementptr i8, i8* %out, i32 0
316 %pi = getelementptr i8, i8* %in, i32 0
317 %vi = bitcast i8* %pi to <4 x float>*
318 %vo = bitcast i8* %po to <4 x float>*
320 %v1 = load <4 x float>, <4 x float>* %vi, align 2
322 store <4 x float> %v1, <4 x float>* %vo, align 2
330 define void @v64_v8i8_4(i8* noalias nocapture %out, i8* noalias nocapture %in) nounwind {
331 ;CHECK-LABEL: v64_v8i8_4:
333 %po = getelementptr i8, i8* %out, i32 0
334 %pi = getelementptr i8, i8* %in, i32 0
335 %vi = bitcast i8* %pi to <8 x i8>*
336 %vo = bitcast i8* %po to <8 x i8>*
338 %v1 = load <8 x i8>, <8 x i8>* %vi, align 4
340 store <8 x i8> %v1, <8 x i8>* %vo, align 4
348 define void @v64_v4i16_4(i8* noalias nocapture %out, i8* noalias nocapture %in) nounwind {
349 ;CHECK-LABEL: v64_v4i16_4:
351 %po = getelementptr i8, i8* %out, i32 0
352 %pi = getelementptr i8, i8* %in, i32 0
353 %vi = bitcast i8* %pi to <4 x i16>*
354 %vo = bitcast i8* %po to <4 x i16>*
356 %v1 = load <4 x i16>, <4 x i16>* %vi, align 4
358 store <4 x i16> %v1, <4 x i16>* %vo, align 4
366 define void @v64_v2i32_4(i8* noalias nocapture %out, i8* noalias nocapture %in) nounwind {
367 ;CHECK-LABEL: v64_v2i32_4:
369 %po = getelementptr i8, i8* %out, i32 0
370 %pi = getelementptr i8, i8* %in, i32 0
371 %vi = bitcast i8* %pi to <2 x i32>*
372 %vo = bitcast i8* %po to <2 x i32>*
374 %v1 = load <2 x i32>, <2 x i32>* %vi, align 4
376 store <2 x i32> %v1, <2 x i32>* %vo, align 4
384 define void @v64_v2f32_4(i8* noalias nocapture %out, i8* noalias nocapture %in) nounwind {
385 ;CHECK-LABEL: v64_v2f32_4:
387 %po = getelementptr i8, i8* %out, i32 0
388 %pi = getelementptr i8, i8* %in, i32 0
389 %vi = bitcast i8* %pi to <2 x float>*
390 %vo = bitcast i8* %po to <2 x float>*
392 %v1 = load <2 x float>, <2 x float>* %vi, align 4
394 store <2 x float> %v1, <2 x float>* %vo, align 4
402 define void @v128_v16i8_4(i8* noalias nocapture %out, i8* noalias nocapture %in) nounwind {
403 ;CHECK-LABEL: v128_v16i8_4:
405 %po = getelementptr i8, i8* %out, i32 0
406 %pi = getelementptr i8, i8* %in, i32 0
407 %vi = bitcast i8* %pi to <16 x i8>*
408 %vo = bitcast i8* %po to <16 x i8>*
410 %v1 = load <16 x i8>, <16 x i8>* %vi, align 4
412 store <16 x i8> %v1, <16 x i8>* %vo, align 4
420 define void @v128_v8i16_4(i8* noalias nocapture %out, i8* noalias nocapture %in) nounwind {
421 ;CHECK-LABEL: v128_v8i16_4:
423 %po = getelementptr i8, i8* %out, i32 0
424 %pi = getelementptr i8, i8* %in, i32 0
425 %vi = bitcast i8* %pi to <8 x i16>*
426 %vo = bitcast i8* %po to <8 x i16>*
428 %v1 = load <8 x i16>, <8 x i16>* %vi, align 4
430 store <8 x i16> %v1, <8 x i16>* %vo, align 4
438 define void @v128_v4i32_4(i8* noalias nocapture %out, i8* noalias nocapture %in) nounwind {
439 ;CHECK-LABEL: v128_v4i32_4:
441 %po = getelementptr i8, i8* %out, i32 0
442 %pi = getelementptr i8, i8* %in, i32 0
443 %vi = bitcast i8* %pi to <4 x i32>*
444 %vo = bitcast i8* %po to <4 x i32>*
446 %v1 = load <4 x i32>, <4 x i32>* %vi, align 4
448 store <4 x i32> %v1, <4 x i32>* %vo, align 4
456 define void @v128_v2i64_4(i8* noalias nocapture %out, i8* noalias nocapture %in) nounwind {
457 ;CHECK-LABEL: v128_v2i64_4:
459 %po = getelementptr i8, i8* %out, i32 0
460 %pi = getelementptr i8, i8* %in, i32 0
461 %vi = bitcast i8* %pi to <2 x i64>*
462 %vo = bitcast i8* %po to <2 x i64>*
464 %v1 = load <2 x i64>, <2 x i64>* %vi, align 4
466 store <2 x i64> %v1, <2 x i64>* %vo, align 4
474 define void @v128_v4f32_4(i8* noalias nocapture %out, i8* noalias nocapture %in) nounwind {
475 ;CHECK-LABEL: v128_v4f32_4:
477 %po = getelementptr i8, i8* %out, i32 0
478 %pi = getelementptr i8, i8* %in, i32 0
479 %vi = bitcast i8* %pi to <4 x float>*
480 %vo = bitcast i8* %po to <4 x float>*
482 %v1 = load <4 x float>, <4 x float>* %vi, align 4
484 store <4 x float> %v1, <4 x float>* %vo, align 4
488 define void @test_weird_type(<3 x double> %in, <3 x i64>* %ptr) {
489 ; CHECK-LABEL: test_weird_type:
492 %vec.int = bitcast <3 x double> %in to <3 x i64>
493 store <3 x i64> %vec.int, <3 x i64>* %ptr, align 8