Skip to content

Commit 1c4341d

Browse files
committed
[SandboxVec][DAG] Fix interval check without Node
This patch moves the check of whether a node exists before the check of whether it is contained in the interval.
1 parent ccc066e commit 1c4341d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,11 +267,11 @@ void DependencyGraph::setDefUseUnscheduledSuccs(
267267
auto *OpI = dyn_cast<Instruction>(Op);
268268
if (OpI == nullptr)
269269
continue;
270-
if (!TopInterval.contains(OpI))
271-
continue;
272270
auto *OpN = getNode(OpI);
273271
if (OpN == nullptr)
274272
continue;
273+
if (!TopInterval.contains(OpI))
274+
continue;
275275
++OpN->UnscheduledSuccs;
276276
}
277277
}

0 commit comments

Comments
 (0)