[DAGCombiner] Add target hook function to decide folding (mul (add x, c1), c2)
[llvm-project.git] / llvm / test / MC / RISCV / rvv / load.s
blob8b1c46599b7b050c4d75ab7b4f690237e6558eb3
1 # RUN: llvm-mc -triple=riscv64 -show-encoding --mattr=+experimental-v %s \
2 # RUN: --riscv-no-aliases | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
3 # RUN: not llvm-mc -triple=riscv64 -show-encoding %s 2>&1 \
4 # RUN: | FileCheck %s --check-prefix=CHECK-ERROR
5 # RUN: llvm-mc -triple=riscv64 -filetype=obj --mattr=+experimental-v %s \
6 # RUN: | llvm-objdump -d --mattr=+experimental-v -M no-aliases - \
7 # RUN: | FileCheck %s --check-prefix=CHECK-INST
8 # RUN: llvm-mc -triple=riscv64 -filetype=obj --mattr=+experimental-v %s \
9 # RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
11 vle1.v v0, (a0)
12 # CHECK-INST: vle1.v v0, (a0)
13 # CHECK-ENCODING: [0x07,0x00,0xb5,0x02]
14 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
15 # CHECK-UNKNOWN: 07 00 b5 02 <unknown>
17 vle1.v v8, (a0)
18 # CHECK-INST: vle1.v v8, (a0)
19 # CHECK-ENCODING: [0x07,0x04,0xb5,0x02]
20 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
21 # CHECK-UNKNOWN: 07 04 b5 02 <unknown>
23 vle8.v v8, (a0), v0.t
24 # CHECK-INST: vle8.v v8, (a0), v0.t
25 # CHECK-ENCODING: [0x07,0x04,0x05,0x00]
26 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
27 # CHECK-UNKNOWN: 07 04 05 00 <unknown>
29 vle8.v v8, (a0)
30 # CHECK-INST: vle8.v v8, (a0)
31 # CHECK-ENCODING: [0x07,0x04,0x05,0x02]
32 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
33 # CHECK-UNKNOWN: 07 04 05 02 <unknown>
35 vle16.v v8, (a0), v0.t
36 # CHECK-INST: vle16.v v8, (a0), v0.t
37 # CHECK-ENCODING: [0x07,0x54,0x05,0x00]
38 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
39 # CHECK-UNKNOWN: 07 54 05 00 <unknown>
41 vle16.v v8, (a0)
42 # CHECK-INST: vle16.v v8, (a0)
43 # CHECK-ENCODING: [0x07,0x54,0x05,0x02]
44 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
45 # CHECK-UNKNOWN: 07 54 05 02 <unknown>
47 vle32.v v8, (a0), v0.t
48 # CHECK-INST: vle32.v v8, (a0), v0.t
49 # CHECK-ENCODING: [0x07,0x64,0x05,0x00]
50 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
51 # CHECK-UNKNOWN: 07 64 05 00 <unknown>
53 vle32.v v8, (a0)
54 # CHECK-INST: vle32.v v8, (a0)
55 # CHECK-ENCODING: [0x07,0x64,0x05,0x02]
56 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
57 # CHECK-UNKNOWN: 07 64 05 02 <unknown>
59 vle64.v v8, (a0), v0.t
60 # CHECK-INST: vle64.v v8, (a0), v0.t
61 # CHECK-ENCODING: [0x07,0x74,0x05,0x00]
62 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
63 # CHECK-UNKNOWN: 07 74 05 00 <unknown>
65 vle64.v v8, (a0)
66 # CHECK-INST: vle64.v v8, (a0)
67 # CHECK-ENCODING: [0x07,0x74,0x05,0x02]
68 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
69 # CHECK-UNKNOWN: 07 74 05 02 <unknown>
71 vle8ff.v v8, (a0), v0.t
72 # CHECK-INST: vle8ff.v v8, (a0), v0.t
73 # CHECK-ENCODING: [0x07,0x04,0x05,0x01]
74 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
75 # CHECK-UNKNOWN: 07 04 05 01 <unknown>
77 vle8ff.v v8, (a0)
78 # CHECK-INST: vle8ff.v v8, (a0)
79 # CHECK-ENCODING: [0x07,0x04,0x05,0x03]
80 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
81 # CHECK-UNKNOWN: 07 04 05 03 <unknown>
83 vle16ff.v v8, (a0), v0.t
84 # CHECK-INST: vle16ff.v v8, (a0), v0.t
85 # CHECK-ENCODING: [0x07,0x54,0x05,0x01]
86 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
87 # CHECK-UNKNOWN: 07 54 05 01 <unknown>
89 vle16ff.v v8, (a0)
90 # CHECK-INST: vle16ff.v v8, (a0)
91 # CHECK-ENCODING: [0x07,0x54,0x05,0x03]
92 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
93 # CHECK-UNKNOWN: 07 54 05 03 <unknown>
95 vle32ff.v v8, (a0), v0.t
96 # CHECK-INST: vle32ff.v v8, (a0), v0.t
97 # CHECK-ENCODING: [0x07,0x64,0x05,0x01]
98 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
99 # CHECK-UNKNOWN: 07 64 05 01 <unknown>
101 vle32ff.v v8, (a0)
102 # CHECK-INST: vle32ff.v v8, (a0)
103 # CHECK-ENCODING: [0x07,0x64,0x05,0x03]
104 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
105 # CHECK-UNKNOWN: 07 64 05 03 <unknown>
107 vle64ff.v v8, (a0), v0.t
108 # CHECK-INST: vle64ff.v v8, (a0), v0.t
109 # CHECK-ENCODING: [0x07,0x74,0x05,0x01]
110 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
111 # CHECK-UNKNOWN: 07 74 05 01 <unknown>
113 vle64ff.v v8, (a0)
114 # CHECK-INST: vle64ff.v v8, (a0)
115 # CHECK-ENCODING: [0x07,0x74,0x05,0x03]
116 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
117 # CHECK-UNKNOWN: 07 74 05 03 <unknown>
119 vlse8.v v8, (a0), a1, v0.t
120 # CHECK-INST: vlse8.v v8, (a0), a1, v0.t
121 # CHECK-ENCODING: [0x07,0x04,0xb5,0x08]
122 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
123 # CHECK-UNKNOWN: 07 04 b5 08 <unknown>
125 vlse8.v v8, (a0), a1
126 # CHECK-INST: vlse8.v v8, (a0), a1
127 # CHECK-ENCODING: [0x07,0x04,0xb5,0x0a]
128 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
129 # CHECK-UNKNOWN: 07 04 b5 0a <unknown>
131 vlse16.v v8, (a0), a1, v0.t
132 # CHECK-INST: vlse16.v v8, (a0), a1, v0.t
133 # CHECK-ENCODING: [0x07,0x54,0xb5,0x08]
134 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
135 # CHECK-UNKNOWN: 07 54 b5 08 <unknown>
137 vlse16.v v8, (a0), a1
138 # CHECK-INST: vlse16.v v8, (a0), a1
139 # CHECK-ENCODING: [0x07,0x54,0xb5,0x0a]
140 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
141 # CHECK-UNKNOWN: 07 54 b5 0a <unknown>
143 vlse32.v v8, (a0), a1, v0.t
144 # CHECK-INST: vlse32.v v8, (a0), a1, v0.t
145 # CHECK-ENCODING: [0x07,0x64,0xb5,0x08]
146 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
147 # CHECK-UNKNOWN: 07 64 b5 08 <unknown>
149 vlse32.v v8, (a0), a1
150 # CHECK-INST: vlse32.v v8, (a0), a1
151 # CHECK-ENCODING: [0x07,0x64,0xb5,0x0a]
152 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
153 # CHECK-UNKNOWN: 07 64 b5 0a <unknown>
155 vlse64.v v8, (a0), a1, v0.t
156 # CHECK-INST: vlse64.v v8, (a0), a1, v0.t
157 # CHECK-ENCODING: [0x07,0x74,0xb5,0x08]
158 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
159 # CHECK-UNKNOWN: 07 74 b5 08 <unknown>
161 vlse64.v v8, (a0), a1
162 # CHECK-INST: vlse64.v v8, (a0), a1
163 # CHECK-ENCODING: [0x07,0x74,0xb5,0x0a]
164 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
165 # CHECK-UNKNOWN: 07 74 b5 0a <unknown>
167 vluxei8.v v8, (a0), v4, v0.t
168 # CHECK-INST: vluxei8.v v8, (a0), v4, v0.t
169 # CHECK-ENCODING: [0x07,0x04,0x45,0x04]
170 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
171 # CHECK-UNKNOWN: 07 04 45 04 <unknown>
173 vluxei8.v v8, (a0), v4
174 # CHECK-INST: vluxei8.v v8, (a0), v4
175 # CHECK-ENCODING: [0x07,0x04,0x45,0x06]
176 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
177 # CHECK-UNKNOWN: 07 04 45 06 <unknown>
179 vluxei16.v v8, (a0), v4, v0.t
180 # CHECK-INST: vluxei16.v v8, (a0), v4, v0.t
181 # CHECK-ENCODING: [0x07,0x54,0x45,0x04]
182 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
183 # CHECK-UNKNOWN: 07 54 45 04 <unknown>
185 vluxei16.v v8, (a0), v4
186 # CHECK-INST: vluxei16.v v8, (a0), v4
187 # CHECK-ENCODING: [0x07,0x54,0x45,0x06]
188 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
189 # CHECK-UNKNOWN: 07 54 45 06 <unknown>
191 vluxei32.v v8, (a0), v4, v0.t
192 # CHECK-INST: vluxei32.v v8, (a0), v4, v0.t
193 # CHECK-ENCODING: [0x07,0x64,0x45,0x04]
194 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
195 # CHECK-UNKNOWN: 07 64 45 04 <unknown>
197 vluxei32.v v8, (a0), v4
198 # CHECK-INST: vluxei32.v v8, (a0), v4
199 # CHECK-ENCODING: [0x07,0x64,0x45,0x06]
200 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
201 # CHECK-UNKNOWN: 07 64 45 06 <unknown>
203 vluxei64.v v8, (a0), v4, v0.t
204 # CHECK-INST: vluxei64.v v8, (a0), v4, v0.t
205 # CHECK-ENCODING: [0x07,0x74,0x45,0x04]
206 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
207 # CHECK-UNKNOWN: 07 74 45 04 <unknown>
209 vluxei64.v v8, (a0), v4
210 # CHECK-INST: vluxei64.v v8, (a0), v4
211 # CHECK-ENCODING: [0x07,0x74,0x45,0x06]
212 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
213 # CHECK-UNKNOWN: 07 74 45 06 <unknown>
215 vloxei8.v v8, (a0), v4, v0.t
216 # CHECK-INST: vloxei8.v v8, (a0), v4, v0.t
217 # CHECK-ENCODING: [0x07,0x04,0x45,0x0c]
218 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
219 # CHECK-UNKNOWN: 07 04 45 0c <unknown>
221 vloxei8.v v8, (a0), v4
222 # CHECK-INST: vloxei8.v v8, (a0), v4
223 # CHECK-ENCODING: [0x07,0x04,0x45,0x0e]
224 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
225 # CHECK-UNKNOWN: 07 04 45 0e <unknown>
227 vloxei16.v v8, (a0), v4, v0.t
228 # CHECK-INST: vloxei16.v v8, (a0), v4, v0.t
229 # CHECK-ENCODING: [0x07,0x54,0x45,0x0c]
230 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
231 # CHECK-UNKNOWN: 07 54 45 0c <unknown>
233 vloxei16.v v8, (a0), v4
234 # CHECK-INST: vloxei16.v v8, (a0), v4
235 # CHECK-ENCODING: [0x07,0x54,0x45,0x0e]
236 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
237 # CHECK-UNKNOWN: 07 54 45 0e <unknown>
239 vloxei32.v v8, (a0), v4, v0.t
240 # CHECK-INST: vloxei32.v v8, (a0), v4, v0.t
241 # CHECK-ENCODING: [0x07,0x64,0x45,0x0c]
242 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
243 # CHECK-UNKNOWN: 07 64 45 0c <unknown>
245 vloxei32.v v8, (a0), v4
246 # CHECK-INST: vloxei32.v v8, (a0), v4
247 # CHECK-ENCODING: [0x07,0x64,0x45,0x0e]
248 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
249 # CHECK-UNKNOWN: 07 64 45 0e <unknown>
251 vloxei64.v v8, (a0), v4, v0.t
252 # CHECK-INST: vloxei64.v v8, (a0), v4, v0.t
253 # CHECK-ENCODING: [0x07,0x74,0x45,0x0c]
254 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
255 # CHECK-UNKNOWN: 07 74 45 0c <unknown>
257 vloxei64.v v8, (a0), v4
258 # CHECK-INST: vloxei64.v v8, (a0), v4
259 # CHECK-ENCODING: [0x07,0x74,0x45,0x0e]
260 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
261 # CHECK-UNKNOWN: 07 74 45 0e <unknown>
263 vl1re8.v v8, (a0)
264 # CHECK-INST: vl1re8.v v8, (a0)
265 # CHECK-ENCODING: [0x07,0x04,0x85,0x02]
266 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
267 # CHECK-UNKNOWN: 07 04 85 02 <unknown>
269 vl1re16.v v8, (a0)
270 # CHECK-INST: vl1re16.v v8, (a0)
271 # CHECK-ENCODING: [0x07,0x54,0x85,0x02]
272 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
273 # CHECK-UNKNOWN: 07 54 85 02 <unknown>
275 vl1re32.v v8, (a0)
276 # CHECK-INST: vl1re32.v v8, (a0)
277 # CHECK-ENCODING: [0x07,0x64,0x85,0x02]
278 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
279 # CHECK-UNKNOWN: 07 64 85 02 <unknown>
281 vl1re64.v v8, (a0)
282 # CHECK-INST: vl1re64.v v8, (a0)
283 # CHECK-ENCODING: [0x07,0x74,0x85,0x02]
284 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
285 # CHECK-UNKNOWN: 07 74 85 02 <unknown>
287 vl2re8.v v8, (a0)
288 # CHECK-INST: vl2re8.v v8, (a0)
289 # CHECK-ENCODING: [0x07,0x04,0x85,0x22]
290 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
291 # CHECK-UNKNOWN: 07 04 85 22 <unknown>
293 vl2re16.v v8, (a0)
294 # CHECK-INST: vl2re16.v v8, (a0)
295 # CHECK-ENCODING: [0x07,0x54,0x85,0x22]
296 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
297 # CHECK-UNKNOWN: 07 54 85 22 <unknown>
299 vl2re32.v v8, (a0)
300 # CHECK-INST: vl2re32.v v8, (a0)
301 # CHECK-ENCODING: [0x07,0x64,0x85,0x22]
302 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
303 # CHECK-UNKNOWN: 07 64 85 22 <unknown>
305 vl2re64.v v8, (a0)
306 # CHECK-INST: vl2re64.v v8, (a0)
307 # CHECK-ENCODING: [0x07,0x74,0x85,0x22]
308 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
309 # CHECK-UNKNOWN: 07 74 85 22 <unknown>
311 vl4re8.v v8, (a0)
312 # CHECK-INST: vl4re8.v v8, (a0)
313 # CHECK-ENCODING: [0x07,0x04,0x85,0x62]
314 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
315 # CHECK-UNKNOWN: 07 04 85 62 <unknown>
317 vl4re16.v v8, (a0)
318 # CHECK-INST: vl4re16.v v8, (a0)
319 # CHECK-ENCODING: [0x07,0x54,0x85,0x62]
320 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
321 # CHECK-UNKNOWN: 07 54 85 62 <unknown>
323 vl4re32.v v8, (a0)
324 # CHECK-INST: vl4re32.v v8, (a0)
325 # CHECK-ENCODING: [0x07,0x64,0x85,0x62]
326 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
327 # CHECK-UNKNOWN: 07 64 85 62 <unknown>
329 vl4re64.v v8, (a0)
330 # CHECK-INST: vl4re64.v v8, (a0)
331 # CHECK-ENCODING: [0x07,0x74,0x85,0x62]
332 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
333 # CHECK-UNKNOWN: 07 74 85 62 <unknown>
335 vl8re8.v v8, (a0)
336 # CHECK-INST: vl8re8.v v8, (a0)
337 # CHECK-ENCODING: [0x07,0x04,0x85,0xe2]
338 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
339 # CHECK-UNKNOWN: 07 04 85 e2 <unknown>
341 vl8re16.v v8, (a0)
342 # CHECK-INST: vl8re16.v v8, (a0)
343 # CHECK-ENCODING: [0x07,0x54,0x85,0xe2]
344 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
345 # CHECK-UNKNOWN: 07 54 85 e2 <unknown>
347 vl8re32.v v8, (a0)
348 # CHECK-INST: vl8re32.v v8, (a0)
349 # CHECK-ENCODING: [0x07,0x64,0x85,0xe2]
350 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
351 # CHECK-UNKNOWN: 07 64 85 e2 <unknown>
353 vl8re64.v v8, (a0)
354 # CHECK-INST: vl8re64.v v8, (a0)
355 # CHECK-ENCODING: [0x07,0x74,0x85,0xe2]
356 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
357 # CHECK-UNKNOWN: 07 74 85 e2 <unknown>