Add live in for PrivateSegmentSize in GISel path (#139968)

This commit is contained in:
Jake Daly 2025-05-21 09:25:25 -07:00 committed by GitHub
parent 0edc8b59ab
commit 91b2e5bc5d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -493,6 +493,12 @@ static void allocateHSAUserSGPRs(CCState &CCInfo,
CCInfo.AllocateReg(FlatScratchInitReg);
}
if (UserSGPRInfo.hasPrivateSegmentSize()) {
Register PrivateSegmentSizeReg = Info.addPrivateSegmentSize(TRI);
MF.addLiveIn(PrivateSegmentSizeReg, &AMDGPU::SGPR_32RegClass);
CCInfo.AllocateReg(PrivateSegmentSizeReg);
}
// TODO: Add GridWorkGroupCount user SGPRs when used. For now with HSA we read
// these from the dispatch pointer.
}