diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2007-02-27 23:33:03 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2007-02-27 23:33:03 +0000 |
commit | 4aeaeaf894d56d6bb3880f764d2ed546a6109e97 (patch) | |
tree | 938ba9cf14b3e6f71248714c9b76671d89e9d415 /llvm/lib | |
parent | 3370b04a66ed47272c43a62893cf3a402043758c (diff) | |
download | bcm5719-llvm-4aeaeaf894d56d6bb3880f764d2ed546a6109e97.tar.gz bcm5719-llvm-4aeaeaf894d56d6bb3880f764d2ed546a6109e97.zip |
Pull out the stops.
llvm-svn: 34703
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/VMCore/ConstantFold.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/VMCore/ConstantFold.cpp b/llvm/lib/VMCore/ConstantFold.cpp index 106bf5f6a19..73a6541a062 100644 --- a/llvm/lib/VMCore/ConstantFold.cpp +++ b/llvm/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)) { |