[PATCH] D87947: [AMDGPU] Make ds fp atomics overloadable

Stanislav Mekhanoshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 18 16:20:11 PDT 2020


rampitec added inline comments.


================
Comment at: clang/lib/CodeGen/CGBuiltin.cpp:14772
+    llvm::Type *PTy = FTy->getParamType(0);
+    Src0 = Builder.CreatePointerBitCastOrAddrSpaceCast(Src0, PTy);
+    return Builder.CreateCall(F, { Src0, Src1, Src2, Src3, Src4 });
----------------
rampitec wrote:
> arsenm wrote:
> > rampitec wrote:
> > > arsenm wrote:
> > > > I don't think you need a cast here (at least an addrspacecast)
> > > If removed builtins-amdgcn.cu fails. It is CUDA with LDS pointer passed as flat. I.e. it comes as cast from addrspace(3) to flat. Generic builtin handling below in this file does the same.
> > I thought these casts would be present in the AST?
> It comes as a flat pointer. I am just replicating what generic code does.
Check the code around the line 4440 in the same file. It does even more than that.


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

https://reviews.llvm.org/D87947



More information about the llvm-commits mailing list