Commit 1d56742a authored by bmeurer's avatar bmeurer Committed by Commit bot

[turbofan] Don't switchify branches with hints.

R=svenpanne@chromium.org

Review URL: https://codereview.chromium.org/929403004

Cr-Commit-Position: refs/heads/master@{#26840}
parent c18de602
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment