[llvm-commits] [llvm] r125774 - /llvm/trunk/lib/Transforms/InstCombine/InstCombineAddSub.cpp

Chris Lattner sabre at nondot.org
Thu Feb 17 12:55:29 PST 2011


Author: lattner
Date: Thu Feb 17 14:55:29 2011
New Revision: 125774

URL: http://llvm.org/viewvc/llvm-project?rev=125774&view=rev
Log:
add is always integer, thanks to Frits for noticing this.

Modified:
    llvm/trunk/lib/Transforms/InstCombine/InstCombineAddSub.cpp

Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineAddSub.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstCombineAddSub.cpp?rev=125774&r1=125773&r2=125774&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/InstCombine/InstCombineAddSub.cpp (original)
+++ llvm/trunk/lib/Transforms/InstCombine/InstCombineAddSub.cpp Thu Feb 17 14:55:29 2011
@@ -147,7 +147,7 @@
     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());





More information about the llvm-commits mailing list