aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-05-26 23:41:32 +0000
committerChris Lattner <sabre@nondot.org>2003-05-26 23:41:32 +0000
commitbd4ecf769def9fff84ab27e6467e5510105caf99 (patch)
tree6b17022e167094e975b0ddc7cbd6e00751841516
parentf449a2a6acb4b3c1a81e33ac047b1a86fa1ce44f (diff)
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
-rw-r--r--lib/Transforms/Scalar/InstructionCombining.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp
index 7c77a666d6..cec8e5ef79 100644
--- a/lib/Transforms/Scalar/InstructionCombining.cpp
+++ b/lib/Transforms/Scalar/InstructionCombining.cpp
@@ -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);