Skip to content

Commit 2adbf25

Browse files
[AMDGPU][NFC] Rename DotIUVOP3PMods to VOP3PModsNeg (#77785)
This is used to select the source modifier (neg) from the immediate operand. After a follow up commit this will no longer be DOTIU specific. Co-authored-by: Changpeng Fang <[email protected]>
1 parent 42fe3bc commit 2adbf25

7 files changed

+12
-12
lines changed

llvm/lib/Target/AMDGPU/AMDGPUGISel.td

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ def gi_vop3pmodsdot :
5151
GIComplexOperandMatcher<s32, "selectVOP3PModsDOT">,
5252
GIComplexPatternEquiv<VOP3PModsDOT>;
5353

54-
def gi_dotiuvop3pmods :
55-
GIComplexOperandMatcher<s32, "selectDotIUVOP3PMods">,
56-
GIComplexPatternEquiv<DotIUVOP3PMods>;
54+
def gi_vop3pmodsneg :
55+
GIComplexOperandMatcher<s32, "selectVOP3PModsNeg">,
56+
GIComplexPatternEquiv<VOP3PModsNeg>;
5757

5858
def gi_wmmaopselvop3pmods :
5959
GIComplexOperandMatcher<s32, "selectWMMAOpSelVOP3PMods">,

llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3009,7 +3009,7 @@ bool AMDGPUDAGToDAGISel::SelectVOP3PModsDOT(SDValue In, SDValue &Src,
30093009
return SelectVOP3PMods(In, Src, SrcMods, true);
30103010
}
30113011

3012-
bool AMDGPUDAGToDAGISel::SelectDotIUVOP3PMods(SDValue In, SDValue &Src) const {
3012+
bool AMDGPUDAGToDAGISel::SelectVOP3PModsNeg(SDValue In, SDValue &Src) const {
30133013
const ConstantSDNode *C = cast<ConstantSDNode>(In);
30143014
// Literal i1 value set in intrinsic, represents SrcMods for the next operand.
30153015
// 1 promotes packed values to signed, 0 treats them as unsigned.

llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ class AMDGPUDAGToDAGISel : public SelectionDAGISel {
237237
bool IsDOT = false) const;
238238
bool SelectVOP3PModsDOT(SDValue In, SDValue &Src, SDValue &SrcMods) const;
239239

240-
bool SelectDotIUVOP3PMods(SDValue In, SDValue &Src) const;
240+
bool SelectVOP3PModsNeg(SDValue In, SDValue &Src) const;
241241
bool SelectWMMAOpSelVOP3PMods(SDValue In, SDValue &Src) const;
242242

243243
bool SelectVOP3OpSel(SDValue In, SDValue &Src, SDValue &SrcMods) const;

llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3927,7 +3927,7 @@ AMDGPUInstructionSelector::selectVOP3PModsDOT(MachineOperand &Root) const {
39273927
}
39283928

39293929
InstructionSelector::ComplexRendererFns
3930-
AMDGPUInstructionSelector::selectDotIUVOP3PMods(MachineOperand &Root) const {
3930+
AMDGPUInstructionSelector::selectVOP3PModsNeg(MachineOperand &Root) const {
39313931
// Literal i1 value set in intrinsic, represents SrcMods for the next operand.
39323932
// Value is in Imm operand as i1 sign extended to int64_t.
39333933
// 1(-1) promotes packed values to signed, 0 treats them as unsigned.

llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ class AMDGPUInstructionSelector final : public InstructionSelector {
194194
selectVOP3PModsDOT(MachineOperand &Root) const;
195195

196196
InstructionSelector::ComplexRendererFns
197-
selectDotIUVOP3PMods(MachineOperand &Root) const;
197+
selectVOP3PModsNeg(MachineOperand &Root) const;
198198

199199
InstructionSelector::ComplexRendererFns
200200
selectWMMAOpSelVOP3PMods(MachineOperand &Root) const;

llvm/lib/Target/AMDGPU/SIInstrInfo.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1360,7 +1360,7 @@ def VOP3OMods : ComplexPattern<untyped, 3, "SelectVOP3OMods">;
13601360
def VOP3PMods : ComplexPattern<untyped, 2, "SelectVOP3PMods">;
13611361

13621362
def VOP3PModsDOT : ComplexPattern<untyped, 2, "SelectVOP3PModsDOT">;
1363-
def DotIUVOP3PMods : ComplexPattern<untyped, 1, "SelectDotIUVOP3PMods">;
1363+
def VOP3PModsNeg : ComplexPattern<untyped, 1, "SelectVOP3PModsNeg">;
13641364
def WMMAOpSelVOP3PMods : ComplexPattern<untyped, 1, "SelectWMMAOpSelVOP3PMods">;
13651365

13661366
def VOP3OpSel : ComplexPattern<untyped, 2, "SelectVOP3OpSel">;

llvm/lib/Target/AMDGPU/VOP3PInstructions.td

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -415,8 +415,8 @@ multiclass VOP3PDOTIUInst <string OpName, SDPatternOperator intrinsic_node> {
415415
null_frag, 1>;
416416
// Dot-iu instructions consider input as signed if imod neg bits are set. Thus
417417
// Dot-iu Intrinsics have extra operands and require separate codegen pattern.
418-
def : GCNPat < (intrinsic_node (DotIUVOP3PMods i32:$src0_mods), i32:$src0,
419-
(DotIUVOP3PMods i32:$src1_mods), i32:$src1,
418+
def : GCNPat < (intrinsic_node (VOP3PModsNeg i32:$src0_mods), i32:$src0,
419+
(VOP3PModsNeg i32:$src1_mods), i32:$src1,
420420
i32:$src2, (i1 timm:$clamp)),
421421
(!cast<Instruction>(NAME) $src0_mods, i32:$src0,
422422
$src1_mods, i32:$src1,
@@ -828,8 +828,8 @@ class WMMAOpSelPat<Instruction Inst, SDPatternOperator node, VOPProfile P> :
828828

829829
class WMMAUIClampPat<Instruction Inst, SDPatternOperator node, VOPProfile P> :
830830
GCNPat < (P.DstVT (node
831-
(DotIUVOP3PMods i32:$src0_modifiers), (P.Src0VT P.Src0VT:$src0),
832-
(DotIUVOP3PMods i32:$src1_modifiers), (P.Src1VT P.Src1VT:$src1),
831+
(VOP3PModsNeg i32:$src0_modifiers), (P.Src0VT P.Src0VT:$src0),
832+
(VOP3PModsNeg i32:$src1_modifiers), (P.Src1VT P.Src1VT:$src1),
833833
(P.Src2VT P.Src2VT:$src2), (i1 timm:$clamp)
834834
)),
835835
(P.DstVT (Inst i32:$src0_modifiers, P.Src0VT:$src0, i32:$src1_modifiers, P.Src1VT:$src1, (i32 8), P.Src2VT:$src2, i1:$clamp))

0 commit comments

Comments
 (0)