diff options
author | Matt Arsenault <Matthew.Arsenault@amd.com> | 2017-01-18 02:10:08 +0000 |
---|---|---|
committer | Matt Arsenault <Matthew.Arsenault@amd.com> | 2017-01-18 02:10:08 +0000 |
commit | f411071d636d83f37ee98ab6a7c36c4c48c8c622 (patch) | |
tree | 3657680202f071145205988378b0156acb8a8945 /llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp | |
parent | ce9d04ce58486876ed75ca1394ae26982dc0ece4 (diff) | |
download | bcm5719-llvm-f411071d636d83f37ee98ab6a7c36c4c48c8c622.tar.gz bcm5719-llvm-f411071d636d83f37ee98ab6a7c36c4c48c8c622.zip |
DAG: Consider nnan in isKnownNeverNaN
llvm-svn: 292328
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index 24aed22e228..be3eef9234b 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -3061,6 +3061,9 @@ bool SelectionDAG::isKnownNeverNaN(SDValue Op) const { if (getTarget().Options.NoNaNsFPMath) return true; + if (const BinaryWithFlagsSDNode *BF = dyn_cast<BinaryWithFlagsSDNode>(Op)) + return BF->Flags.hasNoNaNs(); + // If the value is a constant, we can obviously see if it is a NaN or not. if (const ConstantFPSDNode *C = dyn_cast<ConstantFPSDNode>(Op)) return !C->getValueAPF().isNaN(); |