annotate clang/test/Sema/arm-mve-immediates.c @ 207:2e18cbf3894f

LLVM12
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Tue, 08 Jun 2021 06:07:14 +0900
parents 0572611fdcc8
children c4bab56944e8
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
1 // RUN: %clang_cc1 -triple thumbv8.1m.main-none-none-eabi -fallow-half-arguments-and-returns -target-feature +mve.fp -verify -fsyntax-only %s
150
anatofuz
parents:
diff changeset
2
anatofuz
parents:
diff changeset
3 #include <arm_mve.h>
anatofuz
parents:
diff changeset
4
anatofuz
parents:
diff changeset
5 void test_load_offsets(uint32x4_t addr32, uint64x2_t addr64)
anatofuz
parents:
diff changeset
6 {
anatofuz
parents:
diff changeset
7 // Offsets that should be a multiple of 8 times 0,1,...,127
anatofuz
parents:
diff changeset
8 vldrdq_gather_base_s64(addr64, 0);
anatofuz
parents:
diff changeset
9 vldrdq_gather_base_s64(addr64, 8);
anatofuz
parents:
diff changeset
10 vldrdq_gather_base_s64(addr64, 2*8);
anatofuz
parents:
diff changeset
11 vldrdq_gather_base_s64(addr64, 125*8);
anatofuz
parents:
diff changeset
12 vldrdq_gather_base_s64(addr64, 126*8);
anatofuz
parents:
diff changeset
13 vldrdq_gather_base_s64(addr64, 127*8);
anatofuz
parents:
diff changeset
14 vldrdq_gather_base_s64(addr64, -125*8);
anatofuz
parents:
diff changeset
15 vldrdq_gather_base_s64(addr64, -126*8);
anatofuz
parents:
diff changeset
16 vldrdq_gather_base_s64(addr64, -127*8);
anatofuz
parents:
diff changeset
17 vldrdq_gather_base_s64(addr64, 128*8); // expected-error {{argument value 1024 is outside the valid range [-1016, 1016]}}
anatofuz
parents:
diff changeset
18 vldrdq_gather_base_s64(addr64, -128*8); // expected-error {{argument value -1024 is outside the valid range [-1016, 1016]}}
anatofuz
parents:
diff changeset
19 vldrdq_gather_base_s64(addr64, 4); // expected-error {{argument should be a multiple of 8}}
anatofuz
parents:
diff changeset
20 vldrdq_gather_base_s64(addr64, 1); // expected-error {{argument should be a multiple of 8}}
anatofuz
parents:
diff changeset
21
anatofuz
parents:
diff changeset
22 // Offsets that should be a multiple of 4 times 0,1,...,127
anatofuz
parents:
diff changeset
23 vldrwq_gather_base_s32(addr32, 0);
anatofuz
parents:
diff changeset
24 vldrwq_gather_base_s32(addr32, 4);
anatofuz
parents:
diff changeset
25 vldrwq_gather_base_s32(addr32, 2*4);
anatofuz
parents:
diff changeset
26 vldrwq_gather_base_s32(addr32, 125*4);
anatofuz
parents:
diff changeset
27 vldrwq_gather_base_s32(addr32, 126*4);
anatofuz
parents:
diff changeset
28 vldrwq_gather_base_s32(addr32, 127*4);
anatofuz
parents:
diff changeset
29 vldrwq_gather_base_s32(addr32, -125*4);
anatofuz
parents:
diff changeset
30 vldrwq_gather_base_s32(addr32, -126*4);
anatofuz
parents:
diff changeset
31 vldrwq_gather_base_s32(addr32, -127*4);
anatofuz
parents:
diff changeset
32 vldrwq_gather_base_s32(addr32, 128*4); // expected-error {{argument value 512 is outside the valid range [-508, 508]}}
anatofuz
parents:
diff changeset
33 vldrwq_gather_base_s32(addr32, -128*4); // expected-error {{argument value -512 is outside the valid range [-508, 508]}}
anatofuz
parents:
diff changeset
34 vldrwq_gather_base_s32(addr32, 2); // expected-error {{argument should be a multiple of 4}}
anatofuz
parents:
diff changeset
35 vldrwq_gather_base_s32(addr32, 1); // expected-error {{argument should be a multiple of 4}}
anatofuz
parents:
diff changeset
36
anatofuz
parents:
diff changeset
37 // Show that the polymorphic store intrinsics get the right set of
anatofuz
parents:
diff changeset
38 // error checks after overload resolution. These ones expand to the
anatofuz
parents:
diff changeset
39 // 8-byte granular versions...
anatofuz
parents:
diff changeset
40 vstrdq_scatter_base(addr64, 0, addr64);
anatofuz
parents:
diff changeset
41 vstrdq_scatter_base(addr64, 8, addr64);
anatofuz
parents:
diff changeset
42 vstrdq_scatter_base(addr64, 2*8, addr64);
anatofuz
parents:
diff changeset
43 vstrdq_scatter_base(addr64, 125*8, addr64);
anatofuz
parents:
diff changeset
44 vstrdq_scatter_base(addr64, 126*8, addr64);
anatofuz
parents:
diff changeset
45 vstrdq_scatter_base(addr64, 127*8, addr64);
anatofuz
parents:
diff changeset
46 vstrdq_scatter_base(addr64, -125*8, addr64);
anatofuz
parents:
diff changeset
47 vstrdq_scatter_base(addr64, -126*8, addr64);
anatofuz
parents:
diff changeset
48 vstrdq_scatter_base(addr64, -127*8, addr64);
anatofuz
parents:
diff changeset
49 vstrdq_scatter_base(addr64, 128*8, addr64); // expected-error {{argument value 1024 is outside the valid range [-1016, 1016]}}
anatofuz
parents:
diff changeset
50 vstrdq_scatter_base(addr64, -128*8, addr64); // expected-error {{argument value -1024 is outside the valid range [-1016, 1016]}}
anatofuz
parents:
diff changeset
51 vstrdq_scatter_base(addr64, 4, addr64); // expected-error {{argument should be a multiple of 8}}
anatofuz
parents:
diff changeset
52 vstrdq_scatter_base(addr64, 1, addr64); // expected-error {{argument should be a multiple of 8}}
anatofuz
parents:
diff changeset
53
anatofuz
parents:
diff changeset
54 /// ... and these ones to the 4-byte.
anatofuz
parents:
diff changeset
55 vstrwq_scatter_base(addr32, 0, addr32);
anatofuz
parents:
diff changeset
56 vstrwq_scatter_base(addr32, 4, addr32);
anatofuz
parents:
diff changeset
57 vstrwq_scatter_base(addr32, 2*4, addr32);
anatofuz
parents:
diff changeset
58 vstrwq_scatter_base(addr32, 125*4, addr32);
anatofuz
parents:
diff changeset
59 vstrwq_scatter_base(addr32, 126*4, addr32);
anatofuz
parents:
diff changeset
60 vstrwq_scatter_base(addr32, 127*4, addr32);
anatofuz
parents:
diff changeset
61 vstrwq_scatter_base(addr32, -125*4, addr32);
anatofuz
parents:
diff changeset
62 vstrwq_scatter_base(addr32, -126*4, addr32);
anatofuz
parents:
diff changeset
63 vstrwq_scatter_base(addr32, -127*4, addr32);
anatofuz
parents:
diff changeset
64 vstrwq_scatter_base(addr32, 128*4, addr32); // expected-error {{argument value 512 is outside the valid range [-508, 508]}}
anatofuz
parents:
diff changeset
65 vstrwq_scatter_base(addr32, -128*4, addr32); // expected-error {{argument value -512 is outside the valid range [-508, 508]}}
anatofuz
parents:
diff changeset
66 vstrwq_scatter_base(addr32, 2, addr32); // expected-error {{argument should be a multiple of 4}}
anatofuz
parents:
diff changeset
67 vstrwq_scatter_base(addr32, 1, addr32); // expected-error {{argument should be a multiple of 4}}
anatofuz
parents:
diff changeset
68 }
anatofuz
parents:
diff changeset
69
anatofuz
parents:
diff changeset
70 void test_lane_indices(uint8x16_t v16, uint16x8_t v8,
anatofuz
parents:
diff changeset
71 uint32x4_t v4, uint64x2_t v2)
anatofuz
parents:
diff changeset
72 {
anatofuz
parents:
diff changeset
73 vgetq_lane_u8(v16, -1); // expected-error {{argument value -1 is outside the valid range [0, 15]}}
anatofuz
parents:
diff changeset
74 vgetq_lane_u8(v16, 0);
anatofuz
parents:
diff changeset
75 vgetq_lane_u8(v16, 15);
anatofuz
parents:
diff changeset
76 vgetq_lane_u8(v16, 16); // expected-error {{argument value 16 is outside the valid range [0, 15]}}
anatofuz
parents:
diff changeset
77
anatofuz
parents:
diff changeset
78 vgetq_lane_u16(v8, -1); // expected-error {{argument value -1 is outside the valid range [0, 7]}}
anatofuz
parents:
diff changeset
79 vgetq_lane_u16(v8, 0);
anatofuz
parents:
diff changeset
80 vgetq_lane_u16(v8, 7);
anatofuz
parents:
diff changeset
81 vgetq_lane_u16(v8, 8); // expected-error {{argument value 8 is outside the valid range [0, 7]}}
anatofuz
parents:
diff changeset
82
anatofuz
parents:
diff changeset
83 vgetq_lane_u32(v4, -1); // expected-error {{argument value -1 is outside the valid range [0, 3]}}
anatofuz
parents:
diff changeset
84 vgetq_lane_u32(v4, 0);
anatofuz
parents:
diff changeset
85 vgetq_lane_u32(v4, 3);
anatofuz
parents:
diff changeset
86 vgetq_lane_u32(v4, 4); // expected-error {{argument value 4 is outside the valid range [0, 3]}}
anatofuz
parents:
diff changeset
87
anatofuz
parents:
diff changeset
88 vgetq_lane_u64(v2, -1); // expected-error {{argument value -1 is outside the valid range [0, 1]}}
anatofuz
parents:
diff changeset
89 vgetq_lane_u64(v2, 0);
anatofuz
parents:
diff changeset
90 vgetq_lane_u64(v2, 1);
anatofuz
parents:
diff changeset
91 vgetq_lane_u64(v2, 2); // expected-error {{argument value 2 is outside the valid range [0, 1]}}
anatofuz
parents:
diff changeset
92
anatofuz
parents:
diff changeset
93 vsetq_lane_u8(23, v16, -1); // expected-error {{argument value -1 is outside the valid range [0, 15]}}
anatofuz
parents:
diff changeset
94 vsetq_lane_u8(23, v16, 0);
anatofuz
parents:
diff changeset
95 vsetq_lane_u8(23, v16, 15);
anatofuz
parents:
diff changeset
96 vsetq_lane_u8(23, v16, 16); // expected-error {{argument value 16 is outside the valid range [0, 15]}}
anatofuz
parents:
diff changeset
97
anatofuz
parents:
diff changeset
98 vsetq_lane_u16(23, v8, -1); // expected-error {{argument value -1 is outside the valid range [0, 7]}}
anatofuz
parents:
diff changeset
99 vsetq_lane_u16(23, v8, 0);
anatofuz
parents:
diff changeset
100 vsetq_lane_u16(23, v8, 7);
anatofuz
parents:
diff changeset
101 vsetq_lane_u16(23, v8, 8); // expected-error {{argument value 8 is outside the valid range [0, 7]}}
anatofuz
parents:
diff changeset
102
anatofuz
parents:
diff changeset
103 vsetq_lane_u32(23, v4, -1); // expected-error {{argument value -1 is outside the valid range [0, 3]}}
anatofuz
parents:
diff changeset
104 vsetq_lane_u32(23, v4, 0);
anatofuz
parents:
diff changeset
105 vsetq_lane_u32(23, v4, 3);
anatofuz
parents:
diff changeset
106 vsetq_lane_u32(23, v4, 4); // expected-error {{argument value 4 is outside the valid range [0, 3]}}
anatofuz
parents:
diff changeset
107
anatofuz
parents:
diff changeset
108 vsetq_lane_u64(23, v2, -1); // expected-error {{argument value -1 is outside the valid range [0, 1]}}
anatofuz
parents:
diff changeset
109 vsetq_lane_u64(23, v2, 0);
anatofuz
parents:
diff changeset
110 vsetq_lane_u64(23, v2, 1);
anatofuz
parents:
diff changeset
111 vsetq_lane_u64(23, v2, 2); // expected-error {{argument value 2 is outside the valid range [0, 1]}}
anatofuz
parents:
diff changeset
112 }
anatofuz
parents:
diff changeset
113
anatofuz
parents:
diff changeset
114 void test_immediate_shifts(uint8x16_t vb, uint16x8_t vh, uint32x4_t vw)
anatofuz
parents:
diff changeset
115 {
anatofuz
parents:
diff changeset
116 vshlq_n(vb, 0);
anatofuz
parents:
diff changeset
117 vshlq_n(vb, 7);
anatofuz
parents:
diff changeset
118 vshlq_n(vh, 0);
anatofuz
parents:
diff changeset
119 vshlq_n(vh, 15);
anatofuz
parents:
diff changeset
120 vshlq_n(vw, 0);
anatofuz
parents:
diff changeset
121 vshlq_n(vw, 31);
anatofuz
parents:
diff changeset
122
anatofuz
parents:
diff changeset
123 vshlq_n(vb, -1); // expected-error {{argument value -1 is outside the valid range [0, 7]}}
anatofuz
parents:
diff changeset
124 vshlq_n(vb, 8); // expected-error {{argument value 8 is outside the valid range [0, 7]}}
anatofuz
parents:
diff changeset
125 vshlq_n(vh, -1); // expected-error {{argument value -1 is outside the valid range [0, 15]}}
anatofuz
parents:
diff changeset
126 vshlq_n(vh, 16); // expected-error {{argument value 16 is outside the valid range [0, 15]}}
anatofuz
parents:
diff changeset
127 vshlq_n(vw, -1); // expected-error {{argument value -1 is outside the valid range [0, 31]}}
anatofuz
parents:
diff changeset
128 vshlq_n(vw, 32); // expected-error {{argument value 32 is outside the valid range [0, 31]}}
anatofuz
parents:
diff changeset
129
anatofuz
parents:
diff changeset
130 vqshlq_n(vb, 0);
anatofuz
parents:
diff changeset
131 vqshlq_n(vb, 7);
anatofuz
parents:
diff changeset
132 vqshlq_n(vh, 0);
anatofuz
parents:
diff changeset
133 vqshlq_n(vh, 15);
anatofuz
parents:
diff changeset
134 vqshlq_n(vw, 0);
anatofuz
parents:
diff changeset
135 vqshlq_n(vw, 31);
anatofuz
parents:
diff changeset
136
anatofuz
parents:
diff changeset
137 vqshlq_n(vb, -1); // expected-error {{argument value -1 is outside the valid range [0, 7]}}
anatofuz
parents:
diff changeset
138 vqshlq_n(vb, 8); // expected-error {{argument value 8 is outside the valid range [0, 7]}}
anatofuz
parents:
diff changeset
139 vqshlq_n(vh, -1); // expected-error {{argument value -1 is outside the valid range [0, 15]}}
anatofuz
parents:
diff changeset
140 vqshlq_n(vh, 16); // expected-error {{argument value 16 is outside the valid range [0, 15]}}
anatofuz
parents:
diff changeset
141 vqshlq_n(vw, -1); // expected-error {{argument value -1 is outside the valid range [0, 31]}}
anatofuz
parents:
diff changeset
142 vqshlq_n(vw, 32); // expected-error {{argument value 32 is outside the valid range [0, 31]}}
anatofuz
parents:
diff changeset
143
anatofuz
parents:
diff changeset
144 vsliq(vb, vb, 0);
anatofuz
parents:
diff changeset
145 vsliq(vb, vb, 7);
anatofuz
parents:
diff changeset
146 vsliq(vh, vh, 0);
anatofuz
parents:
diff changeset
147 vsliq(vh, vh, 15);
anatofuz
parents:
diff changeset
148 vsliq(vw, vw, 0);
anatofuz
parents:
diff changeset
149 vsliq(vw, vw, 31);
anatofuz
parents:
diff changeset
150
anatofuz
parents:
diff changeset
151 vsliq(vb, vb, -1); // expected-error {{argument value -1 is outside the valid range [0, 7]}}
anatofuz
parents:
diff changeset
152 vsliq(vb, vb, 8); // expected-error {{argument value 8 is outside the valid range [0, 7]}}
anatofuz
parents:
diff changeset
153 vsliq(vh, vh, -1); // expected-error {{argument value -1 is outside the valid range [0, 15]}}
anatofuz
parents:
diff changeset
154 vsliq(vh, vh, 16); // expected-error {{argument value 16 is outside the valid range [0, 15]}}
anatofuz
parents:
diff changeset
155 vsliq(vw, vw, -1); // expected-error {{argument value -1 is outside the valid range [0, 31]}}
anatofuz
parents:
diff changeset
156 vsliq(vw, vw, 32); // expected-error {{argument value 32 is outside the valid range [0, 31]}}
anatofuz
parents:
diff changeset
157
anatofuz
parents:
diff changeset
158 vshllbq(vb, 1);
anatofuz
parents:
diff changeset
159 vshllbq(vb, 8);
anatofuz
parents:
diff changeset
160 vshllbq(vh, 1);
anatofuz
parents:
diff changeset
161 vshllbq(vh, 16);
anatofuz
parents:
diff changeset
162
anatofuz
parents:
diff changeset
163 vshllbq(vb, 0); // expected-error {{argument value 0 is outside the valid range [1, 8]}}
anatofuz
parents:
diff changeset
164 vshllbq(vb, 9); // expected-error {{argument value 9 is outside the valid range [1, 8]}}
anatofuz
parents:
diff changeset
165 vshllbq(vh, 0); // expected-error {{argument value 0 is outside the valid range [1, 16]}}
anatofuz
parents:
diff changeset
166 vshllbq(vh, 17); // expected-error {{argument value 17 is outside the valid range [1, 16]}}
anatofuz
parents:
diff changeset
167
anatofuz
parents:
diff changeset
168 vshrq(vb, 1);
anatofuz
parents:
diff changeset
169 vshrq(vb, 8);
anatofuz
parents:
diff changeset
170 vshrq(vh, 1);
anatofuz
parents:
diff changeset
171 vshrq(vh, 16);
anatofuz
parents:
diff changeset
172 vshrq(vw, 1);
anatofuz
parents:
diff changeset
173 vshrq(vw, 32);
anatofuz
parents:
diff changeset
174
anatofuz
parents:
diff changeset
175 vshrq(vb, 0); // expected-error {{argument value 0 is outside the valid range [1, 8]}}
anatofuz
parents:
diff changeset
176 vshrq(vb, 9); // expected-error {{argument value 9 is outside the valid range [1, 8]}}
anatofuz
parents:
diff changeset
177 vshrq(vh, 0); // expected-error {{argument value 0 is outside the valid range [1, 16]}}
anatofuz
parents:
diff changeset
178 vshrq(vh, 17); // expected-error {{argument value 17 is outside the valid range [1, 16]}}
anatofuz
parents:
diff changeset
179 vshrq(vw, 0); // expected-error {{argument value 0 is outside the valid range [1, 32]}}
anatofuz
parents:
diff changeset
180 vshrq(vw, 33); // expected-error {{argument value 33 is outside the valid range [1, 32]}}
anatofuz
parents:
diff changeset
181
anatofuz
parents:
diff changeset
182 vshrntq(vb, vh, 1);
anatofuz
parents:
diff changeset
183 vshrntq(vb, vh, 8);
anatofuz
parents:
diff changeset
184 vshrntq(vh, vw, 1);
anatofuz
parents:
diff changeset
185 vshrntq(vh, vw, 16);
anatofuz
parents:
diff changeset
186
anatofuz
parents:
diff changeset
187 vshrntq(vb, vh, 0); // expected-error {{argument value 0 is outside the valid range [1, 8]}}
anatofuz
parents:
diff changeset
188 vshrntq(vb, vh, 9); // expected-error {{argument value 9 is outside the valid range [1, 8]}}
anatofuz
parents:
diff changeset
189 vshrntq(vh, vw, 0); // expected-error {{argument value 0 is outside the valid range [1, 16]}}
anatofuz
parents:
diff changeset
190 vshrntq(vh, vw, 17); // expected-error {{argument value 17 is outside the valid range [1, 16]}}
anatofuz
parents:
diff changeset
191
anatofuz
parents:
diff changeset
192 vsriq(vb, vb, 1);
anatofuz
parents:
diff changeset
193 vsriq(vb, vb, 8);
anatofuz
parents:
diff changeset
194 vsriq(vh, vh, 1);
anatofuz
parents:
diff changeset
195 vsriq(vh, vh, 16);
anatofuz
parents:
diff changeset
196 vsriq(vw, vw, 1);
anatofuz
parents:
diff changeset
197 vsriq(vw, vw, 32);
anatofuz
parents:
diff changeset
198
anatofuz
parents:
diff changeset
199 vsriq(vb, vb, 0); // expected-error {{argument value 0 is outside the valid range [1, 8]}}
anatofuz
parents:
diff changeset
200 vsriq(vb, vb, 9); // expected-error {{argument value 9 is outside the valid range [1, 8]}}
anatofuz
parents:
diff changeset
201 vsriq(vh, vh, 0); // expected-error {{argument value 0 is outside the valid range [1, 16]}}
anatofuz
parents:
diff changeset
202 vsriq(vh, vh, 17); // expected-error {{argument value 17 is outside the valid range [1, 16]}}
anatofuz
parents:
diff changeset
203 vsriq(vw, vw, 0); // expected-error {{argument value 0 is outside the valid range [1, 32]}}
anatofuz
parents:
diff changeset
204 vsriq(vw, vw, 33); // expected-error {{argument value 33 is outside the valid range [1, 32]}}
anatofuz
parents:
diff changeset
205 }
anatofuz
parents:
diff changeset
206
anatofuz
parents:
diff changeset
207 void test_simd_bic_orr(int16x8_t h, int32x4_t w)
anatofuz
parents:
diff changeset
208 {
anatofuz
parents:
diff changeset
209 h = vbicq(h, 0x0000);
anatofuz
parents:
diff changeset
210 h = vbicq(h, 0x0001);
anatofuz
parents:
diff changeset
211 h = vbicq(h, 0x00FF);
anatofuz
parents:
diff changeset
212 h = vbicq(h, 0x0100);
anatofuz
parents:
diff changeset
213 h = vbicq(h, 0x0101); // expected-error-re {{argument should be an 8-bit value shifted by a multiple of 8 bits{{$}}}}
anatofuz
parents:
diff changeset
214 h = vbicq(h, 0x01FF); // expected-error-re {{argument should be an 8-bit value shifted by a multiple of 8 bits{{$}}}}
anatofuz
parents:
diff changeset
215 h = vbicq(h, 0xFF00);
anatofuz
parents:
diff changeset
216
anatofuz
parents:
diff changeset
217 w = vbicq(w, 0x00000000);
anatofuz
parents:
diff changeset
218 w = vbicq(w, 0x00000001);
anatofuz
parents:
diff changeset
219 w = vbicq(w, 0x000000FF);
anatofuz
parents:
diff changeset
220 w = vbicq(w, 0x00000100);
anatofuz
parents:
diff changeset
221 w = vbicq(w, 0x0000FF00);
anatofuz
parents:
diff changeset
222 w = vbicq(w, 0x00010000);
anatofuz
parents:
diff changeset
223 w = vbicq(w, 0x00FF0000);
anatofuz
parents:
diff changeset
224 w = vbicq(w, 0x01000000);
anatofuz
parents:
diff changeset
225 w = vbicq(w, 0xFF000000);
anatofuz
parents:
diff changeset
226 w = vbicq(w, 0x01000001); // expected-error-re {{argument should be an 8-bit value shifted by a multiple of 8 bits{{$}}}}
anatofuz
parents:
diff changeset
227 w = vbicq(w, 0x01FFFFFF); // expected-error-re {{argument should be an 8-bit value shifted by a multiple of 8 bits{{$}}}}
anatofuz
parents:
diff changeset
228
anatofuz
parents:
diff changeset
229 h = vorrq(h, 0x0000);
anatofuz
parents:
diff changeset
230 h = vorrq(h, 0x0001);
anatofuz
parents:
diff changeset
231 h = vorrq(h, 0x00FF);
anatofuz
parents:
diff changeset
232 h = vorrq(h, 0x0100);
anatofuz
parents:
diff changeset
233 h = vorrq(h, 0x0101); // expected-error-re {{argument should be an 8-bit value shifted by a multiple of 8 bits{{$}}}}
anatofuz
parents:
diff changeset
234 h = vorrq(h, 0x01FF); // expected-error-re {{argument should be an 8-bit value shifted by a multiple of 8 bits{{$}}}}
anatofuz
parents:
diff changeset
235 h = vorrq(h, 0xFF00);
anatofuz
parents:
diff changeset
236
anatofuz
parents:
diff changeset
237 w = vorrq(w, 0x00000000);
anatofuz
parents:
diff changeset
238 w = vorrq(w, 0x00000001);
anatofuz
parents:
diff changeset
239 w = vorrq(w, 0x000000FF);
anatofuz
parents:
diff changeset
240 w = vorrq(w, 0x00000100);
anatofuz
parents:
diff changeset
241 w = vorrq(w, 0x0000FF00);
anatofuz
parents:
diff changeset
242 w = vorrq(w, 0x00010000);
anatofuz
parents:
diff changeset
243 w = vorrq(w, 0x00FF0000);
anatofuz
parents:
diff changeset
244 w = vorrq(w, 0x01000000);
anatofuz
parents:
diff changeset
245 w = vorrq(w, 0xFF000000);
anatofuz
parents:
diff changeset
246 w = vorrq(w, 0x01000001); // expected-error-re {{argument should be an 8-bit value shifted by a multiple of 8 bits{{$}}}}
anatofuz
parents:
diff changeset
247 w = vorrq(w, 0x01FFFFFF); // expected-error-re {{argument should be an 8-bit value shifted by a multiple of 8 bits{{$}}}}
anatofuz
parents:
diff changeset
248 }
anatofuz
parents:
diff changeset
249
anatofuz
parents:
diff changeset
250 void test_simd_vmvn(void)
anatofuz
parents:
diff changeset
251 {
anatofuz
parents:
diff changeset
252 uint16x8_t h;
anatofuz
parents:
diff changeset
253 h = vmvnq_n_u16(0x0000);
anatofuz
parents:
diff changeset
254 h = vmvnq_n_u16(0x0001);
anatofuz
parents:
diff changeset
255 h = vmvnq_n_u16(0x00FF);
anatofuz
parents:
diff changeset
256 h = vmvnq_n_u16(0x0100);
anatofuz
parents:
diff changeset
257 h = vmvnq_n_u16(0x0101); // expected-error {{argument should be an 8-bit value shifted by a multiple of 8 bits, or in the form 0x??FF}}
anatofuz
parents:
diff changeset
258 h = vmvnq_n_u16(0x01FF);
anatofuz
parents:
diff changeset
259 h = vmvnq_n_u16(0xFF00);
anatofuz
parents:
diff changeset
260
anatofuz
parents:
diff changeset
261 uint32x4_t w;
anatofuz
parents:
diff changeset
262 w = vmvnq_n_u32(0x00000000);
anatofuz
parents:
diff changeset
263 w = vmvnq_n_u32(0x00000001);
anatofuz
parents:
diff changeset
264 w = vmvnq_n_u32(0x000000FF);
anatofuz
parents:
diff changeset
265 w = vmvnq_n_u32(0x00000100);
anatofuz
parents:
diff changeset
266 w = vmvnq_n_u32(0x0000FF00);
anatofuz
parents:
diff changeset
267 w = vmvnq_n_u32(0x00010000);
anatofuz
parents:
diff changeset
268 w = vmvnq_n_u32(0x00FF0000);
anatofuz
parents:
diff changeset
269 w = vmvnq_n_u32(0x01000000);
anatofuz
parents:
diff changeset
270 w = vmvnq_n_u32(0xFF000000);
anatofuz
parents:
diff changeset
271 w = vmvnq_n_u32(0x01000001); // expected-error {{argument should be an 8-bit value shifted by a multiple of 8 bits, or in the form 0x??FF}}
anatofuz
parents:
diff changeset
272 w = vmvnq_n_u32(0x01FFFFFF); // expected-error {{argument should be an 8-bit value shifted by a multiple of 8 bits, or in the form 0x??FF}}
anatofuz
parents:
diff changeset
273 w = vmvnq_n_u32(0x0001FFFF); // expected-error {{argument should be an 8-bit value shifted by a multiple of 8 bits, or in the form 0x??FF}}
anatofuz
parents:
diff changeset
274 w = vmvnq_n_u32(0x000001FF);
anatofuz
parents:
diff changeset
275 }
anatofuz
parents:
diff changeset
276
anatofuz
parents:
diff changeset
277 void test_vidup(void)
anatofuz
parents:
diff changeset
278 {
anatofuz
parents:
diff changeset
279 vidupq_n_u16(0x12345678, 1);
anatofuz
parents:
diff changeset
280 vidupq_n_u16(0x12345678, 2);
anatofuz
parents:
diff changeset
281 vidupq_n_u16(0x12345678, 4);
anatofuz
parents:
diff changeset
282 vidupq_n_u16(0x12345678, 8);
anatofuz
parents:
diff changeset
283
anatofuz
parents:
diff changeset
284 vidupq_n_u16(0x12345678, 0); // expected-error {{argument value 0 is outside the valid range [1, 8]}}
anatofuz
parents:
diff changeset
285 vidupq_n_u16(0x12345678, 16); // expected-error {{argument value 16 is outside the valid range [1, 8]}}
anatofuz
parents:
diff changeset
286 vidupq_n_u16(0x12345678, -1); // expected-error {{argument value -1 is outside the valid range [1, 8]}}
anatofuz
parents:
diff changeset
287 vidupq_n_u16(0x12345678, -2); // expected-error {{argument value -2 is outside the valid range [1, 8]}}
anatofuz
parents:
diff changeset
288 vidupq_n_u16(0x12345678, -4); // expected-error {{argument value -4 is outside the valid range [1, 8]}}
anatofuz
parents:
diff changeset
289 vidupq_n_u16(0x12345678, -8); // expected-error {{argument value -8 is outside the valid range [1, 8]}}
anatofuz
parents:
diff changeset
290 vidupq_n_u16(0x12345678, 3); // expected-error {{argument should be a power of 2}}
anatofuz
parents:
diff changeset
291 vidupq_n_u16(0x12345678, 7); // expected-error {{argument should be a power of 2}}
anatofuz
parents:
diff changeset
292 }
anatofuz
parents:
diff changeset
293
anatofuz
parents:
diff changeset
294 void test_vcvtq(void)
anatofuz
parents:
diff changeset
295 {
anatofuz
parents:
diff changeset
296 uint16x8_t vec_u16;
anatofuz
parents:
diff changeset
297 float16x8_t vec_f16;
anatofuz
parents:
diff changeset
298 vcvtq_n_f16_u16(vec_u16, 0); // expected-error {{argument value 0 is outside the valid range [1, 16]}}
anatofuz
parents:
diff changeset
299 vcvtq_n_f16_u16(vec_u16, 1);
anatofuz
parents:
diff changeset
300 vcvtq_n_f16_u16(vec_u16, 16);
anatofuz
parents:
diff changeset
301 vcvtq_n_f16_u16(vec_u16, 17); // expected-error {{argument value 17 is outside the valid range [1, 16]}}
anatofuz
parents:
diff changeset
302
anatofuz
parents:
diff changeset
303 int32x4_t vec_s32;
anatofuz
parents:
diff changeset
304 float32x4_t vec_f32;
anatofuz
parents:
diff changeset
305 vcvtq_n_s32_f32(vec_s32, -1); // expected-error {{argument value -1 is outside the valid range [1, 32]}}
anatofuz
parents:
diff changeset
306 vcvtq_n_s32_f32(vec_s32, 1);
anatofuz
parents:
diff changeset
307 vcvtq_n_s32_f32(vec_s32, 32);
anatofuz
parents:
diff changeset
308 vcvtq_n_s32_f32(vec_s32, 33); // expected-error {{argument value 33 is outside the valid range [1, 32]}}
anatofuz
parents:
diff changeset
309 }