AMDGPU/SI: Add llvm.amdgcn.buffer.atomic.* intrinsics
authorNicolai Haehnle <nhaehnle@gmail.com>
Fri, 18 Mar 2016 16:24:31 +0000 (16:24 +0000)
committerNicolai Haehnle <nhaehnle@gmail.com>
Fri, 18 Mar 2016 16:24:31 +0000 (16:24 +0000)
commitad63638f6d3ef9ec8baadd29e592c36feba523ae
tree1b0241f65f099b3435e33caeb635de53b5caeecd
parent3003ba00a3260bdee71dd802bcfa970c3580e6bb
AMDGPU/SI: Add llvm.amdgcn.buffer.atomic.* intrinsics

Summary:
These intrinsics expose the BUFFER_ATOMIC_* instructions and will be used
by Mesa to implement atomics with buffer semantics. The intrinsic interface
matches that of buffer.load.format and buffer.store.format, except that the
GLC bit is not exposed (it is automatically deduced based on whether the
return value is used).

The change of hasSideEffects is required for TableGen to accept the pattern
that matches the intrinsic.

Reviewers: tstellarAMD, arsenm

Subscribers: arsenm, rivanvx, llvm-commits

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

llvm-svn: 263791
llvm/include/llvm/IR/IntrinsicsAMDGPU.td
llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp
llvm/lib/Target/AMDGPU/SIInstrInfo.td
llvm/lib/Target/AMDGPU/SIInstructions.td
llvm/test/Analysis/DivergenceAnalysis/AMDGPU/llvm.amdgcn.buffer.atomic.ll [new file with mode: 0644]
llvm/test/CodeGen/AMDGPU/llvm.amdgcn.buffer.atomic.ll [new file with mode: 0644]