Add APInt interfaces to APFloat (allows directly
access to bits).  Use them in place of float and
double interfaces where appropriate.
First bits of x86 long double constants handling 
(untested, probably does not work).



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41858 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index 01ec5c9..85a76f4 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -109,13 +109,12 @@
   } else if (isa<ConstantFPSDNode>(NotZero)) {
     MVT::ValueType VT = NotZero.getValueType();
     if (VT== MVT::f64) {
-      if (DoubleToBits(cast<ConstantFPSDNode>(NotZero)->
-                       getValueAPF().convertToDouble()) !=
-          (uint64_t)-1)
+      if (*((cast<ConstantFPSDNode>(NotZero)->getValueAPF().
+                  convertToAPInt().getRawData())) != (uint64_t)-1)
         return false;
     } else {
-      if (FloatToBits(cast<ConstantFPSDNode>(NotZero)->
-                      getValueAPF().convertToFloat()) !=
+      if ((uint32_t)*cast<ConstantFPSDNode>(NotZero)->
+                      getValueAPF().convertToAPInt().getRawData() != 
           (uint32_t)-1)
         return false;
     }
@@ -1698,9 +1697,9 @@
     }
     case ISD::BIT_CONVERT:
       if (VT == MVT::i32 && C->getValueType(0) == MVT::f32)
-        return getConstant(FloatToBits(V.convertToFloat()), VT);
+        return getConstant((uint32_t)*V.convertToAPInt().getRawData(), VT);
       else if (VT == MVT::i64 && C->getValueType(0) == MVT::f64)
-        return getConstant(DoubleToBits(V.convertToDouble()), VT);
+        return getConstant(*V.convertToAPInt().getRawData(), VT);
       break;
     }
   }