aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Transforms/Scalar
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-01-12 19:47:05 +0000
committerChris Lattner <sabre@nondot.org>2004-01-12 19:47:05 +0000
commit76f7fe25d9e396701dfef937b2e60b07e57114b9 (patch)
treef89013c2df0a8461d75a1759e5df8d08d31cb97b /lib/Transforms/Scalar
parent7e208904ae8eeef888c3a6eecd38daa779ca36c9 (diff)
downloadexternal_llvm-76f7fe25d9e396701dfef937b2e60b07e57114b9.zip
external_llvm-76f7fe25d9e396701dfef937b2e60b07e57114b9.tar.gz
external_llvm-76f7fe25d9e396701dfef937b2e60b07e57114b9.tar.bz2
Fix bug in previous checkin
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10798 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar')
-rw-r--r--lib/Transforms/Scalar/InstructionCombining.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp
index 978a3db..14e2c70 100644
--- a/lib/Transforms/Scalar/InstructionCombining.cpp
+++ b/lib/Transforms/Scalar/InstructionCombining.cpp
@@ -768,7 +768,9 @@ Instruction *InstCombiner::OptAndOp(Instruction *Op,
ConstantIntegral *AndRHS,
BinaryOperator &TheAnd) {
Value *X = Op->getOperand(0);
- Constant *Together = ConstantExpr::get(Instruction::And, AndRHS, OpRHS);
+ Constant *Together = 0;
+ if (!isa<ShiftInst>(Op))
+ Together = ConstantExpr::get(Instruction::And, AndRHS, OpRHS);
switch (Op->getOpcode()) {
case Instruction::Xor: