[PATCH] [CUDA] Implemented __nvvm_atom_*_gen_* builtins.

Artem Belevich tra at google.com
Tue Jun 23 11:20:32 PDT 2015


Hi jholewinski, eliben, echristo,

Implemented __nvvm_atom_*_gen_* builtins.

Integer variants are implmented 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.xxx LVVM intrinsic.

http://reviews.llvm.org/D10666

Files:
  lib/CodeGen/CGBuiltin.cpp
  lib/CodeGen/CodeGenFunction.h
  test/CodeGen/builtins-nvptx.c

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D10666.28268.patch
Type: text/x-patch
Size: 16520 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150623/3cdcafcf/attachment.bin>


More information about the cfe-commits mailing list