[llvm] 2ff22d7 - AMDGPU/GlobalISel: Reorganize select switch cases
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Sun Jun 30 01:29:05 PDT 2024
Author: Matt Arsenault
Date: 2024-06-30T10:28:58+02:00
New Revision: 2ff22d7485f9f3b28f304f3ab40ef2d4f442b411
URL: https://github.com/llvm/llvm-project/commit/2ff22d7485f9f3b28f304f3ab40ef2d4f442b411
DIFF: https://github.com/llvm/llvm-project/commit/2ff22d7485f9f3b28f304f3ab40ef2d4f442b411.diff
LOG: AMDGPU/GlobalISel: Reorganize select switch cases
Added:
Modified:
llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp
llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.h
Removed:
################################################################################
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp b/llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp
index a3cb3b3f47e03..dcb0f47973c4a 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp
@@ -768,10 +768,6 @@ bool AMDGPUInstructionSelector::selectG_BUILD_VECTOR(MachineInstr &MI) const {
return constrainSelectedInstRegOperands(MI, TII, TRI, RBI);
}
-bool AMDGPUInstructionSelector::selectG_PTR_ADD(MachineInstr &I) const {
- return selectG_ADD_SUB(I);
-}
-
bool AMDGPUInstructionSelector::selectG_IMPLICIT_DEF(MachineInstr &I) const {
const MachineOperand &MO = I.getOperand(0);
@@ -3530,6 +3526,7 @@ bool AMDGPUInstructionSelector::select(MachineInstr &I) {
return selectG_AND_OR_XOR(I);
case TargetOpcode::G_ADD:
case TargetOpcode::G_SUB:
+ case TargetOpcode::G_PTR_ADD:
if (selectImpl(I, *CoverageInfo))
return true;
return selectG_ADD_SUB(I);
@@ -3544,6 +3541,7 @@ bool AMDGPUInstructionSelector::select(MachineInstr &I) {
case TargetOpcode::G_INTTOPTR:
case TargetOpcode::G_BITCAST:
case TargetOpcode::G_PTRTOINT:
+ case TargetOpcode::G_FREEZE:
return selectCOPY(I);
case TargetOpcode::G_CONSTANT:
case TargetOpcode::G_FCONSTANT:
@@ -3566,14 +3564,8 @@ bool AMDGPUInstructionSelector::select(MachineInstr &I) {
case TargetOpcode::G_BUILD_VECTOR:
case TargetOpcode::G_BUILD_VECTOR_TRUNC:
return selectG_BUILD_VECTOR(I);
- case TargetOpcode::G_PTR_ADD:
- if (selectImpl(I, *CoverageInfo))
- return true;
- return selectG_PTR_ADD(I);
case TargetOpcode::G_IMPLICIT_DEF:
return selectG_IMPLICIT_DEF(I);
- case TargetOpcode::G_FREEZE:
- return selectCOPY(I);
case TargetOpcode::G_INSERT:
return selectG_INSERT(I);
case TargetOpcode::G_INTRINSIC:
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.h b/llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.h
index f561d5d29efc4..2d3317e04ce12 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.h
+++ b/llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.h
@@ -103,7 +103,6 @@ class AMDGPUInstructionSelector final : public InstructionSelector {
bool selectG_MERGE_VALUES(MachineInstr &I) const;
bool selectG_UNMERGE_VALUES(MachineInstr &I) const;
bool selectG_BUILD_VECTOR(MachineInstr &I) const;
- bool selectG_PTR_ADD(MachineInstr &I) const;
bool selectG_IMPLICIT_DEF(MachineInstr &I) const;
bool selectG_INSERT(MachineInstr &I) const;
bool selectG_SBFX_UBFX(MachineInstr &I) const;
More information about the llvm-commits
mailing list