diff options
Diffstat (limited to 'include/llvm/CodeGen/SelectionDAGNodes.h')
-rw-r--r-- | include/llvm/CodeGen/SelectionDAGNodes.h | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/include/llvm/CodeGen/SelectionDAGNodes.h b/include/llvm/CodeGen/SelectionDAGNodes.h index 3606c430ee..eb634a627c 100644 --- a/include/llvm/CodeGen/SelectionDAGNodes.h +++ b/include/llvm/CodeGen/SelectionDAGNodes.h @@ -25,6 +25,7 @@ #include "llvm/ADT/GraphTraits.h" #include "llvm/ADT/iterator" #include "llvm/Support/DataTypes.h" +#include "llvm/Support/MathExtras.h" #include <cassert> #include <vector> @@ -742,17 +743,7 @@ public: /// As such, this method can be used to do an exact bit-for-bit comparison of /// two floating point values. bool isExactlyValue(double V) const { - union { - double V; - uint64_t I; - } T1; - T1.V = Value; - union { - double V; - uint64_t I; - } T2; - T2.V = V; - return T1.I == T2.I; + return DoubleToBits(V) == DoubleToBits(Value); } static bool classof(const ConstantFPSDNode *) { return true; } |