Changes in directory llvm/lib/VMCore:
ConstantFold.cpp updated: 1.146 -> 1.147 --- Log message: Fix constant folding of fp->int bitcast for vectors. --- Diffs of the changes: (+2 -2) ConstantFold.cpp | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/lib/VMCore/ConstantFold.cpp diff -u llvm/lib/VMCore/ConstantFold.cpp:1.146 llvm/lib/VMCore/ConstantFold.cpp:1.147 --- llvm/lib/VMCore/ConstantFold.cpp:1.146 Thu Mar 1 18:28:52 2007 +++ llvm/lib/VMCore/ConstantFold.cpp Sat Mar 3 02:32:46 2007 @@ -86,9 +86,9 @@ if (SrcEltTy->getTypeID() == Type::DoubleTyID) { for (unsigned i = 0; i != SrcNumElts; ++i) { - double V = + uint64_t V = DoubleToBits(cast<ConstantFP>(CV->getOperand(i))->getValue()); - Constant *C = ConstantInt::get(APIntOps::RoundDoubleToAPInt(V)); + Constant *C = ConstantInt::get(Type::Int64Ty, V); Result.push_back(ConstantExpr::getBitCast(C, DstEltTy )); } return ConstantVector::get(Result); _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits