This is an archive of the discontinued LLVM Phabricator instance.

clang/AMDGPU: Emit atomicrmw for atomic_inc/dec builtins
ClosedPublic

Authored by arsenm on Nov 6 2022, 9:12 PM.

Details

Reviewers
yaxunl
vangthao
pravinjagtap
Group Reviewers
Restricted Project
Summary

This makes the scope and ordering arguments actually do something.
Also add some new OpenCL tests since the existing HIP tests didn't
cover address spaces.

Diff Detail

Event Timeline

arsenm created this revision.Nov 6 2022, 9:12 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 6 2022, 9:12 PM
arsenm requested review of this revision.Nov 6 2022, 9:12 PM

I don't recognize atomicrmw udec_wrap and can't find it in https://llvm.org/docs/LangRef.html#atomicrmw-instruction. I do vaguely recall the semantics of these builtins (well, the instructions they target) being surprising, Do you know where the uinc_wrap etc were introduced?

foad added a subscriber: foad.Nov 7 2022, 1:42 AM

Do you know where the uinc_wrap etc were introduced?

D137361 in the stack for this patch.

yaxunl accepted this revision as: yaxunl.Jun 14 2023, 6:53 AM

LGTM. Thanks

This revision is now accepted and ready to land.Jun 14 2023, 6:53 AM
pravinjagtap accepted this revision as: pravinjagtap.EditedJun 14 2023, 9:13 PM

LGTM. Thank you.