git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51475 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Nick Lewycky 2008-05-23 04:39:38 +00:00
parent 02d639fcc0
commit 7d26bd8e97

View File

@ -2627,7 +2627,7 @@ Instruction *InstCombiner::visitAdd(BinaryOperator &I) {
}
}
// X + X --> X
// X + X --> X << 1
if (I.getType()->isInteger() && I.getType() != Type::Int1Ty) {
if (Instruction *Result = AssociativeOpt(I, AddRHS(RHS))) return Result;