[PATCH] D138938: [AMDGPU] Remove AMDGPUISelDAGToDAG::isKnownNeverNaN
Thomas Symalla via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 29 12:05:01 PST 2022
tsymalla created this revision.
tsymalla added a reviewer: arsenm.
Herald added subscribers: kosarev, foad, kerbowa, hiraditya, tpr, dstuttard, yaxunl, jvesely, kzhuravl.
Herald added a project: All.
tsymalla requested review of this revision.
Herald added subscribers: llvm-commits, wdng.
Herald added a project: LLVM.
This function removes the mentioned function, as it only does two
checks which are already implemented as part of
SelectionDAG::isKnownNeverNaN - which is called there.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D138938
Files:
llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp
llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.h
Index: llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.h
===================================================================
--- llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.h
+++ llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.h
@@ -110,7 +110,6 @@
private:
std::pair<SDValue, SDValue> foldFrameIndex(SDValue N) const;
- bool isNoNanSrc(SDValue N) const;
bool isInlineImmediate(const SDNode *N, bool Negated = false) const;
bool isNegInlineImmediate(const SDNode *N) const {
return isInlineImmediate(N, true);
Index: llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp
===================================================================
--- llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp
+++ llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp
@@ -316,17 +316,6 @@
}
}
-bool AMDGPUDAGToDAGISel::isNoNanSrc(SDValue N) const {
- if (TM.Options.NoNaNsFPMath)
- return true;
-
- // TODO: Move into isKnownNeverNaN
- if (N->getFlags().hasNoNaNs())
- return true;
-
- return CurDAG->isKnownNeverNaN(N);
-}
-
bool AMDGPUDAGToDAGISel::isInlineImmediate(const SDNode *N,
bool Negated) const {
if (N->isUndef())
@@ -2643,7 +2632,7 @@
bool AMDGPUDAGToDAGISel::SelectVOP3Mods_NNaN(SDValue In, SDValue &Src,
SDValue &SrcMods) const {
SelectVOP3Mods(In, Src, SrcMods);
- return isNoNanSrc(Src);
+ return CurDAG->isKnownNeverNaN(Src);
}
bool AMDGPUDAGToDAGISel::SelectVOP3NoMods(SDValue In, SDValue &Src) const {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D138938.478670.patch
Type: text/x-patch
Size: 1509 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221129/c0983a4d/attachment.bin>
More information about the llvm-commits
mailing list