Change inferred cast creation calls to more specific cast creations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32460 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Reid Spencer
2006-12-12 01:17:41 +00:00
parent f64945d83c
commit 15f46d6c28
5 changed files with 13 additions and 9 deletions

View File

@@ -239,7 +239,7 @@ static Value *LowerCTPOP(Value *V, Instruction *IP) {
for (unsigned i = 1, ct = 0; i != BitSize; i <<= 1, ++ct) {
Value *MaskCst =
ConstantExpr::getCast(ConstantInt::get(Type::ULongTy, MaskValues[ct]),
ConstantExpr::getTruncOrBitCast(ConstantInt::get(Type::ULongTy, MaskValues[ct]),
V->getType());
Value *LHS = BinaryOperator::createAnd(V, MaskCst, "cppop.and1", IP);
Value *VShift = new ShiftInst(Instruction::LShr, V,