xref: /llvm-project/llvm/test/MC/RISCV/rvv/xsfvqmacc.s (revision b27f86b40b20942c0e809128214b43d6edde365a)
1# RUN: llvm-mc -triple=riscv64 -show-encoding --mattr=+v,+xsfvqmaccqoq,+xsfvqmaccdod %s \
2# RUN:        | 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=+v,+xsfvqmaccqoq,+xsfvqmaccdod %s \
6# RUN:        | llvm-objdump -d --mattr=+v,+xsfvqmaccqoq,+xsfvqmaccdod - \
7# RUN:        | FileCheck %s --check-prefix=CHECK-INST
8# RUN: llvm-mc -triple=riscv64 -filetype=obj --mattr=+v,+xsfvqmaccqoq,+xsfvqmaccdod %s \
9# RUN:        | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
10
11sf.vqmaccu.2x8x2 v8, v4, v20
12# CHECK-INST: sf.vqmaccu.2x8x2 v8, v4, v20
13# CHECK-ENCODING: [0x5b,0x24,0x42,0xb3]
14# CHECK-ERROR: instruction requires the following: 'XSfvqmaccdod' (SiFive Int8 Matrix Multiplication Instructions (2-by-8 and 8-by-2))
15# CHECK-UNKNOWN: b342245b <unknown>
16
17sf.vqmacc.2x8x2 v8, v4, v20
18# CHECK-INST: sf.vqmacc.2x8x2 v8, v4, v20
19# CHECK-ENCODING: [0x5b,0x24,0x42,0xb7]
20# CHECK-ERROR: instruction requires the following: 'XSfvqmaccdod' (SiFive Int8 Matrix Multiplication Instructions (2-by-8 and 8-by-2))
21# CHECK-UNKNOWN: b742245b <unknown>
22
23sf.vqmaccus.2x8x2 v8, v4, v20
24# CHECK-INST: sf.vqmaccus.2x8x2 v8, v4, v20
25# CHECK-ENCODING: [0x5b,0x24,0x42,0xbb]
26# CHECK-ERROR: instruction requires the following: 'XSfvqmaccdod' (SiFive Int8 Matrix Multiplication Instructions (2-by-8 and 8-by-2))
27# CHECK-UNKNOWN: bb42245b <unknown>
28
29sf.vqmaccsu.2x8x2 v8, v4, v20
30# CHECK-INST: sf.vqmaccsu.2x8x2 v8, v4, v20
31# CHECK-ENCODING: [0x5b,0x24,0x42,0xbf]
32# CHECK-ERROR: instruction requires the following: 'XSfvqmaccdod' (SiFive Int8 Matrix Multiplication Instructions (2-by-8 and 8-by-2))
33# CHECK-UNKNOWN: bf42245b <unknown>
34
35sf.vqmaccu.4x8x4 v8, v4, v20
36# CHECK-INST: sf.vqmaccu.4x8x4 v8, v4, v20
37# CHECK-ENCODING: [0x5b,0x24,0x42,0xf3]
38# CHECK-ERROR: instruction requires the following: 'XSfvqmaccqoq' (SiFive Int8 Matrix Multiplication Instructions (4-by-8 and 8-by-4))
39# CHECK-UNKNOWN: f342245b <unknown>
40
41sf.vqmacc.4x8x4 v8, v4, v20
42# CHECK-INST: sf.vqmacc.4x8x4 v8, v4, v20
43# CHECK-ENCODING: [0x5b,0x24,0x42,0xf7]
44# CHECK-ERROR: instruction requires the following: 'XSfvqmaccqoq' (SiFive Int8 Matrix Multiplication Instructions (4-by-8 and 8-by-4))
45# CHECK-UNKNOWN: f742245b <unknown>
46
47sf.vqmaccus.4x8x4 v8, v4, v20
48# CHECK-INST: sf.vqmaccus.4x8x4 v8, v4, v20
49# CHECK-ENCODING: [0x5b,0x24,0x42,0xfb]
50# CHECK-ERROR: instruction requires the following: 'XSfvqmaccqoq' (SiFive Int8 Matrix Multiplication Instructions (4-by-8 and 8-by-4))
51# CHECK-UNKNOWN: fb42245b <unknown>
52
53sf.vqmaccsu.4x8x4 v8, v4, v20
54# CHECK-INST: sf.vqmaccsu.4x8x4 v8, v4, v20
55# CHECK-ENCODING: [0x5b,0x24,0x42,0xff]
56# CHECK-ERROR: instruction requires the following: 'XSfvqmaccqoq' (SiFive Int8 Matrix Multiplication Instructions (4-by-8 and 8-by-4))
57# CHECK-UNKNOWN: ff42245b <unknown>
58