continue making the world safe for ConstantDataVector. At this point,

we should (theoretically optimize and codegen ConstantDataVector as well
as ConstantVector.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149116 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner committed 2012-01-27 03:08:05 +00:00
1 parent 2b343702aa
commit a78fa8cc2d
10 files changed
+107 -74

No files matched your search

+2 -4
View File
@@ -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;
}