Index: src/compiler/control-reducer.cc |
diff --git a/src/compiler/control-reducer.cc b/src/compiler/control-reducer.cc |
index 105bdfe2017115dc2c0a82cc62147b5ed146692d..9d74b8a6a4fb001f26f581b55c80019631cd0cd4 100644 |
--- a/src/compiler/control-reducer.cc |
+++ b/src/compiler/control-reducer.cc |
@@ -400,6 +400,8 @@ class ControlReducerImpl { |
// Reduce branches, phis, and merges. |
switch (node->opcode()) { |
+ case IrOpcode::kBranch: |
+ return ReduceBranch(node); |
case IrOpcode::kIfTrue: |
return ReduceIfTrue(node); |
case IrOpcode::kIfFalse: |
@@ -478,6 +480,14 @@ class ControlReducerImpl { |
return replacement == NULL ? dead() : replacement; |
} |
+ // Reduce branches. |
+ Node* ReduceBranch(Node* branch) { |
+ if (DecideCondition(branch->InputAt(0)) != kUnknown) { |
+ for (Node* use : branch->uses()) Revisit(use); |
+ } |
+ return branch; |
+ } |
+ |
// Reduce merges by trimming away dead inputs from the merge and phis. |
Node* ReduceMerge(Node* node) { |
// Count the number of live inputs. |