Skip to content

AMDGPU: Don't allow s_barrier on gfx12 #81317

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion llvm/lib/Target/AMDGPU/SOPInstructions.td
Original file line number Diff line number Diff line change
Expand Up @@ -2620,7 +2620,8 @@ defm S_DECPERFLEVEL : SOPP_Real_32_gfx11_gfx12<0x039>;
defm S_TTRACEDATA : SOPP_Real_32_gfx11_gfx12<0x03a>;
defm S_TTRACEDATA_IMM : SOPP_Real_32_gfx11_gfx12<0x03b>;
defm S_ICACHE_INV : SOPP_Real_32_gfx11_gfx12<0x03c>;
defm S_BARRIER : SOPP_Real_32_gfx11_gfx12<0x03d>;

defm S_BARRIER : SOPP_Real_32_gfx11<0x03d>;

//===----------------------------------------------------------------------===//
// SOPP - GFX1150, GFX12.
Expand Down
3 changes: 0 additions & 3 deletions llvm/test/MC/AMDGPU/gfx12_asm_sopp.s
Original file line number Diff line number Diff line change
Expand Up @@ -270,9 +270,6 @@ s_cbranch_execnz 0x0
s_cbranch_execnz 0x1234
// GFX12: s_cbranch_execnz 4660 ; encoding: [0x34,0x12,0xa6,0xbf]

s_barrier
// GFX12: s_barrier ; encoding: [0x00,0x00,0xbd,0xbf]

s_setkill 0x0
// GFX12: s_setkill 0 ; encoding: [0x00,0x00,0x81,0xbf]

Expand Down
3 changes: 3 additions & 0 deletions llvm/test/MC/AMDGPU/gfx12_unsupported.s
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,9 @@ s_cmpk_le_u32 s0, 0
s_inst_prefetch 1
// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU

s_barrier
// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU

buffer_atomic_cmpswap_f32 v[5:6], off, s[96:99], s3
// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU

Expand Down
3 changes: 0 additions & 3 deletions llvm/test/MC/Disassembler/AMDGPU/gfx12_dasm_sopp.txt
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,6 @@
# GFX12: s_barrier_leave ; encoding: [0x00,0x00,0x95,0xbf]
0x00,0x00,0x95,0xbf

# GFX12: s_barrier ; encoding: [0x00,0x00,0xbd,0xbf]
0x00,0x00,0xbd,0xbf

# GFX12: s_branch 0 ; encoding: [0x00,0x00,0xa0,0xbf]
0x00,0x00,0xa0,0xbf

Expand Down