summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/Sink.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Transforms/Scalar/Sink.cpp')
-rw-r--r--llvm/lib/Transforms/Scalar/Sink.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Scalar/Sink.cpp b/llvm/lib/Transforms/Scalar/Sink.cpp
index 17a6858a0c0..8b916347999 100644
--- a/llvm/lib/Transforms/Scalar/Sink.cpp
+++ b/llvm/lib/Transforms/Scalar/Sink.cpp
@@ -134,7 +134,7 @@ bool Sinking::ProcessBlock(BasicBlock &BB) {
bool ProcessedBegin = false;
SmallPtrSet<Instruction *, 8> Stores;
do {
- Instruction *Inst = I; // The instruction to sink.
+ Instruction *Inst = &*I; // The instruction to sink.
// Predecrement I (if it's not begin) so that it isn't invalidated by
// sinking.
@@ -279,6 +279,6 @@ bool Sinking::SinkInstruction(Instruction *Inst,
dbgs() << ")\n");
// Move the instruction.
- Inst->moveBefore(SuccToSinkTo->getFirstInsertionPt());
+ Inst->moveBefore(&*SuccToSinkTo->getFirstInsertionPt());
return true;
}
OpenPOWER on IntegriCloud