From 9e3d3abd937c9bb79d56d25ec0e0724c7cbba67c Mon Sep 17 00:00:00 2001 From: Dale Johannesen Date: Fri, 14 Sep 2007 22:26:36 +0000 Subject: 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). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41967 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/CBackend/CBackend.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/Target/CBackend') diff --git a/lib/Target/CBackend/CBackend.cpp b/lib/Target/CBackend/CBackend.cpp index 9fc30c4..5f6d590 100644 --- a/lib/Target/CBackend/CBackend.cpp +++ b/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); -- cgit v1.1