Index: runtime/vm/branch_optimizer.cc |
diff --git a/runtime/vm/branch_optimizer.cc b/runtime/vm/branch_optimizer.cc |
index b34baf760248eece918d7aca715cdf8d6ec7fa48..4ad12c1a06583fc2a9e6f315d8ca74e6781845f3 100644 |
--- a/runtime/vm/branch_optimizer.cc |
+++ b/runtime/vm/branch_optimizer.cc |
@@ -44,6 +44,9 @@ bool BranchSimplifier::Match(JoinEntryInstr* block) { |
BranchInstr* branch = block->last_instruction()->AsBranch(); |
ASSERT(branch != NULL); |
ComparisonInstr* comparison = branch->comparison(); |
+ if (comparison->InputCount() != 2) { |
+ return false; |
+ } |
Value* left = comparison->left(); |
PhiInstr* phi = left->definition()->AsPhi(); |
Value* right = comparison->right(); |