From 6f40b831e0e653f88cbb17bf00d739bae28b5816 Mon Sep 17 00:00:00 2001 From: Reid Spencer Date: Tue, 5 Dec 2006 07:18:07 +0000 Subject: [PATCH] Can't make these fail now with just BitCast. Previous failures must have been in conjunction with something else. By right, they should just be BitCasts. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32219 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/VMCore/ConstantFold.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); }