projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
583b68f
)
add is always integer, thanks to Frits for noticing this.
author
Chris Lattner
<sabre@nondot.org>
Thu, 17 Feb 2011 20:55:29 +0000
(20:55 +0000)
committer
Chris Lattner
<sabre@nondot.org>
Thu, 17 Feb 2011 20:55:29 +0000
(20:55 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125774
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Transforms/InstCombine/InstCombineAddSub.cpp
patch
|
blob
|
history
diff --git
a/lib/Transforms/InstCombine/InstCombineAddSub.cpp
b/lib/Transforms/InstCombine/InstCombineAddSub.cpp
index 89cc540da71b7be98693f8dfb24d13964ddebac3..c36a9552e7a3aed6a339c5ffaf06ef8dfa01279f 100644
(file)
--- 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());