mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-27 12:26:08 +00:00
Fix nasty bug in ::isNeg()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4470 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -91,7 +91,7 @@ static inline bool isConstantAllOnes(const Value *V) {
|
|||||||
bool BinaryOperator::isNeg(const Value *V) {
|
bool BinaryOperator::isNeg(const Value *V) {
|
||||||
if (const BinaryOperator *Bop = dyn_cast<BinaryOperator>(V))
|
if (const BinaryOperator *Bop = dyn_cast<BinaryOperator>(V))
|
||||||
return Bop->getOpcode() == Instruction::Sub &&
|
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user