mirror of
https://github.com/RPCS3/llvm.git
synced 2025-03-05 17:18:55 +00:00
PEI: Skip dead objects when looking at CSRs
On AMDGPU if an SGPR is spilled to a VGPR, the frame index is deleted. If there were any CSR SGPRs, this woudl assert when setting the offset. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301961 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
1d482c01f6
commit
012b7077ca
@ -761,6 +761,9 @@ void PEI::calculateFrameObjectOffsets(MachineFunction &Fn) {
|
||||
} else if (MaxCSFrameIndex >= MinCSFrameIndex) {
|
||||
// Be careful about underflow in comparisons agains MinCSFrameIndex.
|
||||
for (unsigned i = MaxCSFrameIndex; i != MinCSFrameIndex - 1; --i) {
|
||||
if (MFI.isDeadObjectIndex(i))
|
||||
continue;
|
||||
|
||||
unsigned Align = MFI.getObjectAlignment(i);
|
||||
// Adjust to alignment boundary
|
||||
Offset = alignTo(Offset, Align, Skew);
|
||||
|
Loading…
x
Reference in New Issue
Block a user