diff options
author | James Molloy <james.molloy@arm.com> | 2015-08-11 09:13:05 +0000 |
---|---|---|
committer | James Molloy <james.molloy@arm.com> | 2015-08-11 09:13:05 +0000 |
commit | 01cdeccdc7e7db09fd51539a48ebb50039b0c88c (patch) | |
tree | fa3f30dc181a28d5ff99feb64cd81fbf5e14a76c /llvm/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp | |
parent | 134bec27226ab1d37cff44b04cef73b67321601b (diff) | |
download | bcm5719-llvm-01cdeccdc7e7db09fd51539a48ebb50039b0c88c.tar.gz bcm5719-llvm-01cdeccdc7e7db09fd51539a48ebb50039b0c88c.zip |
Add new ISD nodes: ISD::FMINNAN and ISD::FMAXNAN
The intention of these is to be a corollary to ISD::FMINNUM/FMAXNUM,
differing only on how NaNs are treated. FMINNUM returns the non-NaN
input (when given one NaN and one non-NaN), FMINNAN returns the NaN
input instead.
This patch includes support for scalarizing, widening and splitting
vectors, but not expansion or softening. The reason is that these
should never be needed - FMINNAN nodes are only going to be created
in one place (SDAGBuilder::visitSelect) and there we'll check if the
node is legal or custom. I could preemptively add expand and soften
code, but I'm fairly opposed to adding code I can't test. It's bad
enough I can't create tests with this patch, but at least this code
will be exercised by the ARM and AArch64 backends fairly shortly.
llvm-svn: 244581
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp index 883cc2573a6..cbb0aa1a760 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp @@ -146,6 +146,8 @@ std::string SDNode::getOperationName(const SelectionDAG *G) const { case ISD::FABS: return "fabs"; case ISD::FMINNUM: return "fminnum"; case ISD::FMAXNUM: return "fmaxnum"; + case ISD::FMINNAN: return "fminnan"; + case ISD::FMAXNAN: return "fmaxnan"; case ISD::FNEG: return "fneg"; case ISD::FSQRT: return "fsqrt"; case ISD::FSIN: return "fsin"; |