[flang-commits] [compiler-rt] [libcxx] [flang] [libc] [lldb] [lld] [clang] [clang-tools-extra] [llvm] [AMDGPU] Use alias info to relax waitcounts for LDS DMA (PR #74537)
Stanislav Mekhanoshin via flang-commits
flang-commits at lists.llvm.org
Tue Dec 19 02:00:17 PST 2023
rampitec wrote:
> How does this work in a case like this?
>
> ```
> call void @llvm.amdgcn.raw.buffer.load.lds(<4 x i32> %rsrc, ptr addrspace(3) @lds.3, i32 4, i32 0, i32 0, i32 0, i32 0)
> call void @llvm.amdgcn.raw.buffer.load.lds(<4 x i32> %rsrc, ptr addrspace(3) %ptr, i32 4, i32 0, i32 0, i32 0, i32 0)
> %val.3 = load float, ptr addrspace(3) @lds.3, align 4
> ```
>
> i.e.
>
> * store to known lds address `@lds.3` (this will use slot 0 and another slot e.g. slot 3?)
>
> * store to unknown lds address (this will use slot 0?)
>
> * load from known lds address `@lds.3` (this will use slot 3?)
It does not know the pointer, so it uses default slot 0 and waits till 0. I have to tell anyone interested here: before I even wrote this code it didn't know of the dependency and did not wait for anything at all. Everyone was happy.
https://github.com/llvm/llvm-project/pull/74537
More information about the flang-commits
mailing list