summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2004-12-07 07:38:08 +0000
committerReid Spencer <rspencer@reidspencer.com>2004-12-07 07:38:08 +0000
commitb95f8ab3ef1b955cb2616d1d20e5ad846b0bc0e8 (patch)
tree943f8dc3bfa1a2dc515e72d7d961b6f437e73cb1 /llvm/lib
parentae056bdd365139bb41a4885b7ad3f55f1f2d6d03 (diff)
downloadbcm5719-llvm-b95f8ab3ef1b955cb2616d1d20e5ad846b0bc0e8.tar.gz
bcm5719-llvm-b95f8ab3ef1b955cb2616d1d20e5ad846b0bc0e8.zip
Revert the recent patches to "fix" ConstantFP::isValueValidForType. None
of them seem to work everywhere. llvm-svn: 18598
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/VMCore/Constants.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/llvm/lib/VMCore/Constants.cpp b/llvm/lib/VMCore/Constants.cpp
index 6aa218c74e7..97e4fa565c7 100644
--- a/llvm/lib/VMCore/Constants.cpp
+++ b/llvm/lib/VMCore/Constants.cpp
@@ -21,7 +21,6 @@
#include "llvm/ADT/StringExtras.h"
#include <algorithm>
#include <iostream>
-#include "math.h"
using namespace llvm;
ConstantBool *ConstantBool::True = new ConstantBool(true);
@@ -441,11 +440,8 @@ bool ConstantFP::isValueValidForType(const Type *Ty, double Val) {
default:
return false; // These can't be represented as floating point!
+ // TODO: Figure out how to test if a double can be cast to a float!
case Type::FloatTyID:
- // Since we're passed a double but the ConstantFP is of type float, make
- // sure that the double value is in the range of a float
- return isinf(Val) || isnan(Val) || (Val >= -HUGE_VALF && Val <= HUGE_VALF);
-
case Type::DoubleTyID:
return true; // This is the largest type...
}
OpenPOWER on IntegriCloud