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
This commit is contained in:
Reid Spencer 2006-12-05 07:18:07 +00:00
parent 35c1c04e8a
commit 6f40b831e0

View File

@ -777,7 +777,7 @@ static Constant *CastConstantPacked(ConstantPacked *CP,
uint64_t V = uint64_t V =
DoubleToBits(cast<ConstantFP>(CP->getOperand(i))->getValue()); DoubleToBits(cast<ConstantFP>(CP->getOperand(i))->getValue());
Constant *C = ConstantInt::get(Type::ULongTy, V); 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); return ConstantPacked::get(Result);
} }
@ -786,7 +786,7 @@ static Constant *CastConstantPacked(ConstantPacked *CP,
for (unsigned i = 0; i != SrcNumElts; ++i) { for (unsigned i = 0; i != SrcNumElts; ++i) {
uint32_t V = FloatToBits(cast<ConstantFP>(CP->getOperand(i))->getValue()); uint32_t V = FloatToBits(cast<ConstantFP>(CP->getOperand(i))->getValue());
Constant *C = ConstantInt::get(Type::UIntTy, V); 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); return ConstantPacked::get(Result);
} }