Change inferred cast creation calls to more specific cast creations.
[oota-llvm.git] / lib / CodeGen / SelectionDAG / LegalizeDAG.cpp
index 4d5d3da8ce91888fc1d1a7ddface6ce3aa702bd8..4cbc9fe4ecf759ddd03d904cc24e7d474fbd9db8 100644 (file)
@@ -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<ConstantFP>(ConstantExpr::getCast(LLVMC, Type::FloatTy));
+        LLVMC = cast<ConstantFP>(ConstantExpr::getFPCast(LLVMC, Type::FloatTy));
         VT = MVT::f32;
         Extend = true;
       }