diff options
author | Chris Lattner <sabre@nondot.org> | 2011-02-17 20:55:29 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2011-02-17 20:55:29 +0000 |
commit | d406764d521e9d9ac17ec8b23fdc3a0f438c931c (patch) | |
tree | 8f512fb4041d1e86524d4e56c0c13315bf0ebe3b /llvm/lib | |
parent | 2a666fc2c7f77145c42c9c6a989996f209901287 (diff) | |
download | bcm5719-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.cpp | 2 |
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()); |