[llvm] [AMDGPU] Update base addr of dyn alloca considering GrowingUp stack (PR #119822)

Christudasan Devadasan via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 12 23:36:40 PST 2024


cdevadas wrote:

> AMDGPU stack grows upwards, the base address
> needs to be aligned first and SP bump by required size later:

The address computation should be retained for both directions. The Opc selection currently happens based on the Stack growth direction (as per the code below). The code would otherwise break suddenly if we decide to change the stack growth direction for any future architecture.
**TFL->getStackGrowthDirection() == TargetFrameLowering::StackGrowsUp**

https://github.com/llvm/llvm-project/pull/119822


More information about the llvm-commits mailing list