mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-14 23:48:49 +00:00
Fix bug: InstCombine/2003-05-26-CastMiscompile.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6338 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f449a2a6ac
commit
bd4ecf769d
@ -897,7 +897,7 @@ Instruction *InstCombiner::visitCastInst(CastInst &CI) {
|
||||
CSrc->getType()->getPrimitiveSize() < CI.getType()->getPrimitiveSize()){
|
||||
assert(CSrc->getType() != Type::ULongTy &&
|
||||
"Cannot have type bigger than ulong!");
|
||||
unsigned AndValue = (1U << CSrc->getType()->getPrimitiveSize()*8)-1;
|
||||
uint64_t AndValue = (1ULL << CSrc->getType()->getPrimitiveSize()*8)-1;
|
||||
Constant *AndOp = ConstantUInt::get(CI.getType(), AndValue);
|
||||
return BinaryOperator::create(Instruction::And, CSrc->getOperand(0),
|
||||
AndOp);
|
||||
|
Loading…
Reference in New Issue
Block a user