summaryrefslogtreecommitdiffstats
path: root/llvm/lib
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
commitd406764d521e9d9ac17ec8b23fdc3a0f438c931c (patch)
tree8f512fb4041d1e86524d4e56c0c13315bf0ebe3b /llvm/lib
parent2a666fc2c7f77145c42c9c6a989996f209901287 (diff)
downloadbcm5719-llvm-d406764d521e9d9ac17ec8b23fdc3a0f438c931c.tar.gz
bcm5719-llvm-d406764d521e9d9ac17ec8b23fdc3a0f438c931c.zip
add is always integer, thanks to Frits for noticing this.
llvm-svn: 125774
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp b/llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp
index 89cc540da71..c36a9552e7a 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp
+++ b/llvm/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());
OpenPOWER on IntegriCloud