[PATCH] D81070: [AMDGPU] Fixup use of StackPtrOffsetReg when not initialized

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 10 09:17:42 PDT 2020


arsenm added a comment.

I've run into another case where SP isn't initialized with a more clear explanation which may be the same problem. We initially select buffer instructions directly referencing SP, and fix it up to the FP later in eliminateFrameIndex. However, if LocalStackSlotAllocation fires on a particular store, it no longer directly references a frame index. Therefore, eliminateFrameIndex never fixes up the scratch offset register in the downstream memory instructions so they still incorrectly reference SP. We can hack around this by forcing SP initialization if getLocalFrameObjectCount, but I think the real fix is to use stack access pseudos before we know the offset register to use


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D81070



More information about the llvm-commits mailing list