We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9883aa9 commit 4089314Copy full SHA for 4089314
llvm/lib/Transforms/Vectorize/SandboxVectorizer/DependencyGraph.cpp
@@ -368,10 +368,11 @@ void DependencyGraph::notifyCreateInstr(Instruction *I) {
368
}
369
370
void DependencyGraph::notifyMoveInstr(Instruction *I, const BBIterator &To) {
371
- // Early return if `I` doesn't actually move.
+ // NOTE: This function runs before `I` moves to its new destination.
372
BasicBlock *BB = To.getNodeParent();
373
- if (To != BB->end() && &*To == I->getNextNode())
374
- return;
+ assert(!(To != BB->end() && &*To == I->getNextNode()) &&
+ !(To == BB->end() && std::next(I->getIterator()) == BB->end()) &&
375
+ "Should not have been called if destination is same as origin.");
376
377
// Maintain the DAGInterval.
378
DAGInterval.notifyMoveInstr(I, To);
0 commit comments