[llvm] dbbab71 - [AMDGPU][NFC] Eliminate the u32imm operand definition.
Ivan Kosarev via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 28 04:24:00 PST 2023
Author: Ivan Kosarev
Date: 2023-02-28T12:23:47Z
New Revision: dbbab71b76378538295f45a11be08b4276687876
URL: https://github.com/llvm/llvm-project/commit/dbbab71b76378538295f45a11be08b4276687876
DIFF: https://github.com/llvm/llvm-project/commit/dbbab71b76378538295f45a11be08b4276687876.diff
LOG: [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
Added:
Modified:
llvm/lib/Target/AMDGPU/AMDGPUInstructions.td
llvm/lib/Target/AMDGPU/BUFInstructions.td
Removed:
################################################################################
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUInstructions.td b/llvm/lib/Target/AMDGPU/AMDGPUInstructions.td
index 998fca791f9f3..8cbe3e4ca9846 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUInstructions.td
+++ b/llvm/lib/Target/AMDGPU/AMDGPUInstructions.td
@@ -135,10 +135,6 @@ def s16ImmTarget : AsmOperandClass {
let OperandType = "OPERAND_IMMEDIATE" in {
-def u32imm : Operand<i32> {
- let PrintMethod = "printU32ImmOperand";
-}
-
def u16imm : Operand<i16> {
let PrintMethod = "printU16ImmOperand";
let ParserMatchClass = u16ImmTarget;
diff --git a/llvm/lib/Target/AMDGPU/BUFInstructions.td b/llvm/lib/Target/AMDGPU/BUFInstructions.td
index 66c844aecd894..37747c5f39261 100644
--- a/llvm/lib/Target/AMDGPU/BUFInstructions.td
+++ b/llvm/lib/Target/AMDGPU/BUFInstructions.td
@@ -1741,12 +1741,12 @@ multiclass MUBUFScratchLoadPat <MUBUF_Pseudo InstrOffen,
ValueType vt, PatFrag ld> {
def : GCNPat <
(vt (ld (MUBUFScratchOffen v4i32:$srsrc, i32:$vaddr,
- i32:$soffset, u32imm:$offset))),
+ i32:$soffset, i32:$offset))),
(InstrOffen $vaddr, $srsrc, $soffset, $offset, 0, 0)
>;
def : GCNPat <
- (vt (ld (MUBUFScratchOffset v4i32:$srsrc, i32:$soffset, u32imm:$offset))),
+ (vt (ld (MUBUFScratchOffset v4i32:$srsrc, i32:$soffset, i32:$offset))),
(InstrOffset $srsrc, $soffset, $offset, 0, 0)
>;
}
@@ -1756,12 +1756,12 @@ multiclass MUBUFScratchLoadPat_D16 <MUBUF_Pseudo InstrOffen,
MUBUF_Pseudo InstrOffset,
ValueType vt, PatFrag ld_frag> {
def : GCNPat <
- (ld_frag (MUBUFScratchOffen v4i32:$srsrc, i32:$vaddr, i32:$soffset, u32imm:$offset), vt:$in),
+ (ld_frag (MUBUFScratchOffen v4i32:$srsrc, i32:$vaddr, i32:$soffset, i32:$offset), vt:$in),
(InstrOffen $vaddr, $srsrc, $soffset, $offset, $in)
>;
def : GCNPat <
- (ld_frag (MUBUFScratchOffset v4i32:$srsrc, i32:$soffset, u32imm:$offset), vt:$in),
+ (ld_frag (MUBUFScratchOffset v4i32:$srsrc, i32:$soffset, i32:$offset), vt:$in),
(InstrOffset $srsrc, $soffset, $offset, $in)
>;
}
@@ -1844,13 +1844,13 @@ multiclass MUBUFScratchStorePat <MUBUF_Pseudo InstrOffen,
RegisterClass rc = VGPR_32> {
def : GCNPat <
(st vt:$value, (MUBUFScratchOffen v4i32:$srsrc, i32:$vaddr,
- i32:$soffset, u32imm:$offset)),
+ i32:$soffset, i32:$offset)),
(InstrOffen rc:$value, $vaddr, $srsrc, $soffset, $offset, 0, 0)
>;
def : GCNPat <
(st vt:$value, (MUBUFScratchOffset v4i32:$srsrc, i32:$soffset,
- u32imm:$offset)),
+ i32:$offset)),
(InstrOffset rc:$value, $srsrc, $soffset, $offset, 0, 0)
>;
}
More information about the llvm-commits
mailing list