mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-14 16:33:28 +00:00
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:
parent
b74b181630
commit
6e7dd9db6b
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user