[PATCH] D18151: AMDGPU/SI: Add llvm.amdgcn.buffer.atomic.* intrinsics

Nicolai Hähnle via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 14 10:15:59 PDT 2016


nhaehnle created this revision.
nhaehnle added reviewers: tstellarAMD, arsenm.
nhaehnle added subscribers: llvm-commits, rivanvx.
Herald added a subscriber: arsenm.

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.

Note that there are minor conflicts with http://reviews.llvm.org/D17280,
which also touches BUFFER_ATOMIC_CMPSWAP.

http://reviews.llvm.org/D18151

Files:
  include/llvm/IR/IntrinsicsAMDGPU.td
  lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp
  lib/Target/AMDGPU/SIInstrInfo.td
  lib/Target/AMDGPU/SIInstructions.td
  test/Analysis/DivergenceAnalysis/AMDGPU/llvm.amdgcn.buffer.atomic.ll
  test/CodeGen/AMDGPU/llvm.amdgcn.buffer.atomic.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D18151.50612.patch
Type: text/x-patch
Size: 22438 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160314/415a83d7/attachment.bin>


More information about the llvm-commits mailing list