1*f4a2713aSLionel Sambuc // REQUIRES: arm-registered-target
2*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -triple armv7a-linux-gnueabi \
3*f4a2713aSLionel Sambuc // RUN: -target-cpu cortex-a8 \
4*f4a2713aSLionel Sambuc // RUN: -emit-llvm -o - %s | FileCheck %s
5*f4a2713aSLionel Sambuc #include <arm_neon.h>
main()6*f4a2713aSLionel Sambuc int main(){
7*f4a2713aSLionel Sambuc int32_t v0[3];
8*f4a2713aSLionel Sambuc int32x2x3_t v1;
9*f4a2713aSLionel Sambuc int32_t v2[4];
10*f4a2713aSLionel Sambuc int32x2x4_t v3;
11*f4a2713aSLionel Sambuc int64x1x3_t v4;
12*f4a2713aSLionel Sambuc int64x1x4_t v5;
13*f4a2713aSLionel Sambuc int64_t v6[3];
14*f4a2713aSLionel Sambuc int64_t v7[4];
15*f4a2713aSLionel Sambuc
16*f4a2713aSLionel Sambuc v1 = vld3_dup_s32(v0);
17*f4a2713aSLionel Sambuc // CHECK: [[T168:%.*]] = call { <2 x i32>, <2 x i32>, <2 x i32> } @llvm.arm.neon.vld3lane.v2i32(i8* {{.*}}, <2 x i32> undef, <2 x i32> undef, <2 x i32> undef, i32 {{[0-9]+}}, i32 {{[0-9]+}})
18*f4a2713aSLionel Sambuc // CHECK-NEXT: [[T169:%.*]] = extractvalue { <2 x i32>, <2 x i32>, <2 x i32> } [[T168]], 0
19*f4a2713aSLionel Sambuc // CHECK-NEXT: [[T170:%.*]] = shufflevector <2 x i32> [[T169]], <2 x i32> [[T169]], <2 x i32> zeroinitializer
20*f4a2713aSLionel Sambuc // CHECK-NEXT: [[T171:%.*]] = insertvalue { <2 x i32>, <2 x i32>, <2 x i32> } [[T168]], <2 x i32> [[T170]], 0
21*f4a2713aSLionel Sambuc // CHECK-NEXT: [[T172:%.*]] = extractvalue { <2 x i32>, <2 x i32>, <2 x i32> } [[T171]], 1
22*f4a2713aSLionel Sambuc // CHECK-NEXT: [[T173:%.*]] = shufflevector <2 x i32> [[T172]], <2 x i32> [[T172]], <2 x i32> zeroinitializer
23*f4a2713aSLionel Sambuc // CHECK-NEXT: [[T174:%.*]] = insertvalue { <2 x i32>, <2 x i32>, <2 x i32> } [[T171]], <2 x i32> [[T173]], 1
24*f4a2713aSLionel Sambuc // CHECK-NEXT: [[T175:%.*]] = extractvalue { <2 x i32>, <2 x i32>, <2 x i32> } [[T174]], 2
25*f4a2713aSLionel Sambuc // CHECK-NEXT: [[T176:%.*]] = shufflevector <2 x i32> [[T175]], <2 x i32> [[T175]], <2 x i32> zeroinitializer
26*f4a2713aSLionel Sambuc // CHECK-NEXT: [[T177:%.*]] = insertvalue { <2 x i32>, <2 x i32>, <2 x i32> } [[T174]], <2 x i32> [[T176]], 2
27*f4a2713aSLionel Sambuc
28*f4a2713aSLionel Sambuc v3 = vld4_dup_s32(v2);
29*f4a2713aSLionel Sambuc // CHECK: [[T178:%.*]] = call { <2 x i32>, <2 x i32>, <2 x i32>, <2 x i32> } @llvm.arm.neon.vld4lane.v2i32(i8* {{.*}}, <2 x i32> undef, <2 x i32> undef, <2 x i32> undef, <2 x i32> undef, i32 {{[0-9]+}}, i32 {{[0-9]+}})
30*f4a2713aSLionel Sambuc // CHECK-NEXT: [[T179:%.*]] = extractvalue { <2 x i32>, <2 x i32>, <2 x i32>, <2 x i32> } [[T178]], 0
31*f4a2713aSLionel Sambuc // CHECK-NEXT: [[T180:%.*]] = shufflevector <2 x i32> [[T179]], <2 x i32> [[T179]], <2 x i32> zeroinitializer
32*f4a2713aSLionel Sambuc // CHECK-NEXT: [[T181:%.*]] = insertvalue { <2 x i32>, <2 x i32>, <2 x i32>, <2 x i32> } [[T178]], <2 x i32> [[T180]], 0
33*f4a2713aSLionel Sambuc // CHECK-NEXT: [[T182:%.*]] = extractvalue { <2 x i32>, <2 x i32>, <2 x i32>, <2 x i32> } [[T181]], 1
34*f4a2713aSLionel Sambuc // CHECK-NEXT: [[T183:%.*]] = shufflevector <2 x i32> [[T182]], <2 x i32> [[T182]], <2 x i32> zeroinitializer
35*f4a2713aSLionel Sambuc // CHECK-NEXT: [[T184:%.*]] = insertvalue { <2 x i32>, <2 x i32>, <2 x i32>, <2 x i32> } [[T181]], <2 x i32> [[T183]], 1
36*f4a2713aSLionel Sambuc // CHECK-NEXT: [[T185:%.*]] = extractvalue { <2 x i32>, <2 x i32>, <2 x i32>, <2 x i32> } [[T184]], 2
37*f4a2713aSLionel Sambuc // CHECK-NEXT: [[T186:%.*]] = shufflevector <2 x i32> [[T185]], <2 x i32> [[T185]], <2 x i32> zeroinitializer
38*f4a2713aSLionel Sambuc // CHECK-NEXT: [[T187:%.*]] = insertvalue { <2 x i32>, <2 x i32>, <2 x i32>, <2 x i32> } [[T184]], <2 x i32> [[T186]], 2
39*f4a2713aSLionel Sambuc // CHECK-NEXT: [[T188:%.*]] = extractvalue { <2 x i32>, <2 x i32>, <2 x i32>, <2 x i32> } [[T187]], 3
40*f4a2713aSLionel Sambuc // CHECK-NEXT: [[T189:%.*]] = shufflevector <2 x i32> [[T188]], <2 x i32> [[T188]], <2 x i32> zeroinitializer
41*f4a2713aSLionel Sambuc // CHECK-NEXT: [[T190:%.*]] = insertvalue { <2 x i32>, <2 x i32>, <2 x i32>, <2 x i32> } [[T187]], <2 x i32> [[T189]], 3
42*f4a2713aSLionel Sambuc
43*f4a2713aSLionel Sambuc v4 = vld3_dup_s64(v6);
44*f4a2713aSLionel Sambuc // CHECK: {{%.*}} = call { <1 x i64>, <1 x i64>, <1 x i64> } @llvm.arm.neon.vld3.v1i64(i8* {{.*}}, i32 {{[0-9]+}})
45*f4a2713aSLionel Sambuc
46*f4a2713aSLionel Sambuc v5 = vld4_dup_s64(v7);
47*f4a2713aSLionel Sambuc // CHECK: {{%.*}} = call { <1 x i64>, <1 x i64>, <1 x i64>, <1 x i64> } @llvm.arm.neon.vld4.v1i64(i8* {{.*}}, i32 {{[0-9]+}})
48*f4a2713aSLionel Sambuc
49*f4a2713aSLionel Sambuc return 0;
50*f4a2713aSLionel Sambuc }
51