mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-22 10:33:23 +00:00
Enhance BinaryOperator::isNot to support vector not.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37585 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
003b6200df
commit
e20b7bec02
@ -1404,7 +1404,11 @@ BinaryOperator *BinaryOperator::createNot(Value *Op, const std::string &Name,
|
||||
|
||||
// isConstantAllOnes - Helper function for several functions below
|
||||
static inline bool isConstantAllOnes(const Value *V) {
|
||||
return isa<ConstantInt>(V) &&cast<ConstantInt>(V)->isAllOnesValue();
|
||||
if (const ConstantInt *CI = dyn_cast<ConstantInt>(V))
|
||||
return CI->isAllOnesValue();
|
||||
if (const ConstantVector *CV = dyn_cast<ConstantVector>(V))
|
||||
return CV->isAllOnesValue();
|
||||
return false;
|
||||
}
|
||||
|
||||
bool BinaryOperator::isNeg(const Value *V) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user