Index: src/compiler/scheduler.cc |
diff --git a/src/compiler/scheduler.cc b/src/compiler/scheduler.cc |
index 066b4a13776444b54ca5aea936f9bcdd3894266b..862969e752ad06c12a72dce45eabbf9bb2aef05f 100644 |
--- a/src/compiler/scheduler.cc |
+++ b/src/compiler/scheduler.cc |
@@ -313,6 +313,13 @@ class CFGBuilder : public ZoneObject { |
case IrOpcode::kMerge: |
BuildBlockForNode(node); |
break; |
+ case IrOpcode::kTerminate: { |
+ // Put Terminate in the loop to which it refers. |
+ Node* loop = NodeProperties::GetControlInput(node); |
+ BasicBlock* block = BuildBlockForNode(loop); |
+ FixNode(block, node); |
+ break; |
+ } |
case IrOpcode::kBranch: |
case IrOpcode::kSwitch: |
BuildBlocksForSuccessors(node); |