[CUDA][HIP] Fix store of vtbl in ctor
vtbl itself is in default global address space. When clang emits ctor, it gets a pointer to the vtbl field based on the this pointer, then stores vtbl to the pointer. Since this pointer can point to any address space (e.g. an object created in stack), this pointer points to default address space, therefore the pointer to vtbl field in this object should also be in default address space. Currently, clang incorrectly casts the pointer to vtbl field in this object to global address space. This caused assertions in backend. This patch fixes that by removing the incorrect addr space cast. Reviewed by: Artem Belevich Differential Revision: https://reviews.llvm.org/D103835
Loading
Please register or sign in to comment