summaryrefslogtreecommitdiff
path: root/lib/Transforms/InstCombine/InstCombineAddSub.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2011-02-17 20:55:29 +0000
committerChris Lattner <sabre@nondot.org>2011-02-17 20:55:29 +0000
commitbd9f6bf5cd5499715e216415989c29f820a7561c (patch)
treeeabe68c9c9299303655d6f7037db1a643dd5b89e /lib/Transforms/InstCombine/InstCombineAddSub.cpp
parent583b68f34fd9bdb6114fa48dadc8def2ec96edac (diff)
downloadllvm-bd9f6bf5cd5499715e216415989c29f820a7561c.tar.gz
llvm-bd9f6bf5cd5499715e216415989c29f820a7561c.tar.bz2
llvm-bd9f6bf5cd5499715e216415989c29f820a7561c.tar.xz
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
Diffstat (limited to 'lib/Transforms/InstCombine/InstCombineAddSub.cpp')
-rw-r--r--lib/Transforms/InstCombine/InstCombineAddSub.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/InstCombine/InstCombineAddSub.cpp b/lib/Transforms/InstCombine/InstCombineAddSub.cpp
index 89cc540da7..c36a9552e7 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());