This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU: Clear offset register when using local stack area
ClosedPublic

Authored by arsenm on Sep 10 2020, 11:09 AM.

Details

Summary

eliminateFrameIndex won't fix up the offset register when the direct
frame index reference is moved to a separate move instruction. Switch
the offset to a base 0 (which it probably should be to begin with).

Diff Detail

Event Timeline

arsenm created this revision.Sep 10 2020, 11:09 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 10 2020, 11:09 AM
arsenm requested review of this revision.Sep 10 2020, 11:09 AM
rampitec added inline comments.Sep 16 2020, 8:30 AM
llvm/test/CodeGen/AMDGPU/stack-pointer-offset-relative-frameindex.ll
45

So it does not use offset at all now? Isn't it a regression?

arsenm added inline comments.Sep 16 2020, 8:31 AM
llvm/test/CodeGen/AMDGPU/stack-pointer-offset-relative-frameindex.ll
45

No, an offset isn't necessary anymore since we now increment the base pointer in the SRD in the kernel prolog. This is one of the cleanups that enables

rampitec accepted this revision.Sep 16 2020, 8:32 AM
This revision is now accepted and ready to land.Sep 16 2020, 8:32 AM