From: Dale Johannesen Date: Thu, 21 Aug 2008 21:20:09 +0000 (+0000) Subject: Accept NOT of a constant vector of int. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=3434994874b4af265df25b1509e340080cb30630;p=oota-llvm.git 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 --- diff --git a/lib/VMCore/Constants.cpp b/lib/VMCore/Constants.cpp index df1ac086b77..63937038055 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(C->getType()) && "Cannot NOT a nonintegral value!"); + assert((isa(C->getType()) || + cast(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);