diff options
author | Dale Johannesen <dalej@apple.com> | 2008-08-21 21:20:09 +0000 |
---|---|---|
committer | Dale Johannesen <dalej@apple.com> | 2008-08-21 21:20:09 +0000 |
commit | 3434994874b4af265df25b1509e340080cb30630 (patch) | |
tree | b07e5a43f3b16b8b98589cd4852274533c54780c /lib | |
parent | 1887c1c2f99903d13406e723f2dcbab4511e3f49 (diff) | |
download | llvm-3434994874b4af265df25b1509e340080cb30630.tar.gz llvm-3434994874b4af265df25b1509e340080cb30630.tar.bz2 llvm-3434994874b4af265df25b1509e340080cb30630.tar.xz |
Accept NOT of a constant vector of int.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55140 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/VMCore/Constants.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/VMCore/Constants.cpp b/lib/VMCore/Constants.cpp index df1ac086b7..6393703805 100644 --- a/lib/VMCore/Constants.cpp +++ b/lib/VMCore/Constants.cpp @@ -756,9 +756,11 @@ Constant *ConstantExpr::getNeg(Constant *C) { C); } Constant *ConstantExpr::getNot(Constant *C) { - assert(isa<IntegerType>(C->getType()) && "Cannot NOT a nonintegral value!"); + assert((isa<IntegerType>(C->getType()) || + cast<VectorType>(C->getType())->getElementType()->isInteger()) && + "Cannot NOT a nonintegral value!"); return get(Instruction::Xor, C, - ConstantInt::getAllOnesValue(C->getType())); + Constant::getAllOnesValue(C->getType())); } Constant *ConstantExpr::getAdd(Constant *C1, Constant *C2) { return get(Instruction::Add, C1, C2); |