diff options
author | Dale Johannesen <dalej@apple.com> | 2007-09-20 16:50:21 +0000 |
---|---|---|
committer | Dale Johannesen <dalej@apple.com> | 2007-09-20 16:50:21 +0000 |
commit | 4bf6ac5f40ba501713755cd9c984e8abce1f3f5d (patch) | |
tree | eee1c431876e1bafda3fe571d073aa538e1d48bd /lib/VMCore/ConstantFold.cpp | |
parent | c20f5b086ecd19eb009f31c1113f14ea94f3c113 (diff) | |
download | external_llvm-4bf6ac5f40ba501713755cd9c984e8abce1f3f5d.zip external_llvm-4bf6ac5f40ba501713755cd9c984e8abce1f3f5d.tar.gz external_llvm-4bf6ac5f40ba501713755cd9c984e8abce1f3f5d.tar.bz2 |
Fix dumb regression in constant folding (Regression/C/casts)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42165 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/ConstantFold.cpp')
-rw-r--r-- | lib/VMCore/ConstantFold.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/VMCore/ConstantFold.cpp b/lib/VMCore/ConstantFold.cpp index fb8b6db..917098d 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) |