projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
89d46b0
)
Fold add X, 0 for floating point types as well
author
Chris Lattner
<sabre@nondot.org>
Thu, 23 May 2002 17:11:38 +0000
(17:11 +0000)
committer
Chris Lattner
<sabre@nondot.org>
Thu, 23 May 2002 17:11:38 +0000
(17:11 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2734
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Transforms/Scalar/InstructionCombining.cpp
patch
|
blob
|
history
diff --git
a/lib/Transforms/Scalar/InstructionCombining.cpp
b/lib/Transforms/Scalar/InstructionCombining.cpp
index b6727d5f9e039ffea85a5a84206422292c705785..6032ab956eb674247e05c6f1031ddcfe62893e17 100644
(file)
--- a/
lib/Transforms/Scalar/InstructionCombining.cpp
+++ b/
lib/Transforms/Scalar/InstructionCombining.cpp
@@
-124,8
+124,7
@@
Instruction *InstCombiner::visitAdd(BinaryOperator *I) {
Value *LHS = I->getOperand(0), *RHS = I->getOperand(1);
// Eliminate 'add int %X, 0'
- if (I->getType()->isIntegral() &&
- RHS == Constant::getNullValue(I->getType())) {
+ if (RHS == Constant::getNullValue(I->getType())) {
AddUsesToWorkList(I); // Add all modified instrs to worklist
I->replaceAllUsesWith(LHS);
return I;