diff --git a/llvm/lib/IR/Type.cpp b/llvm/lib/IR/Type.cpp --- a/llvm/lib/IR/Type.cpp +++ b/llvm/lib/IR/Type.cpp @@ -674,7 +674,7 @@ bool VectorType::isValidElementType(Type *ElemTy) { return ElemTy->isIntegerTy() || ElemTy->isFloatingPointTy() || - ElemTy->isPointerTy(); + ElemTy->isPointerTy() || ElemTy->getTypeID() == TypedPointerTyID; } //===----------------------------------------------------------------------===// diff --git a/llvm/lib/IR/Value.cpp b/llvm/lib/IR/Value.cpp --- a/llvm/lib/IR/Value.cpp +++ b/llvm/lib/IR/Value.cpp @@ -44,7 +44,7 @@ //===----------------------------------------------------------------------===// static inline Type *checkType(Type *Ty) { assert(Ty && "Value defined with a null type: Error!"); - assert(!isa(Ty) && + assert(!isa(Ty->getScalarType()) && "Cannot have values with typed pointer types"); return Ty; }