Fix long double -> uint64 conversion.
authorDale Johannesen <dalej@apple.com>
Fri, 28 Sep 2007 18:44:17 +0000 (18:44 +0000)
committerDale Johannesen <dalej@apple.com>
Fri, 28 Sep 2007 18:44:17 +0000 (18:44 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42440 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SelectionDAG/LegalizeDAG.cpp

index b976195847f280abbd1433ef63592a0ee35b6f7e..ffb2a66527bf969cba1c2d6d5b45719a813b3dab 100644 (file)
@@ -5398,8 +5398,12 @@ void SelectionDAGLegalize::ExpandOp(SDOperand Op, SDOperand &Lo, SDOperand &Hi){
     RTLIB::Libcall LC;
     if (Node->getOperand(0).getValueType() == MVT::f32)
       LC = RTLIB::FPTOUINT_F32_I64;
-    else
+    else if (Node->getOperand(0).getValueType() == MVT::f64)
       LC = RTLIB::FPTOUINT_F64_I64;
+    else if (Node->getOperand(0).getValueType() == MVT::f80 ||
+             Node->getOperand(0).getValueType() == MVT::f128 ||
+             Node->getOperand(0).getValueType() == MVT::ppcf128)
+      LC = RTLIB::FPTOUINT_LD_I64;
     Lo = ExpandLibCall(TLI.getLibcallName(LC), Node,
                        false/*sign irrelevant*/, Hi);
     break;