1 ; RUN: llvm-as < %s | llc -march=arm -mattr=+neon | FileCheck %s
3 %struct.__builtin_neon_v8qi2 = type { <8 x i8>, <8 x i8> }
4 %struct.__builtin_neon_v4hi2 = type { <4 x i16>, <4 x i16> }
5 %struct.__builtin_neon_v2si2 = type { <2 x i32>, <2 x i32> }
6 %struct.__builtin_neon_v2sf2 = type { <2 x float>, <2 x float> }
8 %struct.__builtin_neon_v16qi2 = type { <16 x i8>, <16 x i8> }
9 %struct.__builtin_neon_v8hi2 = type { <8 x i16>, <8 x i16> }
10 %struct.__builtin_neon_v4si2 = type { <4 x i32>, <4 x i32> }
11 %struct.__builtin_neon_v4sf2 = type { <4 x float>, <4 x float> }
13 define <8 x i8> @vtrni8(<8 x i8>* %A, <8 x i8>* %B) nounwind {
16 %tmp1 = load <8 x i8>* %A
17 %tmp2 = load <8 x i8>* %B
18 %tmp3 = call %struct.__builtin_neon_v8qi2 @llvm.arm.neon.vtrn.v8i8(<8 x i8> %tmp1, <8 x i8> %tmp2)
19 %tmp4 = extractvalue %struct.__builtin_neon_v8qi2 %tmp3, 0
20 %tmp5 = extractvalue %struct.__builtin_neon_v8qi2 %tmp3, 1
21 %tmp6 = add <8 x i8> %tmp4, %tmp5
25 define <4 x i16> @vtrni16(<4 x i16>* %A, <4 x i16>* %B) nounwind {
28 %tmp1 = load <4 x i16>* %A
29 %tmp2 = load <4 x i16>* %B
30 %tmp3 = call %struct.__builtin_neon_v4hi2 @llvm.arm.neon.vtrn.v4i16(<4 x i16> %tmp1, <4 x i16> %tmp2)
31 %tmp4 = extractvalue %struct.__builtin_neon_v4hi2 %tmp3, 0
32 %tmp5 = extractvalue %struct.__builtin_neon_v4hi2 %tmp3, 1
33 %tmp6 = add <4 x i16> %tmp4, %tmp5
37 define <2 x i32> @vtrni32(<2 x i32>* %A, <2 x i32>* %B) nounwind {
40 %tmp1 = load <2 x i32>* %A
41 %tmp2 = load <2 x i32>* %B
42 %tmp3 = call %struct.__builtin_neon_v2si2 @llvm.arm.neon.vtrn.v2i32(<2 x i32> %tmp1, <2 x i32> %tmp2)
43 %tmp4 = extractvalue %struct.__builtin_neon_v2si2 %tmp3, 0
44 %tmp5 = extractvalue %struct.__builtin_neon_v2si2 %tmp3, 1
45 %tmp6 = add <2 x i32> %tmp4, %tmp5
49 define <2 x float> @vtrnf(<2 x float>* %A, <2 x float>* %B) nounwind {
52 %tmp1 = load <2 x float>* %A
53 %tmp2 = load <2 x float>* %B
54 %tmp3 = call %struct.__builtin_neon_v2sf2 @llvm.arm.neon.vtrn.v2f32(<2 x float> %tmp1, <2 x float> %tmp2)
55 %tmp4 = extractvalue %struct.__builtin_neon_v2sf2 %tmp3, 0
56 %tmp5 = extractvalue %struct.__builtin_neon_v2sf2 %tmp3, 1
57 %tmp6 = add <2 x float> %tmp4, %tmp5
61 define <16 x i8> @vtrnQi8(<16 x i8>* %A, <16 x i8>* %B) nounwind {
64 %tmp1 = load <16 x i8>* %A
65 %tmp2 = load <16 x i8>* %B
66 %tmp3 = call %struct.__builtin_neon_v16qi2 @llvm.arm.neon.vtrn.v16i8(<16 x i8> %tmp1, <16 x i8> %tmp2)
67 %tmp4 = extractvalue %struct.__builtin_neon_v16qi2 %tmp3, 0
68 %tmp5 = extractvalue %struct.__builtin_neon_v16qi2 %tmp3, 1
69 %tmp6 = add <16 x i8> %tmp4, %tmp5
73 define <8 x i16> @vtrnQi16(<8 x i16>* %A, <8 x i16>* %B) nounwind {
76 %tmp1 = load <8 x i16>* %A
77 %tmp2 = load <8 x i16>* %B
78 %tmp3 = call %struct.__builtin_neon_v8hi2 @llvm.arm.neon.vtrn.v8i16(<8 x i16> %tmp1, <8 x i16> %tmp2)
79 %tmp4 = extractvalue %struct.__builtin_neon_v8hi2 %tmp3, 0
80 %tmp5 = extractvalue %struct.__builtin_neon_v8hi2 %tmp3, 1
81 %tmp6 = add <8 x i16> %tmp4, %tmp5
85 define <4 x i32> @vtrnQi32(<4 x i32>* %A, <4 x i32>* %B) nounwind {
88 %tmp1 = load <4 x i32>* %A
89 %tmp2 = load <4 x i32>* %B
90 %tmp3 = call %struct.__builtin_neon_v4si2 @llvm.arm.neon.vtrn.v4i32(<4 x i32> %tmp1, <4 x i32> %tmp2)
91 %tmp4 = extractvalue %struct.__builtin_neon_v4si2 %tmp3, 0
92 %tmp5 = extractvalue %struct.__builtin_neon_v4si2 %tmp3, 1
93 %tmp6 = add <4 x i32> %tmp4, %tmp5
97 define <4 x float> @vtrnQf(<4 x float>* %A, <4 x float>* %B) nounwind {
100 %tmp1 = load <4 x float>* %A
101 %tmp2 = load <4 x float>* %B
102 %tmp3 = call %struct.__builtin_neon_v4sf2 @llvm.arm.neon.vtrn.v4f32(<4 x float> %tmp1, <4 x float> %tmp2)
103 %tmp4 = extractvalue %struct.__builtin_neon_v4sf2 %tmp3, 0
104 %tmp5 = extractvalue %struct.__builtin_neon_v4sf2 %tmp3, 1
105 %tmp6 = add <4 x float> %tmp4, %tmp5
106 ret <4 x float> %tmp6
109 declare %struct.__builtin_neon_v8qi2 @llvm.arm.neon.vtrn.v8i8(<8 x i8>, <8 x i8>) nounwind readnone
110 declare %struct.__builtin_neon_v4hi2 @llvm.arm.neon.vtrn.v4i16(<4 x i16>, <4 x i16>) nounwind readnone
111 declare %struct.__builtin_neon_v2si2 @llvm.arm.neon.vtrn.v2i32(<2 x i32>, <2 x i32>) nounwind readnone
112 declare %struct.__builtin_neon_v2sf2 @llvm.arm.neon.vtrn.v2f32(<2 x float>, <2 x float>) nounwind readnone
114 declare %struct.__builtin_neon_v16qi2 @llvm.arm.neon.vtrn.v16i8(<16 x i8>, <16 x i8>) nounwind readnone
115 declare %struct.__builtin_neon_v8hi2 @llvm.arm.neon.vtrn.v8i16(<8 x i16>, <8 x i16>) nounwind readnone
116 declare %struct.__builtin_neon_v4si2 @llvm.arm.neon.vtrn.v4i32(<4 x i32>, <4 x i32>) nounwind readnone
117 declare %struct.__builtin_neon_v4sf2 @llvm.arm.neon.vtrn.v4f32(<4 x float>, <4 x float>) nounwind readnone