Skip to content

Commit 44afb94

Browse files
fangliu2020igcbot
authored andcommitted
Fix vISA assert "mismatch in bb->funcInfo link"
Fix vISA assert "mismatch in bb->funcInfo link"
1 parent 96ff32f commit 44afb94

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

visa/FlowGraph.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1316,6 +1316,15 @@ void FlowGraph::handleReturn(Label_BB_Map &labelMap,
13161316
retAddr->removePredEdge(bb);
13171317
}
13181318
}
1319+
1320+
if (bb->isLastInstEOT() && !bb->back()->isReturn()) {
1321+
G4_BB *succ = bb->getPhysicalSucc();
1322+
if (succ && succ->Preds.empty() &&
1323+
succ->getBBType() != G4_BB_INIT_TYPE) {
1324+
succ->Preds.push_back(bb);
1325+
bb->Succs.push_back(succ);
1326+
}
1327+
}
13191328
}
13201329
}
13211330

0 commit comments

Comments
 (0)