aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2007-02-27 23:33:03 +0000
committerReid Spencer <rspencer@reidspencer.com>2007-02-27 23:33:03 +0000
commit012d50b8516c4a9013f478b54d80c3506103f926 (patch)
treea2c9c8784c90c43379fb5b8c371ba725eec5f207
parent80f8481ef0ecbe52ce9b6f17bdcf412438c2f14e (diff)
downloadexternal_llvm-012d50b8516c4a9013f478b54d80c3506103f926.zip
external_llvm-012d50b8516c4a9013f478b54d80c3506103f926.tar.gz
external_llvm-012d50b8516c4a9013f478b54d80c3506103f926.tar.bz2
Pull out the stops.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34703 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/VMCore/ConstantFold.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/VMCore/ConstantFold.cpp b/lib/VMCore/ConstantFold.cpp
index 106bf5f..73a6541 100644
--- a/lib/VMCore/ConstantFold.cpp
+++ b/lib/VMCore/ConstantFold.cpp
@@ -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)) {