[AMDGPU] StackSlotColoring before LowerSGPRSpill causes memfault in Blender 4.1 on gfx908
https://github.com/llvm/llvm-project/pull/93668 caused a regression in Blender 4.1 on gfx908 for all scenes.
Fra:48 Mem:1531.14M (Peak 1531.14M) | Time:06:58.63 | Mem:2448.05M, Peak:2448.05M | Scene, View Layer | Sample 0/256
Warning: precise memory violation signal reporting is not enabled, reported
location may not be accurate. See "show amdgpu precise-memory".
Thread 103 "blender" received signal SIGSEGV, Segmentation fault.
[Switching to thread 103, lane 9 (AMDGPU Lane 1:1:1:1/9 (0,0,0)[9,0,0])]
0x00007ffd7689a68c in integrator_intersect_shadow(KernelGlobalsGPU const*, int) () from memory://192866#offset=0x7ffd77f01240&size=4555968
@llvm/issue-subscribers-backend-amdgpu
Author: Yaxun (Sam) Liu (yxsamliu)
Fra:48 Mem:1531.14M (Peak 1531.14M) | Time:06:58.63 | Mem:2448.05M, Peak:2448.05M | Scene, View Layer | Sample 0/256
Warning: precise memory violation signal reporting is not enabled, reported
location may not be accurate. See "show amdgpu precise-memory".
Thread 103 "blender" received signal SIGSEGV, Segmentation fault.
[Switching to thread 103, lane 9 (AMDGPU Lane 1:1:1:1/9 (0,0,0)[9,0,0])]
0x00007ffd7689a68c in integrator_intersect_shadow(KernelGlobalsGPU const*, int) () from memory://192866#offset=0x7ffd77f01240&size=4555968
After spending time on ISA of good/bad cases, I found that s[0:3] represents the ScratchRsrcReg here, which is used as buffer descriptor(input) for buffer loads & stores, and thus most probably never get redefined or clobbered {since they are reserved & marked live throughout function}. Would it be better if I execute the given assembly & try to debug it?
It seems DC's patches fix the issue, so we do not need to revert your patch.
93526 : [AMDGPU] Split VGPR regalloc pipeline
93525: [CodeGen] change prototype of regalloc filter function
DC's patches
It seems DC's patches fix the issue, so we do not need to revert your patch.
93526 : [AMDGPU] Split VGPR regalloc pipeline
93525: [CodeGen] change prototype of regalloc filter function
How should I ensure that, as I already reverted the patch, before reverting the revert commit.
I have verified that with those patches on top of amd-staging branch.
I will verify them with LLVM main branch.
Since you have reverted your PR. Let's re-enable blender test in buildbot and wait for these two PR's committed then reland your PR.
Yeah, sounds good!
Yeah, sounds good!
CD has committed his change https://github.com/llvm/llvm-project/pull/93526
I think now you can reland your patch. Thanks.
@yxsamliu , I relanded the patch, can you please once check for the failing blender test to verify its correctness, so this issue can be finally closed!
@yxsamliu , I relanded the patch, can you please once check for the failing blender test to verify its correctness, so this issue can be finally closed!
test is passing. thanks