[llvm-commits] [llvm] r42165 - /llvm/trunk/lib/VMCore/ConstantFold.cpp
Dale Johannesen
dalej at apple.com
Thu Sep 20 09:50:21 PDT 2007
Author: johannes
Date: Thu Sep 20 11:50:21 2007
New Revision: 42165
URL: http://llvm.org/viewvc/llvm-project?rev=42165&view=rev
Log:
Fix dumb regression in constant folding (Regression/C/casts)
Modified:
llvm/trunk/lib/VMCore/ConstantFold.cpp
Modified: llvm/trunk/lib/VMCore/ConstantFold.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/ConstantFold.cpp?rev=42165&r1=42164&r2=42165&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/ConstantFold.cpp (original)
+++ llvm/trunk/lib/VMCore/ConstantFold.cpp Thu Sep 20 11:50:21 2007
@@ -213,7 +213,7 @@
return 0; // Other pointer types cannot be casted
case Instruction::UIToFP:
if (const ConstantInt *CI = dyn_cast<ConstantInt>(V)) {
- double d = CI->getValue().signedRoundToDouble();
+ double d = CI->getValue().roundToDouble();
if (DestTy==Type::FloatTy)
return ConstantFP::get(DestTy, APFloat((float)d));
else if (DestTy==Type::DoubleTy)
More information about the llvm-commits
mailing list