[PATCH] D43281: [AMDGPU] fixes for lds f32 builtins

Daniil Fukalov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 19 04:32:27 PDT 2018


dfukalov added a comment.

> My real question was what happens if you put 11 in the description string?

in this case CanT.getAddressSpace() returns target addrspace value "20" (also shifted in the enum by 9==LangAS::FirstTargetAddressSpace)

So again ASTContext::getAddrSpaceQualType decieds that these addrspaces are not equal and then asserts
a
The main reason of these change is to allow usage of the builtins with __local described pointers. Such pointers have LangAS AddressSpace in the ASTContext::getAddrSpaceQualType() equal to "2".
But we have no way to obtain this value from CanT.getAddressSpace() since it returns target addrspace and it is >= 10.

So I'm going to switch to custom processing of these builtins and the patch is preparation to be able to remove their links in llvm repo.


Repository:
  rC Clang

https://reviews.llvm.org/D43281





More information about the cfe-commits mailing list