[llvm] [AMDGPU] Remove `hasAtomicFaddRtnForTy` as it is not used anywhere (PR #82841)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 23 15:17:09 PST 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-backend-amdgpu
Author: Shilei Tian (shiltian)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/82841.diff
4 Files Affected:
- (modified) llvm/lib/Target/AMDGPU/AMDGPUGlobalISelUtils.cpp (-9)
- (modified) llvm/lib/Target/AMDGPU/AMDGPUGlobalISelUtils.h (-2)
- (modified) llvm/lib/Target/AMDGPU/SIISelLowering.cpp (-12)
- (modified) llvm/lib/Target/AMDGPU/SIISelLowering.h (-1)
``````````diff
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUGlobalISelUtils.cpp b/llvm/lib/Target/AMDGPU/AMDGPUGlobalISelUtils.cpp
index 60b7813f240339..a98d4488bf77fe 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUGlobalISelUtils.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUGlobalISelUtils.cpp
@@ -69,12 +69,3 @@ AMDGPU::getBaseWithConstantOffset(MachineRegisterInfo &MRI, Register Reg,
return std::pair(Reg, 0);
}
-
-bool AMDGPU::hasAtomicFaddRtnForTy(const GCNSubtarget &Subtarget,
- const LLT &Ty) {
- if (Ty == LLT::scalar(32))
- return Subtarget.hasAtomicFaddRtnInsts();
- if (Ty == LLT::fixed_vector(2, 16) || Ty == LLT::scalar(64))
- return Subtarget.hasGFX90AInsts();
- return false;
-}
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUGlobalISelUtils.h b/llvm/lib/Target/AMDGPU/AMDGPUGlobalISelUtils.h
index 5ee888d9db001c..5972552b9a4fe8 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUGlobalISelUtils.h
+++ b/llvm/lib/Target/AMDGPU/AMDGPUGlobalISelUtils.h
@@ -26,8 +26,6 @@ std::pair<Register, unsigned>
getBaseWithConstantOffset(MachineRegisterInfo &MRI, Register Reg,
GISelKnownBits *KnownBits = nullptr,
bool CheckNUW = false);
-
-bool hasAtomicFaddRtnForTy(const GCNSubtarget &Subtarget, const LLT &Ty);
}
}
diff --git a/llvm/lib/Target/AMDGPU/SIISelLowering.cpp b/llvm/lib/Target/AMDGPU/SIISelLowering.cpp
index d8f528d8661183..84ef9679ab9563 100644
--- a/llvm/lib/Target/AMDGPU/SIISelLowering.cpp
+++ b/llvm/lib/Target/AMDGPU/SIISelLowering.cpp
@@ -5310,18 +5310,6 @@ MachineBasicBlock *SITargetLowering::EmitInstrWithCustomInserter(
}
}
-bool SITargetLowering::hasAtomicFaddRtnForTy(SDValue &Op) const {
- switch (Op.getValue(0).getSimpleValueType().SimpleTy) {
- case MVT::f32:
- return Subtarget->hasAtomicFaddRtnInsts();
- case MVT::v2f16:
- case MVT::f64:
- return Subtarget->hasGFX90AInsts();
- default:
- return false;
- }
-}
-
bool SITargetLowering::enableAggressiveFMAFusion(EVT VT) const {
// This currently forces unfolding various combinations of fsub into fma with
// free fneg'd operands. As long as we have fast FMA (controlled by
diff --git a/llvm/lib/Target/AMDGPU/SIISelLowering.h b/llvm/lib/Target/AMDGPU/SIISelLowering.h
index e436c23af5bcac..f6e1d198f40aec 100644
--- a/llvm/lib/Target/AMDGPU/SIISelLowering.h
+++ b/llvm/lib/Target/AMDGPU/SIISelLowering.h
@@ -436,7 +436,6 @@ class SITargetLowering final : public AMDGPUTargetLowering {
EmitInstrWithCustomInserter(MachineInstr &MI,
MachineBasicBlock *BB) const override;
- bool hasAtomicFaddRtnForTy(SDValue &Op) const;
bool enableAggressiveFMAFusion(EVT VT) const override;
bool enableAggressiveFMAFusion(LLT Ty) const override;
EVT getSetCCResultType(const DataLayout &DL, LLVMContext &Context,
``````````
</details>
https://github.com/llvm/llvm-project/pull/82841
More information about the llvm-commits
mailing list