[ARM] Better OR's for MVE compares
[llvm-core.git] / test / MC / AArch64 / SVE / incw.s
blobfb6a05ee6f57ab088b568304912f40d4360ba361
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 incw z0.s
15 // CHECK-INST: incw z0.s
16 // CHECK-ENCODING: [0xe0,0xc3,0xb0,0x04]
17 // CHECK-ERROR: instruction requires: sve
18 // CHECK-UNKNOWN: e0 c3 b0 04 <unknown>
20 incw z0.s, all
21 // CHECK-INST: incw z0.s
22 // CHECK-ENCODING: [0xe0,0xc3,0xb0,0x04]
23 // CHECK-ERROR: instruction requires: sve
24 // CHECK-UNKNOWN: e0 c3 b0 04 <unknown>
26 incw z0.s, all, mul #1
27 // CHECK-INST: incw z0.s
28 // CHECK-ENCODING: [0xe0,0xc3,0xb0,0x04]
29 // CHECK-ERROR: instruction requires: sve
30 // CHECK-UNKNOWN: e0 c3 b0 04 <unknown>
32 incw z0.s, all, mul #16
33 // CHECK-INST: incw z0.s, all, mul #16
34 // CHECK-ENCODING: [0xe0,0xc3,0xbf,0x04]
35 // CHECK-ERROR: instruction requires: sve
36 // CHECK-UNKNOWN: e0 c3 bf 04 <unknown>
39 // ---------------------------------------------------------------------------//
40 // Test scalar form and aliases.
41 // ---------------------------------------------------------------------------//
43 incw x0
44 // CHECK-INST: incw x0
45 // CHECK-ENCODING: [0xe0,0xe3,0xb0,0x04]
46 // CHECK-ERROR: instruction requires: sve
47 // CHECK-UNKNOWN: e0 e3 b0 04 <unknown>
49 incw x0, all
50 // CHECK-INST: incw x0
51 // CHECK-ENCODING: [0xe0,0xe3,0xb0,0x04]
52 // CHECK-ERROR: instruction requires: sve
53 // CHECK-UNKNOWN: e0 e3 b0 04 <unknown>
55 incw x0, all, mul #1
56 // CHECK-INST: incw x0
57 // CHECK-ENCODING: [0xe0,0xe3,0xb0,0x04]
58 // CHECK-ERROR: instruction requires: sve
59 // CHECK-UNKNOWN: e0 e3 b0 04 <unknown>
61 incw x0, all, mul #16
62 // CHECK-INST: incw x0, all, mul #16
63 // CHECK-ENCODING: [0xe0,0xe3,0xbf,0x04]
64 // CHECK-ERROR: instruction requires: sve
65 // CHECK-UNKNOWN: e0 e3 bf 04 <unknown>
68 // ---------------------------------------------------------------------------//
69 // Test predicate patterns
70 // ---------------------------------------------------------------------------//
73 incw x0, pow2
74 // CHECK-INST: incw x0, pow2
75 // CHECK-ENCODING: [0x00,0xe0,0xb0,0x04]
76 // CHECK-ERROR: instruction requires: sve
77 // CHECK-UNKNOWN: 00 e0 b0 04 <unknown>
79 incw x0, vl1
80 // CHECK-INST: incw x0, vl1
81 // CHECK-ENCODING: [0x20,0xe0,0xb0,0x04]
82 // CHECK-ERROR: instruction requires: sve
83 // CHECK-UNKNOWN: 20 e0 b0 04 <unknown>
85 incw x0, vl2
86 // CHECK-INST: incw x0, vl2
87 // CHECK-ENCODING: [0x40,0xe0,0xb0,0x04]
88 // CHECK-ERROR: instruction requires: sve
89 // CHECK-UNKNOWN: 40 e0 b0 04 <unknown>
91 incw x0, vl3
92 // CHECK-INST: incw x0, vl3
93 // CHECK-ENCODING: [0x60,0xe0,0xb0,0x04]
94 // CHECK-ERROR: instruction requires: sve
95 // CHECK-UNKNOWN: 60 e0 b0 04 <unknown>
97 incw x0, vl4
98 // CHECK-INST: incw x0, vl4
99 // CHECK-ENCODING: [0x80,0xe0,0xb0,0x04]
100 // CHECK-ERROR: instruction requires: sve
101 // CHECK-UNKNOWN: 80 e0 b0 04 <unknown>
103 incw x0, vl5
104 // CHECK-INST: incw x0, vl5
105 // CHECK-ENCODING: [0xa0,0xe0,0xb0,0x04]
106 // CHECK-ERROR: instruction requires: sve
107 // CHECK-UNKNOWN: a0 e0 b0 04 <unknown>
109 incw x0, vl6
110 // CHECK-INST: incw x0, vl6
111 // CHECK-ENCODING: [0xc0,0xe0,0xb0,0x04]
112 // CHECK-ERROR: instruction requires: sve
113 // CHECK-UNKNOWN: c0 e0 b0 04 <unknown>
115 incw x0, vl7
116 // CHECK-INST: incw x0, vl7
117 // CHECK-ENCODING: [0xe0,0xe0,0xb0,0x04]
118 // CHECK-ERROR: instruction requires: sve
119 // CHECK-UNKNOWN: e0 e0 b0 04 <unknown>
121 incw x0, vl8
122 // CHECK-INST: incw x0, vl8
123 // CHECK-ENCODING: [0x00,0xe1,0xb0,0x04]
124 // CHECK-ERROR: instruction requires: sve
125 // CHECK-UNKNOWN: 00 e1 b0 04 <unknown>
127 incw x0, vl16
128 // CHECK-INST: incw x0, vl16
129 // CHECK-ENCODING: [0x20,0xe1,0xb0,0x04]
130 // CHECK-ERROR: instruction requires: sve
131 // CHECK-UNKNOWN: 20 e1 b0 04 <unknown>
133 incw x0, vl32
134 // CHECK-INST: incw x0, vl32
135 // CHECK-ENCODING: [0x40,0xe1,0xb0,0x04]
136 // CHECK-ERROR: instruction requires: sve
137 // CHECK-UNKNOWN: 40 e1 b0 04 <unknown>
139 incw x0, vl64
140 // CHECK-INST: incw x0, vl64
141 // CHECK-ENCODING: [0x60,0xe1,0xb0,0x04]
142 // CHECK-ERROR: instruction requires: sve
143 // CHECK-UNKNOWN: 60 e1 b0 04 <unknown>
145 incw x0, vl128
146 // CHECK-INST: incw x0, vl128
147 // CHECK-ENCODING: [0x80,0xe1,0xb0,0x04]
148 // CHECK-ERROR: instruction requires: sve
149 // CHECK-UNKNOWN: 80 e1 b0 04 <unknown>
151 incw x0, vl256
152 // CHECK-INST: incw x0, vl256
153 // CHECK-ENCODING: [0xa0,0xe1,0xb0,0x04]
154 // CHECK-ERROR: instruction requires: sve
155 // CHECK-UNKNOWN: a0 e1 b0 04 <unknown>
157 incw x0, #14
158 // CHECK-INST: incw x0, #14
159 // CHECK-ENCODING: [0xc0,0xe1,0xb0,0x04]
160 // CHECK-ERROR: instruction requires: sve
161 // CHECK-UNKNOWN: c0 e1 b0 04 <unknown>
163 incw x0, #28
164 // CHECK-INST: incw x0, #28
165 // CHECK-ENCODING: [0x80,0xe3,0xb0,0x04]
166 // CHECK-ERROR: instruction requires: sve
167 // CHECK-UNKNOWN: 80 e3 b0 04 <unknown>
170 // --------------------------------------------------------------------------//
171 // Test compatibility with MOVPRFX instruction.
173 movprfx z0, z7
174 // CHECK-INST: movprfx z0, z7
175 // CHECK-ENCODING: [0xe0,0xbc,0x20,0x04]
176 // CHECK-ERROR: instruction requires: sve
177 // CHECK-UNKNOWN: e0 bc 20 04 <unknown>
179 incw z0.s
180 // CHECK-INST: incw z0.s
181 // CHECK-ENCODING: [0xe0,0xc3,0xb0,0x04]
182 // CHECK-ERROR: instruction requires: sve
183 // CHECK-UNKNOWN: e0 c3 b0 04 <unknown>
185 movprfx z0, z7
186 // CHECK-INST: movprfx z0, z7
187 // CHECK-ENCODING: [0xe0,0xbc,0x20,0x04]
188 // CHECK-ERROR: instruction requires: sve
189 // CHECK-UNKNOWN: e0 bc 20 04 <unknown>
191 incw z0.s, all, mul #16
192 // CHECK-INST: incw z0.s, all, mul #16
193 // CHECK-ENCODING: [0xe0,0xc3,0xbf,0x04]
194 // CHECK-ERROR: instruction requires: sve
195 // CHECK-UNKNOWN: e0 c3 bf 04 <unknown>
197 movprfx z0, z7
198 // CHECK-INST: movprfx z0, z7
199 // CHECK-ENCODING: [0xe0,0xbc,0x20,0x04]
200 // CHECK-ERROR: instruction requires: sve
201 // CHECK-UNKNOWN: e0 bc 20 04 <unknown>
203 incw z0.s, all
204 // CHECK-INST: incw z0.s
205 // CHECK-ENCODING: [0xe0,0xc3,0xb0,0x04]
206 // CHECK-ERROR: instruction requires: sve
207 // CHECK-UNKNOWN: e0 c3 b0 04 <unknown>