[Frontend] Remove unused includes (NFC) (#116927)
[llvm-project.git] / llvm / test / MC / AArch64 / SVE / ptrue.s
bloba619b1c59fe7bb185edb770ad32cc1dc2ac15868
1 // RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve < %s \
2 // RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
3 // RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sme < %s \
4 // RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
5 // RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \
6 // RUN: | FileCheck %s --check-prefix=CHECK-ERROR
7 // RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve < %s \
8 // RUN: | llvm-objdump --no-print-imm-hex -d --mattr=+sve - | FileCheck %s --check-prefix=CHECK-INST
9 // RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve < %s \
10 // RUN: | llvm-objdump --no-print-imm-hex -d --mattr=-sve - | FileCheck %s --check-prefix=CHECK-UNKNOWN
12 // ---------------------------------------------------------------------------//
13 // Test all predicate sizes for pow2 pattern
14 // ---------------------------------------------------------------------------//
16 ptrue p0.b, pow2
17 // CHECK-INST: ptrue p0.b, pow2
18 // CHECK-ENCODING: [0x00,0xe0,0x18,0x25]
19 // CHECK-ERROR: instruction requires: sve or sme
20 // CHECK-UNKNOWN: 2518e000 <unknown>
22 ptrue p0.h, pow2
23 // CHECK-INST: ptrue p0.h, pow2
24 // CHECK-ENCODING: [0x00,0xe0,0x58,0x25]
25 // CHECK-ERROR: instruction requires: sve or sme
26 // CHECK-UNKNOWN: 2558e000 <unknown>
28 ptrue p0.s, pow2
29 // CHECK-INST: ptrue p0.s, pow2
30 // CHECK-ENCODING: [0x00,0xe0,0x98,0x25]
31 // CHECK-ERROR: instruction requires: sve or sme
32 // CHECK-UNKNOWN: 2598e000 <unknown>
34 ptrue p0.d, pow2
35 // CHECK-INST: ptrue p0.d, pow2
36 // CHECK-ENCODING: [0x00,0xe0,0xd8,0x25]
37 // CHECK-ERROR: instruction requires: sve or sme
38 // CHECK-UNKNOWN: 25d8e000 <unknown>
40 // ---------------------------------------------------------------------------//
41 // Test all predicate sizes without explicit pattern
42 // ---------------------------------------------------------------------------//
44 ptrue p15.b
45 // CHECK-INST: ptrue p15.b
46 // CHECK-ENCODING: [0xef,0xe3,0x18,0x25]
47 // CHECK-ERROR: instruction requires: sve or sme
48 // CHECK-UNKNOWN: 2518e3ef <unknown>
50 ptrue p15.h
51 // CHECK-INST: ptrue p15.h
52 // CHECK-ENCODING: [0xef,0xe3,0x58,0x25]
53 // CHECK-ERROR: instruction requires: sve or sme
54 // CHECK-UNKNOWN: 2558e3ef <unknown>
56 ptrue p15.s
57 // CHECK-INST: ptrue p15.s
58 // CHECK-ENCODING: [0xef,0xe3,0x98,0x25]
59 // CHECK-ERROR: instruction requires: sve or sme
60 // CHECK-UNKNOWN: 2598e3ef <unknown>
62 ptrue p15.d
63 // CHECK-INST: ptrue p15.d
64 // CHECK-ENCODING: [0xef,0xe3,0xd8,0x25]
65 // CHECK-ERROR: instruction requires: sve or sme
66 // CHECK-UNKNOWN: 25d8e3ef <unknown>
68 // ---------------------------------------------------------------------------//
69 // Test available patterns
70 // ---------------------------------------------------------------------------//
72 ptrue p7.s, #1
73 // CHECK-INST: ptrue p7.s, vl1
74 // CHECK-ENCODING: [0x27,0xe0,0x98,0x25]
75 // CHECK-ERROR: instruction requires: sve or sme
76 // CHECK-UNKNOWN: 2598e027 <unknown>
78 ptrue p7.s, vl1
79 // CHECK-INST: ptrue p7.s, vl1
80 // CHECK-ENCODING: [0x27,0xe0,0x98,0x25]
81 // CHECK-ERROR: instruction requires: sve or sme
82 // CHECK-UNKNOWN: 2598e027 <unknown>
84 ptrue p7.s, vl2
85 // CHECK-INST: ptrue p7.s, vl2
86 // CHECK-ENCODING: [0x47,0xe0,0x98,0x25]
87 // CHECK-ERROR: instruction requires: sve or sme
88 // CHECK-UNKNOWN: 2598e047 <unknown>
90 ptrue p7.s, vl3
91 // CHECK-INST: ptrue p7.s, vl3
92 // CHECK-ENCODING: [0x67,0xe0,0x98,0x25]
93 // CHECK-ERROR: instruction requires: sve or sme
94 // CHECK-UNKNOWN: 2598e067 <unknown>
96 ptrue p7.s, vl4
97 // CHECK-INST: ptrue p7.s, vl4
98 // CHECK-ENCODING: [0x87,0xe0,0x98,0x25]
99 // CHECK-ERROR: instruction requires: sve or sme
100 // CHECK-UNKNOWN: 2598e087 <unknown>
102 ptrue p7.s, vl5
103 // CHECK-INST: ptrue p7.s, vl5
104 // CHECK-ENCODING: [0xa7,0xe0,0x98,0x25]
105 // CHECK-ERROR: instruction requires: sve or sme
106 // CHECK-UNKNOWN: 2598e0a7 <unknown>
108 ptrue p7.s, vl6
109 // CHECK-INST: ptrue p7.s, vl6
110 // CHECK-ENCODING: [0xc7,0xe0,0x98,0x25]
111 // CHECK-ERROR: instruction requires: sve or sme
112 // CHECK-UNKNOWN: 2598e0c7 <unknown>
114 ptrue p7.s, vl7
115 // CHECK-INST: ptrue p7.s, vl7
116 // CHECK-ENCODING: [0xe7,0xe0,0x98,0x25]
117 // CHECK-ERROR: instruction requires: sve or sme
118 // CHECK-UNKNOWN: 2598e0e7 <unknown>
120 ptrue p7.s, vl8
121 // CHECK-INST: ptrue p7.s, vl8
122 // CHECK-ENCODING: [0x07,0xe1,0x98,0x25]
123 // CHECK-ERROR: instruction requires: sve or sme
124 // CHECK-UNKNOWN: 2598e107 <unknown>
126 ptrue p7.s, vl16
127 // CHECK-INST: ptrue p7.s, vl16
128 // CHECK-ENCODING: [0x27,0xe1,0x98,0x25]
129 // CHECK-ERROR: instruction requires: sve or sme
130 // CHECK-UNKNOWN: 2598e127 <unknown>
132 ptrue p7.s, vl32
133 // CHECK-INST: ptrue p7.s, vl32
134 // CHECK-ENCODING: [0x47,0xe1,0x98,0x25]
135 // CHECK-ERROR: instruction requires: sve or sme
136 // CHECK-UNKNOWN: 2598e147 <unknown>
138 ptrue p7.s, vl64
139 // CHECK-INST: ptrue p7.s, vl64
140 // CHECK-ENCODING: [0x67,0xe1,0x98,0x25]
141 // CHECK-ERROR: instruction requires: sve or sme
142 // CHECK-UNKNOWN: 2598e167 <unknown>
144 ptrue p7.s, vl128
145 // CHECK-INST: ptrue p7.s, vl128
146 // CHECK-ENCODING: [0x87,0xe1,0x98,0x25]
147 // CHECK-ERROR: instruction requires: sve or sme
148 // CHECK-UNKNOWN: 2598e187 <unknown>
150 ptrue p7.s, vl256
151 // CHECK-INST: ptrue p7.s, vl256
152 // CHECK-ENCODING: [0xa7,0xe1,0x98,0x25]
153 // CHECK-ERROR: instruction requires: sve or sme
154 // CHECK-UNKNOWN: 2598e1a7 <unknown>
156 ptrue p7.s, mul4
157 // CHECK-INST: ptrue p7.s, mul4
158 // CHECK-ENCODING: [0xa7,0xe3,0x98,0x25]
159 // CHECK-ERROR: instruction requires: sve or sme
160 // CHECK-UNKNOWN: 2598e3a7 <unknown>
162 ptrue p7.s, mul3
163 // CHECK-INST: ptrue p7.s, mul3
164 // CHECK-ENCODING: [0xc7,0xe3,0x98,0x25]
165 // CHECK-ERROR: instruction requires: sve or sme
166 // CHECK-UNKNOWN: 2598e3c7 <unknown>
168 ptrue p7.s, all
169 // CHECK-INST: ptrue p7.s
170 // CHECK-ENCODING: [0xe7,0xe3,0x98,0x25]
171 // CHECK-ERROR: instruction requires: sve or sme
172 // CHECK-UNKNOWN: 2598e3e7 <unknown>
174 // ---------------------------------------------------------------------------//
175 // Test immediate values not corresponding to a named pattern
176 // ---------------------------------------------------------------------------//
178 ptrue p7.s, #14
179 // CHECK-INST: ptrue p7.s, #14
180 // CHECK-ENCODING: [0xc7,0xe1,0x98,0x25]
181 // CHECK-ERROR: instruction requires: sve or sme
182 // CHECK-UNKNOWN: 2598e1c7 <unknown>
184 ptrue p7.s, #15
185 // CHECK-INST: ptrue p7.s, #15
186 // CHECK-ENCODING: [0xe7,0xe1,0x98,0x25]
187 // CHECK-ERROR: instruction requires: sve or sme
188 // CHECK-UNKNOWN: 2598e1e7 <unknown>
190 ptrue p7.s, #16
191 // CHECK-INST: ptrue p7.s, #16
192 // CHECK-ENCODING: [0x07,0xe2,0x98,0x25]
193 // CHECK-ERROR: instruction requires: sve or sme
194 // CHECK-UNKNOWN: 2598e207 <unknown>
196 ptrue p7.s, #17
197 // CHECK-INST: ptrue p7.s, #17
198 // CHECK-ENCODING: [0x27,0xe2,0x98,0x25]
199 // CHECK-ERROR: instruction requires: sve or sme
200 // CHECK-UNKNOWN: 2598e227 <unknown>
202 ptrue p7.s, #18
203 // CHECK-INST: ptrue p7.s, #18
204 // CHECK-ENCODING: [0x47,0xe2,0x98,0x25]
205 // CHECK-ERROR: instruction requires: sve or sme
206 // CHECK-UNKNOWN: 2598e247 <unknown>
208 ptrue p7.s, #19
209 // CHECK-INST: ptrue p7.s, #19
210 // CHECK-ENCODING: [0x67,0xe2,0x98,0x25]
211 // CHECK-ERROR: instruction requires: sve or sme
212 // CHECK-UNKNOWN: 2598e267 <unknown>
214 ptrue p7.s, #20
215 // CHECK-INST: ptrue p7.s, #20
216 // CHECK-ENCODING: [0x87,0xe2,0x98,0x25]
217 // CHECK-ERROR: instruction requires: sve or sme
218 // CHECK-UNKNOWN: 2598e287 <unknown>
220 ptrue p7.s, #21
221 // CHECK-INST: ptrue p7.s, #21
222 // CHECK-ENCODING: [0xa7,0xe2,0x98,0x25]
223 // CHECK-ERROR: instruction requires: sve or sme
224 // CHECK-UNKNOWN: 2598e2a7 <unknown>
226 ptrue p7.s, #22
227 // CHECK-INST: ptrue p7.s, #22
228 // CHECK-ENCODING: [0xc7,0xe2,0x98,0x25]
229 // CHECK-ERROR: instruction requires: sve or sme
230 // CHECK-UNKNOWN: 2598e2c7 <unknown>
232 ptrue p7.s, #23
233 // CHECK-INST: ptrue p7.s, #23
234 // CHECK-ENCODING: [0xe7,0xe2,0x98,0x25]
235 // CHECK-ERROR: instruction requires: sve or sme
236 // CHECK-UNKNOWN: 2598e2e7 <unknown>
238 ptrue p7.s, #24
239 // CHECK-INST: ptrue p7.s, #24
240 // CHECK-ENCODING: [0x07,0xe3,0x98,0x25]
241 // CHECK-ERROR: instruction requires: sve or sme
242 // CHECK-UNKNOWN: 2598e307 <unknown>
244 ptrue p7.s, #25
245 // CHECK-INST: ptrue p7.s, #25
246 // CHECK-ENCODING: [0x27,0xe3,0x98,0x25]
247 // CHECK-ERROR: instruction requires: sve or sme
248 // CHECK-UNKNOWN: 2598e327 <unknown>
250 ptrue p7.s, #26
251 // CHECK-INST: ptrue p7.s, #26
252 // CHECK-ENCODING: [0x47,0xe3,0x98,0x25]
253 // CHECK-ERROR: instruction requires: sve or sme
254 // CHECK-UNKNOWN: 2598e347 <unknown>
256 ptrue p7.s, #27
257 // CHECK-INST: ptrue p7.s, #27
258 // CHECK-ENCODING: [0x67,0xe3,0x98,0x25]
259 // CHECK-ERROR: instruction requires: sve or sme
260 // CHECK-UNKNOWN: 2598e367 <unknown>
262 ptrue p7.s, #28
263 // CHECK-INST: ptrue p7.s, #28
264 // CHECK-ENCODING: [0x87,0xe3,0x98,0x25]
265 // CHECK-ERROR: instruction requires: sve or sme
266 // CHECK-UNKNOWN: 2598e387 <unknown>