From: Chris Lattner Date: Tue, 12 Dec 2006 18:41:03 +0000 (+0000) Subject: Fix regression on 400.perlbench last night. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=078b631ff334b5fbd5953e4f0c35db5e5b25f88e;p=oota-llvm.git Fix regression on 400.perlbench last night. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32486 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp index 57b17a9c722..d15a843d408 100644 --- a/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/lib/Transforms/Scalar/InstructionCombining.cpp @@ -3112,7 +3112,7 @@ Instruction *InstCombiner::visitAnd(BinaryOperator &I) { } else if (CastOp->getOpcode() == Instruction::Or) { // Change: and (cast (or X, C1) to T), C2 // into : trunc(C1)&C2 iff trunc(C1)&C2 == C2 - Constant *C3 = ConstantExpr::getBitCast(AndCI, I.getType()); + Constant *C3 = ConstantExpr::getTrunc(AndCI, I.getType()); if (ConstantExpr::getAnd(C3, AndRHS) == AndRHS) // trunc(C1)&C2 return ReplaceInstUsesWith(I, AndRHS); }