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

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 28 16:46:18 PDT 2020


arsenm added a comment.

I think the fundamental problem here is that we wouldn't have any register to increment/decrement in the kernel, and yet the offset is still too far to fit in the immediate field of the instruction and it also can't scavenge a register.

I think this is implicitly relying on trashing the reserved SP. If we're going to rely on this, then there's no reason to increment/decrement it since you can just assign the value directly to the register. We do still try to avoid reserving an SP, although at this point I think it's far more trouble than it's worth to try to save that one register.

The other option is to treat any frame that can possibly have an offset that won't fit in the immediate field as needing an SP


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