diff --git a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp index 3b6185c84ed..b4f25f5cdff 100644 --- a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp +++ b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp @@ -790,7 +790,7 @@ SDOperand SelectionDAGLegalize::LegalizeOp(SDOperand Op) { // Only do this if the target has a native EXTLOAD instruction from // f32. TLI.isLoadXLegal(ISD::EXTLOAD, MVT::f32)) { - LLVMC = cast(ConstantExpr::getFPCast(LLVMC, Type::FloatTy)); + LLVMC = cast(ConstantExpr::getFPTrunc(LLVMC, Type::FloatTy)); VT = MVT::f32; Extend = true; }