summaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen/SelectionDAGNodes.h
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-02-24 06:52:40 +0000
committerDan Gohman <gohman@apple.com>2010-02-24 06:52:40 +0000
commite832693acbfc713bcaf44720efa8149e93a38027 (patch)
treee44715f6b93875ca5ab04613a97111de6329d7e3 /include/llvm/CodeGen/SelectionDAGNodes.h
parent39516a632385cb8103c94fceb6cfed13897a24b4 (diff)
downloadllvm-e832693acbfc713bcaf44720efa8149e93a38027.tar.gz
llvm-e832693acbfc713bcaf44720efa8149e93a38027.tar.bz2
llvm-e832693acbfc713bcaf44720efa8149e93a38027.tar.xz
When forming SSE min and max nodes for UGE and ULE comparisons, it's
necessary to swap the operands to handle NaN and negative zero properly. Also, reintroduce logic for checking for NaN conditions when forming SSE min and max instructions, fixed to take into consideration NaNs and negative zeros. This allows forming min and max instructions in more cases. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97025 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/SelectionDAGNodes.h')
-rw-r--r--include/llvm/CodeGen/SelectionDAGNodes.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/SelectionDAGNodes.h b/include/llvm/CodeGen/SelectionDAGNodes.h
index 9066913620..950963ea18 100644
--- a/include/llvm/CodeGen/SelectionDAGNodes.h
+++ b/include/llvm/CodeGen/SelectionDAGNodes.h
@@ -1815,6 +1815,12 @@ public:
const APFloat& getValueAPF() const { return Value->getValueAPF(); }
const ConstantFP *getConstantFPValue() const { return Value; }
+ /// isZero - Return true if the value is positive or negative zero.
+ bool isZero() const { return Value->isZero(); }
+
+ /// isNaN - Return true if the value is a NaN.
+ bool isNaN() const { return Value->isNaN(); }
+
/// isExactlyValue - We don't rely on operator== working on double values, as
/// it returns true for things that are clearly not equal, like -0.0 and 0.0.
/// As such, this method can be used to do an exact bit-for-bit comparison of