Fix bug in previous checkin

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10798 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2004-01-12 19:47:05 +00:00
parent 7e208904ae
commit 76f7fe25d9

View File

@ -768,7 +768,9 @@ Instruction *InstCombiner::OptAndOp(Instruction *Op,
ConstantIntegral *AndRHS, ConstantIntegral *AndRHS,
BinaryOperator &TheAnd) { BinaryOperator &TheAnd) {
Value *X = Op->getOperand(0); 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()) { switch (Op->getOpcode()) {
case Instruction::Xor: case Instruction::Xor: