blob: 85229d5a57f6de409bc5ee97c42b222445f7d50a [file] [log] [blame]
Stephen Hines6bcf27b2014-05-29 04:14:42 -07001// RUN: %clang_cc1 -O1 -triple arm64-apple-ios7 -target-feature +neon -ffreestanding -S -o - -emit-llvm %s | FileCheck %s
Stephen Hines651f13c2014-04-23 16:59:28 -07002// Test ARM64 SIMD load and stores of an N-element structure intrinsics
3
4#include <arm_neon.h>
5
6int64x2x2_t test_vld2q_lane_s64(const void * a1, int64x2x2_t a2) {
7 // CHECK: test_vld2q_lane_s64
8 return vld2q_lane_s64(a1, a2, 1);
Stephen Hines6bcf27b2014-05-29 04:14:42 -07009 // CHECK: llvm.aarch64.neon.ld2lane.v2i64.p0i8
Stephen Hines651f13c2014-04-23 16:59:28 -070010}
11
12uint64x2x2_t test_vld2q_lane_u64(const void * a1, uint64x2x2_t a2) {
13 // CHECK: test_vld2q_lane_u64
14 return vld2q_lane_u64(a1, a2, 1);
Stephen Hines6bcf27b2014-05-29 04:14:42 -070015 // CHECK: llvm.aarch64.neon.ld2lane.v2i64.p0i8
Stephen Hines651f13c2014-04-23 16:59:28 -070016}
17
18int64x1x2_t test_vld2_lane_s64(const void * a1, int64x1x2_t a2) {
19 // CHECK: test_vld2_lane_s64
20 return vld2_lane_s64(a1, a2, 0);
Stephen Hines6bcf27b2014-05-29 04:14:42 -070021 // CHECK: llvm.aarch64.neon.ld2lane.v1i64.p0i8
Stephen Hines651f13c2014-04-23 16:59:28 -070022}
23
24uint64x1x2_t test_vld2_lane_u64(const void * a1, uint64x1x2_t a2) {
25 // CHECK: test_vld2_lane_u64
26 return vld2_lane_u64(a1, a2, 0);
Stephen Hines6bcf27b2014-05-29 04:14:42 -070027 // CHECK: llvm.aarch64.neon.ld2lane.v1i64.p0i8
Stephen Hines651f13c2014-04-23 16:59:28 -070028}
29
30poly8x16x2_t test_vld2q_lane_p8(const void * a1, poly8x16x2_t a2) {
31 // CHECK: test_vld2q_lane_p8
32 return vld2q_lane_p8(a1, a2, 0);
33 // CHECK: extractvalue {{.*}} 0{{ *$}}
34 // CHECK: extractvalue {{.*}} 1{{ *$}}
35}
36
37uint8x16x2_t test_vld2q_lane_u8(const void * a1, uint8x16x2_t a2) {
38 // CHECK: test_vld2q_lane_u8
39 return vld2q_lane_u8(a1, a2, 0);
Stephen Hines6bcf27b2014-05-29 04:14:42 -070040 // CHECK: llvm.aarch64.neon.ld2lane.v16i8.p0i8
Stephen Hines651f13c2014-04-23 16:59:28 -070041}
42
43int64x2x3_t test_vld3q_lane_s64(const void * a1, int64x2x3_t a2) {
44 // CHECK: test_vld3q_lane_s64
45 return vld3q_lane_s64(a1, a2, 1);
Stephen Hines6bcf27b2014-05-29 04:14:42 -070046 // CHECK: llvm.aarch64.neon.ld3lane.v2i64.p0i8
Stephen Hines651f13c2014-04-23 16:59:28 -070047}
48
49uint64x2x3_t test_vld3q_lane_u64(const void * a1, uint64x2x3_t a2) {
50 // CHECK: test_vld3q_lane_u64
51 return vld3q_lane_u64(a1, a2, 1);
Stephen Hines6bcf27b2014-05-29 04:14:42 -070052 // CHECK: llvm.aarch64.neon.ld3lane.v2i64.p0i8
Stephen Hines651f13c2014-04-23 16:59:28 -070053}
54
55int64x1x3_t test_vld3_lane_s64(const void * a1, int64x1x3_t a2) {
56 // CHECK: test_vld3_lane_s64
57 return vld3_lane_s64(a1, a2, 0);
Stephen Hines6bcf27b2014-05-29 04:14:42 -070058 // CHECK: llvm.aarch64.neon.ld3lane.v1i64.p0i8
Stephen Hines651f13c2014-04-23 16:59:28 -070059}
60
61uint64x1x3_t test_vld3_lane_u64(const void * a1, uint64x1x3_t a2) {
62 // CHECK: test_vld3_lane_u64
63 return vld3_lane_u64(a1, a2, 0);
Stephen Hines6bcf27b2014-05-29 04:14:42 -070064 // CHECK: llvm.aarch64.neon.ld3lane.v1i64.p0i8
Stephen Hines651f13c2014-04-23 16:59:28 -070065}
66
67int8x8x3_t test_vld3_lane_s8(const void * a1, int8x8x3_t a2) {
68 // CHECK: test_vld3_lane_s8
69 return vld3_lane_s8(a1, a2, 0);
Stephen Hines6bcf27b2014-05-29 04:14:42 -070070 // CHECK: llvm.aarch64.neon.ld3lane.v8i8.p0i8
Stephen Hines651f13c2014-04-23 16:59:28 -070071}
72
73poly8x16x3_t test_vld3q_lane_p8(const void * a1, poly8x16x3_t a2) {
74 // CHECK: test_vld3q_lane_p8
75 return vld3q_lane_p8(a1, a2, 0);
Stephen Hines6bcf27b2014-05-29 04:14:42 -070076 // CHECK: llvm.aarch64.neon.ld3lane.v16i8.p0i8
Stephen Hines651f13c2014-04-23 16:59:28 -070077}
78
79uint8x16x3_t test_vld3q_lane_u8(const void * a1, uint8x16x3_t a2) {
80 // CHECK: test_vld3q_lane_u8
81 return vld3q_lane_u8(a1, a2, 0);
Stephen Hines6bcf27b2014-05-29 04:14:42 -070082 // CHECK: llvm.aarch64.neon.ld3lane.v16i8.p0i8
Stephen Hines651f13c2014-04-23 16:59:28 -070083}
84
85int64x2x4_t test_vld4q_lane_s64(const void * a1, int64x2x4_t a2) {
86 // CHECK: test_vld4q_lane_s64
87 return vld4q_lane_s64(a1, a2, 0);
Stephen Hines6bcf27b2014-05-29 04:14:42 -070088 // CHECK: llvm.aarch64.neon.ld4lane.v2i64.p0i8
Stephen Hines651f13c2014-04-23 16:59:28 -070089}
90
91uint64x2x4_t test_vld4q_lane_u64(const void * a1, uint64x2x4_t a2) {
92 // CHECK: test_vld4q_lane_u64
93 return vld4q_lane_u64(a1, a2, 0);
Stephen Hines6bcf27b2014-05-29 04:14:42 -070094 // CHECK: llvm.aarch64.neon.ld4lane.v2i64.p0i8
Stephen Hines651f13c2014-04-23 16:59:28 -070095}
96
97int64x1x4_t test_vld4_lane_s64(const void * a1, int64x1x4_t a2) {
98 // CHECK: test_vld4_lane_s64
99 return vld4_lane_s64(a1, a2, 0);
Stephen Hines6bcf27b2014-05-29 04:14:42 -0700100 // CHECK: llvm.aarch64.neon.ld4lane.v1i64.p0i8
Stephen Hines651f13c2014-04-23 16:59:28 -0700101}
102
103uint64x1x4_t test_vld4_lane_u64(const void * a1, uint64x1x4_t a2) {
104 // CHECK: test_vld4_lane_u64
105 return vld4_lane_u64(a1, a2, 0);
Stephen Hines6bcf27b2014-05-29 04:14:42 -0700106 // CHECK: llvm.aarch64.neon.ld4lane.v1i64.p0i8
Stephen Hines651f13c2014-04-23 16:59:28 -0700107}
108
109int8x8x4_t test_vld4_lane_s8(const void * a1, int8x8x4_t a2) {
110 // CHECK: test_vld4_lane_s8
111 return vld4_lane_s8(a1, a2, 0);
Stephen Hines6bcf27b2014-05-29 04:14:42 -0700112 // CHECK: llvm.aarch64.neon.ld4lane.v8i8.p0i8
Stephen Hines651f13c2014-04-23 16:59:28 -0700113}
114
115uint8x8x4_t test_vld4_lane_u8(const void * a1, uint8x8x4_t a2) {
116 // CHECK: test_vld4_lane_u8
117 return vld4_lane_u8(a1, a2, 0);
Stephen Hines6bcf27b2014-05-29 04:14:42 -0700118 // CHECK: llvm.aarch64.neon.ld4lane.v8i8.p0i8
Stephen Hines651f13c2014-04-23 16:59:28 -0700119}
120
121poly8x16x4_t test_vld4q_lane_p8(const void * a1, poly8x16x4_t a2) {
122 // CHECK: test_vld4q_lane_p8
123 return vld4q_lane_p8(a1, a2, 0);
Stephen Hines6bcf27b2014-05-29 04:14:42 -0700124 // CHECK: llvm.aarch64.neon.ld4lane.v16i8.p0i8
Stephen Hines651f13c2014-04-23 16:59:28 -0700125}
126
127int8x16x4_t test_vld4q_lane_s8(const void * a1, int8x16x4_t a2) {
128 // CHECK: test_vld4q_lane_s8
129 return vld4q_lane_s8(a1, a2, 0);
130 // CHECK: extractvalue {{.*}} 0{{ *$}}
131 // CHECK: extractvalue {{.*}} 1{{ *$}}
132 // CHECK: extractvalue {{.*}} 2{{ *$}}
133 // CHECK: extractvalue {{.*}} 3{{ *$}}
134}
135
136uint8x16x4_t test_vld4q_lane_u8(const void * a1, uint8x16x4_t a2) {
137 // CHECK: test_vld4q_lane_u8
138 return vld4q_lane_u8(a1, a2, 0);
Stephen Hines6bcf27b2014-05-29 04:14:42 -0700139 // CHECK: llvm.aarch64.neon.ld4lane.v16i8.p0i8
Stephen Hines651f13c2014-04-23 16:59:28 -0700140}
141