Index: src/compiler/control-flow-optimizer.cc |
diff --git a/src/compiler/control-flow-optimizer.cc b/src/compiler/control-flow-optimizer.cc |
index 4a19339746bf5db086c1a565ec17ffffd2c126d8..de47589af6462a0bfc5b4f2094273795271e29db 100644 |
--- a/src/compiler/control-flow-optimizer.cc |
+++ b/src/compiler/control-flow-optimizer.cc |
@@ -204,6 +204,7 @@ bool ControlFlowOptimizer::TryBuildSwitch(Node* node) { |
DCHECK_EQ(IrOpcode::kBranch, node->opcode()); |
Node* branch = node; |
+ if (BranchHintOf(branch->op()) != BranchHint::kNone) return false; |
Node* cond = NodeProperties::GetValueInput(branch, 0); |
if (cond->opcode() != IrOpcode::kWord32Equal) return false; |
Int32BinopMatcher m(cond); |
@@ -227,6 +228,7 @@ bool ControlFlowOptimizer::TryBuildSwitch(Node* node) { |
if (it == if_false->uses().end()) break; |
Node* branch1 = *it++; |
if (branch1->opcode() != IrOpcode::kBranch) break; |
+ if (BranchHintOf(branch1->op()) != BranchHint::kNone) break; |
if (it != if_false->uses().end()) break; |
Node* cond1 = branch1->InputAt(0); |
if (cond1->opcode() != IrOpcode::kWord32Equal) break; |