atomic::store currently is being used by AMDGPU for named barrier. Internally
it calls __atomic_store_n compiler builtin. However, NVPTX backends doesn't
support AtomicStore instruction, causing backend crash when calling llc on
the device runtime directly, where atomic::store is not optimized out. This
patch removes atomic::store from public area and uses __atomic_store_n
directly where it is needed as a workaround. We can come back and revisit it in
the future is atomic::store is needed somewhere else.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Yeah, __atomic_exchange_n is expanded based on the ordering, and one of the expansion is still atomic store, which goes back to current situation. atomic::store is only being used by AMDGPU to implement named barrier. I'm wondering if we want to drop atomic::store and use the __atomic_store_n wherever it needs?
Comment Actions
No, this is strictly worse. If anything, we can introduce a switch to ensure the ordering is known statically. We can use a macro and do it for all of the atomic ops.
Comment Actions
It doesn't work because __atomic_exchange_n with __ATOMIC_RELEASE will be lowered to atomicLoad, which again causes the issue.