From bd9f6bf5cd5499715e216415989c29f820a7561c Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Thu, 17 Feb 2011 20:55:29 +0000 Subject: [PATCH] add is always integer, thanks to Frits for noticing this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125774 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/InstCombine/InstCombineAddSub.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Transforms/InstCombine/InstCombineAddSub.cpp b/lib/Transforms/InstCombine/InstCombineAddSub.cpp index 89cc540da71..c36a9552e7a 100644 --- a/lib/Transforms/InstCombine/InstCombineAddSub.cpp +++ b/lib/Transforms/InstCombine/InstCombineAddSub.cpp @@ -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()); -- 2.34.1