[llvm] r365349 - AMDGPU: Move waitcnt intrinsic to instruction definition pattern
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 8 09:53:48 PDT 2019
Author: arsenm
Date: Mon Jul 8 09:53:48 2019
New Revision: 365349
URL: http://llvm.org/viewvc/llvm-project?rev=365349&view=rev
Log:
AMDGPU: Move waitcnt intrinsic to instruction definition pattern
Modified:
llvm/trunk/lib/Target/AMDGPU/SIInstrInfo.td
llvm/trunk/lib/Target/AMDGPU/SOPInstructions.td
Modified: llvm/trunk/lib/Target/AMDGPU/SIInstrInfo.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AMDGPU/SIInstrInfo.td?rev=365349&r1=365348&r2=365349&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AMDGPU/SIInstrInfo.td (original)
+++ llvm/trunk/lib/Target/AMDGPU/SIInstrInfo.td Mon Jul 8 09:53:48 2019
@@ -745,6 +745,7 @@ def VReg32OrOffClass : AsmOperandClass {
def WAIT_FLAG : Operand <i32> {
let ParserMatchClass = SWaitMatchClass;
let PrintMethod = "printWaitFlag";
+ let OperandType = "OPERAND_IMMEDIATE";
}
include "SIInstrFormats.td"
Modified: llvm/trunk/lib/Target/AMDGPU/SOPInstructions.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AMDGPU/SOPInstructions.td?rev=365349&r1=365348&r2=365349&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AMDGPU/SOPInstructions.td (original)
+++ llvm/trunk/lib/Target/AMDGPU/SOPInstructions.td Mon Jul 8 09:53:48 2019
@@ -1089,7 +1089,8 @@ def S_WAKEUP : SOPP <0x00000003, (ins),
}
let mayLoad = 1, mayStore = 1, hasSideEffects = 1 in
-def S_WAITCNT : SOPP <0x0000000c, (ins WAIT_FLAG:$simm16), "s_waitcnt $simm16">;
+def S_WAITCNT : SOPP <0x0000000c, (ins WAIT_FLAG:$simm16), "s_waitcnt $simm16",
+ [(int_amdgcn_s_waitcnt SIMM16bit:$simm16)]>;
def S_SETHALT : SOPP <0x0000000d, (ins i16imm:$simm16), "s_sethalt $simm16">;
def S_SETKILL : SOPP <0x0000000b, (ins i16imm:$simm16), "s_setkill $simm16">;
@@ -1247,17 +1248,6 @@ def : GCNPat<
>;
-
-//===----------------------------------------------------------------------===//
-// SOPP Patterns
-//===----------------------------------------------------------------------===//
-
-def : GCNPat <
- (int_amdgcn_s_waitcnt i32:$simm16),
- (S_WAITCNT (as_i16imm $simm16))
->;
-
-
//===----------------------------------------------------------------------===//
// Target-specific instruction encodings.
//===----------------------------------------------------------------------===//
More information about the llvm-commits
mailing list