[InstCombine] Signed saturation patterns
[llvm-complete.git] / test / MC / AArch64 / SVE / incd.s
blob9774c450ed12aa2dbd9eaa393d6fd79d6a007380
1 // RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve < %s \
2 // RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
3 // RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \
4 // RUN: | FileCheck %s --check-prefix=CHECK-ERROR
5 // RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve < %s \
6 // RUN: | llvm-objdump -d -mattr=+sve - | FileCheck %s --check-prefix=CHECK-INST
7 // RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve < %s \
8 // RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
10 // ---------------------------------------------------------------------------//
11 // Test vector form and aliases.
12 // ---------------------------------------------------------------------------//
14 incd z0.d
15 // CHECK-INST: incd z0.d
16 // CHECK-ENCODING: [0xe0,0xc3,0xf0,0x04]
17 // CHECK-ERROR: instruction requires: sve
18 // CHECK-UNKNOWN: e0 c3 f0 04 <unknown>
20 incd z0.d, all
21 // CHECK-INST: incd z0.d
22 // CHECK-ENCODING: [0xe0,0xc3,0xf0,0x04]
23 // CHECK-ERROR: instruction requires: sve
24 // CHECK-UNKNOWN: e0 c3 f0 04 <unknown>
26 incd z0.d, all, mul #1
27 // CHECK-INST: incd z0.d
28 // CHECK-ENCODING: [0xe0,0xc3,0xf0,0x04]
29 // CHECK-ERROR: instruction requires: sve
30 // CHECK-UNKNOWN: e0 c3 f0 04 <unknown>
32 incd z0.d, all, mul #16
33 // CHECK-INST: incd z0.d, all, mul #16
34 // CHECK-ENCODING: [0xe0,0xc3,0xff,0x04]
35 // CHECK-ERROR: instruction requires: sve
36 // CHECK-UNKNOWN: e0 c3 ff 04 <unknown>
39 // ---------------------------------------------------------------------------//
40 // Test scalar form and aliases.
41 // ---------------------------------------------------------------------------//
43 incd x0
44 // CHECK-INST: incd x0
45 // CHECK-ENCODING: [0xe0,0xe3,0xf0,0x04]
46 // CHECK-ERROR: instruction requires: sve
47 // CHECK-UNKNOWN: e0 e3 f0 04 <unknown>
49 incd x0, all
50 // CHECK-INST: incd x0
51 // CHECK-ENCODING: [0xe0,0xe3,0xf0,0x04]
52 // CHECK-ERROR: instruction requires: sve
53 // CHECK-UNKNOWN: e0 e3 f0 04 <unknown>
55 incd x0, all, mul #1
56 // CHECK-INST: incd x0
57 // CHECK-ENCODING: [0xe0,0xe3,0xf0,0x04]
58 // CHECK-ERROR: instruction requires: sve
59 // CHECK-UNKNOWN: e0 e3 f0 04 <unknown>
61 incd x0, all, mul #16
62 // CHECK-INST: incd x0, all, mul #16
63 // CHECK-ENCODING: [0xe0,0xe3,0xff,0x04]
64 // CHECK-ERROR: instruction requires: sve
65 // CHECK-UNKNOWN: e0 e3 ff 04 <unknown>
68 // ---------------------------------------------------------------------------//
69 // Test predicate patterns
70 // ---------------------------------------------------------------------------//
72 incd x0, pow2
73 // CHECK-INST: incd x0, pow2
74 // CHECK-ENCODING: [0x00,0xe0,0xf0,0x04]
75 // CHECK-ERROR: instruction requires: sve
76 // CHECK-UNKNOWN: 00 e0 f0 04 <unknown>
78 incd x0, vl1
79 // CHECK-INST: incd x0, vl1
80 // CHECK-ENCODING: [0x20,0xe0,0xf0,0x04]
81 // CHECK-ERROR: instruction requires: sve
82 // CHECK-UNKNOWN: 20 e0 f0 04 <unknown>
84 incd x0, vl2
85 // CHECK-INST: incd x0, vl2
86 // CHECK-ENCODING: [0x40,0xe0,0xf0,0x04]
87 // CHECK-ERROR: instruction requires: sve
88 // CHECK-UNKNOWN: 40 e0 f0 04 <unknown>
90 incd x0, vl3
91 // CHECK-INST: incd x0, vl3
92 // CHECK-ENCODING: [0x60,0xe0,0xf0,0x04]
93 // CHECK-ERROR: instruction requires: sve
94 // CHECK-UNKNOWN: 60 e0 f0 04 <unknown>
96 incd x0, vl4
97 // CHECK-INST: incd x0, vl4
98 // CHECK-ENCODING: [0x80,0xe0,0xf0,0x04]
99 // CHECK-ERROR: instruction requires: sve
100 // CHECK-UNKNOWN: 80 e0 f0 04 <unknown>
102 incd x0, vl5
103 // CHECK-INST: incd x0, vl5
104 // CHECK-ENCODING: [0xa0,0xe0,0xf0,0x04]
105 // CHECK-ERROR: instruction requires: sve
106 // CHECK-UNKNOWN: a0 e0 f0 04 <unknown>
108 incd x0, vl6
109 // CHECK-INST: incd x0, vl6
110 // CHECK-ENCODING: [0xc0,0xe0,0xf0,0x04]
111 // CHECK-ERROR: instruction requires: sve
112 // CHECK-UNKNOWN: c0 e0 f0 04 <unknown>
114 incd x0, vl7
115 // CHECK-INST: incd x0, vl7
116 // CHECK-ENCODING: [0xe0,0xe0,0xf0,0x04]
117 // CHECK-ERROR: instruction requires: sve
118 // CHECK-UNKNOWN: e0 e0 f0 04 <unknown>
120 incd x0, vl8
121 // CHECK-INST: incd x0, vl8
122 // CHECK-ENCODING: [0x00,0xe1,0xf0,0x04]
123 // CHECK-ERROR: instruction requires: sve
124 // CHECK-UNKNOWN: 00 e1 f0 04 <unknown>
126 incd x0, vl16
127 // CHECK-INST: incd x0, vl16
128 // CHECK-ENCODING: [0x20,0xe1,0xf0,0x04]
129 // CHECK-ERROR: instruction requires: sve
130 // CHECK-UNKNOWN: 20 e1 f0 04 <unknown>
132 incd x0, vl32
133 // CHECK-INST: incd x0, vl32
134 // CHECK-ENCODING: [0x40,0xe1,0xf0,0x04]
135 // CHECK-ERROR: instruction requires: sve
136 // CHECK-UNKNOWN: 40 e1 f0 04 <unknown>
138 incd x0, vl64
139 // CHECK-INST: incd x0, vl64
140 // CHECK-ENCODING: [0x60,0xe1,0xf0,0x04]
141 // CHECK-ERROR: instruction requires: sve
142 // CHECK-UNKNOWN: 60 e1 f0 04 <unknown>
144 incd x0, vl128
145 // CHECK-INST: incd x0, vl128
146 // CHECK-ENCODING: [0x80,0xe1,0xf0,0x04]
147 // CHECK-ERROR: instruction requires: sve
148 // CHECK-UNKNOWN: 80 e1 f0 04 <unknown>
150 incd x0, vl256
151 // CHECK-INST: incd x0, vl256
152 // CHECK-ENCODING: [0xa0,0xe1,0xf0,0x04]
153 // CHECK-ERROR: instruction requires: sve
154 // CHECK-UNKNOWN: a0 e1 f0 04 <unknown>
156 incd x0, #14
157 // CHECK-INST: incd x0, #14
158 // CHECK-ENCODING: [0xc0,0xe1,0xf0,0x04]
159 // CHECK-ERROR: instruction requires: sve
160 // CHECK-UNKNOWN: c0 e1 f0 04 <unknown>
162 incd x0, #28
163 // CHECK-INST: incd x0, #28
164 // CHECK-ENCODING: [0x80,0xe3,0xf0,0x04]
165 // CHECK-ERROR: instruction requires: sve
166 // CHECK-UNKNOWN: 80 e3 f0 04 <unknown>
169 // --------------------------------------------------------------------------//
170 // Test compatibility with MOVPRFX instruction.
172 movprfx z0, z7
173 // CHECK-INST: movprfx z0, z7
174 // CHECK-ENCODING: [0xe0,0xbc,0x20,0x04]
175 // CHECK-ERROR: instruction requires: sve
176 // CHECK-UNKNOWN: e0 bc 20 04 <unknown>
178 incd z0.d
179 // CHECK-INST: incd z0.d
180 // CHECK-ENCODING: [0xe0,0xc3,0xf0,0x04]
181 // CHECK-ERROR: instruction requires: sve
182 // CHECK-UNKNOWN: e0 c3 f0 04 <unknown>
184 movprfx z0, z7
185 // CHECK-INST: movprfx z0, z7
186 // CHECK-ENCODING: [0xe0,0xbc,0x20,0x04]
187 // CHECK-ERROR: instruction requires: sve
188 // CHECK-UNKNOWN: e0 bc 20 04 <unknown>
190 incd z0.d, all, mul #16
191 // CHECK-INST: incd z0.d, all, mul #16
192 // CHECK-ENCODING: [0xe0,0xc3,0xff,0x04]
193 // CHECK-ERROR: instruction requires: sve
194 // CHECK-UNKNOWN: e0 c3 ff 04 <unknown>
196 movprfx z0, z7
197 // CHECK-INST: movprfx z0, z7
198 // CHECK-ENCODING: [0xe0,0xbc,0x20,0x04]
199 // CHECK-ERROR: instruction requires: sve
200 // CHECK-UNKNOWN: e0 bc 20 04 <unknown>
202 incd z0.d, all
203 // CHECK-INST: incd z0.d
204 // CHECK-ENCODING: [0xe0,0xc3,0xf0,0x04]
205 // CHECK-ERROR: instruction requires: sve
206 // CHECK-UNKNOWN: e0 c3 f0 04 <unknown>