Skip to content

Commit 430b049

Browse files
committed
AMDGPU: Move waitcnt intrinsic to instruction definition pattern
llvm-svn: 365349
1 parent 6afc666 commit 430b049

File tree

2 files changed

+3
-12
lines changed

2 files changed

+3
-12
lines changed

llvm/lib/Target/AMDGPU/SIInstrInfo.td

+1
Original file line numberDiff line numberDiff line change
@@ -745,6 +745,7 @@ def VReg32OrOffClass : AsmOperandClass {
745745
def WAIT_FLAG : Operand <i32> {
746746
let ParserMatchClass = SWaitMatchClass;
747747
let PrintMethod = "printWaitFlag";
748+
let OperandType = "OPERAND_IMMEDIATE";
748749
}
749750

750751
include "SIInstrFormats.td"

llvm/lib/Target/AMDGPU/SOPInstructions.td

+2-12
Original file line numberDiff line numberDiff line change
@@ -1089,7 +1089,8 @@ def S_WAKEUP : SOPP <0x00000003, (ins), "s_wakeup"> {
10891089
}
10901090

10911091
let mayLoad = 1, mayStore = 1, hasSideEffects = 1 in
1092-
def S_WAITCNT : SOPP <0x0000000c, (ins WAIT_FLAG:$simm16), "s_waitcnt $simm16">;
1092+
def S_WAITCNT : SOPP <0x0000000c, (ins WAIT_FLAG:$simm16), "s_waitcnt $simm16",
1093+
[(int_amdgcn_s_waitcnt SIMM16bit:$simm16)]>;
10931094
def S_SETHALT : SOPP <0x0000000d, (ins i16imm:$simm16), "s_sethalt $simm16">;
10941095
def S_SETKILL : SOPP <0x0000000b, (ins i16imm:$simm16), "s_setkill $simm16">;
10951096

@@ -1247,17 +1248,6 @@ def : GCNPat<
12471248
>;
12481249

12491250

1250-
1251-
//===----------------------------------------------------------------------===//
1252-
// SOPP Patterns
1253-
//===----------------------------------------------------------------------===//
1254-
1255-
def : GCNPat <
1256-
(int_amdgcn_s_waitcnt i32:$simm16),
1257-
(S_WAITCNT (as_i16imm $simm16))
1258-
>;
1259-
1260-
12611251
//===----------------------------------------------------------------------===//
12621252
// Target-specific instruction encodings.
12631253
//===----------------------------------------------------------------------===//

0 commit comments

Comments
 (0)