Skip to content

Commit 91b2e5b

Browse files
authored
Add live in for PrivateSegmentSize in GISel path (#139968)
1 parent 0edc8b5 commit 91b2e5b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

llvm/lib/Target/AMDGPU/AMDGPUCallLowering.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -493,6 +493,12 @@ static void allocateHSAUserSGPRs(CCState &CCInfo,
493493
CCInfo.AllocateReg(FlatScratchInitReg);
494494
}
495495

496+
if (UserSGPRInfo.hasPrivateSegmentSize()) {
497+
Register PrivateSegmentSizeReg = Info.addPrivateSegmentSize(TRI);
498+
MF.addLiveIn(PrivateSegmentSizeReg, &AMDGPU::SGPR_32RegClass);
499+
CCInfo.AllocateReg(PrivateSegmentSizeReg);
500+
}
501+
496502
// TODO: Add GridWorkGroupCount user SGPRs when used. For now with HSA we read
497503
// these from the dispatch pointer.
498504
}

0 commit comments

Comments
 (0)