aboutsummaryrefslogtreecommitdiff
path: root/backend/lib/CodeGen/MachineLICM.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'backend/lib/CodeGen/MachineLICM.cpp')
-rw-r--r--backend/lib/CodeGen/MachineLICM.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/backend/lib/CodeGen/MachineLICM.cpp b/backend/lib/CodeGen/MachineLICM.cpp
index 6ab15dc..3863388 100644
--- a/backend/lib/CodeGen/MachineLICM.cpp
+++ b/backend/lib/CodeGen/MachineLICM.cpp
@@ -303,7 +303,7 @@ operandsAreInvariant(const MachineInstr &Instruction, const MachineLoop &Loop,
auto Anchor = firstTerminator(Preheader, Target);
if (!Anchor)
return std::unexpected(Anchor.error());
- auto Removed = Source->removeInstruction(Instruction);
+ auto Removed = Instruction.eraseFromParent();
if (!Removed)
return std::unexpected(Removed.error());
if (*Anchor != nullptr)