mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 03:33:20 +01:00
Enhance BinaryOperator::isNot to support vector not.
llvm-svn: 37585
This commit is contained in:
parent
6c32b44b4c
commit
c2985cea59
@ -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…
Reference in New Issue
Block a user