[llvm-readobj] - Simplify stack-sizes.test test case.
[llvm-complete.git] / test / MC / AMDGPU / vop-err.s
blob13388263b20e98499738cdab4858e4fd3ef9529f
1 // RUN: not llvm-mc -arch=amdgcn -mcpu=bonaire -show-encoding %s 2>&1 | FileCheck %s
2 // RUN: not llvm-mc -arch=amdgcn -mcpu=tonga -show-encoding %s 2>&1 | FileCheck %s
4 // GENERIC LIMITATIONS ON VOP FORMATS: CONSTANT BUS RESTRICTIONS
6 //=====================================================
7 // v_movreld_b32: implicitly reads m0 (VOP1/VOP3)
9 v_movreld_b32 v0, s1
10 // CHECK: error: invalid operand (violates constant bus restrictions)
12 v_movreld_b32 v0, flat_scratch_lo
13 // CHECK: error: invalid operand (violates constant bus restrictions)
15 v_movreld_b32 v0, flat_scratch_hi
16 // CHECK: error: invalid operand (violates constant bus restrictions)
18 v_movreld_b32 v0, vcc_lo
19 // CHECK: error: invalid operand (violates constant bus restrictions)
21 v_movreld_b32 v0, vcc_hi
22 // CHECK: error: invalid operand (violates constant bus restrictions)
24 v_movreld_b32 v0, exec_lo
25 // CHECK: error: invalid operand (violates constant bus restrictions)
27 v_movreld_b32 v0, exec_hi
28 // CHECK: error: invalid operand (violates constant bus restrictions)
30 v_movreld_b32 v0, ttmp0
31 // CHECK: error: invalid operand (violates constant bus restrictions)
33 v_movreld_b32 v0, ttmp1
34 // CHECK: error: invalid operand (violates constant bus restrictions)
36 v_movreld_b32 v0, 123
37 // CHECK: error: invalid operand (violates constant bus restrictions)
39 v_movreld_b32_e64 v0, s1
40 // CHECK: error: invalid operand (violates constant bus restrictions)
42 v_movreld_b32_e64 v0, flat_scratch_lo
43 // CHECK: error: invalid operand (violates constant bus restrictions)
45 v_movreld_b32_e64 v0, flat_scratch_hi
46 // CHECK: error: invalid operand (violates constant bus restrictions)
48 //=====================================================
49 // v_div_fmas: implicitly read VCC (VOP3)
51 v_div_fmas_f32 v0, s1, s1, s1
52 // CHECK: error: invalid operand (violates constant bus restrictions)
54 v_div_fmas_f32 v0, v2, v3, -s1
55 // CHECK: error: invalid operand (violates constant bus restrictions)
57 v_div_fmas_f32 v0, v1, s2, |v3|
58 // CHECK: error: invalid operand (violates constant bus restrictions)
60 v_div_fmas_f32 v0, v1, -v2, -s3
61 // CHECK: error: invalid operand (violates constant bus restrictions)
63 v_div_fmas_f32 v0, v1, flat_scratch_lo, v3
64 // CHECK: error: invalid operand (violates constant bus restrictions)
66 v_div_fmas_f32 v0, v1, v2, flat_scratch_hi
67 // CHECK: error: invalid operand (violates constant bus restrictions)
69 v_div_fmas_f32 v0, v1, v2, m0
70 // CHECK: error: invalid operand (violates constant bus restrictions)
72 v_div_fmas_f32 v0, v1, ttmp2, v2
73 // CHECK: error: invalid operand (violates constant bus restrictions)
75 v_div_fmas_f64 v[0:1], s[2:3], v[4:5], v[6:7]
76 // CHECK: error: invalid operand (violates constant bus restrictions)
78 v_div_fmas_f64 v[0:1], v[2:3], s[4:5], v[6:7]
79 // CHECK: error: invalid operand (violates constant bus restrictions)
81 v_div_fmas_f64 v[0:1], v[2:3], v[4:5], s[6:7]
82 // CHECK: error: invalid operand (violates constant bus restrictions)
84 v_div_fmas_f64 v[0:1], v[2:3], v[4:5], ttmp[2:3]
85 // CHECK: error: invalid operand (violates constant bus restrictions)
87 v_div_fmas_f64 v[0:1], v[2:3], v[4:5], flat_scratch
88 // CHECK: error: invalid operand (violates constant bus restrictions)
90 v_div_fmas_f64 v[0:1], v[2:3], v[4:5], exec
91 // CHECK: error: invalid operand (violates constant bus restrictions)
93 //=====================================================
94 // v_cndmask_b32: implicitly reads VCC (VOP2)
96 v_cndmask_b32 v0, s1, v2, vcc
97 // CHECK: error: invalid operand (violates constant bus restrictions)
99 v_cndmask_b32 v0, flat_scratch_lo, v2, vcc
100 // CHECK: error: invalid operand (violates constant bus restrictions)
102 v_cndmask_b32 v0, flat_scratch_hi, v2, vcc
103 // CHECK: error: invalid operand (violates constant bus restrictions)
105 v_cndmask_b32 v0, exec_lo, v2, vcc
106 // CHECK: error: invalid operand (violates constant bus restrictions)
108 v_cndmask_b32 v0, exec_hi, v2, vcc
109 // CHECK: error: invalid operand (violates constant bus restrictions)
111 //=====================================================
112 // v_cndmask_b32_e64: VOP3, no implicit reads
114 v_cndmask_b32_e64 v0, s1, v2, vcc
115 // CHECK: error: invalid operand (violates constant bus restrictions)
117 v_cndmask_b32_e64 v0, flat_scratch_lo, v2, vcc
118 // CHECK: error: invalid operand (violates constant bus restrictions)
120 v_cndmask_b32_e64 v0, flat_scratch_hi, v2, vcc
121 // CHECK: error: invalid operand (violates constant bus restrictions)
123 v_cndmask_b32_e64 v0, s1, v2, flat_scratch
124 // CHECK: error: invalid operand (violates constant bus restrictions)
126 v_cndmask_b32_e64 v0, s0, v2, s[0:1]
127 // CHECK: error: invalid operand (violates constant bus restrictions)
129 v_cndmask_b32_e64 v0, v2, s0, s[0:1]
130 // CHECK: error: invalid operand (violates constant bus restrictions)
132 v_cndmask_b32_e64 v0, s0, s0, s[0:1]
133 // CHECK: error: invalid operand (violates constant bus restrictions)
135 v_cndmask_b32_e64 v0, s1, v2, s[0:1]
136 // CHECK: error: invalid operand (violates constant bus restrictions)
138 v_cndmask_b32_e64 v0, v2, s1, s[0:1]
139 // CHECK: error: invalid operand (violates constant bus restrictions)
141 v_cndmask_b32_e64 v0, s1, s1, s[0:1]
142 // CHECK: error: invalid operand (violates constant bus restrictions)
144 v_cndmask_b32_e64 v0, s1, v2, s[2:3]
145 // CHECK: error: invalid operand (violates constant bus restrictions)
147 v_cndmask_b32_e64 v0, v2, s1, s[2:3]
148 // CHECK: error: invalid operand (violates constant bus restrictions)
150 v_cndmask_b32_e64 v0, s1, s1, s[2:3]
151 // CHECK: error: invalid operand (violates constant bus restrictions)
153 //=====================================================
154 // v_addc_u32: implicitly reads VCC (VOP2 only!)
156 v_addc_u32 v0, vcc, s0, v0, vcc
157 // CHECK: error: invalid operand (violates constant bus restrictions)
159 v_addc_u32 v0, vcc, flat_scratch_lo, v0, vcc
160 // CHECK: error: invalid operand (violates constant bus restrictions)
162 v_addc_u32 v0, vcc, flat_scratch_hi, v0, vcc
163 // CHECK: error: invalid operand (violates constant bus restrictions)
165 v_addc_u32 v0, vcc, exec_lo, v0, vcc
166 // CHECK: error: invalid operand (violates constant bus restrictions)
168 v_addc_u32 v0, vcc, exec_hi, v0, vcc
169 // CHECK: error: invalid operand (violates constant bus restrictions)
171 //=====================================================
172 // v_addc_u32_e64: no implicit read in VOP3
174 v_addc_u32_e64 v0, s[0:1], s2, v2, vcc
175 // CHECK: error: invalid operand (violates constant bus restrictions)
177 v_addc_u32_e64 v0, s[0:1], v2, s2, vcc
178 // CHECK: error: invalid operand (violates constant bus restrictions)
180 v_addc_u32_e64 v0, s[0:1], s2, s2, vcc
181 // CHECK: error: invalid operand (violates constant bus restrictions)
183 v_addc_u32_e64 v0, s[0:1], s0, v2, s[0:1]
184 // CHECK: error: invalid operand (violates constant bus restrictions)
186 v_addc_u32_e64 v0, s[0:1], v2, s0, s[0:1]
187 // CHECK: error: invalid operand (violates constant bus restrictions)
189 v_addc_u32_e64 v0, s[0:1], s0, s0, s[0:1]
190 // CHECK: error: invalid operand (violates constant bus restrictions)
192 v_addc_u32_e64 v0, s[0:1], s2, v2, s[0:1]
193 // CHECK: error: invalid operand (violates constant bus restrictions)
195 v_addc_u32_e64 v0, s[0:1], v2, s2, s[0:1]
196 // CHECK: error: invalid operand (violates constant bus restrictions)
198 v_addc_u32_e64 v0, s[0:1], s2, s2, s[0:1]
199 // CHECK: error: invalid operand (violates constant bus restrictions)
201 //=====================================================
202 // VOP1 w/o implicit reads have no negative test cases on constant bus use
203 // VOPC has no negative test cases on constant bus use
205 //=====================================================
206 // madak/madmk: a special case for VOP2 w/o implicit reads
208 v_madak_f32 v0, s0, v0, 0x11213141
209 // CHECK: error: invalid operand (violates constant bus restrictions)
211 v_madak_f32 v0, flat_scratch_lo, v0, 0x11213141
212 // CHECK: error: invalid operand (violates constant bus restrictions)
214 v_madak_f32 v0, flat_scratch_hi, v0, 0x11213141
215 // CHECK: error: invalid operand (violates constant bus restrictions)
217 v_madak_f32 v0, exec_lo, v0, 0x11213141
218 // CHECK: error: invalid operand (violates constant bus restrictions)
220 v_madak_f32 v0, exec_hi, v0, 0x11213141
221 // CHECK: error: invalid operand (violates constant bus restrictions)
223 v_madak_f32 v0, vcc_lo, v0, 0x11213141
224 // CHECK: error: invalid operand (violates constant bus restrictions)
226 v_madak_f32 v0, vcc_hi, v0, 0x11213141
227 // CHECK: error: invalid operand (violates constant bus restrictions)
229 //=====================================================
230 // VOP3 w/o implicit reads
232 v_mad_f32 v0, s0, s1, s0
233 // CHECK: error: invalid operand (violates constant bus restrictions)
235 v_mad_f32 v0, s1, s0, s0
236 // CHECK: error: invalid operand (violates constant bus restrictions)
238 v_mad_f32 v0, s0, s0, s1
239 // CHECK: error: invalid operand (violates constant bus restrictions)
241 v_mad_f32 v0, s0, s0, flat_scratch_lo
242 // CHECK: error: invalid operand (violates constant bus restrictions)
244 //=====================================================
245 // VOP2_e64:
247 v_add_f32_e64 v0, s0, s1
248 // CHECK: error: invalid operand (violates constant bus restrictions)
250 v_add_f32_e64 v0, s0, flat_scratch_lo
251 // CHECK: error: invalid operand (violates constant bus restrictions)
253 v_add_f32_e64 v0, flat_scratch_hi, s1
254 // CHECK: error: invalid operand (violates constant bus restrictions)
256 v_add_f32_e64 v0, flat_scratch_hi, m0
257 // CHECK: error: invalid operand (violates constant bus restrictions)
259 v_add_f64 v[0:1], s[0:1], s[2:3]
260 // CHECK: error: invalid operand (violates constant bus restrictions)
262 v_add_f64 v[0:1], s[0:1], flat_scratch
263 // CHECK: error: invalid operand (violates constant bus restrictions)
265 v_add_f64 v[0:1], vcc, s[2:3]
266 // CHECK: error: invalid operand (violates constant bus restrictions)
268 //=====================================================
269 // VOPC_e64:
271 v_cmp_eq_f32_e64 s[0:1], s0, s1
272 // CHECK: error: invalid operand (violates constant bus restrictions)
274 v_cmp_eq_f32_e64 s[0:1], s0, flat_scratch_lo
275 // CHECK: error: invalid operand (violates constant bus restrictions)
277 v_cmp_eq_f32_e64 s[0:1], flat_scratch_hi, s1
278 // CHECK: error: invalid operand (violates constant bus restrictions)
280 v_cmp_eq_f32_e64 s[0:1], s0, m0
281 // CHECK: error: invalid operand (violates constant bus restrictions)
283 v_cmp_eq_f64_e64 s[0:1], s[0:1], s[2:3]
284 // CHECK: error: invalid operand (violates constant bus restrictions)
286 v_cmp_eq_f64_e64 s[0:1], s[0:1], flat_scratch
287 // CHECK: error: invalid operand (violates constant bus restrictions)
289 v_cmp_eq_f64_e64 s[0:1], vcc, s[2:3]
290 // CHECK: error: invalid operand (violates constant bus restrictions)