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:
2d1222c
)
bugfix for reid's shift patch.
author
Chris Lattner
<sabre@nondot.org>
Fri, 2 Feb 2007 05:29:55 +0000
(
05:29
+0000)
committer
Chris Lattner
<sabre@nondot.org>
Fri, 2 Feb 2007 05:29:55 +0000
(
05:29
+0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33779
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 4aa92ec6d4fdcee2bc6148322b965f7e9253787d..0306c3919bd53cbc69b5a288e0c0aad323118c30 100644
(file)
--- a/
lib/Transforms/Scalar/InstructionCombining.cpp
+++ b/
lib/Transforms/Scalar/InstructionCombining.cpp
@@
-5454,10
+5454,10
@@
Instruction *InstCombiner::FoldShiftByConstant(Value *Op0, ConstantInt *Op1,
//
unsigned TypeBits = Op0->getType()->getPrimitiveSizeInBits();
if (Op1->getZExtValue() >= TypeBits) {
- if (
isUnsignedShift || isLeftShift
)
+ if (
I.getOpcode() != Instruction::AShr
)
return ReplaceInstUsesWith(I, Constant::getNullValue(Op0->getType()));
else {
- I.setOperand(1, ConstantInt::get(
Type::Int8Ty
, TypeBits-1));
+ I.setOperand(1, ConstantInt::get(
I.getType()
, TypeBits-1));
return &I;
}
}