From bb4e7b2fa4e4edd7ef621a36ff8239314e7e1168 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 12 Dec 2006 19:11:20 +0000 Subject: [PATCH] this can be trunc or bitcast, per line 3092. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32487 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/Scalar/InstructionCombining.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp index d15a843d408..a1ed221a7e1 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::getTrunc(AndCI, I.getType()); + Constant *C3 = ConstantExpr::getTruncOrBitCast(AndCI,I.getType()); if (ConstantExpr::getAnd(C3, AndRHS) == AndRHS) // trunc(C1)&C2 return ReplaceInstUsesWith(I, AndRHS); }