]> granicus.if.org Git - clang/commit
[CUDA] Implemented __nvvm_atom_*_gen_* builtins.
authorArtem Belevich <tra@google.com>
Thu, 25 Jun 2015 18:29:42 +0000 (18:29 +0000)
committerArtem Belevich <tra@google.com>
Thu, 25 Jun 2015 18:29:42 +0000 (18:29 +0000)
commit30a80fbaae1f680d20e749c405b23b523749a8a3
tree39dd0934e0488b5b5e1ff531aea0ec7cf0f5f856
parenta288f22e28971ce3e0c5606d18fd7499aa17ee8a
[CUDA] Implemented __nvvm_atom_*_gen_* builtins.

Integer variants are implemented as atomicrmw or cmpxchg instructions.
Atomic add for floating point (__nvvm_atom_add_gen_f()) is implemented
as a call to an overloaded @llvm.nvvm.atomic.load.add.f32.* LVVM
intrinsic.

Differential Revision: http://reviews.llvm.org/D10666

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@240669 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CGBuiltin.cpp
lib/CodeGen/CodeGenFunction.h
test/CodeGen/builtins-nvptx.c