From 3434994874b4af265df25b1509e340080cb30630 Mon Sep 17 00:00:00 2001 From: Dale Johannesen Date: Thu, 21 Aug 2008 21:20:09 +0000 Subject: 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 --- lib/VMCore/Constants.cpp | 6 ++++-- 1 file 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(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); -- cgit v1.2.3