AMDGPU: Use srcvalue and delete Ignore complex pattern (#161359)

This commit is contained in:
Petar Avramovic 2025-09-30 16:18:51 +02:00 committed by GitHub
parent 4a873d58df
commit 98d43ef2d8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 1 additions and 22 deletions

View File

@ -13,10 +13,6 @@
include "AMDGPU.td"
include "AMDGPUCombine.td"
def gi_ignore :
GIComplexOperandMatcher<s32, "selectIgnore">,
GIComplexPatternEquiv<Ignore>;
def sd_vsrc0 : ComplexPattern<i32, 1, "">;
def gi_vsrc0 :
GIComplexOperandMatcher<s32, "selectVSRC0">,

View File

@ -4312,8 +4312,6 @@ bool AMDGPUDAGToDAGISel::SelectBITOP3(SDValue In, SDValue &Src0, SDValue &Src1,
return true;
}
bool AMDGPUDAGToDAGISel::SelectIgnore(SDValue In) const { return true; }
SDValue AMDGPUDAGToDAGISel::getHi16Elt(SDValue In) const {
if (In.isUndef())
return CurDAG->getUNDEF(MVT::i32);

View File

@ -305,8 +305,6 @@ private:
void SelectWAVE_ADDRESS(SDNode *N);
void SelectSTACKRESTORE(SDNode *N);
bool SelectIgnore(SDValue In) const;
protected:
// Include the pieces autogenerated from the target description.
#include "AMDGPUGenDAGISel.inc"

View File

@ -4266,14 +4266,6 @@ Register AMDGPUInstructionSelector::copyToVGPRIfSrcFolded(
return Src;
}
InstructionSelector::ComplexRendererFns
AMDGPUInstructionSelector::selectIgnore(MachineOperand &Root) const {
// Don't render anything.
ComplexRendererFns Renderers;
Renderers.emplace();
return Renderers;
}
///
/// This will select either an SGPR or VGPR operand and will save us from
/// having to write an extra tablegen pattern.

View File

@ -166,9 +166,6 @@ private:
MachineOperand Root, MachineInstr *InsertPt,
bool ForceVGPR = false) const;
InstructionSelector::ComplexRendererFns
selectIgnore(MachineOperand &Root) const;
InstructionSelector::ComplexRendererFns
selectVCSRC(MachineOperand &Root) const;

View File

@ -1710,8 +1710,6 @@ def VOP3PMadMixBF16Mods : ComplexPattern<untyped, 2, "SelectVOP3PMadMixBF16Mods"
def VINTERPMods : ComplexPattern<untyped, 2, "SelectVINTERPMods">;
def VINTERPModsHi : ComplexPattern<untyped, 2, "SelectVINTERPModsHi">;
def Ignore : ComplexPattern<untyped, 0, "SelectIgnore">;
//===----------------------------------------------------------------------===//
// SI assembler operands
//===----------------------------------------------------------------------===//

View File

@ -1617,7 +1617,7 @@ def S_BARRIER_WAIT : SOPP_Pseudo <"s_barrier_wait", (ins i16imm:$simm16), "$simm
}
def S_BARRIER_LEAVE : SOPP_Pseudo <"s_barrier_leave",
(ins), "", [(int_amdgcn_s_barrier_leave (Ignore))] > {
(ins), "", [(int_amdgcn_s_barrier_leave (i16 srcvalue))] > {
let SchedRW = [WriteBarrier];
let simm16 = 0;
let fixed_imm = 1;