Don't duplicate the work done by a gep into a "bitcast" if the gep has
[oota-llvm.git] / lib / Transforms / InstCombine / InstCombineAddSub.cpp
index 89cc540da71b7be98693f8dfb24d13964ddebac3..c36a9552e7a3aed6a339c5ffaf06ef8dfa01279f 100644 (file)
@@ -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());