diff options
Diffstat (limited to 'lib/VMCore/Instructions.cpp')
-rw-r--r-- | lib/VMCore/Instructions.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/VMCore/Instructions.cpp b/lib/VMCore/Instructions.cpp index a0fb91aada..301791dd0b 100644 --- a/lib/VMCore/Instructions.cpp +++ b/lib/VMCore/Instructions.cpp @@ -1932,10 +1932,8 @@ BinaryOperator *BinaryOperator::CreateNot(Value *Op, const Twine &Name, // isConstantAllOnes - Helper function for several functions below static inline bool isConstantAllOnes(const Value *V) { - if (const ConstantInt *CI = dyn_cast<ConstantInt>(V)) - return CI->isAllOnesValue(); - if (const ConstantVector *CV = dyn_cast<ConstantVector>(V)) - return CV->isAllOnesValue(); + if (const Constant *C = dyn_cast<Constant>(V)) + return C->isAllOnesValue(); return false; } |