Skip to content

Commit cf55e61

Browse files
authored
AMDGPU: Don't allow s_barrier on gfx12 (#81317)
- s_barrier is not present on gfx12
1 parent d2d6b36 commit cf55e61

File tree

4 files changed

+5
-7
lines changed

4 files changed

+5
-7
lines changed

llvm/lib/Target/AMDGPU/SOPInstructions.td

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2620,7 +2620,8 @@ defm S_DECPERFLEVEL : SOPP_Real_32_gfx11_gfx12<0x039>;
26202620
defm S_TTRACEDATA : SOPP_Real_32_gfx11_gfx12<0x03a>;
26212621
defm S_TTRACEDATA_IMM : SOPP_Real_32_gfx11_gfx12<0x03b>;
26222622
defm S_ICACHE_INV : SOPP_Real_32_gfx11_gfx12<0x03c>;
2623-
defm S_BARRIER : SOPP_Real_32_gfx11_gfx12<0x03d>;
2623+
2624+
defm S_BARRIER : SOPP_Real_32_gfx11<0x03d>;
26242625

26252626
//===----------------------------------------------------------------------===//
26262627
// SOPP - GFX1150, GFX12.

llvm/test/MC/AMDGPU/gfx12_asm_sopp.s

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -270,9 +270,6 @@ s_cbranch_execnz 0x0
270270
s_cbranch_execnz 0x1234
271271
// GFX12: s_cbranch_execnz 4660 ; encoding: [0x34,0x12,0xa6,0xbf]
272272

273-
s_barrier
274-
// GFX12: s_barrier ; encoding: [0x00,0x00,0xbd,0xbf]
275-
276273
s_setkill 0x0
277274
// GFX12: s_setkill 0 ; encoding: [0x00,0x00,0x81,0xbf]
278275

llvm/test/MC/AMDGPU/gfx12_unsupported.s

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,9 @@ s_cmpk_le_u32 s0, 0
106106
s_inst_prefetch 1
107107
// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU
108108

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

llvm/test/MC/Disassembler/AMDGPU/gfx12_dasm_sopp.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,6 @@
7878
# GFX12: s_barrier_leave ; encoding: [0x00,0x00,0x95,0xbf]
7979
0x00,0x00,0x95,0xbf
8080

81-
# GFX12: s_barrier ; encoding: [0x00,0x00,0xbd,0xbf]
82-
0x00,0x00,0xbd,0xbf
83-
8481
# GFX12: s_branch 0 ; encoding: [0x00,0x00,0xa0,0xbf]
8582
0x00,0x00,0xa0,0xbf
8683

0 commit comments

Comments
 (0)