Pull out the stops.
authorReid Spencer <rspencer@reidspencer.com>
Tue, 27 Feb 2007 23:33:03 +0000 (23:33 +0000)
committerReid Spencer <rspencer@reidspencer.com>
Tue, 27 Feb 2007 23:33:03 +0000 (23:33 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34703 91177308-0d34-0410-b5e6-96231b3b80d8

lib/VMCore/ConstantFold.cpp

index 106bf5f6a19d0699a760cfd2df3caee190f3a6e8..73a6541a062bda1fbb7fd369c0acef94b5453f42 100644 (file)
@@ -198,13 +198,11 @@ Constant *llvm::ConstantFoldCastInstruction(unsigned opc, const Constant *V,
     return 0;                   // Other pointer types cannot be casted
   case Instruction::UIToFP:
     if (const ConstantInt *CI = dyn_cast<ConstantInt>(V))
-      if (CI->getType()->getBitWidth() <= 64)
-        return ConstantFP::get(DestTy, CI->getValue().roundToDouble());
+      return ConstantFP::get(DestTy, CI->getValue().roundToDouble());
     return 0;
   case Instruction::SIToFP:
     if (const ConstantInt *CI = dyn_cast<ConstantInt>(V))
-      if (CI->getType()->getBitWidth() <= 64)
-        return ConstantFP::get(DestTy, CI->getValue().signedRoundToDouble()); 
+      return ConstantFP::get(DestTy, CI->getValue().signedRoundToDouble()); 
     return 0;
   case Instruction::ZExt:
     if (const ConstantInt *CI = dyn_cast<ConstantInt>(V)) {