[llvm] [AMDGPU] Initialize FrameOffsetReg for amdgpu_cs_chain functions (PR #165518)

Shilei Tian via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 4 20:58:25 PST 2025


================
@@ -98,6 +98,7 @@ SIMachineFunctionInfo::SIMachineFunctionInfo(const Function &F,
     // set one up. For now, we can use s32 to match what amdgpu_gfx functions
     // would use if called, but this can be revisited.
     // FIXME: Only reserve this if we actually need it.
+    FrameOffsetReg = AMDGPU::SGPR33;
----------------
shiltian wrote:

Based on the comment, it doesn't seem like this is needed. The test case has a UB in the first place, because `indirect` should not be called directly. I'm not sure if we want to do this. @jayfoad @rovka 

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


More information about the llvm-commits mailing list