Skip to content

Commit dbbab71

Browse files
committed
[AMDGPU][NFC] Eliminate the u32imm operand definition.
It is only used to infer the types of offset parameters in isel patterns, which we can specify directly. Reviewed By: piotr Differential Revision: https://reviews.llvm.org/D144890
1 parent 140d6a9 commit dbbab71

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

llvm/lib/Target/AMDGPU/AMDGPUInstructions.td

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -135,10 +135,6 @@ def s16ImmTarget : AsmOperandClass {
135135

136136
let OperandType = "OPERAND_IMMEDIATE" in {
137137

138-
def u32imm : Operand<i32> {
139-
let PrintMethod = "printU32ImmOperand";
140-
}
141-
142138
def u16imm : Operand<i16> {
143139
let PrintMethod = "printU16ImmOperand";
144140
let ParserMatchClass = u16ImmTarget;

llvm/lib/Target/AMDGPU/BUFInstructions.td

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1741,12 +1741,12 @@ multiclass MUBUFScratchLoadPat <MUBUF_Pseudo InstrOffen,
17411741
ValueType vt, PatFrag ld> {
17421742
def : GCNPat <
17431743
(vt (ld (MUBUFScratchOffen v4i32:$srsrc, i32:$vaddr,
1744-
i32:$soffset, u32imm:$offset))),
1744+
i32:$soffset, i32:$offset))),
17451745
(InstrOffen $vaddr, $srsrc, $soffset, $offset, 0, 0)
17461746
>;
17471747

17481748
def : GCNPat <
1749-
(vt (ld (MUBUFScratchOffset v4i32:$srsrc, i32:$soffset, u32imm:$offset))),
1749+
(vt (ld (MUBUFScratchOffset v4i32:$srsrc, i32:$soffset, i32:$offset))),
17501750
(InstrOffset $srsrc, $soffset, $offset, 0, 0)
17511751
>;
17521752
}
@@ -1756,12 +1756,12 @@ multiclass MUBUFScratchLoadPat_D16 <MUBUF_Pseudo InstrOffen,
17561756
MUBUF_Pseudo InstrOffset,
17571757
ValueType vt, PatFrag ld_frag> {
17581758
def : GCNPat <
1759-
(ld_frag (MUBUFScratchOffen v4i32:$srsrc, i32:$vaddr, i32:$soffset, u32imm:$offset), vt:$in),
1759+
(ld_frag (MUBUFScratchOffen v4i32:$srsrc, i32:$vaddr, i32:$soffset, i32:$offset), vt:$in),
17601760
(InstrOffen $vaddr, $srsrc, $soffset, $offset, $in)
17611761
>;
17621762

17631763
def : GCNPat <
1764-
(ld_frag (MUBUFScratchOffset v4i32:$srsrc, i32:$soffset, u32imm:$offset), vt:$in),
1764+
(ld_frag (MUBUFScratchOffset v4i32:$srsrc, i32:$soffset, i32:$offset), vt:$in),
17651765
(InstrOffset $srsrc, $soffset, $offset, $in)
17661766
>;
17671767
}
@@ -1844,13 +1844,13 @@ multiclass MUBUFScratchStorePat <MUBUF_Pseudo InstrOffen,
18441844
RegisterClass rc = VGPR_32> {
18451845
def : GCNPat <
18461846
(st vt:$value, (MUBUFScratchOffen v4i32:$srsrc, i32:$vaddr,
1847-
i32:$soffset, u32imm:$offset)),
1847+
i32:$soffset, i32:$offset)),
18481848
(InstrOffen rc:$value, $vaddr, $srsrc, $soffset, $offset, 0, 0)
18491849
>;
18501850

18511851
def : GCNPat <
18521852
(st vt:$value, (MUBUFScratchOffset v4i32:$srsrc, i32:$soffset,
1853-
u32imm:$offset)),
1853+
i32:$offset)),
18541854
(InstrOffset rc:$value, $srsrc, $soffset, $offset, 0, 0)
18551855
>;
18561856
}

0 commit comments

Comments
 (0)