AMDGPU/SI: Fix SI scheduler refcount issue

Without this fix, releaseSuccessors when InOrOutBlock is
false could release SUs outside the schedule BasicBlock.

Patch by Axel Davy

llvm-svn: 275935
This commit is contained in:
Matt Arsenault 2016-07-19 00:35:22 +00:00
parent cb540bc03c
commit fe358066ea
1 changed files with 3 additions and 0 deletions

View File

@ -464,6 +464,9 @@ void SIScheduleBlock::releaseSuccessors(SUnit *SU, bool InOrOutBlock) {
for (SDep& Succ : SU->Succs) {
SUnit *SuccSU = Succ.getSUnit();
if (SuccSU->NodeNum >= DAG->SUnits.size())
continue;
if (BC->isSUInBlock(SuccSU, ID) != InOrOutBlock)
continue;