From 3cf889f75ef6e4ae454ddb72fdf7bdeb89193f0a Mon Sep 17 00:00:00 2001 From: Dale Johannesen Date: Fri, 31 Aug 2007 04:03:46 +0000 Subject: Enhance APFloat to retain bits of NaNs (fixes oggenc). Use APFloat interfaces for more references, mostly of ConstantFPSDNode. llvm-svn: 41632 --- llvm/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp') diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp index 0ce46fdf041..d03439b4c44 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp @@ -95,7 +95,7 @@ std::string DOTGraphTraits::getNodeLabel(const SDNode *Node, if (const ConstantSDNode *CSDN = dyn_cast(Node)) { Op += ": " + utostr(CSDN->getValue()); } else if (const ConstantFPSDNode *CSDN = dyn_cast(Node)) { - Op += ": " + ftostr(CSDN->getValue()); + Op += ": " + ftostr(CSDN->getValueAPF()); } else if (const GlobalAddressSDNode *GADN = dyn_cast(Node)) { int offset = GADN->getOffset(); @@ -115,7 +115,7 @@ std::string DOTGraphTraits::getNodeLabel(const SDNode *Node, Op += "<" + SS.str() + ">"; } else { if (ConstantFP *CFP = dyn_cast(CP->getConstVal())) - Op += "<" + ftostr(CFP->getValue()) + ">"; + Op += "<" + ftostr(CFP->getValueAPF()) + ">"; else if (ConstantInt *CI = dyn_cast(CP->getConstVal())) Op += "<" + utostr(CI->getZExtValue()) + ">"; else { -- cgit v1.2.3