Skip to content

Commit b178c2d

Browse files
committed
[SandboxVec][DAG] Fix trim schedule
Fix trimSchedule by skipping instructions without a DAG Node.
1 parent 8b62114 commit b178c2d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

llvm/lib/Transforms/Vectorize/SandboxVectorizer/Scheduler.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,8 @@ void Scheduler::trimSchedule(ArrayRef<Instruction *> Instrs) {
172172
for (auto *I = LowestI, *E = TopI->getPrevNode(); I != E;
173173
I = I->getPrevNode()) {
174174
auto *N = DAG.getNode(I);
175+
if (N == nullptr)
176+
continue;
175177
if (auto *SB = N->getSchedBundle())
176178
eraseBundle(SB);
177179
}

0 commit comments

Comments
 (0)