add is always integer, thanks to Frits for noticing this.
llvm-svn: 125774
This commit is contained in:
parent
2a666fc2c7
commit
d406764d52
|
@ -147,7 +147,7 @@ Instruction *InstCombiner::visitAdd(BinaryOperator &I) {
|
|||
return BinaryOperator::CreateXor(LHS, RHS);
|
||||
|
||||
// X + X --> X << 1
|
||||
if (LHS == RHS && I.getType()->isIntegerTy()) {
|
||||
if (LHS == RHS) {
|
||||
BinaryOperator *New =
|
||||
BinaryOperator::CreateShl(LHS, ConstantInt::get(I.getType(), 1));
|
||||
New->setHasNoSignedWrap(I.hasNoSignedWrap());
|
||||
|
|
Loading…
Reference in New Issue