1// RUN: not llvm-mc -arch=amdgcn %s 2>&1 | FileCheck --check-prefixes=GCN,PREGFX11,SICI,SICIVI --implicit-check-not=error: %s 2// RUN: not llvm-mc -arch=amdgcn -mcpu=tahiti %s 2>&1 | FileCheck --check-prefixes=GCN,PREGFX11,SICI,SICIVI --implicit-check-not=error: %s 3// RUN: not llvm-mc -arch=amdgcn -mcpu=fiji %s 2>&1 | FileCheck --check-prefixes=GCN,PREGFX11,VI,SICIVI --implicit-check-not=error: %s 4// RUN: not llvm-mc -arch=amdgcn -mcpu=gfx1010 %s 2>&1 | FileCheck --check-prefixes=GCN,PREGFX11,GFX10 --implicit-check-not=error: %s 5// RUN: not llvm-mc -arch=amdgcn -mcpu=gfx1100 %s 2>&1 | FileCheck --check-prefixes=GCN,GFX11 --implicit-check-not=error: %s 6 7//===----------------------------------------------------------------------===// 8// sendmsg 9//===----------------------------------------------------------------------===// 10 11s_sendmsg sendmsg(MSG_INTERRUPTX) 12// GCN: error: expected a message name or an absolute expression 13 14s_sendmsg sendmsg(1 -) 15// GCN: error: unknown token in expression 16 17s_sendmsg sendmsg(MSG_INTERRUPT, 0) 18// GCN: error: message does not support operations 19 20s_sendmsg sendmsg(MSG_INTERRUPT, 0, 0) 21// GCN: error: message does not support operations 22 23s_sendmsg sendmsg(MSG_GS) 24// PREGFX11: error: missing message operation 25// GFX11: error: specified message id is not supported on this GPU 26 27s_sendmsg sendmsg(MSG_GS, GS_OP_NOP) 28// PREGFX11: error: invalid operation id 29// GFX11: error: specified message id is not supported on this GPU 30 31s_sendmsg sendmsg(MSG_GS, SYSMSG_OP_ECC_ERR_INTERRUPT) 32// GCN: error: expected an operation name or an absolute expression 33 34s_sendmsg sendmsg(MSG_GS, 0) 35// PREGFX11: error: invalid operation id 36// GFX11: error: specified message id is not supported on this GPU 37 38s_sendmsg sendmsg(MSG_GS, -1) 39// PREGFX11: error: invalid operation id 40// GFX11: error: specified message id is not supported on this GPU 41 42s_sendmsg sendmsg(MSG_GS, 4) 43// PREGFX11: error: invalid operation id 44// GFX11: error: specified message id is not supported on this GPU 45 46s_sendmsg sendmsg(MSG_GS, 8) 47// PREGFX11: error: invalid operation id 48// GFX11: error: specified message id is not supported on this GPU 49 50s_sendmsg sendmsg(15, -1) 51// GCN: error: invalid operation id 52 53s_sendmsg sendmsg(15, 8) 54// GCN: error: invalid operation id 55 56s_sendmsg sendmsg(MSG_GS, GS_OP_CUT, 0, 0) 57// GCN: error: expected a closing parenthesis 58 59s_sendmsg sendmsg(MSG_GSX, GS_OP_CUT, 0) 60// GCN: error: expected a message name or an absolute expression 61 62s_sendmsg sendmsg(MSG_GS, GS_OP_CUTX, 0) 63// GCN: error: expected an operation name or an absolute expression 64 65s_sendmsg sendmsg(MSG_GS, 1 -) 66// GCN: error: unknown token in expression 67 68s_sendmsg sendmsg(MSG_GS, GS_OP_CUT, 4) 69// PREGFX11: error: invalid message stream id 70// GFX11: error: specified message id is not supported on this GPU 71 72s_sendmsg sendmsg(MSG_GS, GS_OP_CUT, 1 -) 73// GCN: error: unknown token in expression 74 75s_sendmsg sendmsg(2, 3, 0, 0) 76// GCN: error: expected a closing parenthesis 77 78s_sendmsg sendmsg(2, 2, -1) 79// GCN: error: invalid message stream id 80 81s_sendmsg sendmsg(2, 2, 4) 82// GCN: error: invalid message stream id 83 84s_sendmsg sendmsg(2, 2, 0, 0) 85// GCN: error: expected a closing parenthesis 86 87s_sendmsg sendmsg(MSG_GS_DONE, GS_OP_NOP, 0) 88// PREGFX11: error: message operation does not support streams 89// GFX11: error: specified message id is not supported on this GPU 90 91s_sendmsg sendmsg(MSG_GS_DONE, 0, 0) 92// PREGFX11: error: message operation does not support streams 93// GFX11: error: specified message id is not supported on this GPU 94 95s_sendmsg sendmsg(MSG_HS_TESSFACTOR) 96// SICI: error: specified message id is not supported on this GPU 97// VI: error: specified message id is not supported on this GPU 98// GFX10: error: specified message id is not supported on this GPU 99 100s_sendmsg sendmsg(MSG_DEALLOC_VGPRS) 101// SICI: error: specified message id is not supported on this GPU 102// VI: error: specified message id is not supported on this GPU 103// GFX10: error: specified message id is not supported on this GPU 104 105s_sendmsg sendmsg(MSG_SAVEWAVE) 106// SICI: error: specified message id is not supported on this GPU 107// GFX11: error: specified message id is not supported on this GPU 108 109s_sendmsg sendmsg(MSG_STALL_WAVE_GEN) 110// SICI: error: specified message id is not supported on this GPU 111// VI: error: specified message id is not supported on this GPU 112 113s_sendmsg sendmsg(MSG_HALT_WAVES) 114// SICI: error: specified message id is not supported on this GPU 115// VI: error: specified message id is not supported on this GPU 116 117s_sendmsg sendmsg(MSG_ORDERED_PS_DONE) 118// SICI: error: specified message id is not supported on this GPU 119// VI: error: specified message id is not supported on this GPU 120 121s_sendmsg sendmsg(MSG_EARLY_PRIM_DEALLOC) 122// SICI: error: specified message id is not supported on this GPU 123// VI: error: specified message id is not supported on this GPU 124// GFX11: error: specified message id is not supported on this GPU 125 126s_sendmsg sendmsg(MSG_GS_ALLOC_REQ) 127// VI: error: specified message id is not supported on this GPU 128// SICI: error: specified message id is not supported on this GPU 129 130s_sendmsg sendmsg(MSG_GS_ALLOC_REQ, 0) 131// VI: error: specified message id is not supported on this GPU 132// SICI: error: specified message id is not supported on this GPU 133// GFX10: error: message does not support operations 134// GFX11: error: message does not support operations 135 136s_sendmsg sendmsg(MSG_GET_DOORBELL) 137// SICI: error: specified message id is not supported on this GPU 138// VI: error: specified message id is not supported on this GPU 139// GFX11: error: specified message id is not supported on this GPU 140 141s_sendmsg sendmsg(MSG_GET_DDID) 142// SICI: error: specified message id is not supported on this GPU 143// VI: error: specified message id is not supported on this GPU 144// GFX11: error: specified message id is not supported on this GPU 145 146s_sendmsg sendmsg(MSG_RTN_GET_DOORBELL) 147// SICI: error: specified message id is not supported on this GPU 148// VI: error: specified message id is not supported on this GPU 149// GFX10: error: specified message id is not supported on this GPU 150 151s_sendmsg sendmsg(MSG_RTN_GET_DDID) 152// SICI: error: specified message id is not supported on this GPU 153// VI: error: specified message id is not supported on this GPU 154// GFX10: error: specified message id is not supported on this GPU 155 156s_sendmsg sendmsg(MSG_RTN_GET_TMA) 157// SICI: error: specified message id is not supported on this GPU 158// VI: error: specified message id is not supported on this GPU 159// GFX10: error: specified message id is not supported on this GPU 160 161s_sendmsg sendmsg(MSG_RTN_GET_REALTIME) 162// SICI: error: specified message id is not supported on this GPU 163// VI: error: specified message id is not supported on this GPU 164// GFX10: error: specified message id is not supported on this GPU 165 166s_sendmsg sendmsg(MSG_RTN_SAVE_WAVE) 167// SICI: error: specified message id is not supported on this GPU 168// VI: error: specified message id is not supported on this GPU 169// GFX10: error: specified message id is not supported on this GPU 170 171s_sendmsg sendmsg(MSG_RTN_GET_TBA) 172// SICI: error: specified message id is not supported on this GPU 173// VI: error: specified message id is not supported on this GPU 174// GFX10: error: specified message id is not supported on this GPU 175 176s_sendmsg sendmsg(-1) 177// GCN: error: invalid message id 178 179s_sendmsg sendmsg(16) 180// PREGFX11: error: invalid message id 181 182s_sendmsg sendmsg(MSG_SYSMSG) 183// GCN: error: missing message operation 184 185s_sendmsg sendmsg(MSG_SYSMSG, SYSMSG_OP_ECC_ERR_INTERRUPT, 0) 186// GCN: error: message operation does not support streams 187 188s_sendmsg sendmsg(MSG_SYSMSG, 0) 189// GCN: error: invalid operation id 190 191s_sendmsg sendmsg(MSG_SYSMSG, 5) 192// GCN: error: invalid operation id 193 194//===----------------------------------------------------------------------===// 195// waitcnt 196//===----------------------------------------------------------------------===// 197 198s_waitcnt lgkmcnt(16) 199// VI: error: too large value for lgkmcnt 200// SICI: error: too large value for lgkmcnt 201 202s_waitcnt lgkmcnt(64) 203// GCN: error: too large value for lgkmcnt 204 205s_waitcnt expcnt(8) 206// GCN: error: too large value for expcnt 207 208s_waitcnt vmcnt(16) 209// VI: error: too large value for vmcnt 210// SICI: error: too large value for vmcnt 211 212s_waitcnt vmcnt(64) 213// GCN: error: too large value for vmcnt 214 215s_waitcnt vmcnt(0xFFFFFFFFFFFF0000) 216// GCN: error: too large value for vmcnt 217 218s_waitcnt vmcnt(0), expcnt(0), lgkmcnt(0), 219// GCN: error: expected a counter name 220 221s_waitcnt vmcnt(0) & expcnt(0) & lgkmcnt(0)& 222// GCN: error: expected a counter name 223 224s_waitcnt vmcnt(0) & expcnt(0) & x 225// GCN: error: expected a left parenthesis 226 227s_waitcnt vmcnt(0) & expcnt(0) x 228// GCN: error: expected a left parenthesis 229 230s_waitcnt vmcnt(0) & expcnt(0) & 1 231// GCN: error: expected a counter name 232 233s_waitcnt vmcnt(0) & expcnt(0) 1 234// GCN: error: expected a counter name 235 236s_waitcnt vmcnt(0) & expcnt(0) x(0) 237// GCN: error: invalid counter name x 238 239s_waitcnt vmcnt(x) 240// GCN: error: expected absolute expression 241 242s_waitcnt x 243// GCN: error: expected absolute expression 244 245s_waitcnt vmcnt(0 246// GCN: error: expected a closing parenthesis 247 248//===----------------------------------------------------------------------===// 249// s_waitcnt_depctr. 250//===----------------------------------------------------------------------===// 251 252s_waitcnt_depctr 65536 253// GFX10: error: invalid operand for instruction 254// GFX11: error: invalid operand for instruction 255// SICIVI: error: instruction not supported on this GPU 256 257s_waitcnt_depctr -32769 258// GFX10: error: invalid operand for instruction 259// GFX11: error: invalid operand for instruction 260// SICIVI: error: instruction not supported on this GPU 261 262s_waitcnt_depctr depctr_hold_cnt(0) 263// GFX10: error: depctr_hold_cnt is not supported on this GPU 264// SICIVI: error: instruction not supported on this GPU 265 266s_waitcnt_depctr depctr_sa_sdst(-1) 267// GFX10: error: invalid value for depctr_sa_sdst 268// GFX11: error: invalid value for depctr_sa_sdst 269// SICIVI: error: instruction not supported on this GPU 270 271s_waitcnt_depctr depctr_va_vdst(-1) 272// GFX10: error: invalid value for depctr_va_vdst 273// GFX11: error: invalid value for depctr_va_vdst 274// SICIVI: error: instruction not supported on this GPU 275 276s_waitcnt_depctr depctr_va_sdst(-1) 277// GFX10: error: invalid value for depctr_va_sdst 278// GFX11: error: invalid value for depctr_va_sdst 279// SICIVI: error: instruction not supported on this GPU 280 281s_waitcnt_depctr depctr_va_ssrc(-1) 282// GFX10: error: invalid value for depctr_va_ssrc 283// GFX11: error: invalid value for depctr_va_ssrc 284// SICIVI: error: instruction not supported on this GPU 285 286s_waitcnt_depctr depctr_va_vcc(-1) 287// GFX10: error: invalid value for depctr_va_vcc 288// GFX11: error: invalid value for depctr_va_vcc 289// SICIVI: error: instruction not supported on this GPU 290 291s_waitcnt_depctr depctr_vm_vsrc(-1) 292// GFX10: error: invalid value for depctr_vm_vsrc 293// GFX11: error: invalid value for depctr_vm_vsrc 294// SICIVI: error: instruction not supported on this GPU 295 296s_waitcnt_depctr depctr_sa_sdst(2) 297// GFX10: error: invalid value for depctr_sa_sdst 298// GFX11: error: invalid value for depctr_sa_sdst 299// SICIVI: error: instruction not supported on this GPU 300 301s_waitcnt_depctr depctr_va_vdst(16) 302// GFX10: error: invalid value for depctr_va_vdst 303// GFX11: error: invalid value for depctr_va_vdst 304// SICIVI: error: instruction not supported on this GPU 305 306s_waitcnt_depctr depctr_va_sdst(8) 307// GFX10: error: invalid value for depctr_va_sdst 308// GFX11: error: invalid value for depctr_va_sdst 309// SICIVI: error: instruction not supported on this GPU 310 311s_waitcnt_depctr depctr_va_ssrc(2) 312// GFX10: error: invalid value for depctr_va_ssrc 313// GFX11: error: invalid value for depctr_va_ssrc 314// SICIVI: error: instruction not supported on this GPU 315 316s_waitcnt_depctr depctr_va_vcc(2) 317// GFX10: error: invalid value for depctr_va_vcc 318// GFX11: error: invalid value for depctr_va_vcc 319// SICIVI: error: instruction not supported on this GPU 320 321s_waitcnt_depctr depctr_vm_vsrc(8) 322// GFX10: error: invalid value for depctr_vm_vsrc 323// GFX11: error: invalid value for depctr_vm_vsrc 324// SICIVI: error: instruction not supported on this GPU 325 326s_waitcnt_depctr depctr_vm_(8) 327// GFX10: error: invalid counter name depctr_vm_ 328// GFX11: error: invalid counter name depctr_vm_ 329// SICIVI: error: instruction not supported on this GPU 330 331s_waitcnt_depctr depctr_sa_sdst(0) depctr_sa_sdst(0) 332// GFX10: error: duplicate counter name depctr_sa_sdst 333// GFX11: error: duplicate counter name depctr_sa_sdst 334// SICIVI: error: instruction not supported on this GPU 335 336s_waitcnt_depctr depctr_va_vdst(0) depctr_va_vdst(0) 337// GFX10: error: duplicate counter name depctr_va_vdst 338// GFX11: error: duplicate counter name depctr_va_vdst 339// SICIVI: error: instruction not supported on this GPU 340 341s_waitcnt_depctr depctr_va_sdst(0) depctr_va_sdst(0) 342// GFX10: error: duplicate counter name depctr_va_sdst 343// GFX11: error: duplicate counter name depctr_va_sdst 344// SICIVI: error: instruction not supported on this GPU 345 346s_waitcnt_depctr depctr_va_ssrc(0) depctr_va_ssrc(0) 347// GFX10: error: duplicate counter name depctr_va_ssrc 348// GFX11: error: duplicate counter name depctr_va_ssrc 349// SICIVI: error: instruction not supported on this GPU 350 351s_waitcnt_depctr depctr_va_vcc(0) depctr_va_vcc(0) 352// GFX10: error: duplicate counter name depctr_va_vcc 353// GFX11: error: duplicate counter name depctr_va_vcc 354// SICIVI: error: instruction not supported on this GPU 355 356s_waitcnt_depctr depctr_vm_vsrc(0) depctr_vm_vsrc(0) 357// GFX10: error: duplicate counter name depctr_vm_vsrc 358// GFX11: error: duplicate counter name depctr_vm_vsrc 359// SICIVI: error: instruction not supported on this GPU 360 361s_waitcnt_depctr depctr_sa_sdst(0) depctr_va_sdst(0) depctr_sa_sdst(0) 362// GFX10: error: duplicate counter name depctr_sa_sdst 363// GFX11: error: duplicate counter name depctr_sa_sdst 364// SICIVI: error: instruction not supported on this GPU 365 366s_waitcnt_depctr depctr_va_ssrc(0) depctr_va_sdst(0) depctr_va_ssrc(0) 367// GFX10: error: duplicate counter name depctr_va_ssrc 368// GFX11: error: duplicate counter name depctr_va_ssrc 369// SICIVI: error: instruction not supported on this GPU 370 371s_waitcnt_depctr depctr_va_vcc(0) depctr_va_vcc(0) depctr_va_sdst(0) 372// GFX10: error: duplicate counter name depctr_va_vcc 373// GFX11: error: duplicate counter name depctr_va_vcc 374// SICIVI: error: instruction not supported on this GPU 375 376s_waitcnt_depctr depctr_vm_vsrc(0) depctr_vm_vsrc(0) depctr_va_sdst(0) 377// GFX10: error: duplicate counter name depctr_vm_vsrc 378// GFX11: error: duplicate counter name depctr_vm_vsrc 379// SICIVI: error: instruction not supported on this GPU 380 381s_waitcnt_depctr depctr_va_sdst(0) depctr_vm_vsrc 0) 382// GFX10: error: expected a left parenthesis 383// GFX11: error: expected a left parenthesis 384// SICIVI: error: instruction not supported on this GPU 385 386s_waitcnt_depctr depctr_va_sdst(0) 0depctr_vm_vsrc(0) 387// GFX10: error: expected a counter name 388// GFX11: error: expected a counter name 389// SICIVI: error: instruction not supported on this GPU 390 391s_waitcnt_depctr depctr_va_sdst(0) depctr_vm_vsrc(x) 392// GFX10: error: expected absolute expression 393// GFX11: error: expected absolute expression 394// SICIVI: error: instruction not supported on this GPU 395 396s_waitcnt_depctr depctr_va_sdst(0) depctr_vm_vsrc(0; & depctr_va_sdst(0) 397// GFX10: error: expected a closing parenthesis 398// GFX11: error: expected a closing parenthesis 399// SICIVI: error: instruction not supported on this GPU 400 401s_waitcnt_depctr depctr_vm_vsrc 0) depctr_vm_vsrc(0) depctr_va_sdst(0) 402// GFX10: error: expected absolute expression 403// GFX11: error: expected absolute expression 404// SICIVI: error: instruction not supported on this GPU 405 406s_waitcnt_depctr depctr_vm_vsrc(0) , 407// GFX10: error: expected a counter name 408// GFX11: error: expected a counter name 409// SICIVI: error: instruction not supported on this GPU 410 411s_waitcnt_depctr depctr_vm_vsrc(0) , & 412// GFX10: error: expected a counter name 413// GFX11: error: expected a counter name 414// SICIVI: error: instruction not supported on this GPU 415 416s_waitcnt_depctr depctr_vm_vsrc(0) & 417// GFX10: error: expected a counter name 418// GFX11: error: expected a counter name 419// SICIVI: error: instruction not supported on this GPU 420 421s_waitcnt_depctr depctr_vm_vsrc(0) & & 422// GFX10: error: expected a counter name 423// GFX11: error: expected a counter name 424// SICIVI: error: instruction not supported on this GPU 425 426//===----------------------------------------------------------------------===// 427// s_branch. 428//===----------------------------------------------------------------------===// 429 430s_branch 0x80000000ffff 431// GCN: error: expected a 16-bit signed jump offset 432 433s_branch 0x10000 434// GCN: error: expected a 16-bit signed jump offset 435 436s_branch -32769 437// GCN: error: expected a 16-bit signed jump offset 438 439s_branch 1.0 440// GCN: error: expected a 16-bit signed jump offset 441 442s_branch s0 443// GCN: error: invalid operand for instruction 444 445s_branch offset:1 446// GCN: error: not a valid operand 447