1 # RUN: llvm-mc %s -triple=riscv64 -mattr=+experimental-b -riscv-no-aliases \
2 # RUN: | FileCheck -check-prefixes=CHECK-S-OBJ-NOALIAS %s
3 # RUN: llvm-mc %s -triple=riscv64 -mattr=+experimental-b \
4 # RUN: | FileCheck -check-prefixes=CHECK-S-OBJ %s
5 # RUN: llvm-mc -filetype=obj -triple riscv64 -mattr=+experimental-b < %s \
6 # RUN: | llvm-objdump -d -r -M no-aliases --mattr=+experimental-b - \
7 # RUN: | FileCheck -check-prefixes=CHECK-S-OBJ-NOALIAS %s
8 # RUN: llvm-mc -filetype=obj -triple riscv64 -mattr=+experimental-b < %s \
9 # RUN: | llvm-objdump -d -r --mattr=+experimental-b - \
10 # RUN: | FileCheck -check-prefixes=CHECK-S-OBJ %s
12 # The following check prefixes are used in this test:
13 # CHECK-S-OBJ Match both the .s and objdumped object output with
15 # CHECK-S-OBJ-NOALIAS Match both the .s and objdumped object output with
18 # CHECK-S-OBJ-NOALIAS: andi t0, t1, 255
19 # CHECK-S-OBJ: andi t0, t1, 255
22 # CHECK-S-OBJ-NOALIAS: zext.h t0, t1
23 # CHECK-S-OBJ: zext.h t0, t1
26 # CHECK-S-OBJ-NOALIAS: add.uw t0, t1, zero
27 # CHECK-S-OBJ: zext.w t0, t1
30 # CHECK-S-OBJ-NOALIAS: grevi t0, t1, 1
31 # CHECK-S-OBJ: rev.p t0, t1
34 # CHECK-S-OBJ-NOALIAS: grevi t0, t1, 2
35 # CHECK-S-OBJ: rev2.n t0, t1
38 # CHECK-S-OBJ-NOALIAS: grevi t0, t1, 3
39 # CHECK-S-OBJ: rev.n t0, t1
42 # CHECK-S-OBJ-NOALIAS: grevi t0, t1, 4
43 # CHECK-S-OBJ: rev4.b t0, t1
46 # CHECK-S-OBJ-NOALIAS: grevi t0, t1, 6
47 # CHECK-S-OBJ: rev2.b t0, t1
50 # CHECK-S-OBJ-NOALIAS: grevi t0, t1, 7
51 # CHECK-S-OBJ: rev.b t0, t1
54 # CHECK-S-OBJ-NOALIAS: grevi t0, t1, 8
55 # CHECK-S-OBJ: rev8.h t0, t1
58 # CHECK-S-OBJ-NOALIAS: grevi t0, t1, 12
59 # CHECK-S-OBJ: rev4.h t0, t1
62 # CHECK-S-OBJ-NOALIAS: grevi t0, t1, 14
63 # CHECK-S-OBJ: rev2.h t0, t1
66 # CHECK-S-OBJ-NOALIAS: grevi t0, t1, 15
67 # CHECK-S-OBJ: rev.h t0, t1
70 # CHECK-S-OBJ-NOALIAS: grevi t0, t1, 16
71 # CHECK-S-OBJ: rev16.w t0, t1
74 # CHECK-S-OBJ-NOALIAS: grevi t0, t1, 24
75 # CHECK-S-OBJ: rev8.w t0, t1
78 # CHECK-S-OBJ-NOALIAS: grevi t0, t1, 28
79 # CHECK-S-OBJ: rev4.w t0, t1
82 # CHECK-S-OBJ-NOALIAS: grevi t0, t1, 30
83 # CHECK-S-OBJ: rev2.w t0, t1
86 # CHECK-S-OBJ-NOALIAS: grevi t0, t1, 31
87 # CHECK-S-OBJ: rev.w t0, t1
90 # CHECK-S-OBJ-NOALIAS: grevi t0, t1, 32
91 # CHECK-S-OBJ: rev32 t0, t1
94 # CHECK-S-OBJ-NOALIAS: grevi t0, t1, 48
95 # CHECK-S-OBJ: rev16 t0, t1
98 # CHECK-S-OBJ-NOALIAS: rev8 t0, t1
99 # CHECK-S-OBJ: rev8 t0, t1
102 # CHECK-S-OBJ-NOALIAS: grevi t0, t1, 60
103 # CHECK-S-OBJ: rev4 t0, t1
106 # CHECK-S-OBJ-NOALIAS: grevi t0, t1, 62
107 # CHECK-S-OBJ: rev2 t0, t1
110 # CHECK-S-OBJ-NOALIAS: grevi t0, t1, 63
111 # CHECK-S-OBJ: rev t0, t1
114 # CHECK-S-OBJ-NOALIAS: shfli t0, t1, 1
115 # CHECK-S-OBJ: zip.n t0, t1
118 # CHECK-S-OBJ-NOALIAS: unshfli t0, t1, 1
119 # CHECK-S-OBJ: unzip.n t0, t1
122 # CHECK-S-OBJ-NOALIAS: shfli t0, t1, 2
123 # CHECK-S-OBJ: zip2.b t0, t1
126 # CHECK-S-OBJ-NOALIAS: unshfli t0, t1, 2
127 # CHECK-S-OBJ: unzip2.b t0, t1
130 # CHECK-S-OBJ-NOALIAS: shfli t0, t1, 3
131 # CHECK-S-OBJ: zip.b t0, t1
134 # CHECK-S-OBJ-NOALIAS: unshfli t0, t1, 3
135 # CHECK-S-OBJ: unzip.b t0, t1
138 # CHECK-S-OBJ-NOALIAS: shfli t0, t1, 4
139 # CHECK-S-OBJ: zip4.h t0, t1
142 # CHECK-S-OBJ-NOALIAS: unshfli t0, t1, 4
143 # CHECK-S-OBJ: unzip4.h t0, t1
146 # CHECK-S-OBJ-NOALIAS: shfli t0, t1, 6
147 # CHECK-S-OBJ: zip2.h t0, t1
150 # CHECK-S-OBJ-NOALIAS: unshfli t0, t1, 6
151 # CHECK-S-OBJ: unzip2.h t0, t1
154 # CHECK-S-OBJ-NOALIAS: shfli t0, t1, 7
155 # CHECK-S-OBJ: zip.h t0, t1
158 # CHECK-S-OBJ-NOALIAS: unshfli t0, t1, 7
159 # CHECK-S-OBJ: unzip.h t0, t1
162 # CHECK-S-OBJ-NOALIAS: shfli t0, t1, 8
163 # CHECK-S-OBJ: zip8.w t0, t1
166 # CHECK-S-OBJ-NOALIAS: unshfli t0, t1, 8
167 # CHECK-S-OBJ: unzip8.w t0, t1
170 # CHECK-S-OBJ-NOALIAS: shfli t0, t1, 12
171 # CHECK-S-OBJ: zip4.w t0, t1
174 # CHECK-S-OBJ-NOALIAS: unshfli t0, t1, 12
175 # CHECK-S-OBJ: unzip4.w t0, t1
178 # CHECK-S-OBJ-NOALIAS: shfli t0, t1, 14
179 # CHECK-S-OBJ: zip2.w t0, t1
182 # CHECK-S-OBJ-NOALIAS: unshfli t0, t1, 14
183 # CHECK-S-OBJ: unzip2.w t0, t1
186 # CHECK-S-OBJ-NOALIAS: shfli t0, t1, 15
187 # CHECK-S-OBJ: zip.w t0, t1
190 # CHECK-S-OBJ-NOALIAS: unshfli t0, t1, 15
191 # CHECK-S-OBJ: unzip.w t0, t1
194 # CHECK-S-OBJ-NOALIAS: shfli t0, t1, 16
195 # CHECK-S-OBJ: zip16 t0, t1
198 # CHECK-S-OBJ-NOALIAS: unshfli t0, t1, 16
199 # CHECK-S-OBJ: unzip16 t0, t1
202 # CHECK-S-OBJ-NOALIAS: shfli t0, t1, 24
203 # CHECK-S-OBJ: zip8 t0, t1
206 # CHECK-S-OBJ-NOALIAS: unshfli t0, t1, 24
207 # CHECK-S-OBJ: unzip8 t0, t1
210 # CHECK-S-OBJ-NOALIAS: shfli t0, t1, 28
211 # CHECK-S-OBJ: zip4 t0, t1
214 # CHECK-S-OBJ-NOALIAS: unshfli t0, t1, 28
215 # CHECK-S-OBJ: unzip4 t0, t1
218 # CHECK-S-OBJ-NOALIAS: shfli t0, t1, 30
219 # CHECK-S-OBJ: zip2 t0, t1
222 # CHECK-S-OBJ-NOALIAS: unshfli t0, t1, 30
223 # CHECK-S-OBJ: unzip2 t0, t1
226 # CHECK-S-OBJ-NOALIAS: shfli t0, t1, 31
227 # CHECK-S-OBJ: zip t0, t1
230 # CHECK-S-OBJ-NOALIAS: unshfli t0, t1, 31
231 # CHECK-S-OBJ: unzip t0, t1
234 # CHECK-S-OBJ-NOALIAS: gorci t0, t1, 1
235 # CHECK-S-OBJ: orc.p t0, t1
238 # CHECK-S-OBJ-NOALIAS: gorci t0, t1, 2
239 # CHECK-S-OBJ: orc2.n t0, t1
242 # CHECK-S-OBJ-NOALIAS: gorci t0, t1, 3
243 # CHECK-S-OBJ: orc.n t0, t1
246 # CHECK-S-OBJ-NOALIAS: gorci t0, t1, 4
247 # CHECK-S-OBJ: orc4.b t0, t1
250 # CHECK-S-OBJ-NOALIAS: gorci t0, t1, 6
251 # CHECK-S-OBJ: orc2.b t0, t1
254 # CHECK-S-OBJ-NOALIAS: orc.b t0, t1
255 # CHECK-S-OBJ: orc.b t0, t1
258 # CHECK-S-OBJ-NOALIAS: gorci t0, t1, 8
259 # CHECK-S-OBJ: orc8.h t0, t1
262 # CHECK-S-OBJ-NOALIAS: gorci t0, t1, 12
263 # CHECK-S-OBJ: orc4.h t0, t1
266 # CHECK-S-OBJ-NOALIAS: gorci t0, t1, 14
267 # CHECK-S-OBJ: orc2.h t0, t1
270 # CHECK-S-OBJ-NOALIAS: gorci t0, t1, 15
271 # CHECK-S-OBJ: orc.h t0, t1
274 # CHECK-S-OBJ-NOALIAS: gorci t0, t1, 16
275 # CHECK-S-OBJ: orc16.w t0, t1
278 # CHECK-S-OBJ-NOALIAS: gorci t0, t1, 24
279 # CHECK-S-OBJ: orc8.w t0, t1
282 # CHECK-S-OBJ-NOALIAS: gorci t0, t1, 28
283 # CHECK-S-OBJ: orc4.w t0, t1
286 # CHECK-S-OBJ-NOALIAS: gorci t0, t1, 30
287 # CHECK-S-OBJ: orc2.w t0, t1
290 # CHECK-S-OBJ-NOALIAS: gorci t0, t1, 31
291 # CHECK-S-OBJ: orc.w t0, t1
294 # CHECK-S-OBJ-NOALIAS: gorci t0, t1, 32
295 # CHECK-S-OBJ: orc32 t0, t1
298 # CHECK-S-OBJ-NOALIAS: gorci t0, t1, 48
299 # CHECK-S-OBJ: orc16 t0, t1
302 # CHECK-S-OBJ-NOALIAS: gorci t0, t1, 56
303 # CHECK-S-OBJ: orc8 t0, t1
306 # CHECK-S-OBJ-NOALIAS: gorci t0, t1, 60
307 # CHECK-S-OBJ: orc4 t0, t1
310 # CHECK-S-OBJ-NOALIAS: gorci t0, t1, 62
311 # CHECK-S-OBJ: orc2 t0, t1
314 # CHECK-S-OBJ-NOALIAS: gorci t0, t1, 63
315 # CHECK-S-OBJ: orc t0, t1
318 # CHECK-S-OBJ-NOALIAS: rori t0, t1, 8
319 # CHECK-S-OBJ: rori t0, t1, 8
322 # CHECK-S-OBJ-NOALIAS: roriw t0, t1, 8
323 # CHECK-S-OBJ: roriw t0, t1, 8
326 # CHECK-S-OBJ-NOALIAS: bseti t0, t1, 8
327 # CHECK-S-OBJ: bseti t0, t1, 8
330 # CHECK-S-OBJ-NOALIAS: bclri t0, t1, 8
331 # CHECK-S-OBJ: bclri t0, t1, 8
334 # CHECK-S-OBJ-NOALIAS: binvi t0, t1, 8
335 # CHECK-S-OBJ: binvi t0, t1, 8
338 # CHECK-S-OBJ-NOALIAS: bexti t0, t1, 8
339 # CHECK-S-OBJ: bexti t0, t1, 8
342 # CHECK-S-OBJ-NOALIAS: grevi t0, t1, 13
343 # CHECK-S-OBJ: grevi t0, t1, 13
346 # CHECK-S-OBJ-NOALIAS: gorci t0, t1, 13
347 # CHECK-S-OBJ: gorci t0, t1, 13
350 # CHECK-S-OBJ-NOALIAS: shfli t0, t1, 13
351 # CHECK-S-OBJ: shfli t0, t1, 13
354 # CHECK-S-OBJ-NOALIAS: unshfli t0, t1, 13
355 # CHECK-S-OBJ: unshfli t0, t1, 13
358 # CHECK-S-OBJ-NOALIAS: greviw t0, t1, 13
359 # CHECK-S-OBJ: greviw t0, t1, 13
362 # CHECK-S-OBJ-NOALIAS: gorciw t0, t1, 13
363 # CHECK-S-OBJ: gorciw t0, t1, 13
366 # CHECK-S-OBJ-NOALIAS: addi t1, zero, -2
367 # CHECK-S-OBJ-NOALIAS-NEXT: add.uw t1, t1, zero
368 # CHECK-S-OBJ: addi t1, zero, -2
369 # CHECK-S-OBJ-NEXT: zext.w t1, t1
372 # CHECK-S-OBJ-NOALIAS: lui t2, 699051
373 # CHECK-S-OBJ-NOALIAS-NEXT: addiw t2, t2, -1366
374 # CHECK-S-OBJ-NOALIAS-NEXT: add.uw t2, t2, zero
375 # CHECK-S-OBJ: lui t2, 699051
376 # CHECK-S-OBJ-NEXT: addiw t2, t2, -1366
377 # CHECK-S-OBJ-NEXT: zext.w t2, t2