brintos

brintos / llvm-project-archived public Read only

0
0
Text · 12.3 KiB · 4af69a5 Raw
291 lines · plain
1// RUN: not llvm-mc -triple=amdgcn -mcpu=bonaire %s 2>&1 | FileCheck --implicit-check-not=error: %s2// RUN: not llvm-mc -triple=amdgcn -mcpu=tonga   %s 2>&1 | FileCheck --implicit-check-not=error: %s3 4// GENERIC LIMITATIONS ON VOP FORMATS: CONSTANT BUS RESTRICTIONS5 6//=====================================================7// v_movreld_b32: implicitly reads m0 (VOP1/VOP3)8 9v_movreld_b32 v0, s110// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand (violates constant bus restrictions)11 12v_movreld_b32 v0, flat_scratch_lo13// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand (violates constant bus restrictions)14 15v_movreld_b32 v0, flat_scratch_hi16// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand (violates constant bus restrictions)17 18v_movreld_b32 v0, vcc_lo19// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand (violates constant bus restrictions)20 21v_movreld_b32 v0, vcc_hi22// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand (violates constant bus restrictions)23 24v_movreld_b32 v0, exec_lo25// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand (violates constant bus restrictions)26 27v_movreld_b32 v0, exec_hi28// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand (violates constant bus restrictions)29 30v_movreld_b32 v0, ttmp031// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand (violates constant bus restrictions)32 33v_movreld_b32 v0, ttmp134// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand (violates constant bus restrictions)35 36v_movreld_b32 v0, 12337// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand (violates constant bus restrictions)38 39v_movreld_b32_e64 v0, s140// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand (violates constant bus restrictions)41 42v_movreld_b32_e64 v0, flat_scratch_lo43// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand (violates constant bus restrictions)44 45v_movreld_b32_e64 v0, flat_scratch_hi46// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand (violates constant bus restrictions)47 48//=====================================================49// v_div_fmas: implicitly read VCC (VOP3)50 51v_div_fmas_f32 v0, s1, s1, s152// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand (violates constant bus restrictions)53 54v_div_fmas_f32 v0, v2, v3, -s155// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand (violates constant bus restrictions)56 57v_div_fmas_f32 v0, v1, s2, |v3|58// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand (violates constant bus restrictions)59 60v_div_fmas_f32 v0, v1, -v2, -s361// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand (violates constant bus restrictions)62 63v_div_fmas_f32 v0, v1, flat_scratch_lo, v364// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand (violates constant bus restrictions)65 66v_div_fmas_f32 v0, v1, v2, flat_scratch_hi67// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand (violates constant bus restrictions)68 69v_div_fmas_f32 v0, v1, v2, m070// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand (violates constant bus restrictions)71 72v_div_fmas_f32 v0, v1, ttmp2, v273// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand (violates constant bus restrictions)74 75v_div_fmas_f64 v[0:1], s[2:3], v[4:5], v[6:7]76// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand (violates constant bus restrictions)77 78v_div_fmas_f64 v[0:1], v[2:3], s[4:5], v[6:7]79// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand (violates constant bus restrictions)80 81v_div_fmas_f64 v[0:1], v[2:3], v[4:5], s[6:7]82// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand (violates constant bus restrictions)83 84v_div_fmas_f64 v[0:1], v[2:3], v[4:5], ttmp[2:3]85// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand (violates constant bus restrictions)86 87v_div_fmas_f64 v[0:1], v[2:3], v[4:5], flat_scratch88// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand (violates constant bus restrictions)89 90v_div_fmas_f64 v[0:1], v[2:3], v[4:5], exec91// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand (violates constant bus restrictions)92 93//=====================================================94// v_cndmask_b32: implicitly reads VCC (VOP2)95 96v_cndmask_b32 v0, s1, v2, vcc97// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand (violates constant bus restrictions)98 99v_cndmask_b32 v0, flat_scratch_lo, v2, vcc100// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand (violates constant bus restrictions)101 102v_cndmask_b32 v0, flat_scratch_hi, v2, vcc103// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand (violates constant bus restrictions)104 105v_cndmask_b32 v0, exec_lo, v2, vcc106// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand (violates constant bus restrictions)107 108v_cndmask_b32 v0, exec_hi, v2, vcc109// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand (violates constant bus restrictions)110 111//=====================================================112// v_cndmask_b32_e64: VOP3, no implicit reads113 114v_cndmask_b32_e64 v0, s1, v2, vcc115// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand (violates constant bus restrictions)116 117v_cndmask_b32_e64 v0, flat_scratch_lo, v2, vcc118// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand (violates constant bus restrictions)119 120v_cndmask_b32_e64 v0, flat_scratch_hi, v2, vcc121// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand (violates constant bus restrictions)122 123v_cndmask_b32_e64 v0, s1, v2, flat_scratch124// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand (violates constant bus restrictions)125 126v_cndmask_b32_e64 v0, s0, v2, s[0:1]127// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand (violates constant bus restrictions)128 129v_cndmask_b32_e64 v0, v2, s0, s[0:1]130// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand (violates constant bus restrictions)131 132v_cndmask_b32_e64 v0, s0, s0, s[0:1]133// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand (violates constant bus restrictions)134 135v_cndmask_b32_e64 v0, s1, v2, s[0:1]136// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand (violates constant bus restrictions)137 138v_cndmask_b32_e64 v0, v2, s1, s[0:1]139// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand (violates constant bus restrictions)140 141v_cndmask_b32_e64 v0, s1, s1, s[0:1]142// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand (violates constant bus restrictions)143 144v_cndmask_b32_e64 v0, s1, v2, s[2:3]145// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand (violates constant bus restrictions)146 147v_cndmask_b32_e64 v0, v2, s1, s[2:3]148// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand (violates constant bus restrictions)149 150v_cndmask_b32_e64 v0, s1, s1, s[2:3]151// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand (violates constant bus restrictions)152 153//=====================================================154// v_addc_u32: implicitly reads VCC (VOP2 only!)155 156v_addc_u32 v0, vcc, s0, v0, vcc157// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand (violates constant bus restrictions)158 159v_addc_u32 v0, vcc, flat_scratch_lo, v0, vcc160// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand (violates constant bus restrictions)161 162v_addc_u32 v0, vcc, flat_scratch_hi, v0, vcc163// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand (violates constant bus restrictions)164 165v_addc_u32 v0, vcc, exec_lo, v0, vcc166// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand (violates constant bus restrictions)167 168v_addc_u32 v0, vcc, exec_hi, v0, vcc169// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand (violates constant bus restrictions)170 171//=====================================================172// v_addc_u32_e64: no implicit read in VOP3173 174v_addc_u32_e64 v0, s[0:1], s2, v2, vcc175// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand (violates constant bus restrictions)176 177v_addc_u32_e64 v0, s[0:1], v2, s2, vcc178// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand (violates constant bus restrictions)179 180v_addc_u32_e64 v0, s[0:1], s2, s2, vcc181// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand (violates constant bus restrictions)182 183v_addc_u32_e64 v0, s[0:1], s0, v2, s[0:1]184// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand (violates constant bus restrictions)185 186v_addc_u32_e64 v0, s[0:1], v2, s0, s[0:1]187// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand (violates constant bus restrictions)188 189v_addc_u32_e64 v0, s[0:1], s0, s0, s[0:1]190// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand (violates constant bus restrictions)191 192v_addc_u32_e64 v0, s[0:1], s2, v2, s[0:1]193// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand (violates constant bus restrictions)194 195v_addc_u32_e64 v0, s[0:1], v2, s2, s[0:1]196// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand (violates constant bus restrictions)197 198v_addc_u32_e64 v0, s[0:1], s2, s2, s[0:1]199// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand (violates constant bus restrictions)200 201//=====================================================202// VOP1 w/o implicit reads have no negative test cases on constant bus use203// VOPC has no negative test cases on constant bus use204 205//=====================================================206// madak/madmk: a special case for VOP2 w/o implicit reads207 208v_madak_f32 v0, s0, v0, 0x11213141209// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand (violates constant bus restrictions)210 211v_madak_f32 v0, flat_scratch_lo, v0, 0x11213141212// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand (violates constant bus restrictions)213 214v_madak_f32 v0, flat_scratch_hi, v0, 0x11213141215// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand (violates constant bus restrictions)216 217v_madak_f32 v0, exec_lo, v0, 0x11213141218// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand (violates constant bus restrictions)219 220v_madak_f32 v0, exec_hi, v0, 0x11213141221// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand (violates constant bus restrictions)222 223v_madak_f32 v0, vcc_lo, v0, 0x11213141224// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand (violates constant bus restrictions)225 226v_madak_f32 v0, vcc_hi, v0, 0x11213141227// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand (violates constant bus restrictions)228 229//=====================================================230// VOP3 w/o implicit reads231 232v_mad_f32 v0, s0, s1, s0233// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand (violates constant bus restrictions)234 235v_mad_f32 v0, s1, s0, s0236// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand (violates constant bus restrictions)237 238v_mad_f32 v0, s0, s0, s1239// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand (violates constant bus restrictions)240 241v_mad_f32 v0, s0, s0, flat_scratch_lo242// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand (violates constant bus restrictions)243 244//=====================================================245// VOP2_e64:246 247v_add_f32_e64 v0, s0, s1248// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand (violates constant bus restrictions)249 250v_add_f32_e64 v0, s0, flat_scratch_lo251// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand (violates constant bus restrictions)252 253v_add_f32_e64 v0, flat_scratch_hi, s1254// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand (violates constant bus restrictions)255 256v_add_f32_e64 v0, flat_scratch_hi, m0257// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand (violates constant bus restrictions)258 259v_add_f64 v[0:1], s[0:1], s[2:3]260// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand (violates constant bus restrictions)261 262v_add_f64 v[0:1], s[0:1], flat_scratch263// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand (violates constant bus restrictions)264 265v_add_f64 v[0:1], vcc, s[2:3]266// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand (violates constant bus restrictions)267 268//=====================================================269// VOPC_e64:270 271v_cmp_eq_f32_e64 s[0:1], s0, s1272// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand (violates constant bus restrictions)273 274v_cmp_eq_f32_e64 s[0:1], s0, flat_scratch_lo275// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand (violates constant bus restrictions)276 277v_cmp_eq_f32_e64 s[0:1], flat_scratch_hi, s1278// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand (violates constant bus restrictions)279 280v_cmp_eq_f32_e64 s[0:1], s0, m0281// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand (violates constant bus restrictions)282 283v_cmp_eq_f64_e64 s[0:1], s[0:1], s[2:3]284// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand (violates constant bus restrictions)285 286v_cmp_eq_f64_e64 s[0:1], s[0:1], flat_scratch287// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand (violates constant bus restrictions)288 289v_cmp_eq_f64_e64 s[0:1], vcc, s[2:3]290// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand (violates constant bus restrictions)291