Skip to content

Commit 064e73c

Browse files
committed
Revert "[GVNSink] Skip debug intrinsics when identifying sinking candidates (#77419)"
This reverts commit 51bf0df. There are test failures on Windows.
1 parent ed64042 commit 064e73c

File tree

2 files changed

+3
-89
lines changed

2 files changed

+3
-89
lines changed

llvm/lib/Transforms/Scalar/GVNSink.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ class LockstepReverseIterator {
132132
ActiveBlocks.remove(BB);
133133
continue;
134134
}
135-
Insts.push_back(BB->getTerminator()->getPrevNonDebugInstruction());
135+
Insts.push_back(BB->getTerminator()->getPrevNode());
136136
}
137137
if (Insts.empty())
138138
Fail = true;
@@ -168,7 +168,7 @@ class LockstepReverseIterator {
168168
if (Inst == &Inst->getParent()->front())
169169
ActiveBlocks.remove(Inst->getParent());
170170
else
171-
NewInsts.push_back(Inst->getPrevNonDebugInstruction());
171+
NewInsts.push_back(Inst->getPrevNode());
172172
}
173173
if (NewInsts.empty()) {
174174
Fail = true;
@@ -834,7 +834,7 @@ void GVNSink::sinkLastInstruction(ArrayRef<BasicBlock *> Blocks,
834834
BasicBlock *BBEnd) {
835835
SmallVector<Instruction *, 4> Insts;
836836
for (BasicBlock *BB : Blocks)
837-
Insts.push_back(BB->getTerminator()->getPrevNonDebugInstruction());
837+
Insts.push_back(BB->getTerminator()->getPrevNode());
838838
Instruction *I0 = Insts.front();
839839

840840
SmallVector<Value *, 4> NewOperands;

llvm/test/Transforms/GVNSink/sink-ignore-dbg-intrinsics.ll

Lines changed: 0 additions & 86 deletions
This file was deleted.

0 commit comments

Comments
 (0)