Skip to content

Commit

Permalink
Revert "[GVNSink] Skip debug intrinsics when identifying sinking cand…
Browse files Browse the repository at this point in the history
…idates (llvm#77419)"

This reverts commit 51bf0df.

There are test failures on Windows.
  • Loading branch information
nikic committed Jan 9, 2024
1 parent ed64042 commit 064e73c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 89 deletions.
6 changes: 3 additions & 3 deletions llvm/lib/Transforms/Scalar/GVNSink.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ class LockstepReverseIterator {
ActiveBlocks.remove(BB);
continue;
}
Insts.push_back(BB->getTerminator()->getPrevNonDebugInstruction());
Insts.push_back(BB->getTerminator()->getPrevNode());
}
if (Insts.empty())
Fail = true;
Expand Down Expand Up @@ -168,7 +168,7 @@ class LockstepReverseIterator {
if (Inst == &Inst->getParent()->front())
ActiveBlocks.remove(Inst->getParent());
else
NewInsts.push_back(Inst->getPrevNonDebugInstruction());
NewInsts.push_back(Inst->getPrevNode());
}
if (NewInsts.empty()) {
Fail = true;
Expand Down Expand Up @@ -834,7 +834,7 @@ void GVNSink::sinkLastInstruction(ArrayRef<BasicBlock *> Blocks,
BasicBlock *BBEnd) {
SmallVector<Instruction *, 4> Insts;
for (BasicBlock *BB : Blocks)
Insts.push_back(BB->getTerminator()->getPrevNonDebugInstruction());
Insts.push_back(BB->getTerminator()->getPrevNode());
Instruction *I0 = Insts.front();

SmallVector<Value *, 4> NewOperands;
Expand Down
86 changes: 0 additions & 86 deletions llvm/test/Transforms/GVNSink/sink-ignore-dbg-intrinsics.ll

This file was deleted.

0 comments on commit 064e73c

Please sign in to comment.