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

Michael Liao via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 22 09:04:18 PST 2021


hliao added a comment.

In D96980#2576062 <https://reviews.llvm.org/D96980#2576062>, @arsenm wrote:

> In D96980#2575930 <https://reviews.llvm.org/D96980#2575930>, @ruiling wrote:
>
>> 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.
>>
>> For exec == 0 when reloading, I think the basic block that contains v_readfirstlane will be jumped over, see `SIInsertSkips.cpp` and `hasUnwantedEffectsWhenEXECEmpty()`
>
> I'm trying to eliminate SIInsertSkips. Initially, all branches that go over exec changes should insert the skip jump. We then should eliminate them in cases where they aren't needed and the blocks are short.

For that elimination, we could choose to skip it if the body of the branch has unwanted effect.


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