From: Chris Lattner Date: Mon, 12 Jan 2004 19:47:05 +0000 (+0000) Subject: Fix bug in previous checkin X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=76f7fe25d9e396701dfef937b2e60b07e57114b9;p=oota-llvm.git Fix bug in previous checkin git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10798 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp index 978a3db7387..14e2c70a8c9 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(Op)) + Together = ConstantExpr::get(Instruction::And, AndRHS, OpRHS); switch (Op->getOpcode()) { case Instruction::Xor: