[llvm] [AMDGPU] Pre-GFX10 does not need added latency for workgroup fences (PR #177157)

Carl Ritson via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 23 05:10:05 PST 2026


perlfu wrote:

> For pre-GFX10, when tgsplit mode is enabled, wait counts are inserted for workgroup fences (see [SIMemoryLegalizer.cpp](https://github.com/llvm/llvm-project/blob/main/llvm/lib/Target/AMDGPU/SIMemoryLegalizer.cpp#L1147-#L1155)). This is because waves of the same workgroup can execute on different CU in tgsplit mode. Should also check for isTgSplitEnabled() here to avoid skipping latency in that case?

Thanks for pointing this out.  I have added a check for tg-split and test.

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


More information about the llvm-commits mailing list