[InstCombine] Signed saturation tests. NFC
[llvm-complete.git] / test / MC / AArch64 / SVE / index.s
bloba728e4c3d1c34371a537269339165db5c1c7b1cf
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 // Index (immediate, immediate)
13 index z0.b, #0, #0
14 // CHECK-INST: index z0.b, #0, #0
15 // CHECK-ENCODING: [0x00,0x40,0x20,0x04]
16 // CHECK-ERROR: instruction requires: sve
17 // CHECK-UNKNOWN: 00 40 20 04 <unknown>
19 index z31.b, #-1, #-1
20 // CHECK-INST: index z31.b, #-1, #-1
21 // CHECK-ENCODING: [0xff,0x43,0x3f,0x04]
22 // CHECK-ERROR: instruction requires: sve
23 // CHECK-UNKNOWN: ff 43 3f 04 <unknown>
25 index z0.h, #0, #0
26 // CHECK-INST: index z0.h, #0, #0
27 // CHECK-ENCODING: [0x00,0x40,0x60,0x04]
28 // CHECK-ERROR: instruction requires: sve
29 // CHECK-UNKNOWN: 00 40 60 04 <unknown>
31 index z31.h, #-1, #-1
32 // CHECK-INST: index z31.h, #-1, #-1
33 // CHECK-ENCODING: [0xff,0x43,0x7f,0x04]
34 // CHECK-ERROR: instruction requires: sve
35 // CHECK-UNKNOWN: ff 43 7f 04 <unknown>
37 index z0.s, #0, #0
38 // CHECK-INST: index z0.s, #0, #0
39 // CHECK-ENCODING: [0x00,0x40,0xa0,0x04]
40 // CHECK-ERROR: instruction requires: sve
41 // CHECK-UNKNOWN: 00 40 a0 04 <unknown>
43 index z31.s, #-1, #-1
44 // CHECK-INST: index z31.s, #-1, #-1
45 // CHECK-ENCODING: [0xff,0x43,0xbf,0x04]
46 // CHECK-ERROR: instruction requires: sve
47 // CHECK-UNKNOWN: ff 43 bf 04 <unknown>
49 index z0.d, #0, #0
50 // CHECK-INST: index z0.d, #0, #0
51 // CHECK-ENCODING: [0x00,0x40,0xe0,0x04]
52 // CHECK-ERROR: instruction requires: sve
53 // CHECK-UNKNOWN: 00 40 e0 04 <unknown>
55 index z31.d, #-1, #-1
56 // CHECK-INST: index z31.d, #-1, #-1
57 // CHECK-ENCODING: [0xff,0x43,0xff,0x04]
58 // CHECK-ERROR: instruction requires: sve
59 // CHECK-UNKNOWN: ff 43 ff 04 <unknown>
61 // --------------------------------------------------------------------------//
62 // Index (immediate, scalar)
64 index z31.b, #-1, wzr
65 // CHECK-INST: index z31.b, #-1, wzr
66 // CHECK-ENCODING: [0xff,0x4b,0x3f,0x04]
67 // CHECK-ERROR: instruction requires: sve
68 // CHECK-UNKNOWN: ff 4b 3f 04 <unknown>
70 index z23.b, #13, w8
71 // CHECK-INST: index z23.b, #13, w8
72 // CHECK-ENCODING: [0xb7,0x49,0x28,0x04]
73 // CHECK-ERROR: instruction requires: sve
74 // CHECK-UNKNOWN: b7 49 28 04 <unknown>
76 index z31.h, #-1, wzr
77 // CHECK-INST: index z31.h, #-1, wzr
78 // CHECK-ENCODING: [0xff,0x4b,0x7f,0x04]
79 // CHECK-ERROR: instruction requires: sve
80 // CHECK-UNKNOWN: ff 4b 7f 04 <unknown>
82 index z23.h, #13, w8
83 // CHECK-INST: index z23.h, #13, w8
84 // CHECK-ENCODING: [0xb7,0x49,0x68,0x04]
85 // CHECK-ERROR: instruction requires: sve
86 // CHECK-UNKNOWN: b7 49 68 04 <unknown>
88 index z31.s, #-1, wzr
89 // CHECK-INST: index z31.s, #-1, wzr
90 // CHECK-ENCODING: [0xff,0x4b,0xbf,0x04]
91 // CHECK-ERROR: instruction requires: sve
92 // CHECK-UNKNOWN: ff 4b bf 04 <unknown>
94 index z23.s, #13, w8
95 // CHECK-INST: index z23.s, #13, w8
96 // CHECK-ENCODING: [0xb7,0x49,0xa8,0x04]
97 // CHECK-ERROR: instruction requires: sve
98 // CHECK-UNKNOWN: b7 49 a8 04 <unknown>
100 index z31.d, #-1, xzr
101 // CHECK-INST: index z31.d, #-1, xzr
102 // CHECK-ENCODING: [0xff,0x4b,0xff,0x04]
103 // CHECK-ERROR: instruction requires: sve
104 // CHECK-UNKNOWN: ff 4b ff 04 <unknown>
106 index z23.d, #13, x8
107 // CHECK-INST: index z23.d, #13, x8
108 // CHECK-ENCODING: [0xb7,0x49,0xe8,0x04]
109 // CHECK-ERROR: instruction requires: sve
110 // CHECK-UNKNOWN: b7 49 e8 04 <unknown>
113 // --------------------------------------------------------------------------//
114 // Index (scalar, immediate)
116 index z31.b, wzr, #-1
117 // CHECK-INST: index z31.b, wzr, #-1
118 // CHECK-ENCODING: [0xff,0x47,0x3f,0x04]
119 // CHECK-ERROR: instruction requires: sve
120 // CHECK-UNKNOWN: ff 47 3f 04 <unknown>
122 index z23.b, w13, #8
123 // CHECK-INST: index z23.b, w13, #8
124 // CHECK-ENCODING: [0xb7,0x45,0x28,0x04]
125 // CHECK-ERROR: instruction requires: sve
126 // CHECK-UNKNOWN: b7 45 28 04 <unknown>
128 index z31.h, wzr, #-1
129 // CHECK-INST: index z31.h, wzr, #-1
130 // CHECK-ENCODING: [0xff,0x47,0x7f,0x04]
131 // CHECK-ERROR: instruction requires: sve
132 // CHECK-UNKNOWN: ff 47 7f 04 <unknown>
134 index z23.h, w13, #8
135 // CHECK-INST: index z23.h, w13, #8
136 // CHECK-ENCODING: [0xb7,0x45,0x68,0x04]
137 // CHECK-ERROR: instruction requires: sve
138 // CHECK-UNKNOWN: b7 45 68 04 <unknown>
140 index z31.s, wzr, #-1
141 // CHECK-INST: index z31.s, wzr, #-1
142 // CHECK-ENCODING: [0xff,0x47,0xbf,0x04]
143 // CHECK-ERROR: instruction requires: sve
144 // CHECK-UNKNOWN: ff 47 bf 04 <unknown>
146 index z23.s, w13, #8
147 // CHECK-INST: index z23.s, w13, #8
148 // CHECK-ENCODING: [0xb7,0x45,0xa8,0x04]
149 // CHECK-ERROR: instruction requires: sve
150 // CHECK-UNKNOWN: b7 45 a8 04 <unknown>
152 index z31.d, xzr, #-1
153 // CHECK-INST: index z31.d, xzr, #-1
154 // CHECK-ENCODING: [0xff,0x47,0xff,0x04]
155 // CHECK-ERROR: instruction requires: sve
156 // CHECK-UNKNOWN: ff 47 ff 04 <unknown>
158 index z23.d, x13, #8
159 // CHECK-INST: index z23.d, x13, #8
160 // CHECK-ENCODING: [0xb7,0x45,0xe8,0x04]
161 // CHECK-ERROR: instruction requires: sve
162 // CHECK-UNKNOWN: b7 45 e8 04 <unknown>
165 // --------------------------------------------------------------------------//
166 // Index (scalar, scalar)
168 index z31.b, wzr, wzr
169 // CHECK-INST: index z31.b, wzr, wzr
170 // CHECK-ENCODING: [0xff,0x4f,0x3f,0x04]
171 // CHECK-ERROR: instruction requires: sve
172 // CHECK-UNKNOWN: ff 4f 3f 04 <unknown>
174 index z21.b, w10, w21
175 // CHECK-INST: index z21.b, w10, w21
176 // CHECK-ENCODING: [0x55,0x4d,0x35,0x04]
177 // CHECK-ERROR: instruction requires: sve
178 // CHECK-UNKNOWN: 55 4d 35 04 <unknown>
180 index z31.h, wzr, wzr
181 // check-inst: index z31.h, wzr, wzr
182 // check-encoding: [0xff,0x4f,0x7f,0x04]
183 // check-error: instruction requires: sve
184 // check-unknown: ff 4f 7f 04 <unknown>
186 index z0.h, w0, w0
187 // check-inst: index z0.h, w0, w0
188 // check-encoding: [0x00,0x4c,0x60,0x04]
189 // check-error: instruction requires: sve
190 // check-unknown: 00 4c 60 04 <unknown>
192 index z31.s, wzr, wzr
193 // CHECK-INST: index z31.s, wzr, wzr
194 // CHECK-ENCODING: [0xff,0x4f,0xbf,0x04]
195 // CHECK-ERROR: instruction requires: sve
196 // CHECK-UNKNOWN: ff 4f bf 04 <unknown>
198 index z21.s, w10, w21
199 // CHECK-INST: index z21.s, w10, w21
200 // CHECK-ENCODING: [0x55,0x4d,0xb5,0x04]
201 // CHECK-ERROR: instruction requires: sve
202 // CHECK-UNKNOWN: 55 4d b5 04 <unknown>
204 index z31.d, xzr, xzr
205 // CHECK-INST: index z31.d, xzr, xzr
206 // CHECK-ENCODING: [0xff,0x4f,0xff,0x04]
207 // CHECK-ERROR: instruction requires: sve
208 // CHECK-UNKNOWN: ff 4f ff 04 <unknown>
210 index z21.d, x10, x21
211 // CHECK-INST: index z21.d, x10, x21
212 // CHECK-ENCODING: [0x55,0x4d,0xf5,0x04]
213 // CHECK-ERROR: instruction requires: sve
214 // CHECK-UNKNOWN: 55 4d f5 04 <unknown>