mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +00:00
These don't really need contexts either.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75528 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1711,19 +1711,19 @@ static inline bool isConstantAllOnes(const Value *V) {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool BinaryOperator::isNeg(LLVMContext &Context, const Value *V) {
|
||||
bool BinaryOperator::isNeg(const Value *V) {
|
||||
if (const BinaryOperator *Bop = dyn_cast<BinaryOperator>(V))
|
||||
if (Bop->getOpcode() == Instruction::Sub)
|
||||
return Bop->getOperand(0) ==
|
||||
Context.getZeroValueForNegation(Bop->getType());
|
||||
if (Constant* C = dyn_cast<Constant>(Bop->getOperand(0)))
|
||||
return C->isNegativeZeroValue();
|
||||
return false;
|
||||
}
|
||||
|
||||
bool BinaryOperator::isFNeg(LLVMContext &Context, const Value *V) {
|
||||
bool BinaryOperator::isFNeg(const Value *V) {
|
||||
if (const BinaryOperator *Bop = dyn_cast<BinaryOperator>(V))
|
||||
if (Bop->getOpcode() == Instruction::FSub)
|
||||
return Bop->getOperand(0) ==
|
||||
Context.getZeroValueForNegation(Bop->getType());
|
||||
if (Constant* C = dyn_cast<Constant>(Bop->getOperand(0)))
|
||||
return C->isNegativeZeroValue();
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user