[ARM] Better OR's for MVE compares
[llvm-core.git] / test / MC / WebAssembly / simd-encodings.s
blobb2a39e7cce93ae72b911f107f3c7964fb6dc0f53
1 # RUN: llvm-mc -show-encoding -triple=wasm32-unkown-unknown -mattr=+unimplemented-simd128 < %s | FileCheck %s
3 main:
4 .functype main () -> ()
6 # CHECK: v128.load 48 # encoding: [0xfd,0x00,0x04,0x30]
7 v128.load 48
9 # CHECK: v128.store 48 # encoding: [0xfd,0x01,0x04,0x30]
10 v128.store 48
12 # CHECK: v128.const 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
13 # CHECK-SAME: # encoding: [0xfd,0x02,
14 # CHECK-SAME: 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,
15 # CHECK-SAME: 0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f]
16 v128.const 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
18 # CHECK: v128.const 256, 770, 1284, 1798, 2312, 2826, 3340, 3854
19 # CHECK-SAME: # encoding: [0xfd,0x02,
20 # CHECK-SAME: 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,
21 # CHECK-SAME: 0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f]
22 v128.const 256, 770, 1284, 1798, 2312, 2826, 3340, 3854
24 # TODO(tlively): Fix assembler so v128.const works with 4xi32 and 2xi64
26 # CHECK: v128.const 0x1.0402p-121, 0x1.0c0a08p-113,
27 # CHECK-SAME: 0x1.14121p-105, 0x1.1c1a18p-97
28 # CHECK-SAME: # encoding: [0xfd,0x02,
29 # CHECK-SAME: 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,
30 # CHECK-SAME: 0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f]
31 v128.const 0x1.0402p-121, 0x1.0c0a08p-113, 0x1.14121p-105, 0x1.1c1a18p-97
33 # CHECK: v128.const 0x1.60504030201p-911, 0x1.e0d0c0b0a0908p-783
34 # CHECK-SAME: # encoding: [0xfd,0x02,
35 # CHECK-SAME: 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,
36 # CHECK-SAME: 0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f]
37 v128.const 0x1.60504030201p-911, 0x1.e0d0c0b0a0908p-783
39 # CHECK: v8x16.shuffle 0, 17, 2, 19, 4, 21, 6, 23,
40 # CHECK-SAME: 8, 25, 10, 27, 12, 29, 14, 31
41 # CHECK-SAME: # encoding: [0xfd,0x03,
42 # CHECK-SAME: 0x00,0x11,0x02,0x13,0x04,0x15,0x06,0x17,
43 # CHECK-SAME: 0x08,0x19,0x0a,0x1b,0x0c,0x1d,0x0e,0x1f]
44 v8x16.shuffle 0, 17, 2, 19, 4, 21, 6, 23, 8, 25, 10, 27, 12, 29, 14, 31
46 # CHECK: i8x16.splat # encoding: [0xfd,0x04]
47 i8x16.splat
49 # CHECK: i8x16.extract_lane_s 15 # encoding: [0xfd,0x05,0x0f]
50 i8x16.extract_lane_s 15
52 # CHECK: i8x16.extract_lane_u 15 # encoding: [0xfd,0x06,0x0f]
53 i8x16.extract_lane_u 15
55 # CHECK: i8x16.replace_lane 15 # encoding: [0xfd,0x07,0x0f]
56 i8x16.replace_lane 15
58 # CHECK: i16x8.splat # encoding: [0xfd,0x08]
59 i16x8.splat
61 # CHECK: i16x8.extract_lane_s 7 # encoding: [0xfd,0x09,0x07]
62 i16x8.extract_lane_s 7
64 # CHECK: i16x8.extract_lane_u 7 # encoding: [0xfd,0x0a,0x07]
65 i16x8.extract_lane_u 7
67 # CHECK: i16x8.replace_lane 7 # encoding: [0xfd,0x0b,0x07]
68 i16x8.replace_lane 7
70 # CHECK: i32x4.splat # encoding: [0xfd,0x0c]
71 i32x4.splat
73 # CHECK: i32x4.extract_lane 3 # encoding: [0xfd,0x0d,0x03]
74 i32x4.extract_lane 3
76 # CHECK: i32x4.replace_lane 3 # encoding: [0xfd,0x0e,0x03]
77 i32x4.replace_lane 3
79 # CHECK: i64x2.splat # encoding: [0xfd,0x0f]
80 i64x2.splat
82 # CHECK: i64x2.extract_lane 1 # encoding: [0xfd,0x10,0x01]
83 i64x2.extract_lane 1
85 # CHECK: i64x2.replace_lane 1 # encoding: [0xfd,0x11,0x01]
86 i64x2.replace_lane 1
88 # CHECK: f32x4.splat # encoding: [0xfd,0x12]
89 f32x4.splat
91 # CHECK: f32x4.extract_lane 3 # encoding: [0xfd,0x13,0x03]
92 f32x4.extract_lane 3
94 # CHECK: f32x4.replace_lane 3 # encoding: [0xfd,0x14,0x03]
95 f32x4.replace_lane 3
97 # CHECK: f64x2.splat # encoding: [0xfd,0x15]
98 f64x2.splat
100 # CHECK: f64x2.extract_lane 1 # encoding: [0xfd,0x16,0x01]
101 f64x2.extract_lane 1
103 # CHECK: f64x2.replace_lane 1 # encoding: [0xfd,0x17,0x01]
104 f64x2.replace_lane 1
106 # CHECK: i8x16.eq # encoding: [0xfd,0x18]
107 i8x16.eq
109 # CHECK: i8x16.ne # encoding: [0xfd,0x19]
110 i8x16.ne
112 # CHECK: i8x16.lt_s # encoding: [0xfd,0x1a]
113 i8x16.lt_s
115 # CHECK: i8x16.lt_u # encoding: [0xfd,0x1b]
116 i8x16.lt_u
118 # CHECK: i8x16.gt_s # encoding: [0xfd,0x1c]
119 i8x16.gt_s
121 # CHECK: i8x16.gt_u # encoding: [0xfd,0x1d]
122 i8x16.gt_u
124 # CHECK: i8x16.le_s # encoding: [0xfd,0x1e]
125 i8x16.le_s
127 # CHECK: i8x16.le_u # encoding: [0xfd,0x1f]
128 i8x16.le_u
130 # CHECK: i8x16.ge_s # encoding: [0xfd,0x20]
131 i8x16.ge_s
133 # CHECK: i8x16.ge_u # encoding: [0xfd,0x21]
134 i8x16.ge_u
136 # CHECK: i16x8.eq # encoding: [0xfd,0x22]
137 i16x8.eq
139 # CHECK: i16x8.ne # encoding: [0xfd,0x23]
140 i16x8.ne
142 # CHECK: i16x8.lt_s # encoding: [0xfd,0x24]
143 i16x8.lt_s
145 # CHECK: i16x8.lt_u # encoding: [0xfd,0x25]
146 i16x8.lt_u
148 # CHECK: i16x8.gt_s # encoding: [0xfd,0x26]
149 i16x8.gt_s
151 # CHECK: i16x8.gt_u # encoding: [0xfd,0x27]
152 i16x8.gt_u
154 # CHECK: i16x8.le_s # encoding: [0xfd,0x28]
155 i16x8.le_s
157 # CHECK: i16x8.le_u # encoding: [0xfd,0x29]
158 i16x8.le_u
160 # CHECK: i16x8.ge_s # encoding: [0xfd,0x2a]
161 i16x8.ge_s
163 # CHECK: i16x8.ge_u # encoding: [0xfd,0x2b]
164 i16x8.ge_u
166 # CHECK: i32x4.eq # encoding: [0xfd,0x2c]
167 i32x4.eq
169 # CHECK: i32x4.ne # encoding: [0xfd,0x2d]
170 i32x4.ne
172 # CHECK: i32x4.lt_s # encoding: [0xfd,0x2e]
173 i32x4.lt_s
175 # CHECK: i32x4.lt_u # encoding: [0xfd,0x2f]
176 i32x4.lt_u
178 # CHECK: i32x4.gt_s # encoding: [0xfd,0x30]
179 i32x4.gt_s
181 # CHECK: i32x4.gt_u # encoding: [0xfd,0x31]
182 i32x4.gt_u
184 # CHECK: i32x4.le_s # encoding: [0xfd,0x32]
185 i32x4.le_s
187 # CHECK: i32x4.le_u # encoding: [0xfd,0x33]
188 i32x4.le_u
190 # CHECK: i32x4.ge_s # encoding: [0xfd,0x34]
191 i32x4.ge_s
193 # CHECK: i32x4.ge_u # encoding: [0xfd,0x35]
194 i32x4.ge_u
196 # CHECK: f32x4.eq # encoding: [0xfd,0x40]
197 f32x4.eq
199 # CHECK: f32x4.ne # encoding: [0xfd,0x41]
200 f32x4.ne
202 # CHECK: f32x4.lt # encoding: [0xfd,0x42]
203 f32x4.lt
205 # CHECK: f32x4.gt # encoding: [0xfd,0x43]
206 f32x4.gt
208 # CHECK: f32x4.le # encoding: [0xfd,0x44]
209 f32x4.le
211 # CHECK: f32x4.ge # encoding: [0xfd,0x45]
212 f32x4.ge
214 # CHECK: f64x2.eq # encoding: [0xfd,0x46]
215 f64x2.eq
217 # CHECK: f64x2.ne # encoding: [0xfd,0x47]
218 f64x2.ne
220 # CHECK: f64x2.lt # encoding: [0xfd,0x48]
221 f64x2.lt
223 # CHECK: f64x2.gt # encoding: [0xfd,0x49]
224 f64x2.gt
226 # CHECK: f64x2.le # encoding: [0xfd,0x4a]
227 f64x2.le
229 # CHECK: f64x2.ge # encoding: [0xfd,0x4b]
230 f64x2.ge
232 # CHECK: v128.not # encoding: [0xfd,0x4c]
233 v128.not
235 # CHECK: v128.and # encoding: [0xfd,0x4d]
236 v128.and
238 # CHECK: v128.or # encoding: [0xfd,0x4e]
239 v128.or
241 # CHECK: v128.xor # encoding: [0xfd,0x4f]
242 v128.xor
244 # CHECK: v128.bitselect # encoding: [0xfd,0x50]
245 v128.bitselect
247 # CHECK: i8x16.neg # encoding: [0xfd,0x51]
248 i8x16.neg
250 # CHECK: i8x16.any_true # encoding: [0xfd,0x52]
251 i8x16.any_true
253 # CHECK: i8x16.all_true # encoding: [0xfd,0x53]
254 i8x16.all_true
256 # CHECK: i8x16.shl # encoding: [0xfd,0x54]
257 i8x16.shl
259 # CHECK: i8x16.shr_s # encoding: [0xfd,0x55]
260 i8x16.shr_s
262 # CHECK: i8x16.shr_u # encoding: [0xfd,0x56]
263 i8x16.shr_u
265 # CHECK: i8x16.add # encoding: [0xfd,0x57]
266 i8x16.add
268 # CHECK: i8x16.add_saturate_s # encoding: [0xfd,0x58]
269 i8x16.add_saturate_s
271 # CHECK: i8x16.add_saturate_u # encoding: [0xfd,0x59]
272 i8x16.add_saturate_u
274 # CHECK: i8x16.sub # encoding: [0xfd,0x5a]
275 i8x16.sub
277 # CHECK: i8x16.sub_saturate_s # encoding: [0xfd,0x5b]
278 i8x16.sub_saturate_s
280 # CHECK: i8x16.sub_saturate_u # encoding: [0xfd,0x5c]
281 i8x16.sub_saturate_u
283 # CHECK: i8x16.mul # encoding: [0xfd,0x5d]
284 i8x16.mul
286 # CHECK: i16x8.neg # encoding: [0xfd,0x62]
287 i16x8.neg
289 # CHECK: i16x8.any_true # encoding: [0xfd,0x63]
290 i16x8.any_true
292 # CHECK: i16x8.all_true # encoding: [0xfd,0x64]
293 i16x8.all_true
295 # CHECK: i16x8.shl # encoding: [0xfd,0x65]
296 i16x8.shl
298 # CHECK: i16x8.shr_s # encoding: [0xfd,0x66]
299 i16x8.shr_s
301 # CHECK: i16x8.shr_u # encoding: [0xfd,0x67]
302 i16x8.shr_u
304 # CHECK: i16x8.add # encoding: [0xfd,0x68]
305 i16x8.add
307 # CHECK: i16x8.add_saturate_s # encoding: [0xfd,0x69]
308 i16x8.add_saturate_s
310 # CHECK: i16x8.add_saturate_u # encoding: [0xfd,0x6a]
311 i16x8.add_saturate_u
313 # CHECK: i16x8.sub # encoding: [0xfd,0x6b]
314 i16x8.sub
316 # CHECK: i16x8.sub_saturate_s # encoding: [0xfd,0x6c]
317 i16x8.sub_saturate_s
319 # CHECK: i16x8.sub_saturate_u # encoding: [0xfd,0x6d]
320 i16x8.sub_saturate_u
322 # CHECK: i16x8.mul # encoding: [0xfd,0x6e]
323 i16x8.mul
325 # CHECK: i32x4.neg # encoding: [0xfd,0x73]
326 i32x4.neg
328 # CHECK: i32x4.any_true # encoding: [0xfd,0x74]
329 i32x4.any_true
331 # CHECK: i32x4.all_true # encoding: [0xfd,0x75]
332 i32x4.all_true
334 # CHECK: i32x4.shl # encoding: [0xfd,0x76]
335 i32x4.shl
337 # CHECK: i32x4.shr_s # encoding: [0xfd,0x77]
338 i32x4.shr_s
340 # CHECK: i32x4.shr_u # encoding: [0xfd,0x78]
341 i32x4.shr_u
343 # CHECK: i32x4.add # encoding: [0xfd,0x79]
344 i32x4.add
346 # CHECK: i32x4.sub # encoding: [0xfd,0x7c]
347 i32x4.sub
349 # CHECK: i32x4.mul # encoding: [0xfd,0x7f]
350 i32x4.mul
352 # CHECK: i64x2.neg # encoding: [0xfd,0x84,0x01]
353 i64x2.neg
355 # CHECK: i64x2.any_true # encoding: [0xfd,0x85,0x01]
356 i64x2.any_true
358 # CHECK: i64x2.all_true # encoding: [0xfd,0x86,0x01]
359 i64x2.all_true
361 # CHECK: i64x2.shl # encoding: [0xfd,0x87,0x01]
362 i64x2.shl
364 # CHECK: i64x2.shr_s # encoding: [0xfd,0x88,0x01]
365 i64x2.shr_s
367 # CHECK: i64x2.shr_u # encoding: [0xfd,0x89,0x01]
368 i64x2.shr_u
370 # CHECK: i64x2.add # encoding: [0xfd,0x8a,0x01]
371 i64x2.add
373 # CHECK: i64x2.sub # encoding: [0xfd,0x8d,0x01]
374 i64x2.sub
376 # CHECK: f32x4.abs # encoding: [0xfd,0x95,0x01]
377 f32x4.abs
379 # CHECK: f32x4.neg # encoding: [0xfd,0x96,0x01]
380 f32x4.neg
382 # CHECK: f32x4.sqrt # encoding: [0xfd,0x97,0x01]
383 f32x4.sqrt
385 # CHECK: f32x4.add # encoding: [0xfd,0x9a,0x01]
386 f32x4.add
388 # CHECK: f32x4.sub # encoding: [0xfd,0x9b,0x01]
389 f32x4.sub
391 # CHECK: f32x4.mul # encoding: [0xfd,0x9c,0x01]
392 f32x4.mul
394 # CHECK: f32x4.div # encoding: [0xfd,0x9d,0x01]
395 f32x4.div
397 # CHECK: f32x4.min # encoding: [0xfd,0x9e,0x01]
398 f32x4.min
400 # CHECK: f32x4.max # encoding: [0xfd,0x9f,0x01]
401 f32x4.max
403 # CHECK: f64x2.abs # encoding: [0xfd,0xa0,0x01]
404 f64x2.abs
406 # CHECK: f64x2.neg # encoding: [0xfd,0xa1,0x01]
407 f64x2.neg
409 # CHECK: f64x2.sqrt # encoding: [0xfd,0xa2,0x01]
410 f64x2.sqrt
412 # CHECK: f64x2.add # encoding: [0xfd,0xa5,0x01]
413 f64x2.add
415 # CHECK: f64x2.sub # encoding: [0xfd,0xa6,0x01]
416 f64x2.sub
418 # CHECK: f64x2.mul # encoding: [0xfd,0xa7,0x01]
419 f64x2.mul
421 # CHECK: f64x2.div # encoding: [0xfd,0xa8,0x01]
422 f64x2.div
424 # CHECK: f64x2.min # encoding: [0xfd,0xa9,0x01]
425 f64x2.min
427 # CHECK: f64x2.max # encoding: [0xfd,0xaa,0x01]
428 f64x2.max
430 # CHECK: i32x4.trunc_sat_f32x4_s # encoding: [0xfd,0xab,0x01]
431 i32x4.trunc_sat_f32x4_s
433 # CHECK: i32x4.trunc_sat_f32x4_u # encoding: [0xfd,0xac,0x01]
434 i32x4.trunc_sat_f32x4_u
436 # CHECK: i64x2.trunc_sat_f64x2_s # encoding: [0xfd,0xad,0x01]
437 i64x2.trunc_sat_f64x2_s
439 # CHECK: i64x2.trunc_sat_f64x2_u # encoding: [0xfd,0xae,0x01]
440 i64x2.trunc_sat_f64x2_u
442 # CHECK: f32x4.convert_i32x4_s # encoding: [0xfd,0xaf,0x01]
443 f32x4.convert_i32x4_s
445 # CHECK: f32x4.convert_i32x4_u # encoding: [0xfd,0xb0,0x01]
446 f32x4.convert_i32x4_u
448 # CHECK: f64x2.convert_i64x2_s # encoding: [0xfd,0xb1,0x01]
449 f64x2.convert_i64x2_s
451 # CHECK: f64x2.convert_i64x2_u # encoding: [0xfd,0xb2,0x01]
452 f64x2.convert_i64x2_u
454 end_function