This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU/SI: Add llvm.amdgcn.buffer.atomic.* intrinsics
ClosedPublic

Authored by nhaehnle on Mar 14 2016, 10:15 AM.

Details

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.

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

Diff Detail

Event Timeline

nhaehnle updated this revision to Diff 50612.Mar 14 2016, 10:15 AM
nhaehnle retitled this revision from to AMDGPU/SI: Add llvm.amdgcn.buffer.atomic.* intrinsics.
nhaehnle updated this object.
nhaehnle added reviewers: tstellarAMD, arsenm.
nhaehnle added subscribers: llvm-commits, rivanvx.
nhaehnle updated this revision to Diff 50849.Mar 16 2016, 1:13 PM

Rebase the patch on top of D18218, with adjusted/simplified signatures for
the intrinsics.

tstellarAMD accepted this revision.Mar 16 2016, 2:35 PM
tstellarAMD edited edge metadata.

I like the new signature better too.

This revision is now accepted and ready to land.Mar 16 2016, 2:35 PM
This revision was automatically updated to reflect the committed changes.