[PATCH] D96980: [amdgpu] Revert agnostic SGPR spill.

Michael Liao via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 19 11:08:29 PST 2021


hliao added a comment.

In D96980#2574913 <https://reviews.llvm.org/D96980#2574913>, @sebastian-ne wrote:

> I think this approach fails when exec is zero.
> The v_mov for the save will be a noop, the v_readfirstline for the restore will read lane 0, which contains some unknown value.
> exec=0 is a corner case, but I don’t think we can build on that.
>
> Other than that, it surely is more efficient than the (worst case) 4 memory operations introduced by saving all lanes of the used VGPR :)

That's the part I don't understand. Why code path is still executed when exec mask is 0? For the regular code by the compiler, exec mask 0 always results in branch away on that code path. There's even no chance to execute that. Could you elaborate on how a code path could be executed with exec mask 0?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D96980



More information about the llvm-commits mailing list