xref: /minix3/external/bsd/llvm/dist/clang/test/CodeGen/arm64_vLdStNum_lane.c (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1*0a6a1f1dSLionel Sambuc // RUN: %clang_cc1 -O1 -triple arm64-apple-ios7 -target-feature +neon -ffreestanding -S -o - -emit-llvm %s | FileCheck %s
2*0a6a1f1dSLionel Sambuc // Test ARM64 SIMD load and stores of an N-element structure  intrinsics
3*0a6a1f1dSLionel Sambuc 
4*0a6a1f1dSLionel Sambuc #include <arm_neon.h>
5*0a6a1f1dSLionel Sambuc 
test_vld2q_lane_s64(const void * a1,int64x2x2_t a2)6*0a6a1f1dSLionel Sambuc int64x2x2_t test_vld2q_lane_s64(const void * a1, int64x2x2_t a2) {
7*0a6a1f1dSLionel Sambuc   // CHECK: test_vld2q_lane_s64
8*0a6a1f1dSLionel Sambuc   return vld2q_lane_s64(a1, a2, 1);
9*0a6a1f1dSLionel Sambuc   // CHECK: llvm.aarch64.neon.ld2lane.v2i64.p0i8
10*0a6a1f1dSLionel Sambuc }
11*0a6a1f1dSLionel Sambuc 
test_vld2q_lane_u64(const void * a1,uint64x2x2_t a2)12*0a6a1f1dSLionel Sambuc uint64x2x2_t test_vld2q_lane_u64(const void * a1, uint64x2x2_t a2) {
13*0a6a1f1dSLionel Sambuc   // CHECK: test_vld2q_lane_u64
14*0a6a1f1dSLionel Sambuc   return vld2q_lane_u64(a1, a2, 1);
15*0a6a1f1dSLionel Sambuc   // CHECK: llvm.aarch64.neon.ld2lane.v2i64.p0i8
16*0a6a1f1dSLionel Sambuc }
17*0a6a1f1dSLionel Sambuc 
test_vld2_lane_s64(const void * a1,int64x1x2_t a2)18*0a6a1f1dSLionel Sambuc int64x1x2_t test_vld2_lane_s64(const void * a1, int64x1x2_t a2) {
19*0a6a1f1dSLionel Sambuc   // CHECK: test_vld2_lane_s64
20*0a6a1f1dSLionel Sambuc   return vld2_lane_s64(a1, a2, 0);
21*0a6a1f1dSLionel Sambuc   // CHECK: llvm.aarch64.neon.ld2lane.v1i64.p0i8
22*0a6a1f1dSLionel Sambuc }
23*0a6a1f1dSLionel Sambuc 
test_vld2_lane_u64(const void * a1,uint64x1x2_t a2)24*0a6a1f1dSLionel Sambuc uint64x1x2_t test_vld2_lane_u64(const void * a1, uint64x1x2_t a2) {
25*0a6a1f1dSLionel Sambuc   // CHECK: test_vld2_lane_u64
26*0a6a1f1dSLionel Sambuc   return vld2_lane_u64(a1, a2, 0);
27*0a6a1f1dSLionel Sambuc   // CHECK: llvm.aarch64.neon.ld2lane.v1i64.p0i8
28*0a6a1f1dSLionel Sambuc }
29*0a6a1f1dSLionel Sambuc 
test_vld2q_lane_p8(const void * a1,poly8x16x2_t a2)30*0a6a1f1dSLionel Sambuc poly8x16x2_t test_vld2q_lane_p8(const void * a1, poly8x16x2_t a2) {
31*0a6a1f1dSLionel Sambuc   // CHECK: test_vld2q_lane_p8
32*0a6a1f1dSLionel Sambuc   return vld2q_lane_p8(a1, a2, 0);
33*0a6a1f1dSLionel Sambuc   // CHECK: extractvalue {{.*}} 0{{ *$}}
34*0a6a1f1dSLionel Sambuc   // CHECK: extractvalue {{.*}} 1{{ *$}}
35*0a6a1f1dSLionel Sambuc }
36*0a6a1f1dSLionel Sambuc 
test_vld2q_lane_u8(const void * a1,uint8x16x2_t a2)37*0a6a1f1dSLionel Sambuc uint8x16x2_t test_vld2q_lane_u8(const void * a1, uint8x16x2_t a2) {
38*0a6a1f1dSLionel Sambuc   // CHECK: test_vld2q_lane_u8
39*0a6a1f1dSLionel Sambuc   return vld2q_lane_u8(a1, a2, 0);
40*0a6a1f1dSLionel Sambuc   // CHECK: llvm.aarch64.neon.ld2lane.v16i8.p0i8
41*0a6a1f1dSLionel Sambuc }
42*0a6a1f1dSLionel Sambuc 
test_vld3q_lane_s64(const void * a1,int64x2x3_t a2)43*0a6a1f1dSLionel Sambuc int64x2x3_t test_vld3q_lane_s64(const void * a1, int64x2x3_t a2) {
44*0a6a1f1dSLionel Sambuc   // CHECK: test_vld3q_lane_s64
45*0a6a1f1dSLionel Sambuc   return vld3q_lane_s64(a1, a2, 1);
46*0a6a1f1dSLionel Sambuc   // CHECK: llvm.aarch64.neon.ld3lane.v2i64.p0i8
47*0a6a1f1dSLionel Sambuc }
48*0a6a1f1dSLionel Sambuc 
test_vld3q_lane_u64(const void * a1,uint64x2x3_t a2)49*0a6a1f1dSLionel Sambuc uint64x2x3_t test_vld3q_lane_u64(const void * a1, uint64x2x3_t a2) {
50*0a6a1f1dSLionel Sambuc   // CHECK: test_vld3q_lane_u64
51*0a6a1f1dSLionel Sambuc   return vld3q_lane_u64(a1, a2, 1);
52*0a6a1f1dSLionel Sambuc   // CHECK: llvm.aarch64.neon.ld3lane.v2i64.p0i8
53*0a6a1f1dSLionel Sambuc }
54*0a6a1f1dSLionel Sambuc 
test_vld3_lane_s64(const void * a1,int64x1x3_t a2)55*0a6a1f1dSLionel Sambuc int64x1x3_t test_vld3_lane_s64(const void * a1, int64x1x3_t a2) {
56*0a6a1f1dSLionel Sambuc   // CHECK: test_vld3_lane_s64
57*0a6a1f1dSLionel Sambuc   return vld3_lane_s64(a1, a2, 0);
58*0a6a1f1dSLionel Sambuc   // CHECK: llvm.aarch64.neon.ld3lane.v1i64.p0i8
59*0a6a1f1dSLionel Sambuc }
60*0a6a1f1dSLionel Sambuc 
test_vld3_lane_u64(const void * a1,uint64x1x3_t a2)61*0a6a1f1dSLionel Sambuc uint64x1x3_t test_vld3_lane_u64(const void * a1, uint64x1x3_t a2) {
62*0a6a1f1dSLionel Sambuc   // CHECK: test_vld3_lane_u64
63*0a6a1f1dSLionel Sambuc   return vld3_lane_u64(a1, a2, 0);
64*0a6a1f1dSLionel Sambuc   // CHECK: llvm.aarch64.neon.ld3lane.v1i64.p0i8
65*0a6a1f1dSLionel Sambuc }
66*0a6a1f1dSLionel Sambuc 
test_vld3_lane_s8(const void * a1,int8x8x3_t a2)67*0a6a1f1dSLionel Sambuc int8x8x3_t test_vld3_lane_s8(const void * a1, int8x8x3_t a2) {
68*0a6a1f1dSLionel Sambuc   // CHECK: test_vld3_lane_s8
69*0a6a1f1dSLionel Sambuc   return vld3_lane_s8(a1, a2, 0);
70*0a6a1f1dSLionel Sambuc   // CHECK: llvm.aarch64.neon.ld3lane.v8i8.p0i8
71*0a6a1f1dSLionel Sambuc }
72*0a6a1f1dSLionel Sambuc 
test_vld3q_lane_p8(const void * a1,poly8x16x3_t a2)73*0a6a1f1dSLionel Sambuc poly8x16x3_t test_vld3q_lane_p8(const void * a1, poly8x16x3_t a2) {
74*0a6a1f1dSLionel Sambuc   // CHECK: test_vld3q_lane_p8
75*0a6a1f1dSLionel Sambuc   return vld3q_lane_p8(a1, a2, 0);
76*0a6a1f1dSLionel Sambuc   // CHECK: llvm.aarch64.neon.ld3lane.v16i8.p0i8
77*0a6a1f1dSLionel Sambuc }
78*0a6a1f1dSLionel Sambuc 
test_vld3q_lane_u8(const void * a1,uint8x16x3_t a2)79*0a6a1f1dSLionel Sambuc uint8x16x3_t test_vld3q_lane_u8(const void * a1, uint8x16x3_t a2) {
80*0a6a1f1dSLionel Sambuc   // CHECK: test_vld3q_lane_u8
81*0a6a1f1dSLionel Sambuc   return vld3q_lane_u8(a1, a2, 0);
82*0a6a1f1dSLionel Sambuc   // CHECK: llvm.aarch64.neon.ld3lane.v16i8.p0i8
83*0a6a1f1dSLionel Sambuc }
84*0a6a1f1dSLionel Sambuc 
test_vld4q_lane_s64(const void * a1,int64x2x4_t a2)85*0a6a1f1dSLionel Sambuc int64x2x4_t test_vld4q_lane_s64(const void * a1, int64x2x4_t a2) {
86*0a6a1f1dSLionel Sambuc   // CHECK: test_vld4q_lane_s64
87*0a6a1f1dSLionel Sambuc   return vld4q_lane_s64(a1, a2, 0);
88*0a6a1f1dSLionel Sambuc   // CHECK: llvm.aarch64.neon.ld4lane.v2i64.p0i8
89*0a6a1f1dSLionel Sambuc }
90*0a6a1f1dSLionel Sambuc 
test_vld4q_lane_u64(const void * a1,uint64x2x4_t a2)91*0a6a1f1dSLionel Sambuc uint64x2x4_t test_vld4q_lane_u64(const void * a1, uint64x2x4_t a2) {
92*0a6a1f1dSLionel Sambuc   // CHECK: test_vld4q_lane_u64
93*0a6a1f1dSLionel Sambuc   return vld4q_lane_u64(a1, a2, 0);
94*0a6a1f1dSLionel Sambuc   // CHECK: llvm.aarch64.neon.ld4lane.v2i64.p0i8
95*0a6a1f1dSLionel Sambuc }
96*0a6a1f1dSLionel Sambuc 
test_vld4_lane_s64(const void * a1,int64x1x4_t a2)97*0a6a1f1dSLionel Sambuc int64x1x4_t test_vld4_lane_s64(const void * a1, int64x1x4_t a2) {
98*0a6a1f1dSLionel Sambuc   // CHECK: test_vld4_lane_s64
99*0a6a1f1dSLionel Sambuc   return vld4_lane_s64(a1, a2, 0);
100*0a6a1f1dSLionel Sambuc   // CHECK: llvm.aarch64.neon.ld4lane.v1i64.p0i8
101*0a6a1f1dSLionel Sambuc }
102*0a6a1f1dSLionel Sambuc 
test_vld4_lane_u64(const void * a1,uint64x1x4_t a2)103*0a6a1f1dSLionel Sambuc uint64x1x4_t test_vld4_lane_u64(const void * a1, uint64x1x4_t a2) {
104*0a6a1f1dSLionel Sambuc   // CHECK: test_vld4_lane_u64
105*0a6a1f1dSLionel Sambuc   return vld4_lane_u64(a1, a2, 0);
106*0a6a1f1dSLionel Sambuc   // CHECK: llvm.aarch64.neon.ld4lane.v1i64.p0i8
107*0a6a1f1dSLionel Sambuc }
108*0a6a1f1dSLionel Sambuc 
test_vld4_lane_s8(const void * a1,int8x8x4_t a2)109*0a6a1f1dSLionel Sambuc int8x8x4_t test_vld4_lane_s8(const void * a1, int8x8x4_t a2) {
110*0a6a1f1dSLionel Sambuc   // CHECK: test_vld4_lane_s8
111*0a6a1f1dSLionel Sambuc   return vld4_lane_s8(a1, a2, 0);
112*0a6a1f1dSLionel Sambuc   // CHECK: llvm.aarch64.neon.ld4lane.v8i8.p0i8
113*0a6a1f1dSLionel Sambuc }
114*0a6a1f1dSLionel Sambuc 
test_vld4_lane_u8(const void * a1,uint8x8x4_t a2)115*0a6a1f1dSLionel Sambuc uint8x8x4_t test_vld4_lane_u8(const void * a1, uint8x8x4_t a2) {
116*0a6a1f1dSLionel Sambuc   // CHECK: test_vld4_lane_u8
117*0a6a1f1dSLionel Sambuc   return vld4_lane_u8(a1, a2, 0);
118*0a6a1f1dSLionel Sambuc   // CHECK: llvm.aarch64.neon.ld4lane.v8i8.p0i8
119*0a6a1f1dSLionel Sambuc }
120*0a6a1f1dSLionel Sambuc 
test_vld4q_lane_p8(const void * a1,poly8x16x4_t a2)121*0a6a1f1dSLionel Sambuc poly8x16x4_t test_vld4q_lane_p8(const void * a1, poly8x16x4_t a2) {
122*0a6a1f1dSLionel Sambuc   // CHECK: test_vld4q_lane_p8
123*0a6a1f1dSLionel Sambuc   return vld4q_lane_p8(a1, a2, 0);
124*0a6a1f1dSLionel Sambuc   // CHECK: llvm.aarch64.neon.ld4lane.v16i8.p0i8
125*0a6a1f1dSLionel Sambuc }
126*0a6a1f1dSLionel Sambuc 
test_vld4q_lane_s8(const void * a1,int8x16x4_t a2)127*0a6a1f1dSLionel Sambuc int8x16x4_t test_vld4q_lane_s8(const void * a1, int8x16x4_t a2) {
128*0a6a1f1dSLionel Sambuc   // CHECK: test_vld4q_lane_s8
129*0a6a1f1dSLionel Sambuc   return vld4q_lane_s8(a1, a2, 0);
130*0a6a1f1dSLionel Sambuc   // CHECK: extractvalue {{.*}} 0{{ *$}}
131*0a6a1f1dSLionel Sambuc   // CHECK: extractvalue {{.*}} 1{{ *$}}
132*0a6a1f1dSLionel Sambuc   // CHECK: extractvalue {{.*}} 2{{ *$}}
133*0a6a1f1dSLionel Sambuc   // CHECK: extractvalue {{.*}} 3{{ *$}}
134*0a6a1f1dSLionel Sambuc }
135*0a6a1f1dSLionel Sambuc 
test_vld4q_lane_u8(const void * a1,uint8x16x4_t a2)136*0a6a1f1dSLionel Sambuc uint8x16x4_t test_vld4q_lane_u8(const void * a1, uint8x16x4_t a2) {
137*0a6a1f1dSLionel Sambuc   // CHECK: test_vld4q_lane_u8
138*0a6a1f1dSLionel Sambuc   return vld4q_lane_u8(a1, a2, 0);
139*0a6a1f1dSLionel Sambuc   // CHECK: llvm.aarch64.neon.ld4lane.v16i8.p0i8
140*0a6a1f1dSLionel Sambuc }
141*0a6a1f1dSLionel Sambuc 
142