From 48d2e04152366890e0b219a5f7c6f5b4905af480 Mon Sep 17 00:00:00 2001 From: Stanislav Mekhanoshin Date: Tue, 16 Feb 2021 16:34:24 -0800 Subject: [PATCH] [AMDGPU] Mark SMRD atomics We did not have atomic flags on SMRD, did not copy TSFlags to real instructions, and did not have ret/noret atomic map. At the moment it is NFC, but needed for D96469. Differential Revision: https://reviews.llvm.org/D96823 --- llvm/lib/Target/AMDGPU/SMInstructions.td | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/llvm/lib/Target/AMDGPU/SMInstructions.td b/llvm/lib/Target/AMDGPU/SMInstructions.td index 5b8896c21832..19afd72b3211 100644 --- a/llvm/lib/Target/AMDGPU/SMInstructions.td +++ b/llvm/lib/Target/AMDGPU/SMInstructions.td @@ -62,6 +62,8 @@ class SM_Real let UseNamedOperandTable = ps.UseNamedOperandTable; let SMRD = ps.SMRD; + let TSFlags = ps.TSFlags; + bit is_buffer = ps.is_buffer; // encoding @@ -227,24 +229,29 @@ class SM_Atomic_Pseudo : + bit isRet, + string opNameWithSuffix = opName # !if(isImm, + !if(isRet, "_IMM_RTN", "_IMM"), + !if(isRet, "_SGPR_RTN", "_SGPR"))> : SM_Atomic_Pseudo { + isRet>, + AtomicNoRet { let offset_is_imm = isImm; - let PseudoInstr = opName # !if(isImm, - !if(isRet, "_IMM_RTN", "_IMM"), - !if(isRet, "_SGPR_RTN", "_SGPR")); + let PseudoInstr = opNameWithSuffix; let Constraints = !if(isRet, "$sdst = $sdata", ""); let DisableEncoding = !if(isRet, "$sdata", ""); @@ -589,7 +596,8 @@ defm S_ATC_PROBE_BUFFER : SM_Real_Probe_vi <0x27, "S_ATC_PROBE_BUFFER">; //===----------------------------------------------------------------------===// class SMEM_Atomic_Real_vi op, SM_Atomic_Pseudo ps> - : SMEM_Real_vi { + : SMEM_Real_vi , + AtomicNoRet { bits<7> sdata; @@ -973,7 +981,8 @@ defm S_ATC_PROBE : SM_Real_Probe_gfx10 <0x26, "S_ATC_PROBE">; defm S_ATC_PROBE_BUFFER : SM_Real_Probe_gfx10 <0x27, "S_ATC_PROBE_BUFFER">; class SMEM_Atomic_Real_gfx10 op, SM_Atomic_Pseudo ps> - : SMEM_Real_gfx10 { + : SMEM_Real_gfx10 , + AtomicNoRet { bits<7> sdata; bit dlc;