]> granicus.if.org Git - llvm/commitdiff
AMDGPU: Move waitcnt intrinsic to instruction definition pattern
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Mon, 8 Jul 2019 16:53:48 +0000 (16:53 +0000)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Mon, 8 Jul 2019 16:53:48 +0000 (16:53 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@365349 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/AMDGPU/SIInstrInfo.td
lib/Target/AMDGPU/SOPInstructions.td

index f071ee09063479018b05f37026e538b959fb345f..073ca6e0f34ec8bb7b42bec19b678429a695307f 100644 (file)
@@ -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"
index 9d780573cb72b700e9b7ff0344d870de6618ecef..48fb62e291491ee213991560d6527ee3edbb374f 100644 (file)
@@ -1089,7 +1089,8 @@ def S_WAKEUP : SOPP <0x00000003, (ins), "s_wakeup"> {
 }
 
 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.
 //===----------------------------------------------------------------------===//