convertFromInteger, as originally written, expected sign-extended
[oota-llvm.git] / lib / CodeGen / SelectionDAG / SelectionDAG.cpp
index 1e76435b07bbf85d2687bb2db9209ec821fa2709..6a9b14907a05175434f6e06cd1c18317c5a25bea 100644 (file)
@@ -1595,7 +1595,7 @@ SDOperand SelectionDAG::getNode(unsigned Opcode, MVT::ValueType VT,
     case ISD::SINT_TO_FP: {
       const uint64_t zero[] = {0, 0};
       APFloat apf = APFloat(APInt(MVT::getSizeInBits(VT), 2, zero));
-      (void)apf.convertFromInteger(&Val, 
+      (void)apf.convertFromZeroExtendedInteger(&Val, 
                                MVT::getSizeInBits(Operand.getValueType()), 
                                Opcode==ISD::SINT_TO_FP,
                                APFloat::rmNearestTiesToEven);