Skip to content

Commit 80d430d

Browse files
authored
[AMDGPU] Add MSG_SAVEWAVE_HAS_TDM on gfx1250 (#153483)
1 parent fc911fe commit 80d430d

File tree

4 files changed

+15
-1
lines changed

4 files changed

+15
-1
lines changed

llvm/lib/Target/AMDGPU/SIDefines.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -440,6 +440,7 @@ enum Id { // Message ID, width(4) [3:0].
440440
ID_EARLY_PRIM_DEALLOC = 8, // added in GFX9, removed in GFX10
441441
ID_GS_ALLOC_REQ = 9, // added in GFX9
442442
ID_GET_DOORBELL = 10, // added in GFX9, removed in GFX11
443+
ID_SAVEWAVE_HAS_TDM = 10, // added in GFX1250
443444
ID_GET_DDID = 11, // added in GFX10, removed in GFX11
444445
ID_SYSMSG = 15,
445446

llvm/lib/Target/AMDGPU/Utils/AMDGPUAsmUtils.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ static constexpr CustomOperand MsgOperands[] = {
106106
{{"MSG_GET_DDID"}, ID_GET_DDID, isGFX10},
107107
{{"MSG_HS_TESSFACTOR"}, ID_HS_TESSFACTOR_GFX11Plus, isGFX11Plus},
108108
{{"MSG_DEALLOC_VGPRS"}, ID_DEALLOC_VGPRS_GFX11Plus, isGFX11Plus},
109-
{{""}},
109+
{{"MSG_SAVEWAVE_HAS_TDM"}, ID_SAVEWAVE_HAS_TDM, isGFX1250},
110110
{{"MSG_SYSMSG"}, ID_SYSMSG},
111111
{{"MSG_RTN_GET_DOORBELL"}, ID_RTN_GET_DOORBELL, isGFX11Plus},
112112
{{"MSG_RTN_GET_DDID"}, ID_RTN_GET_DDID, isGFX11Plus},

llvm/test/MC/AMDGPU/gfx1250_asm_sopp.s

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,10 @@ s_monitor_sleep 32768
4848
s_monitor_sleep 0
4949
// GFX1250: s_monitor_sleep 0 ; encoding: [0x00,0x00,0x84,0xbf]
5050
// GFX12-ERR: :[[@LINE-2]]:{{[0-9]+}}: error: instruction not supported on this GPU
51+
52+
s_sendmsg sendmsg(MSG_SAVEWAVE_HAS_TDM)
53+
// GFX1250: s_sendmsg sendmsg(MSG_SAVEWAVE_HAS_TDM) ; encoding: [0x0a,0x00,0xb6,0xbf]
54+
// GFX12-ERR: :[[@LINE-2]]:{{[0-9]+}}: error: specified message id is not supported on this GPU
55+
56+
s_barrier_wait -3
57+
// GFX1250: s_barrier_wait -3 ; encoding: [0xfd,0xff,0x94,0xbf]

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,9 @@
3535

3636
# GFX1250: s_monitor_sleep 1 ; encoding: [0x01,0x00,0x84,0xbf]
3737
0x01,0x00,0x84,0xbf
38+
39+
# GFX1250: s_sendmsg sendmsg(MSG_SAVEWAVE_HAS_TDM) ; encoding: [0x0a,0x00,0xb6,0xbf]
40+
0x0a,0x00,0xb6,0xbf
41+
42+
# GFX1250: s_barrier_wait 0xfffd ; encoding: [0xfd,0xff,0x94,0xbf]
43+
0xfd,0xff,0x94,0xbf

0 commit comments

Comments
 (0)