summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/CBackend/CBackend.cpp
diff options
context:
space:
mode:
authorDale Johannesen <dalej@apple.com>2007-09-14 22:26:36 +0000
committerDale Johannesen <dalej@apple.com>2007-09-14 22:26:36 +0000
commit98d3a08d8f0bd3c3402e893cb81776da2184b40f (patch)
tree04beeb4e6a5eaf25f38cc094e153c84d5e2959a3 /llvm/lib/Target/CBackend/CBackend.cpp
parentdb47ee203a9eecfbeff427b4f20982b2c41708fa (diff)
downloadbcm5719-llvm-98d3a08d8f0bd3c3402e893cb81776da2184b40f.tar.gz
bcm5719-llvm-98d3a08d8f0bd3c3402e893cb81776da2184b40f.zip
Remove the assumption that FP's are either float or
double from some of the many places in the optimizers it appears, and do something reasonable with x86 long double. Make APInt::dump() public, remove newline, use it to dump ConstantSDNode's. Allow APFloats in FoldingSet. Expand X86 backend handling of long doubles (conversions to/from int, mostly). llvm-svn: 41967
Diffstat (limited to 'llvm/lib/Target/CBackend/CBackend.cpp')
-rw-r--r--llvm/lib/Target/CBackend/CBackend.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Target/CBackend/CBackend.cpp b/llvm/lib/Target/CBackend/CBackend.cpp
index 9fc30c45da1..5f6d5905bf5 100644
--- a/llvm/lib/Target/CBackend/CBackend.cpp
+++ b/llvm/lib/Target/CBackend/CBackend.cpp
@@ -604,6 +604,9 @@ void CWriter::printConstantVector(ConstantVector *CP) {
// only deal in IEEE FP).
//
static bool isFPCSafeToPrint(const ConstantFP *CFP) {
+ // Do long doubles the hard way for now.
+ if (CFP->getType()!=Type::FloatTy && CFP->getType()!=Type::DoubleTy)
+ return false;
APFloat APF = APFloat(CFP->getValueAPF()); // copy
if (CFP->getType()==Type::FloatTy)
APF.convert(APFloat::IEEEdouble, APFloat::rmNearestTiesToEven);
OpenPOWER on IntegriCloud