From aadaafb7b290922dd1a77504bf56a4e0c76478b5 Mon Sep 17 00:00:00 2001 From: Petar Avramovic Date: Tue, 30 Sep 2025 14:10:39 +0200 Subject: [PATCH] AMDGPU: Use srcvalue and delete Ignore complex pattern --- llvm/lib/Target/AMDGPU/AMDGPUGISel.td | 4 ---- llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp | 2 -- llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.h | 2 -- llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp | 8 -------- llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.h | 3 --- llvm/lib/Target/AMDGPU/SIInstrInfo.td | 2 -- llvm/lib/Target/AMDGPU/SOPInstructions.td | 2 +- 7 files changed, 1 insertion(+), 22 deletions(-) diff --git a/llvm/lib/Target/AMDGPU/AMDGPUGISel.td b/llvm/lib/Target/AMDGPU/AMDGPUGISel.td index a0cd1785c0130..bb4bf742fb861 100644 --- a/llvm/lib/Target/AMDGPU/AMDGPUGISel.td +++ b/llvm/lib/Target/AMDGPU/AMDGPUGISel.td @@ -13,10 +13,6 @@ include "AMDGPU.td" include "AMDGPUCombine.td" -def gi_ignore : - GIComplexOperandMatcher, - GIComplexPatternEquiv; - def sd_vsrc0 : ComplexPattern; def gi_vsrc0 : GIComplexOperandMatcher, diff --git a/llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp b/llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp index bdf4cd3693b2a..2192a72bb27b7 100644 --- a/llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp +++ b/llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp @@ -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); diff --git a/llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.h b/llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.h index 906548742f77f..4fa0d3f72e1c7 100644 --- a/llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.h +++ b/llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.h @@ -305,8 +305,6 @@ class AMDGPUDAGToDAGISel : public SelectionDAGISel { 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" diff --git a/llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp b/llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp index 1535f2681480e..12915c7344426 100644 --- a/llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp +++ b/llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp @@ -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. diff --git a/llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.h b/llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.h index 5a575a9c66a8a..c760fe7ef99dd 100644 --- a/llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.h +++ b/llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.h @@ -166,9 +166,6 @@ class AMDGPUInstructionSelector final : public InstructionSelector { MachineOperand Root, MachineInstr *InsertPt, bool ForceVGPR = false) const; - InstructionSelector::ComplexRendererFns - selectIgnore(MachineOperand &Root) const; - InstructionSelector::ComplexRendererFns selectVCSRC(MachineOperand &Root) const; diff --git a/llvm/lib/Target/AMDGPU/SIInstrInfo.td b/llvm/lib/Target/AMDGPU/SIInstrInfo.td index e46bd45aed506..18a53931a6390 100644 --- a/llvm/lib/Target/AMDGPU/SIInstrInfo.td +++ b/llvm/lib/Target/AMDGPU/SIInstrInfo.td @@ -1710,8 +1710,6 @@ def VOP3PMadMixBF16Mods : ComplexPattern; def VINTERPModsHi : ComplexPattern; -def Ignore : ComplexPattern; - //===----------------------------------------------------------------------===// // SI assembler operands //===----------------------------------------------------------------------===// diff --git a/llvm/lib/Target/AMDGPU/SOPInstructions.td b/llvm/lib/Target/AMDGPU/SOPInstructions.td index 6a39187e48cc8..b3fd8c70dd045 100644 --- a/llvm/lib/Target/AMDGPU/SOPInstructions.td +++ b/llvm/lib/Target/AMDGPU/SOPInstructions.td @@ -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;