[PATCH] D110772: [clang] Allow pointers from any address space to gfx90a builtins

Yaxun Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 29 20:53:21 PDT 2021


yaxunl added inline comments.


================
Comment at: clang/lib/CodeGen/CGBuiltin.cpp:15764
+        AddrParamTy->getPointerElementType() == AddrTy->getPointerElementType())
+      Addr = Builder.CreateAddrSpaceCast(Addr, AddrParamTy);
     return Builder.CreateCall(F, {Addr, Val, ZeroI32, ZeroI32, ZeroI1});
----------------
In https://reviews.llvm.org/D102405 you already inserted an addr space cast in AST when you pass a pointer to default addr space to a builtin expecting a pointer to non-default addr space. This addr space cast in AST will be emitted as addr space cast in IR. Why do you still need to insert addr space cast here?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D110772/new/

https://reviews.llvm.org/D110772



More information about the cfe-commits mailing list