diff options
Diffstat (limited to 'llvm/lib/Transforms/Scalar/InstructionCombining.cpp')
| -rw-r--r-- | llvm/lib/Transforms/Scalar/InstructionCombining.cpp | 4 | 
1 files changed, 4 insertions, 0 deletions
| diff --git a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp index 61acad04f32..f8f0573395d 100644 --- a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp @@ -1294,6 +1294,10 @@ Instruction *InstCombiner::OptAndOp(Instruction *Op,            ShVal = InsertNewInstBefore(new ShiftInst(Instruction::Shr, ShVal,                                                      OpRHS, Op->getName()),                                        TheAnd); +          Value *AndRHS2 = ConstantExpr::getCast(AndRHS, ShVal->getType()); +          ShVal = InsertNewInstBefore(BinaryOperator::createAnd(ShVal, AndRHS2, +                                                             TheAnd.getName()), +                                      TheAnd);            return new CastInst(ShVal, Op->getType());          }        } | 

