summaryrefslogtreecommitdiff
path: root/compiler/optimizing/licm.cc
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/optimizing/licm.cc')
-rw-r--r--compiler/optimizing/licm.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/optimizing/licm.cc b/compiler/optimizing/licm.cc
index c38bbe3477..27442d487e 100644
--- a/compiler/optimizing/licm.cc
+++ b/compiler/optimizing/licm.cc
@@ -122,6 +122,9 @@ void LICM::Run() {
if (instruction->NeedsEnvironment()) {
UpdateLoopPhisIn(instruction->GetEnvironment(), loop_info);
}
+ // Move instruction into the pre header. Note that this cannot move
+ // a throwing instruction out of its try block since these are hoisted
+ // only from the header block (and TryBoundary would start a new block).
instruction->MoveBefore(pre_header->GetLastInstruction());
} else if (instruction->CanThrow()) {
// If `instruction` can throw, we cannot move further instructions