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:
26fbcec
)
Fix nasty bug in ::isNeg()
author
Chris Lattner
<sabre@nondot.org>
Thu, 31 Oct 2002 17:09:06 +0000
(17:09 +0000)
committer
Chris Lattner
<sabre@nondot.org>
Thu, 31 Oct 2002 17:09:06 +0000
(17:09 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4470
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/VMCore/iOperators.cpp
patch
|
blob
|
history
diff --git
a/lib/VMCore/iOperators.cpp
b/lib/VMCore/iOperators.cpp
index 5aa9714eb9355124c31efbba9aed51a2969519a1..5a88986135bd3082389d04dceef10b7e0b6d971d 100644
(file)
--- a/
lib/VMCore/iOperators.cpp
+++ b/
lib/VMCore/iOperators.cpp
@@
-91,7
+91,7
@@
static inline bool isConstantAllOnes(const Value *V) {
bool BinaryOperator::isNeg(const Value *V) {
if (const BinaryOperator *Bop = dyn_cast<BinaryOperator>(V))
return Bop->getOpcode() == Instruction::Sub &&
bool BinaryOperator::isNeg(const Value *V) {
if (const BinaryOperator *Bop = dyn_cast<BinaryOperator>(V))
return Bop->getOpcode() == Instruction::Sub &&
-
isa<Constant>(Bop->getOperand(0)) && cast<Constant>(V)->isNullValue(
);
+
Bop->getOperand(0) == Constant::getNullValue(Bop->getType()
);
return false;
}
return false;
}