1# RUN: llvm-mc -triple=riscv64 -show-encoding --mattr=+experimental-v %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=+experimental-v %s \
6# RUN:        | llvm-objdump -d --mattr=+experimental-v - \
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
10
11vmerge.vvm v8, v4, v20, v0
12# CHECK-INST: vmerge.vvm v8, v4, v20, v0
13# CHECK-ENCODING: [0x57,0x04,0x4a,0x5c]
14# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
15# CHECK-UNKNOWN: 57 04 4a 5c <unknown>
16
17vmerge.vxm v8, v4, a0, v0
18# CHECK-INST: vmerge.vxm v8, v4, a0, v0
19# CHECK-ENCODING: [0x57,0x44,0x45,0x5c]
20# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
21# CHECK-UNKNOWN: 57 44 45 5c <unknown>
22
23vmerge.vim v8, v4, 15, v0
24# CHECK-INST: vmerge.vim v8, v4, 15, v0
25# CHECK-ENCODING: [0x57,0xb4,0x47,0x5c]
26# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
27# CHECK-UNKNOWN: 57 b4 47 5c <unknown>
28
29vslideup.vx v8, v4, a0, v0.t
30# CHECK-INST: vslideup.vx v8, v4, a0, v0.t
31# CHECK-ENCODING: [0x57,0x44,0x45,0x38]
32# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
33# CHECK-UNKNOWN: 57 44 45 38 <unknown>
34
35vslideup.vx v8, v4, a0
36# CHECK-INST: vslideup.vx v8, v4, a0
37# CHECK-ENCODING: [0x57,0x44,0x45,0x3a]
38# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
39# CHECK-UNKNOWN: 57 44 45 3a <unknown>
40
41vslideup.vi v8, v4, 31, v0.t
42# CHECK-INST: vslideup.vi v8, v4, 31, v0.t
43# CHECK-ENCODING: [0x57,0xb4,0x4f,0x38]
44# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
45# CHECK-UNKNOWN: 57 b4 4f 38 <unknown>
46
47vslideup.vi v8, v4, 31
48# CHECK-INST: vslideup.vi v8, v4, 31
49# CHECK-ENCODING: [0x57,0xb4,0x4f,0x3a]
50# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
51# CHECK-UNKNOWN: 57 b4 4f 3a <unknown>
52
53vslidedown.vx v8, v4, a0, v0.t
54# CHECK-INST: vslidedown.vx v8, v4, a0, v0.t
55# CHECK-ENCODING: [0x57,0x44,0x45,0x3c]
56# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
57# CHECK-UNKNOWN: 57 44 45 3c <unknown>
58
59vslidedown.vx v8, v4, a0
60# CHECK-INST: vslidedown.vx v8, v4, a0
61# CHECK-ENCODING: [0x57,0x44,0x45,0x3e]
62# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
63# CHECK-UNKNOWN: 57 44 45 3e <unknown>
64
65vslidedown.vi v8, v4, 31, v0.t
66# CHECK-INST: vslidedown.vi v8, v4, 31, v0.t
67# CHECK-ENCODING: [0x57,0xb4,0x4f,0x3c]
68# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
69# CHECK-UNKNOWN: 57 b4 4f 3c <unknown>
70
71vslidedown.vi v8, v4, 31
72# CHECK-INST: vslidedown.vi v8, v4, 31
73# CHECK-ENCODING: [0x57,0xb4,0x4f,0x3e]
74# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
75# CHECK-UNKNOWN: 57 b4 4f 3e <unknown>
76
77vslide1up.vx v8, v4, a0, v0.t
78# CHECK-INST: vslide1up.vx v8, v4, a0, v0.t
79# CHECK-ENCODING: [0x57,0x64,0x45,0x38]
80# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
81# CHECK-UNKNOWN: 57 64 45 38 <unknown>
82
83vslide1up.vx v8, v4, a0
84# CHECK-INST: vslide1up.vx v8, v4, a0
85# CHECK-ENCODING: [0x57,0x64,0x45,0x3a]
86# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
87# CHECK-UNKNOWN: 57 64 45 3a <unknown>
88
89vslide1down.vx v8, v4, a0, v0.t
90# CHECK-INST: vslide1down.vx v8, v4, a0, v0.t
91# CHECK-ENCODING: [0x57,0x64,0x45,0x3c]
92# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
93# CHECK-UNKNOWN: 57 64 45 3c <unknown>
94
95vslide1down.vx v8, v4, a0
96# CHECK-INST: vslide1down.vx v8, v4, a0
97# CHECK-ENCODING: [0x57,0x64,0x45,0x3e]
98# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
99# CHECK-UNKNOWN: 57 64 45 3e <unknown>
100
101vrgather.vv v8, v4, v20, v0.t
102# CHECK-INST: vrgather.vv v8, v4, v20, v0.t
103# CHECK-ENCODING: [0x57,0x04,0x4a,0x30]
104# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
105# CHECK-UNKNOWN: 57 04 4a 30 <unknown>
106
107vrgather.vv v8, v4, v20
108# CHECK-INST: vrgather.vv v8, v4, v20
109# CHECK-ENCODING: [0x57,0x04,0x4a,0x32]
110# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
111# CHECK-UNKNOWN: 57 04 4a 32 <unknown>
112
113vrgather.vx v8, v4, a0, v0.t
114# CHECK-INST: vrgather.vx v8, v4, a0, v0.t
115# CHECK-ENCODING: [0x57,0x44,0x45,0x30]
116# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
117# CHECK-UNKNOWN: 57 44 45 30 <unknown>
118
119vrgather.vx v8, v4, a0
120# CHECK-INST: vrgather.vx v8, v4, a0
121# CHECK-ENCODING: [0x57,0x44,0x45,0x32]
122# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
123# CHECK-UNKNOWN: 57 44 45 32 <unknown>
124
125vrgather.vi v8, v4, 31, v0.t
126# CHECK-INST: vrgather.vi v8, v4, 31, v0.t
127# CHECK-ENCODING: [0x57,0xb4,0x4f,0x30]
128# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
129# CHECK-UNKNOWN: 57 b4 4f 30 <unknown>
130
131vrgather.vi v8, v4, 31
132# CHECK-INST: vrgather.vi v8, v4, 31
133# CHECK-ENCODING: [0x57,0xb4,0x4f,0x32]
134# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
135# CHECK-UNKNOWN: 57 b4 4f 32 <unknown>
136
137vcompress.vm v8, v4, v20
138# CHECK-INST: vcompress.vm v8, v4, v20
139# CHECK-ENCODING: [0x57,0x24,0x4a,0x5e]
140# CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
141# CHECK-UNKNOWN: 57 24 4a 5e <unknown>
142