Index: llvm/lib/IR/Type.cpp =================================================================== --- llvm/lib/IR/Type.cpp +++ 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; } //===----------------------------------------------------------------------===// Index: llvm/lib/IR/Value.cpp =================================================================== --- llvm/lib/IR/Value.cpp +++ 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; }