[llvm] [AMDGPU] Update EXECZ retention in SIPreEmitPeephole for GFX11/12 (PR #97676)

Jay Foad via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 4 03:28:37 PDT 2024


jayfoad wrote:

> > > Also add code to retain uniform jumps over barrier instructions.
> > 
> > This seems like it should be a separate patch. Is it required for correctness? Why hasn't it caused problems before?
> 
> Can separate these. I don't think we commonly generate code that jumps a barrier, because it would create potential problems if some waves did not follow the same decisions across a workgroup. And/or our blocks with s_barrier are usually above the threshold. But I think the risk of generating something where this matters maybe higher with newer barrier operations on GFX12.

So should barrier operations be included in `hasUnwantedEffectsWhenEXECEmpty`? I've never understood precisely what that function is for.

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


More information about the llvm-commits mailing list