mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 11:13:28 +01:00
Fix nasty bug in ::isNeg()
llvm-svn: 4470
This commit is contained in:
parent
8ecd939ce9
commit
31bbb65ef8
@ -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 &&
|
||||
isa<Constant>(Bop->getOperand(0)) && cast<Constant>(V)->isNullValue();
|
||||
Bop->getOperand(0) == Constant::getNullValue(Bop->getType());
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user