diff options
author | Chris Lattner <sabre@nondot.org> | 2004-01-12 19:47:05 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-01-12 19:47:05 +0000 |
commit | fcf21a75b0a8e847827b77d58e6a8918e0e0dd90 (patch) | |
tree | c0ec46e936d10c14f890868e992667d930093783 /llvm/lib/Transforms/Scalar/InstructionCombining.cpp | |
parent | abc7519fc824306cb0053873971391f1ee639629 (diff) | |
download | bcm5719-llvm-fcf21a75b0a8e847827b77d58e6a8918e0e0dd90.tar.gz bcm5719-llvm-fcf21a75b0a8e847827b77d58e6a8918e0e0dd90.zip |
Fix bug in previous checkin
llvm-svn: 10798
Diffstat (limited to 'llvm/lib/Transforms/Scalar/InstructionCombining.cpp')
-rw-r--r-- | llvm/lib/Transforms/Scalar/InstructionCombining.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp index 978a3db7387..14e2c70a8c9 100644 --- a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/llvm/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: |