aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/VMCore/ConstantFold.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/VMCore/ConstantFold.cpp b/lib/VMCore/ConstantFold.cpp
index fb8b6db5cf..917098d351 100644
--- a/lib/VMCore/ConstantFold.cpp
+++ b/lib/VMCore/ConstantFold.cpp
@@ -213,7 +213,7 @@ 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)) {
- 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)