While creating mask, use 1ULL instead of 1.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31062 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Devang Patel 2006-10-20 01:16:56 +00:00
parent b74b181630
commit 6e7dd9db6b

View File

@ -5595,7 +5595,7 @@ Instruction *InstCombiner::visitCastInst(CastInst &CI) {
unsigned SrcBitSize = Src->getType()->getPrimitiveSizeInBits();
unsigned DestBitSize = CI.getType()->getPrimitiveSizeInBits();
assert(SrcBitSize < DestBitSize && "Not a zext?");
Constant *C = ConstantUInt::get(Type::ULongTy, (1 << SrcBitSize)-1);
Constant *C = ConstantUInt::get(Type::ULongTy, (1ULL << SrcBitSize)-1);
C = ConstantExpr::getCast(C, CI.getType());
return BinaryOperator::createAnd(Res, C);
}