[llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp
Chris Lattner
sabre at nondot.org
Thu Feb 1 21:30:11 PST 2007
Changes in directory llvm/lib/Transforms/Scalar:
InstructionCombining.cpp updated: 1.620 -> 1.621
---
Log message:
bugfix for reid's shift patch.
---
Diffs of the changes: (+2 -2)
InstructionCombining.cpp | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp
diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.620 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.621
--- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.620 Thu Feb 1 20:16:22 2007
+++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp Thu Feb 1 23:29:55 2007
@@ -5454,10 +5454,10 @@
//
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;
}
}
More information about the llvm-commits
mailing list