This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU: Add atomic_inc + atomic_dec intrinsics
ClosedPublic

Authored by arsenm on Mar 22 2016, 1:39 PM.

Details

Reviewers
tstellarAMD
Summary

These are different than atomicrmw add 1 because they have
an additional input value to clamp the result.

Diff Detail

Event Timeline

arsenm updated this revision to Diff 51335.Mar 22 2016, 1:39 PM
arsenm retitled this revision from to AMDGPU: Add atomic_inc + atomic_dec intrinsics.
arsenm updated this object.
arsenm added a reviewer: tstellarAMD.
arsenm added a subscriber: llvm-commits.
arsenm updated this revision to Diff 51372.Mar 22 2016, 6:08 PM

Fix global inc for VI

include/llvm/IR/IntrinsicsAMDGPU.td
154

Yes, I think we need an ordering for these.

arsenm added inline comments.Mar 22 2016, 6:27 PM
include/llvm/IR/IntrinsicsAMDGPU.td
154

I'm not sure how to do that because you can't just add one of the flags atomicrmw uses

arsenm updated this revision to Diff 51422.Mar 23 2016, 8:14 AM

Fix for i64

tstellarAMD accepted this revision.Mar 30 2016, 3:00 PM
tstellarAMD edited edge metadata.

LGTM.

This revision is now accepted and ready to land.Mar 30 2016, 3:00 PM
arsenm closed this revision.Apr 12 2016, 7:28 AM

r266074