diff --git a/lib/VMCore/ConstantFold.cpp b/lib/VMCore/ConstantFold.cpp index 58f1d444f67..4a274a71d40 100644 --- a/lib/VMCore/ConstantFold.cpp +++ b/lib/VMCore/ConstantFold.cpp @@ -777,7 +777,7 @@ static Constant *CastConstantPacked(ConstantPacked *CP, uint64_t V = DoubleToBits(cast(CP->getOperand(i))->getValue()); Constant *C = ConstantInt::get(Type::ULongTy, V); - Result.push_back(ConstantExpr::getTruncOrBitCast(C, DstEltTy )); + Result.push_back(ConstantExpr::getBitCast(C, DstEltTy )); } return ConstantPacked::get(Result); } @@ -786,7 +786,7 @@ static Constant *CastConstantPacked(ConstantPacked *CP, for (unsigned i = 0; i != SrcNumElts; ++i) { uint32_t V = FloatToBits(cast(CP->getOperand(i))->getValue()); Constant *C = ConstantInt::get(Type::UIntTy, V); - Result.push_back(ConstantExpr::getTruncOrBitCast(C, DstEltTy)); + Result.push_back(ConstantExpr::getBitCast(C, DstEltTy)); } return ConstantPacked::get(Result); }