this can only be fptrunc.
authorChris Lattner <sabre@nondot.org>
Tue, 12 Dec 2006 05:21:51 +0000 (05:21 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 12 Dec 2006 05:21:51 +0000 (05:21 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32473 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SelectionDAG/LegalizeDAG.cpp

index 3b6185c84ed75d041a15d5af75e34a18e0ac69cd..b4f25f5cdffb37b18ddb3250ff1d876b26717a3c 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::getFPCast(LLVMC, Type::FloatTy));
+        LLVMC = cast<ConstantFP>(ConstantExpr::getFPTrunc(LLVMC, Type::FloatTy));
         VT = MVT::f32;
         Extend = true;
       }