[PATCH] D146762: [Verifier] Ban GEP, load, store of addrspace(8) on AMDGPU
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 31 06:24:29 PDT 2023
arsenm added a comment.
We don't have any real target specific verifier checks like this now. I do think we need some kind of target IR verifier, but just dropping this in like this is probably not the way to go about it
================
Comment at: llvm/lib/IR/Verifier.cpp:3876-3878
+ auto *PTy = dyn_cast<PointerType>(GEP.getPointerOperandType());
+ if (auto *VPtrTy = dyn_cast<VectorType>(GEP.getPointerOperandType()))
+ PTy = dyn_cast<PointerType>(VPtrTy->getElementType());
----------------
Can use GEP.getAddressSpace().
This also will miss constant expressions
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D146762/new/
https://reviews.llvm.org/D146762
More information about the llvm-commits
mailing list