Skip to content

Commit f31cec0

Browse files
jakemdalysivan-shani
authored andcommitted
Add live in for PrivateSegmentSize in GISel path (llvm#139968)
1 parent cd3794d commit f31cec0

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)