Skip to content

Commit e6d6bb5

Browse files
authored
AMDGPU: Remove s_waitcnt from gfx1250 support (#145620)
Also add checks to verify that ds_bvh_stack ops, s_wait_samplecnt and s_wait_bvhcnt are no longer supported by gfx1250 (these instructions depend on vimage support).
1 parent c04e804 commit e6d6bb5

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

llvm/lib/Target/AMDGPU/SOPInstructions.td

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1589,8 +1589,10 @@ def S_WAKEUP : SOPP_Pseudo <"s_wakeup", (ins) > {
15891589
let mayStore = 1;
15901590
}
15911591

1592+
let SubtargetPredicate = isNotGFX1250Plus in {
15921593
def S_WAITCNT : SOPP_Pseudo <"s_waitcnt" , (ins SWaitCnt:$simm16), "$simm16",
15931594
[(int_amdgcn_s_waitcnt timm:$simm16)]>;
1595+
}
15941596

15951597
// "_soft" waitcnts are waitcnts that are either relaxed into their non-soft
15961598
// counterpart, or completely removed.

llvm/test/MC/AMDGPU/gfx1250_asm_unsupported.s

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,32 @@
11
; RUN: not llvm-mc -triple=amdgcn -mcpu=gfx1250 -show-encoding %s 2>&1 | FileCheck --check-prefix=GFX1250-ERR --implicit-check-not=error: --strict-whitespace %s
22

3+
;; Ray Tracing: DS_BVH_STACK ops
4+
5+
ds_bvh_stack_rtn_b32 v255, v254, v253, v[249:252]
6+
// GFX1250-ERR: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU
7+
8+
ds_bvh_stack_push4_pop1_rtn_b32 v1, v0, v1, v[2:5]
9+
// GFX1250-ERR: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU
10+
11+
ds_bvh_stack_push8_pop1_rtn_b32 v1, v0, v1, v[2:9]
12+
// GFX1250-ERR: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU
13+
14+
ds_bvh_stack_push8_pop2_rtn_b64 v[254:255], v253, v252, v[244:251]
15+
// GFX1250-ERR: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU
16+
17+
;; S_WAIT_*CNT instructions.
18+
19+
s_wait_samplecnt 0x1234
20+
// GFX1250-ERR: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU
21+
22+
s_wait_bvhcnt 0x1234
23+
// GFX1250-ERR: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU
24+
25+
;; S_WAITCNT instruction.
26+
27+
s_waitcnt 0
28+
// GFX1250-ERR: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU
29+
330
;; All "TBUFFER" ops, and BUFFER_LOAD/STORE_FORMAT ops.
431

532
tbuffer_load_d16_format_x v4, off, s[8:11], s3 format:[BUF_FMT_8_UNORM] offset:8388607

0 commit comments

Comments
 (0)