Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(338)

Unified Diff: runtime/vm/branch_optimizer.cc

Issue 2463593002: VM: Enable branch merging of isnan, isinf. (Closed)
Patch Set: addressed comments Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/vm/constants_dbc.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« no previous file with comments | « no previous file | runtime/vm/constants_dbc.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698