forked from OSchip/llvm-project
Soften assertion in AMDGPU emitPrologue.
[AMDGPU] emitPrologue looks for an unused unallocated SGPR that is not the scratch descriptor. Continue search if unused register found fails other requirements. Reviewers: arsenm, tstellarAMD, nhaehnle Subscribers: arsenm, llvm-commits, kzhuravl Differential Revision: http://reviews.llvm.org/D20526 llvm-svn: 270646
This commit is contained in:
parent
2b8e41705e
commit
e003bb7ead
|
@ -184,8 +184,9 @@ void SIFrameLowering::emitPrologue(MachineFunction &MF,
|
|||
// Pick the first unallocated SGPR. Be careful not to pick an alias of the
|
||||
// scratch descriptor, since we haven’t added its uses yet.
|
||||
if (!MRI.isPhysRegUsed(Reg)) {
|
||||
assert(MRI.isAllocatable(Reg) &&
|
||||
!TRI->isSubRegisterEq(ScratchRsrcReg, Reg));
|
||||
if (!MRI.isAllocatable(Reg) ||
|
||||
TRI->isSubRegisterEq(ScratchRsrcReg, Reg))
|
||||
continue;
|
||||
|
||||
MRI.replaceRegWith(ScratchWaveOffsetReg, Reg);
|
||||
ScratchWaveOffsetReg = Reg;
|
||||
|
|
Loading…
Reference in New Issue