[PATCH] D136768: Make typed pointers to be yet again recognized as pointers
Joshua Cranmer via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 27 12:25:51 PDT 2022
This revision was automatically updated to reflect the committed changes.
Closed by commit rGa97eab7d39d4: [IR] Allow typed pointers to be used in vector types (authored by sidorovd, committed by jcranmer-intel).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D136768/new/
https://reviews.llvm.org/D136768
Files:
llvm/lib/IR/Type.cpp
llvm/lib/IR/Value.cpp
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<TypedPointerType>(Ty) &&
+ assert(!isa<TypedPointerType>(Ty->getScalarType()) &&
"Cannot have values with typed pointer types");
return Ty;
}
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;
}
//===----------------------------------------------------------------------===//
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D136768.471259.patch
Type: text/x-patch
Size: 1006 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221027/518427e0/attachment.bin>
More information about the llvm-commits
mailing list