projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f449a2a
)
Fix bug: InstCombine/2003-05-26-CastMiscompile.ll
author
Chris Lattner
<sabre@nondot.org>
Mon, 26 May 2003 23:41:32 +0000
(23:41 +0000)
committer
Chris Lattner
<sabre@nondot.org>
Mon, 26 May 2003 23:41:32 +0000
(23:41 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6338
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Transforms/Scalar/InstructionCombining.cpp
patch
|
blob
|
history
diff --git
a/lib/Transforms/Scalar/InstructionCombining.cpp
b/lib/Transforms/Scalar/InstructionCombining.cpp
index 7c77a666d6ef0935413f076fceabded2e44f66e8..cec8e5ef79c1978d5497782e1687279b24ce72f4 100644
(file)
--- 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!");
- u
nsigned AndValue = (1U
<< CSrc->getType()->getPrimitiveSize()*8)-1;
+ u
int64_t AndValue = (1ULL
<< CSrc->getType()->getPrimitiveSize()*8)-1;
Constant *AndOp = ConstantUInt::get(CI.getType(), AndValue);
return BinaryOperator::create(Instruction::And, CSrc->getOperand(0),
AndOp);