[DAGCombiner] Add target hook function to decide folding (mul (add x, c1), c2)
[llvm-project.git] / llvm / test / MC / RISCV / rvv / store.s
blobe22f6b4efe83812e24899ed8c2039540a380bdfe
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 vse1.v v24, (a0)
12 # CHECK-INST: vse1.v v24, (a0)
13 # CHECK-ENCODING: [0x27,0x0c,0xb5,0x02]
14 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
15 # CHECK-UNKNOWN: 27 0c b5 02 <unknown>
17 vse8.v v24, (a0), v0.t
18 # CHECK-INST: vse8.v v24, (a0), v0.t
19 # CHECK-ENCODING: [0x27,0x0c,0x05,0x00]
20 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
21 # CHECK-UNKNOWN: 27 0c 05 00 <unknown>
23 vse8.v v24, (a0)
24 # CHECK-INST: vse8.v v24, (a0)
25 # CHECK-ENCODING: [0x27,0x0c,0x05,0x02]
26 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
27 # CHECK-UNKNOWN: 27 0c 05 02 <unknown>
29 vse16.v v24, (a0), v0.t
30 # CHECK-INST: vse16.v v24, (a0), v0.t
31 # CHECK-ENCODING: [0x27,0x5c,0x05,0x00]
32 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
33 # CHECK-UNKNOWN: 27 5c 05 00 <unknown>
35 vse16.v v24, (a0)
36 # CHECK-INST: vse16.v v24, (a0)
37 # CHECK-ENCODING: [0x27,0x5c,0x05,0x02]
38 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
39 # CHECK-UNKNOWN: 27 5c 05 02 <unknown>
41 vse32.v v24, (a0), v0.t
42 # CHECK-INST: vse32.v v24, (a0), v0.t
43 # CHECK-ENCODING: [0x27,0x6c,0x05,0x00]
44 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
45 # CHECK-UNKNOWN: 27 6c 05 00 <unknown>
47 vse32.v v24, (a0)
48 # CHECK-INST: vse32.v v24, (a0)
49 # CHECK-ENCODING: [0x27,0x6c,0x05,0x02]
50 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
51 # CHECK-UNKNOWN: 27 6c 05 02 <unknown>
53 vse64.v v24, (a0), v0.t
54 # CHECK-INST: vse64.v v24, (a0), v0.t
55 # CHECK-ENCODING: [0x27,0x7c,0x05,0x00]
56 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
57 # CHECK-UNKNOWN: 27 7c 05 00 <unknown>
59 vse64.v v24, (a0)
60 # CHECK-INST: vse64.v v24, (a0)
61 # CHECK-ENCODING: [0x27,0x7c,0x05,0x02]
62 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
63 # CHECK-UNKNOWN: 27 7c 05 02 <unknown>
65 vsse8.v v24, (a0), a1, v0.t
66 # CHECK-INST: vsse8.v v24, (a0), a1, v0.t
67 # CHECK-ENCODING: [0x27,0x0c,0xb5,0x08]
68 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
69 # CHECK-UNKNOWN: 27 0c b5 08 <unknown>
71 vsse8.v v24, (a0), a1
72 # CHECK-INST: vsse8.v v24, (a0), a1
73 # CHECK-ENCODING: [0x27,0x0c,0xb5,0x0a]
74 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
75 # CHECK-UNKNOWN: 27 0c b5 0a <unknown>
77 vsse16.v v24, (a0), a1, v0.t
78 # CHECK-INST: vsse16.v v24, (a0), a1, v0.t
79 # CHECK-ENCODING: [0x27,0x5c,0xb5,0x08]
80 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
81 # CHECK-UNKNOWN: 27 5c b5 08 <unknown>
83 vsse16.v v24, (a0), a1
84 # CHECK-INST: vsse16.v v24, (a0), a1
85 # CHECK-ENCODING: [0x27,0x5c,0xb5,0x0a]
86 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
87 # CHECK-UNKNOWN: 27 5c b5 0a <unknown>
89 vsse32.v v24, (a0), a1, v0.t
90 # CHECK-INST: vsse32.v v24, (a0), a1, v0.t
91 # CHECK-ENCODING: [0x27,0x6c,0xb5,0x08]
92 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
93 # CHECK-UNKNOWN: 27 6c b5 08 <unknown>
95 vsse32.v v24, (a0), a1
96 # CHECK-INST: vsse32.v v24, (a0), a1
97 # CHECK-ENCODING: [0x27,0x6c,0xb5,0x0a]
98 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
99 # CHECK-UNKNOWN: 27 6c b5 0a <unknown>
101 vsse64.v v24, (a0), a1, v0.t
102 # CHECK-INST: vsse64.v v24, (a0), a1, v0.t
103 # CHECK-ENCODING: [0x27,0x7c,0xb5,0x08]
104 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
105 # CHECK-UNKNOWN: 27 7c b5 08 <unknown>
107 vsse64.v v24, (a0), a1
108 # CHECK-INST: vsse64.v v24, (a0), a1
109 # CHECK-ENCODING: [0x27,0x7c,0xb5,0x0a]
110 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
111 # CHECK-UNKNOWN: 27 7c b5 0a <unknown>
113 vsuxei8.v v24, (a0), v4, v0.t
114 # CHECK-INST: vsuxei8.v v24, (a0), v4, v0.t
115 # CHECK-ENCODING: [0x27,0x0c,0x45,0x04]
116 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
117 # CHECK-UNKNOWN: 27 0c 45 04 <unknown>
119 vsuxei8.v v24, (a0), v4
120 # CHECK-INST: vsuxei8.v v24, (a0), v4
121 # CHECK-ENCODING: [0x27,0x0c,0x45,0x06]
122 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
123 # CHECK-UNKNOWN: 27 0c 45 06 <unknown>
125 vsuxei16.v v24, (a0), v4, v0.t
126 # CHECK-INST: vsuxei16.v v24, (a0), v4, v0.t
127 # CHECK-ENCODING: [0x27,0x5c,0x45,0x04]
128 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
129 # CHECK-UNKNOWN: 27 5c 45 04 <unknown>
131 vsuxei16.v v24, (a0), v4
132 # CHECK-INST: vsuxei16.v v24, (a0), v4
133 # CHECK-ENCODING: [0x27,0x5c,0x45,0x06]
134 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
135 # CHECK-UNKNOWN: 27 5c 45 06 <unknown>
137 vsuxei32.v v24, (a0), v4, v0.t
138 # CHECK-INST: vsuxei32.v v24, (a0), v4, v0.t
139 # CHECK-ENCODING: [0x27,0x6c,0x45,0x04]
140 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
141 # CHECK-UNKNOWN: 27 6c 45 04 <unknown>
143 vsuxei32.v v24, (a0), v4
144 # CHECK-INST: vsuxei32.v v24, (a0), v4
145 # CHECK-ENCODING: [0x27,0x6c,0x45,0x06]
146 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
147 # CHECK-UNKNOWN: 27 6c 45 06 <unknown>
149 vsuxei64.v v24, (a0), v4, v0.t
150 # CHECK-INST: vsuxei64.v v24, (a0), v4, v0.t
151 # CHECK-ENCODING: [0x27,0x7c,0x45,0x04]
152 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
153 # CHECK-UNKNOWN: 27 7c 45 04 <unknown>
155 vsuxei64.v v24, (a0), v4
156 # CHECK-INST: vsuxei64.v v24, (a0), v4
157 # CHECK-ENCODING: [0x27,0x7c,0x45,0x06]
158 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
159 # CHECK-UNKNOWN: 27 7c 45 06 <unknown>
161 vsoxei8.v v24, (a0), v4, v0.t
162 # CHECK-INST: vsoxei8.v v24, (a0), v4, v0.t
163 # CHECK-ENCODING: [0x27,0x0c,0x45,0x0c]
164 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
165 # CHECK-UNKNOWN: 27 0c 45 0c <unknown>
167 vsoxei8.v v24, (a0), v4
168 # CHECK-INST: vsoxei8.v v24, (a0), v4
169 # CHECK-ENCODING: [0x27,0x0c,0x45,0x0e]
170 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
171 # CHECK-UNKNOWN: 27 0c 45 0e <unknown>
173 vsoxei16.v v24, (a0), v4, v0.t
174 # CHECK-INST: vsoxei16.v v24, (a0), v4, v0.t
175 # CHECK-ENCODING: [0x27,0x5c,0x45,0x0c]
176 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
177 # CHECK-UNKNOWN: 27 5c 45 0c <unknown>
179 vsoxei16.v v24, (a0), v4
180 # CHECK-INST: vsoxei16.v v24, (a0), v4
181 # CHECK-ENCODING: [0x27,0x5c,0x45,0x0e]
182 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
183 # CHECK-UNKNOWN: 27 5c 45 0e <unknown>
185 vsoxei32.v v24, (a0), v4, v0.t
186 # CHECK-INST: vsoxei32.v v24, (a0), v4, v0.t
187 # CHECK-ENCODING: [0x27,0x6c,0x45,0x0c]
188 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
189 # CHECK-UNKNOWN: 27 6c 45 0c <unknown>
191 vsoxei32.v v24, (a0), v4
192 # CHECK-INST: vsoxei32.v v24, (a0), v4
193 # CHECK-ENCODING: [0x27,0x6c,0x45,0x0e]
194 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
195 # CHECK-UNKNOWN: 27 6c 45 0e <unknown>
197 vsoxei64.v v24, (a0), v4, v0.t
198 # CHECK-INST: vsoxei64.v v24, (a0), v4, v0.t
199 # CHECK-ENCODING: [0x27,0x7c,0x45,0x0c]
200 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
201 # CHECK-UNKNOWN: 27 7c 45 0c <unknown>
203 vsoxei64.v v24, (a0), v4
204 # CHECK-INST: vsoxei64.v v24, (a0), v4
205 # CHECK-ENCODING: [0x27,0x7c,0x45,0x0e]
206 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
207 # CHECK-UNKNOWN: 27 7c 45 0e <unknown>
209 vs1r.v v24, (a0)
210 # CHECK-INST: vs1r.v v24, (a0)
211 # CHECK-ENCODING: [0x27,0x0c,0x85,0x02]
212 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
213 # CHECK-UNKNOWN: 27 0c 85 02 <unknown>
215 vs2r.v v24, (a0)
216 # CHECK-INST: vs2r.v v24, (a0)
217 # CHECK-ENCODING: [0x27,0x0c,0x85,0x22]
218 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
219 # CHECK-UNKNOWN: 27 0c 85 22 <unknown>
221 vs4r.v v24, (a0)
222 # CHECK-INST: vs4r.v v24, (a0)
223 # CHECK-ENCODING: [0x27,0x0c,0x85,0x62]
224 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
225 # CHECK-UNKNOWN: 27 0c 85 62 <unknown>
227 vs8r.v v24, (a0)
228 # CHECK-INST: vs8r.v v24, (a0)
229 # CHECK-ENCODING: [0x27,0x0c,0x85,0xe2]
230 # CHECK-ERROR: instruction requires the following: 'V' (Vector Instructions)
231 # CHECK-UNKNOWN: 27 0c 85 e2 <unknown>