convertFromInteger, as originally written, expected sign-extended
[oota-llvm.git] / lib / CodeGen / SelectionDAG / LegalizeDAG.cpp
index a928968ef90cb28b4d6ed098634b08ec79e86e62..09f45d2ce7e6ee68a927bc06b6319511bc6fee43 100644 (file)
@@ -3234,8 +3234,8 @@ SDOperand SelectionDAGLegalize::LegalizeOp(SDOperand Op) {
           const uint64_t zero[] = {0, 0};
           APFloat apf = APFloat(APInt(MVT::getSizeInBits(VT), 2, zero));
           uint64_t x = 1ULL << ShiftAmt;
-          (void)apf.convertFromInteger(&x, MVT::getSizeInBits(NVT), false, 
-                                       APFloat::rmNearestTiesToEven);
+          (void)apf.convertFromZeroExtendedInteger
+            (&x, MVT::getSizeInBits(NVT), false, APFloat::rmNearestTiesToEven);
           Tmp2 = DAG.getConstantFP(apf, VT);
           Tmp3 = DAG.getSetCC(TLI.getSetCCResultTy(),
                             Node->getOperand(0), Tmp2, ISD::SETLT);