1 ; RUN: llc < %s -march=arm -mattr=+neon | FileCheck %s
3 %struct.__neon_int8x8x3_t = type { <8 x i8>, <8 x i8>, <8 x i8> }
4 %struct.__neon_int16x4x3_t = type { <4 x i16>, <4 x i16>, <4 x i16> }
5 %struct.__neon_int32x2x3_t = type { <2 x i32>, <2 x i32>, <2 x i32> }
6 %struct.__neon_float32x2x3_t = type { <2 x float>, <2 x float>, <2 x float> }
7 %struct.__neon_int64x1x3_t = type { <1 x i64>, <1 x i64>, <1 x i64> }
9 %struct.__neon_int8x16x3_t = type { <16 x i8>, <16 x i8>, <16 x i8> }
10 %struct.__neon_int16x8x3_t = type { <8 x i16>, <8 x i16>, <8 x i16> }
11 %struct.__neon_int32x4x3_t = type { <4 x i32>, <4 x i32>, <4 x i32> }
12 %struct.__neon_float32x4x3_t = type { <4 x float>, <4 x float>, <4 x float> }
14 define <8 x i8> @vld3i8(i8* %A) nounwind {
16 ;Check the alignment value. Max for this instruction is 64 bits:
17 ;CHECK: vld3.8 {d16, d17, d18}, [r0, :64]
18 %tmp1 = call %struct.__neon_int8x8x3_t @llvm.arm.neon.vld3.v8i8(i8* %A, i32 32)
19 %tmp2 = extractvalue %struct.__neon_int8x8x3_t %tmp1, 0
20 %tmp3 = extractvalue %struct.__neon_int8x8x3_t %tmp1, 2
21 %tmp4 = add <8 x i8> %tmp2, %tmp3
25 define <4 x i16> @vld3i16(i16* %A) nounwind {
28 %tmp0 = bitcast i16* %A to i8*
29 %tmp1 = call %struct.__neon_int16x4x3_t @llvm.arm.neon.vld3.v4i16(i8* %tmp0, i32 1)
30 %tmp2 = extractvalue %struct.__neon_int16x4x3_t %tmp1, 0
31 %tmp3 = extractvalue %struct.__neon_int16x4x3_t %tmp1, 2
32 %tmp4 = add <4 x i16> %tmp2, %tmp3
36 define <2 x i32> @vld3i32(i32* %A) nounwind {
39 %tmp0 = bitcast i32* %A to i8*
40 %tmp1 = call %struct.__neon_int32x2x3_t @llvm.arm.neon.vld3.v2i32(i8* %tmp0, i32 1)
41 %tmp2 = extractvalue %struct.__neon_int32x2x3_t %tmp1, 0
42 %tmp3 = extractvalue %struct.__neon_int32x2x3_t %tmp1, 2
43 %tmp4 = add <2 x i32> %tmp2, %tmp3
47 define <2 x float> @vld3f(float* %A) nounwind {
50 %tmp0 = bitcast float* %A to i8*
51 %tmp1 = call %struct.__neon_float32x2x3_t @llvm.arm.neon.vld3.v2f32(i8* %tmp0, i32 1)
52 %tmp2 = extractvalue %struct.__neon_float32x2x3_t %tmp1, 0
53 %tmp3 = extractvalue %struct.__neon_float32x2x3_t %tmp1, 2
54 %tmp4 = fadd <2 x float> %tmp2, %tmp3
58 define <1 x i64> @vld3i64(i64* %A) nounwind {
60 ;Check the alignment value. Max for this instruction is 64 bits:
61 ;CHECK: vld1.64 {d16, d17, d18}, [r0, :64]
62 %tmp0 = bitcast i64* %A to i8*
63 %tmp1 = call %struct.__neon_int64x1x3_t @llvm.arm.neon.vld3.v1i64(i8* %tmp0, i32 16)
64 %tmp2 = extractvalue %struct.__neon_int64x1x3_t %tmp1, 0
65 %tmp3 = extractvalue %struct.__neon_int64x1x3_t %tmp1, 2
66 %tmp4 = add <1 x i64> %tmp2, %tmp3
70 define <16 x i8> @vld3Qi8(i8* %A) nounwind {
72 ;Check the alignment value. Max for this instruction is 64 bits:
73 ;CHECK: vld3.8 {d16, d18, d20}, [r0, :64]!
74 ;CHECK: vld3.8 {d17, d19, d21}, [r0, :64]
75 %tmp1 = call %struct.__neon_int8x16x3_t @llvm.arm.neon.vld3.v16i8(i8* %A, i32 32)
76 %tmp2 = extractvalue %struct.__neon_int8x16x3_t %tmp1, 0
77 %tmp3 = extractvalue %struct.__neon_int8x16x3_t %tmp1, 2
78 %tmp4 = add <16 x i8> %tmp2, %tmp3
82 define <8 x i16> @vld3Qi16(i16* %A) nounwind {
86 %tmp0 = bitcast i16* %A to i8*
87 %tmp1 = call %struct.__neon_int16x8x3_t @llvm.arm.neon.vld3.v8i16(i8* %tmp0, i32 1)
88 %tmp2 = extractvalue %struct.__neon_int16x8x3_t %tmp1, 0
89 %tmp3 = extractvalue %struct.__neon_int16x8x3_t %tmp1, 2
90 %tmp4 = add <8 x i16> %tmp2, %tmp3
94 define <4 x i32> @vld3Qi32(i32* %A) nounwind {
98 %tmp0 = bitcast i32* %A to i8*
99 %tmp1 = call %struct.__neon_int32x4x3_t @llvm.arm.neon.vld3.v4i32(i8* %tmp0, i32 1)
100 %tmp2 = extractvalue %struct.__neon_int32x4x3_t %tmp1, 0
101 %tmp3 = extractvalue %struct.__neon_int32x4x3_t %tmp1, 2
102 %tmp4 = add <4 x i32> %tmp2, %tmp3
106 define <4 x float> @vld3Qf(float* %A) nounwind {
110 %tmp0 = bitcast float* %A to i8*
111 %tmp1 = call %struct.__neon_float32x4x3_t @llvm.arm.neon.vld3.v4f32(i8* %tmp0, i32 1)
112 %tmp2 = extractvalue %struct.__neon_float32x4x3_t %tmp1, 0
113 %tmp3 = extractvalue %struct.__neon_float32x4x3_t %tmp1, 2
114 %tmp4 = fadd <4 x float> %tmp2, %tmp3
115 ret <4 x float> %tmp4
118 declare %struct.__neon_int8x8x3_t @llvm.arm.neon.vld3.v8i8(i8*, i32) nounwind readonly
119 declare %struct.__neon_int16x4x3_t @llvm.arm.neon.vld3.v4i16(i8*, i32) nounwind readonly
120 declare %struct.__neon_int32x2x3_t @llvm.arm.neon.vld3.v2i32(i8*, i32) nounwind readonly
121 declare %struct.__neon_float32x2x3_t @llvm.arm.neon.vld3.v2f32(i8*, i32) nounwind readonly
122 declare %struct.__neon_int64x1x3_t @llvm.arm.neon.vld3.v1i64(i8*, i32) nounwind readonly
124 declare %struct.__neon_int8x16x3_t @llvm.arm.neon.vld3.v16i8(i8*, i32) nounwind readonly
125 declare %struct.__neon_int16x8x3_t @llvm.arm.neon.vld3.v8i16(i8*, i32) nounwind readonly
126 declare %struct.__neon_int32x4x3_t @llvm.arm.neon.vld3.v4i32(i8*, i32) nounwind readonly
127 declare %struct.__neon_float32x4x3_t @llvm.arm.neon.vld3.v4f32(i8*, i32) nounwind readonly