[PATCH] D99507: [amdgpu] Add a pass to avoid jump into blocks with 0 exec mask.

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 29 13:17:58 PDT 2021


arsenm added a comment.

In D99507#2656770 <https://reviews.llvm.org/D99507#2656770>, @hliao wrote:

> In D99507#2656766 <https://reviews.llvm.org/D99507#2656766>, @arsenm wrote:
>
>> I'm not comfortable adding a pass to fixup a bug in control flow lowering. I think we just need to actually try to model divergent predecessors/successors explicitly
>
> What's the bug you refer to? I am not aware CFG lowering has anything issue except direct uses of EXECZ/EXECNZ scared me. If the target or fallthrough block of that EXECZ/EXECNZ branches could restore the mask immediately, that sounds fine. But, we run into the case where the mask to be restored needs reloading.

Instead of having a fixup patch to avoid cases where this happens, we should have the infrastructure to stop this from happening in the first place


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D99507/new/

https://reviews.llvm.org/D99507



More information about the llvm-commits mailing list