Skip to content

Commit 64a7114

Browse files
authored
AMDGPU: Simplify SMInstruction definitions, NFC (#86613)
Copy OtherPredicates from Pseudo to Real. Real should inherit predicates from the corresponding Pseudo
1 parent 08a321e commit 64a7114

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

llvm/lib/Target/AMDGPU/SMInstructions.td

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ class SM_Real <SM_Pseudo ps, string opName = ps.Mnemonic>
6767
let UseNamedOperandTable = ps.UseNamedOperandTable;
6868
let SchedRW = ps.SchedRW;
6969
let SubtargetPredicate = ps.SubtargetPredicate;
70+
let OtherPredicates = ps.OtherPredicates;
7071
let AsmMatchConverter = ps.AsmMatchConverter;
7172
let IsAtomicRet = ps.IsAtomicRet;
7273
let IsAtomicNoRet = ps.IsAtomicNoRet;
@@ -1172,41 +1173,33 @@ defm S_LOAD_DWORDX4 : SM_Real_Loads_gfx10<0x002>;
11721173
defm S_LOAD_DWORDX8 : SM_Real_Loads_gfx10<0x003>;
11731174
defm S_LOAD_DWORDX16 : SM_Real_Loads_gfx10<0x004>;
11741175

1175-
let SubtargetPredicate = HasScalarFlatScratchInsts in {
11761176
defm S_SCRATCH_LOAD_DWORD : SM_Real_Loads_gfx10<0x005>;
11771177
defm S_SCRATCH_LOAD_DWORDX2 : SM_Real_Loads_gfx10<0x006>;
11781178
defm S_SCRATCH_LOAD_DWORDX4 : SM_Real_Loads_gfx10<0x007>;
1179-
} // End SubtargetPredicate = HasScalarFlatScratchInsts
11801179

11811180
defm S_BUFFER_LOAD_DWORD : SM_Real_Loads_gfx10<0x008>;
11821181
defm S_BUFFER_LOAD_DWORDX2 : SM_Real_Loads_gfx10<0x009>;
11831182
defm S_BUFFER_LOAD_DWORDX4 : SM_Real_Loads_gfx10<0x00a>;
11841183
defm S_BUFFER_LOAD_DWORDX8 : SM_Real_Loads_gfx10<0x00b>;
11851184
defm S_BUFFER_LOAD_DWORDX16 : SM_Real_Loads_gfx10<0x00c>;
11861185

1187-
let SubtargetPredicate = HasScalarStores in {
11881186
defm S_STORE_DWORD : SM_Real_Stores_gfx10<0x010>;
11891187
defm S_STORE_DWORDX2 : SM_Real_Stores_gfx10<0x011>;
11901188
defm S_STORE_DWORDX4 : SM_Real_Stores_gfx10<0x012>;
1191-
let OtherPredicates = [HasScalarFlatScratchInsts] in {
11921189
defm S_SCRATCH_STORE_DWORD : SM_Real_Stores_gfx10<0x015>;
11931190
defm S_SCRATCH_STORE_DWORDX2 : SM_Real_Stores_gfx10<0x016>;
11941191
defm S_SCRATCH_STORE_DWORDX4 : SM_Real_Stores_gfx10<0x017>;
1195-
} // End OtherPredicates = [HasScalarFlatScratchInsts]
11961192
defm S_BUFFER_STORE_DWORD : SM_Real_Stores_gfx10<0x018>;
11971193
defm S_BUFFER_STORE_DWORDX2 : SM_Real_Stores_gfx10<0x019>;
11981194
defm S_BUFFER_STORE_DWORDX4 : SM_Real_Stores_gfx10<0x01a>;
1199-
} // End SubtargetPredicate = HasScalarStores
12001195

12011196
def S_MEMREALTIME_gfx10 : SMEM_Real_gfx10<0x025, S_MEMREALTIME>;
12021197
def S_MEMTIME_gfx10 : SMEM_Real_gfx10<0x024, S_MEMTIME>;
12031198
def S_GL1_INV_gfx10 : SMEM_Real_gfx10<0x01f, S_GL1_INV>;
12041199
def S_GET_WAVEID_IN_WORKGROUP_gfx10 : SMEM_Real_gfx10<0x02a, S_GET_WAVEID_IN_WORKGROUP>;
12051200
def S_DCACHE_INV_gfx10 : SMEM_Real_gfx10<0x020, S_DCACHE_INV>;
12061201

1207-
let SubtargetPredicate = HasScalarStores in {
12081202
def S_DCACHE_WB_gfx10 : SMEM_Real_gfx10<0x021, S_DCACHE_WB>;
1209-
} // End SubtargetPredicate = HasScalarStores
12101203

12111204
multiclass SM_Real_Probe_gfx10<bits<8> op> {
12121205
defvar ps = NAME;
@@ -1243,8 +1236,6 @@ multiclass SM_Real_Atomics_gfx10<bits<8> op> {
12431236
def _SGPR_IMM_RTN_gfx10 : SMEM_Atomic_Real_gfx10 <op, !cast<SM_Atomic_Pseudo>(ps#_SGPR_IMM_RTN)>;
12441237
}
12451238

1246-
let SubtargetPredicate = HasScalarAtomics in {
1247-
12481239
defm S_BUFFER_ATOMIC_SWAP : SM_Real_Atomics_gfx10 <0x40>;
12491240
defm S_BUFFER_ATOMIC_CMPSWAP : SM_Real_Atomics_gfx10 <0x41>;
12501241
defm S_BUFFER_ATOMIC_ADD : SM_Real_Atomics_gfx10 <0x42>;
@@ -1311,8 +1302,6 @@ multiclass SM_Real_Discard_gfx10<bits<8> op> {
13111302
defm S_DCACHE_DISCARD : SM_Real_Discard_gfx10 <0x28>;
13121303
defm S_DCACHE_DISCARD_X2 : SM_Real_Discard_gfx10 <0x29>;
13131304

1314-
} // End SubtargetPredicate = HasScalarAtomics
1315-
13161305
def SMInfoTable : GenericTable {
13171306
let FilterClass = "SM_Real";
13181307
let CppTypeName = "SMInfo";

0 commit comments

Comments
 (0)