Don't try to convert PPC long double.
authorDale Johannesen <dalej@apple.com>
Mon, 28 Apr 2008 19:46:58 +0000 (19:46 +0000)
committerDale Johannesen <dalej@apple.com>
Mon, 28 Apr 2008 19:46:58 +0000 (19:46 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50369 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Constants.h

index d6529c7d5ffe1119ad7b1427fb018b52bd7d3148..32898894c57027f1d2317208757dff4a7b5d2302 100644 (file)
@@ -263,6 +263,9 @@ public:
   bool isExactlyValue(const APFloat& V) const;
 
   bool isExactlyValue(double V) const {
+    // convert is not supported on this type
+    if (&Val.getSemantics() == &APFloat::PPCDoubleDouble)
+      return false;
     APFloat FV(V);
     FV.convert(Val.getSemantics(), APFloat::rmNearestTiesToEven);
     return isExactlyValue(FV);