Skip to content

Commit dbeec22

Browse files
kzhuravlchangpeng
authored andcommitted
AMDGPU: Don't allow s_barrier on gfx12 (llvm#81317)
- s_barrier is not present on gfx12 Change-Id: I389841737fad5a8f7f467e1666ead10e9e5650e1
1 parent dfd9498 commit dbeec22

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
@@ -2660,7 +2660,8 @@ defm S_DECPERFLEVEL : SOPP_Real_32_gfx11_gfx12<0x039>;
26602660
defm S_TTRACEDATA : SOPP_Real_32_gfx11_gfx12<0x03a>;
26612661
defm S_TTRACEDATA_IMM : SOPP_Real_32_gfx11_gfx12<0x03b>;
26622662
defm S_ICACHE_INV : SOPP_Real_32_gfx11_gfx12<0x03c>;
2663-
defm S_BARRIER : SOPP_Real_32_gfx11_gfx12<0x03d>;
2663+
2664+
defm S_BARRIER : SOPP_Real_32_gfx11<0x03d>;
26642665

26652666
//===----------------------------------------------------------------------===//
26662667
// 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
@@ -279,9 +279,6 @@ s_cbranch_execnz 0x0
279279
s_cbranch_execnz 0x1234
280280
// GFX12: s_cbranch_execnz 4660 ; encoding: [0x34,0x12,0xa6,0xbf]
281281

282-
s_barrier
283-
// GFX12: s_barrier ; encoding: [0x00,0x00,0xbd,0xbf]
284-
285282
s_setkill 0x0
286283
// GFX12: s_setkill 0 ; encoding: [0x00,0x00,0x81,0xbf]
287284

llvm/test/MC/AMDGPU/gfx12_unsupported.s

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,9 @@ s_cmpk_lt_u32 s0, 0
103103
s_cmpk_le_u32 s0, 0
104104
// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU
105105

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

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)