summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
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
commit196897c42457211b000ca17e9e90f5cee75ba2a5 (patch)
tree9509c8be3c63724eb724ed8b3215d29275112d9d /llvm/lib/Transforms
parentadf7b998bda1a29a647420df7d6f1bfec53d8cc9 (diff)
downloadbcm5719-llvm-196897c42457211b000ca17e9e90f5cee75ba2a5.tar.gz
bcm5719-llvm-196897c42457211b000ca17e9e90f5cee75ba2a5.zip
Fix bug: InstCombine/2003-05-26-CastMiscompile.ll
llvm-svn: 6338
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/Scalar/InstructionCombining.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
index 7c77a666d6e..cec8e5ef79c 100644
--- a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
+++ b/llvm/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);
OpenPOWER on IntegriCloud