1 // RUN: %clang_cc1 -triple aarch64-linux-gnu -target-feature +neon -ffreestanding -fsyntax-only -verify %s
2 // RUN: %clang_cc1 -triple arm64-linux-gnu -target-feature +neon -ffreestanding -fsyntax-only -verify %s
4 // REQUIRES: aarch64-registered-target || arm-registered-target
8 void test_vext_8bit(int8x8_t small
, int8x16_t big
) {
9 vext_s8(small
, small
, 7);
10 vext_u8(small
, small
, 7);
11 vext_p8(small
, small
, 7);
12 vextq_s8(big
, big
, 15);
13 vextq_u8(big
, big
, 15);
14 vextq_p8(big
, big
, 15);
16 vext_s8(small
, small
, 8); // expected-error-re {{argument value {{.*}} is outside the valid range}}
17 vext_u8(small
, small
, 8); // expected-error-re {{argument value {{.*}} is outside the valid range}}
18 vext_p8(small
, small
, 8); // expected-error-re {{argument value {{.*}} is outside the valid range}}
19 vextq_s8(big
, big
, 16); // expected-error-re {{argument value {{.*}} is outside the valid range}}
20 vextq_u8(big
, big
, 16); // expected-error-re {{argument value {{.*}} is outside the valid range}}
21 vextq_p8(big
, big
, 16); // expected-error-re {{argument value {{.*}} is outside the valid range}}
24 void test_mul_lane_f64(float64x1_t small
, float64x2_t big
, float64x2_t rhs
) {
25 vmul_lane_f64(small
, small
, 0);
26 vmul_laneq_f64(small
, big
, 1);
27 vmulq_lane_f64(big
, small
, 0);
28 vmulq_laneq_f64(big
, big
, 1);
29 vfma_lane_f64(small
, small
, small
, 0);
30 vfma_laneq_f64(small
, small
, big
, 1);
31 vfmaq_lane_f64(big
, big
, small
, 0);
32 vfmaq_laneq_f64(big
, big
, big
, 1);
34 vmul_lane_f64(small
, small
, 1); // expected-error-re {{argument value {{.*}} is outside the valid range}}
35 vmul_laneq_f64(small
, big
, 2); // expected-error-re {{argument value {{.*}} is outside the valid range}}
36 vfma_lane_f64(small
, small
, small
, 1); // expected-error-re {{argument value {{.*}} is outside the valid range}}
37 vfma_laneq_f64(small
, small
, big
, 2); // expected-error-re {{argument value {{.*}} is outside the valid range}}
38 vfmaq_laneq_f64(big
, big
, big
, 2); // expected-error-re {{argument value {{.*}} is outside the valid range}}
41 void test_ld1st1(int8x8_t small
, int8x16_t big
, void *addr
) {
42 vld1_lane_s8(addr
, small
, 7);
43 vld1_lane_s16(addr
, small
, 3);
44 vld1_lane_s32(addr
, small
, 1);
45 vld1_lane_s64(addr
, small
, 0);
47 vld1q_lane_s8(addr
, big
, 15);
48 vld1q_lane_s16(addr
, big
, 7);
49 vld1q_lane_s32(addr
, big
, 3);
50 vld1q_lane_s64(addr
, big
, 1);
52 vld1_lane_s8(addr
, small
, 8); // expected-error-re {{argument value {{.*}} is outside the valid range}}
53 vld1_lane_s16(addr
, small
, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}
54 vld1_lane_s32(addr
, small
, 2); // expected-error-re {{argument value {{.*}} is outside the valid range}}
55 vld1_lane_s64(addr
, small
, 1); // expected-error-re {{argument value {{.*}} is outside the valid range}}
57 vld1q_lane_s8(addr
, big
, 16); // expected-error-re {{argument value {{.*}} is outside the valid range}}
58 vld1q_lane_s16(addr
, big
, 8); // expected-error-re {{argument value {{.*}} is outside the valid range}}
59 vld1q_lane_s32(addr
, big
, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}
60 vld1q_lane_s64(addr
, big
, 2); // expected-error-re {{argument value {{.*}} is outside the valid range}}
62 vst1_lane_s8(addr
, small
, 7);
63 vst1_lane_s16(addr
, small
, 3);
64 vst1_lane_s32(addr
, small
, 1);
65 vst1_lane_s64(addr
, small
, 0);
67 vst1q_lane_s8(addr
, big
, 15);
68 vst1q_lane_s16(addr
, big
, 7);
69 vst1q_lane_s32(addr
, big
, 3);
70 vst1q_lane_s64(addr
, big
, 1);
72 vst1_lane_s8(addr
, small
, 8); // expected-error-re {{argument value {{.*}} is outside the valid range}}
73 vst1_lane_s16(addr
, small
, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}
74 vst1_lane_s32(addr
, small
, 2); // expected-error-re {{argument value {{.*}} is outside the valid range}}
75 vst1_lane_s64(addr
, small
, 1); // expected-error-re {{argument value {{.*}} is outside the valid range}}
77 vst1q_lane_s8(addr
, big
, 16); // expected-error-re {{argument value {{.*}} is outside the valid range}}
78 vst1q_lane_s16(addr
, big
, 8); // expected-error-re {{argument value {{.*}} is outside the valid range}}
79 vst1q_lane_s32(addr
, big
, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}
80 vst1q_lane_s64(addr
, big
, 2); // expected-error-re {{argument value {{.*}} is outside the valid range}}
83 void test_ld2st2(int8x8x2_t small8
, int8x16x2_t big8
,
84 int16x4x2_t small16
, int16x8x2_t big16
,
85 int32x2x2_t small32
, int32x4x2_t big32
,
86 int64x1x2_t small64
, int64x2x2_t big64
,
88 vld2_lane_s8(addr
, small8
, 7);
89 vld2_lane_s16(addr
, small16
, 3);
90 vld2_lane_s32(addr
, small32
, 1);
91 vld2_lane_s64(addr
, small64
, 0);
93 vld2q_lane_s8(addr
, big8
, 15);
94 vld2q_lane_s16(addr
, big16
, 7);
95 vld2q_lane_s32(addr
, big32
, 3);
96 vld2q_lane_s64(addr
, big64
, 1);
98 vld2_lane_s8(addr
, small8
, 8); // expected-error-re {{argument value {{.*}} is outside the valid range}}
99 vld2_lane_s16(addr
, small16
, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}
100 vld2_lane_s32(addr
, small32
, 2); // expected-error-re {{argument value {{.*}} is outside the valid range}}
101 vld2_lane_s64(addr
, small64
, 1); // expected-error-re {{argument value {{.*}} is outside the valid range}}
103 vld2q_lane_s8(addr
, big8
, 16); // expected-error-re {{argument value {{.*}} is outside the valid range}}
104 vld2q_lane_s16(addr
, big16
, 8); // expected-error-re {{argument value {{.*}} is outside the valid range}}
105 vld2q_lane_s32(addr
, big32
, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}
106 vld2q_lane_s64(addr
, big64
, 2); // expected-error-re {{argument value {{.*}} is outside the valid range}}
108 vst2_lane_s8(addr
, small8
, 7);
109 vst2_lane_s16(addr
, small16
, 3);
110 vst2_lane_s32(addr
, small32
, 1);
111 vst2_lane_s64(addr
, small64
, 0);
113 vst2q_lane_s8(addr
, big8
, 15);
114 vst2q_lane_s16(addr
, big16
, 7);
115 vst2q_lane_s32(addr
, big32
, 3);
116 vst2q_lane_s64(addr
, big64
, 1);
118 vst2_lane_s8(addr
, small8
, 8); // expected-error-re {{argument value {{.*}} is outside the valid range}}
119 vst2_lane_s16(addr
, small16
, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}
120 vst2_lane_s32(addr
, small32
, 2); // expected-error-re {{argument value {{.*}} is outside the valid range}}
121 vst2_lane_s64(addr
, small64
, 1); // expected-error-re {{argument value {{.*}} is outside the valid range}}
123 vst2q_lane_s8(addr
, big8
, 16); // expected-error-re {{argument value {{.*}} is outside the valid range}}
124 vst2q_lane_s16(addr
, big16
, 8); // expected-error-re {{argument value {{.*}} is outside the valid range}}
125 vst2q_lane_s32(addr
, big32
, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}
126 vst2q_lane_s64(addr
, big64
, 2); // expected-error-re {{argument value {{.*}} is outside the valid range}}
129 void test_ld3st3(int8x8x3_t small8
, int8x16x3_t big8
,
130 int16x4x3_t small16
, int16x8x3_t big16
,
131 int32x2x3_t small32
, int32x4x3_t big32
,
132 int64x1x3_t small64
, int64x2x3_t big64
,
134 vld3_lane_s8(addr
, small8
, 7);
135 vld3_lane_s16(addr
, small16
, 3);
136 vld3_lane_s32(addr
, small32
, 1);
137 vld3_lane_s64(addr
, small64
, 0);
139 vld3q_lane_s8(addr
, big8
, 15);
140 vld3q_lane_s16(addr
, big16
, 7);
141 vld3q_lane_s32(addr
, big32
, 3);
142 vld3q_lane_s64(addr
, big64
, 1);
144 vld3_lane_s8(addr
, small8
, 8); // expected-error-re {{argument value {{.*}} is outside the valid range}}
145 vld3_lane_s16(addr
, small16
, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}
146 vld3_lane_s32(addr
, small32
, 2); // expected-error-re {{argument value {{.*}} is outside the valid range}}
147 vld3_lane_s64(addr
, small64
, 1); // expected-error-re {{argument value {{.*}} is outside the valid range}}
149 vld3q_lane_s8(addr
, big8
, 16); // expected-error-re {{argument value {{.*}} is outside the valid range}}
150 vld3q_lane_s16(addr
, big16
, 8); // expected-error-re {{argument value {{.*}} is outside the valid range}}
151 vld3q_lane_s32(addr
, big32
, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}
152 vld3q_lane_s64(addr
, big64
, 2); // expected-error-re {{argument value {{.*}} is outside the valid range}}
154 vst3_lane_s8(addr
, small8
, 7);
155 vst3_lane_s16(addr
, small16
, 3);
156 vst3_lane_s32(addr
, small32
, 1);
157 vst3_lane_s64(addr
, small64
, 0);
159 vst3q_lane_s8(addr
, big8
, 15);
160 vst3q_lane_s16(addr
, big16
, 7);
161 vst3q_lane_s32(addr
, big32
, 3);
162 vst3q_lane_s64(addr
, big64
, 1);
164 vst3_lane_s8(addr
, small8
, 8); // expected-error-re {{argument value {{.*}} is outside the valid range}}
165 vst3_lane_s16(addr
, small16
, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}
166 vst3_lane_s32(addr
, small32
, 2); // expected-error-re {{argument value {{.*}} is outside the valid range}}
167 vst3_lane_s64(addr
, small64
, 1); // expected-error-re {{argument value {{.*}} is outside the valid range}}
169 vst3q_lane_s8(addr
, big8
, 16); // expected-error-re {{argument value {{.*}} is outside the valid range}}
170 vst3q_lane_s16(addr
, big16
, 8); // expected-error-re {{argument value {{.*}} is outside the valid range}}
171 vst3q_lane_s32(addr
, big32
, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}
172 vst3q_lane_s64(addr
, big64
, 2); // expected-error-re {{argument value {{.*}} is outside the valid range}}
175 void test_ld4st4(int8x8x4_t small8
, int8x16x4_t big8
,
176 int16x4x4_t small16
, int16x8x4_t big16
,
177 int32x2x4_t small32
, int32x4x4_t big32
,
178 int64x1x4_t small64
, int64x2x4_t big64
,
180 vld4_lane_s8(addr
, small8
, 7);
181 vld4_lane_s16(addr
, small16
, 3);
182 vld4_lane_s32(addr
, small32
, 1);
183 vld4_lane_s64(addr
, small64
, 0);
185 vld4q_lane_s8(addr
, big8
, 15);
186 vld4q_lane_s16(addr
, big16
, 7);
187 vld4q_lane_s32(addr
, big32
, 3);
188 vld4q_lane_s64(addr
, big64
, 1);
190 vld4_lane_s8(addr
, small8
, 8); // expected-error-re {{argument value {{.*}} is outside the valid range}}
191 vld4_lane_s16(addr
, small16
, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}
192 vld4_lane_s32(addr
, small32
, 2); // expected-error-re {{argument value {{.*}} is outside the valid range}}
193 vld4_lane_s64(addr
, small64
, 1); // expected-error-re {{argument value {{.*}} is outside the valid range}}
195 vld4q_lane_s8(addr
, big8
, 16); // expected-error-re {{argument value {{.*}} is outside the valid range}}
196 vld4q_lane_s16(addr
, big16
, 8); // expected-error-re {{argument value {{.*}} is outside the valid range}}
197 vld4q_lane_s32(addr
, big32
, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}
198 vld4q_lane_s64(addr
, big64
, 2); // expected-error-re {{argument value {{.*}} is outside the valid range}}
200 vst4_lane_s8(addr
, small8
, 7);
201 vst4_lane_s16(addr
, small16
, 3);
202 vst4_lane_s32(addr
, small32
, 1);
203 vst4_lane_s64(addr
, small64
, 0);
205 vst4q_lane_s8(addr
, big8
, 15);
206 vst4q_lane_s16(addr
, big16
, 7);
207 vst4q_lane_s32(addr
, big32
, 3);
208 vst4q_lane_s64(addr
, big64
, 1);
210 vst4_lane_s8(addr
, small8
, 8); // expected-error-re {{argument value {{.*}} is outside the valid range}}
211 vst4_lane_s16(addr
, small16
, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}
212 vst4_lane_s32(addr
, small32
, 2); // expected-error-re {{argument value {{.*}} is outside the valid range}}
213 vst4_lane_s64(addr
, small64
, 1); // expected-error-re {{argument value {{.*}} is outside the valid range}}
215 vst4q_lane_s8(addr
, big8
, 16); // expected-error-re {{argument value {{.*}} is outside the valid range}}
216 vst4q_lane_s16(addr
, big16
, 8); // expected-error-re {{argument value {{.*}} is outside the valid range}}
217 vst4q_lane_s32(addr
, big32
, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}
218 vst4q_lane_s64(addr
, big64
, 2); // expected-error-re {{argument value {{.*}} is outside the valid range}}