summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorDale Johannesen <dalej@apple.com>2007-09-19 17:53:26 +0000
committerDale Johannesen <dalej@apple.com>2007-09-19 17:53:26 +0000
commitb59d25fe540a980c74efa1caab92a82212a296a3 (patch)
treec2b1ece5cd9ea6e2280aa12945a9504434ae0e78 /llvm/lib
parentd79f3d51b17bae75fd05d68bc1f82cdb13c29d4f (diff)
downloadbcm5719-llvm-b59d25fe540a980c74efa1caab92a82212a296a3.tar.gz
bcm5719-llvm-b59d25fe540a980c74efa1caab92a82212a296a3.zip
Fix longdouble -> uint conversion.
llvm-svn: 42143
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
index c4290c8aa50..10a5f212e02 100644
--- a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
@@ -3211,8 +3211,9 @@ SDOperand SelectionDAGLegalize::LegalizeOp(SDOperand Op) {
SDOperand True, False;
MVT::ValueType VT = Node->getOperand(0).getValueType();
MVT::ValueType NVT = Node->getValueType(0);
- unsigned ShiftAmt = MVT::getSizeInBits(Node->getValueType(0))-1;
- Tmp2 = DAG.getConstantFP((double)(1ULL << ShiftAmt), VT);
+ unsigned ShiftAmt = MVT::getSizeInBits(NVT)-1;
+ Tmp2 = DAG.getConstantFP(APFloat(APInt(MVT::getSizeInBits(VT),
+ 1ULL << ShiftAmt)), VT);
Tmp3 = DAG.getSetCC(TLI.getSetCCResultTy(),
Node->getOperand(0), Tmp2, ISD::SETLT);
True = DAG.getNode(ISD::FP_TO_SINT, NVT, Node->getOperand(0));
OpenPOWER on IntegriCloud