[PATCH] D28691: Add OpenCL 2.0 atomic builtin functions as Clang builtin

Yaxun Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 25 07:56:56 PDT 2017


yaxunl marked 2 inline comments as done.
yaxunl added inline comments.


================
Comment at: include/clang/Basic/Builtins.def:713
+ATOMIC_BUILTIN(__opencl_atomic_fetch_or, "v.", "t")
+ATOMIC_BUILTIN(__opencl_atomic_fetch_xor, "v.", "t")
+
----------------
b-sumner wrote:
> yaxunl wrote:
> > Anastasia wrote:
> > > What about min/max? I believe they will need to have the scope too. 
> > They are not 2.0 atomic builtin functions. They can be implemented as library functions through 2.0 atomic builtin functions.
> Yes, they are.  Please look again at 6.13.11.7.5 in the 2.0 C spec.
sorry I thought they are just some atomic extensions since C++11 atomic builtins do not have those. I will add them.


https://reviews.llvm.org/D28691





More information about the cfe-commits mailing list