[llvm] [AMDGPU] Introduce orderign parameter to atomic intrinsics and introduce new llvm.amdgcn.image.atomic.load intrinsic. (PR #73613)

via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 28 00:22:23 PST 2023


sstipanovic wrote:

> I think the PR description needs to be clearer:
> 
> * This adds ordering parameters to all _existing_ atomic intrinsics. So this will require changes in LLVM IR code generators.
> * New intrinsic atomic.load does not implicitly have acquire semantics, this is just the ordering provided in the lit test.
> 
> If ordering parameter is to be added to all intrinsics then I suspect there needs to be more test coverage that the full range of these values make their way to MIR and manifest the expected effects.

Initially I was about to add ordering parameter only for the new intrinsic, but I noticed that the ordering is not set for other atomics either, even though llpc sets the ordering for atomic intrinsics. Maybe, with this change, llpc won't have to add fences anymore.
If this approach is ok, I'm happy to add more tests.

https://github.com/llvm/llvm-project/pull/73613


More information about the llvm-commits mailing list