[ARM] Better OR's for MVE compares
[llvm-core.git] / test / MC / AArch64 / neon-scalar-saturating-add-sub.s
blob0bf243495999010d7e0762a158ec64014c0c0c51
1 // RUN: llvm-mc -triple aarch64-none-linux-gnu -mattr=+neon -show-encoding < %s | FileCheck %s
3 //------------------------------------------------------------------------------
4 // Scalar Integer Saturating Add (Signed)
5 //------------------------------------------------------------------------------
6 sqadd b0, b1, b2
7 sqadd h10, h11, h12
8 sqadd s20, s21, s2
9 sqadd d17, d31, d8
11 // CHECK: sqadd b0, b1, b2 // encoding: [0x20,0x0c,0x22,0x5e]
12 // CHECK: sqadd h10, h11, h12 // encoding: [0x6a,0x0d,0x6c,0x5e]
13 // CHECK: sqadd s20, s21, s2 // encoding: [0xb4,0x0e,0xa2,0x5e]
14 // CHECK: sqadd d17, d31, d8 // encoding: [0xf1,0x0f,0xe8,0x5e]
16 //------------------------------------------------------------------------------
17 // Scalar Integer Saturating Add (Unsigned)
18 //------------------------------------------------------------------------------
19 uqadd b0, b1, b2
20 uqadd h10, h11, h12
21 uqadd s20, s21, s2
22 uqadd d17, d31, d8
24 // CHECK: uqadd b0, b1, b2 // encoding: [0x20,0x0c,0x22,0x7e]
25 // CHECK: uqadd h10, h11, h12 // encoding: [0x6a,0x0d,0x6c,0x7e]
26 // CHECK: uqadd s20, s21, s2 // encoding: [0xb4,0x0e,0xa2,0x7e]
27 // CHECK: uqadd d17, d31, d8 // encoding: [0xf1,0x0f,0xe8,0x7e]
29 //------------------------------------------------------------------------------
30 // Scalar Integer Saturating Sub (Signed)
31 //------------------------------------------------------------------------------
32 sqsub b0, b1, b2
33 sqsub h10, h11, h12
34 sqsub s20, s21, s2
35 sqsub d17, d31, d8
37 // CHECK: sqsub b0, b1, b2 // encoding: [0x20,0x2c,0x22,0x5e]
38 // CHECK: sqsub h10, h11, h12 // encoding: [0x6a,0x2d,0x6c,0x5e]
39 // CHECK: sqsub s20, s21, s2 // encoding: [0xb4,0x2e,0xa2,0x5e]
40 // CHECK: sqsub d17, d31, d8 // encoding: [0xf1,0x2f,0xe8,0x5e]
42 //------------------------------------------------------------------------------
43 // Scalar Integer Saturating Sub (Unsigned)
44 //------------------------------------------------------------------------------
45 uqsub b0, b1, b2
46 uqsub h10, h11, h12
47 uqsub s20, s21, s2
48 uqsub d17, d31, d8
50 // CHECK: uqsub b0, b1, b2 // encoding: [0x20,0x2c,0x22,0x7e]
51 // CHECK: uqsub h10, h11, h12 // encoding: [0x6a,0x2d,0x6c,0x7e]
52 // CHECK: uqsub s20, s21, s2 // encoding: [0xb4,0x2e,0xa2,0x7e]
53 // CHECK: uqsub d17, d31, d8 // encoding: [0xf1,0x2f,0xe8,0x7e]
55 //----------------------------------------------------------------------
56 // Signed Saturating Accumulated of Unsigned Value
57 //----------------------------------------------------------------------
59 suqadd b19, b14
60 suqadd h20, h15
61 suqadd s21, s12
62 suqadd d18, d22
64 // CHECK: suqadd b19, b14 // encoding: [0xd3,0x39,0x20,0x5e]
65 // CHECK: suqadd h20, h15 // encoding: [0xf4,0x39,0x60,0x5e]
66 // CHECK: suqadd s21, s12 // encoding: [0x95,0x39,0xa0,0x5e]
67 // CHECK: suqadd d18, d22 // encoding: [0xd2,0x3a,0xe0,0x5e]
69 //----------------------------------------------------------------------
70 // Unsigned Saturating Accumulated of Signed Value
71 //----------------------------------------------------------------------
73 usqadd b19, b14
74 usqadd h20, h15
75 usqadd s21, s12
76 usqadd d18, d22
78 // CHECK: usqadd b19, b14 // encoding: [0xd3,0x39,0x20,0x7e]
79 // CHECK: usqadd h20, h15 // encoding: [0xf4,0x39,0x60,0x7e]
80 // CHECK: usqadd s21, s12 // encoding: [0x95,0x39,0xa0,0x7e]
81 // CHECK: usqadd d18, d22 // encoding: [0xd2,0x3a,0xe0,0x7e]