[ARM] Better OR's for MVE compares
[llvm-core.git] / test / MC / AArch64 / neon-aba-abd.s
blobb3a90bb1489512ebb54147aa1c119c6851e14ebd
1 // RUN: llvm-mc -triple aarch64-none-linux-gnu -mattr=+neon,+fullfp16 -show-encoding < %s | FileCheck %s
3 // Check that the assembler can handle the documented syntax for AArch64
5 //----------------------------------------------------------------------
6 // Vector Absolute Difference and Accumulate (Signed, Unsigned)
7 //----------------------------------------------------------------------
8 uaba v0.8b, v1.8b, v2.8b
9 uaba v0.16b, v1.16b, v2.16b
10 uaba v0.4h, v1.4h, v2.4h
11 uaba v0.8h, v1.8h, v2.8h
12 uaba v0.2s, v1.2s, v2.2s
13 uaba v0.4s, v1.4s, v2.4s
15 // CHECK: uaba v0.8b, v1.8b, v2.8b // encoding: [0x20,0x7c,0x22,0x2e]
16 // CHECK: uaba v0.16b, v1.16b, v2.16b // encoding: [0x20,0x7c,0x22,0x6e]
17 // CHECK: uaba v0.4h, v1.4h, v2.4h // encoding: [0x20,0x7c,0x62,0x2e]
18 // CHECK: uaba v0.8h, v1.8h, v2.8h // encoding: [0x20,0x7c,0x62,0x6e]
19 // CHECK: uaba v0.2s, v1.2s, v2.2s // encoding: [0x20,0x7c,0xa2,0x2e]
20 // CHECK: uaba v0.4s, v1.4s, v2.4s // encoding: [0x20,0x7c,0xa2,0x6e]
23 saba v0.8b, v1.8b, v2.8b
24 saba v0.16b, v1.16b, v2.16b
25 saba v0.4h, v1.4h, v2.4h
26 saba v0.8h, v1.8h, v2.8h
27 saba v0.2s, v1.2s, v2.2s
28 saba v0.4s, v1.4s, v2.4s
30 // CHECK: saba v0.8b, v1.8b, v2.8b // encoding: [0x20,0x7c,0x22,0x0e]
31 // CHECK: saba v0.16b, v1.16b, v2.16b // encoding: [0x20,0x7c,0x22,0x4e]
32 // CHECK: saba v0.4h, v1.4h, v2.4h // encoding: [0x20,0x7c,0x62,0x0e]
33 // CHECK: saba v0.8h, v1.8h, v2.8h // encoding: [0x20,0x7c,0x62,0x4e]
34 // CHECK: saba v0.2s, v1.2s, v2.2s // encoding: [0x20,0x7c,0xa2,0x0e]
35 // CHECK: saba v0.4s, v1.4s, v2.4s // encoding: [0x20,0x7c,0xa2,0x4e]
37 //----------------------------------------------------------------------
38 // Vector Absolute Difference (Signed, Unsigned)
39 //----------------------------------------------------------------------
40 uabd v0.8b, v1.8b, v2.8b
41 uabd v0.16b, v1.16b, v2.16b
42 uabd v0.4h, v1.4h, v2.4h
43 uabd v0.8h, v1.8h, v2.8h
44 uabd v0.2s, v1.2s, v2.2s
45 uabd v0.4s, v1.4s, v2.4s
47 // CHECK: uabd v0.8b, v1.8b, v2.8b // encoding: [0x20,0x74,0x22,0x2e]
48 // CHECK: uabd v0.16b, v1.16b, v2.16b // encoding: [0x20,0x74,0x22,0x6e]
49 // CHECK: uabd v0.4h, v1.4h, v2.4h // encoding: [0x20,0x74,0x62,0x2e]
50 // CHECK: uabd v0.8h, v1.8h, v2.8h // encoding: [0x20,0x74,0x62,0x6e]
51 // CHECK: uabd v0.2s, v1.2s, v2.2s // encoding: [0x20,0x74,0xa2,0x2e]
52 // CHECK: uabd v0.4s, v1.4s, v2.4s // encoding: [0x20,0x74,0xa2,0x6e]
54 sabd v0.8b, v1.8b, v2.8b
55 sabd v0.16b, v1.16b, v2.16b
56 sabd v0.4h, v1.4h, v2.4h
57 sabd v0.8h, v1.8h, v2.8h
58 sabd v0.2s, v1.2s, v2.2s
59 sabd v0.4s, v1.4s, v2.4s
61 // CHECK: sabd v0.8b, v1.8b, v2.8b // encoding: [0x20,0x74,0x22,0x0e]
62 // CHECK: sabd v0.16b, v1.16b, v2.16b // encoding: [0x20,0x74,0x22,0x4e]
63 // CHECK: sabd v0.4h, v1.4h, v2.4h // encoding: [0x20,0x74,0x62,0x0e]
64 // CHECK: sabd v0.8h, v1.8h, v2.8h // encoding: [0x20,0x74,0x62,0x4e]
65 // CHECK: sabd v0.2s, v1.2s, v2.2s // encoding: [0x20,0x74,0xa2,0x0e]
66 // CHECK: sabd v0.4s, v1.4s, v2.4s // encoding: [0x20,0x74,0xa2,0x4e]
68 //----------------------------------------------------------------------
69 // Vector Absolute Difference (Floating Point)
70 //----------------------------------------------------------------------
71 fabd v0.4h, v1.4h, v2.4h
72 fabd v0.2s, v1.2s, v2.2s
73 fabd v31.4s, v15.4s, v16.4s
74 fabd v7.2d, v8.2d, v25.2d
76 // CHECK: fabd v0.4h, v1.4h, v2.4h // encoding: [0x20,0x14,0xc2,0x2e]
77 // CHECK: fabd v0.2s, v1.2s, v2.2s // encoding: [0x20,0xd4,0xa2,0x2e]
78 // CHECK: fabd v31.4s, v15.4s, v16.4s // encoding: [0xff,0xd5,0xb0,0x6e]
79 // CHECK: fabd v7.2d, v8.2d, v25.2d // encoding: [0x07,0xd5,0xf9,0x6e]