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

Unified Diff: src/compiler/common-operator-reducer.cc

Issue 1450883003: [turbofan] Check for dead node in the common operator reducer. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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 | test/mjsunit/regress/regress-556543.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/common-operator-reducer.cc
diff --git a/src/compiler/common-operator-reducer.cc b/src/compiler/common-operator-reducer.cc
index e3c2ecad6ea10fe810e7c9e3e382fe9e5e0927e9..2334541f8adae64c18b45c8676eff1b041aef4f0 100644
--- a/src/compiler/common-operator-reducer.cc
+++ b/src/compiler/common-operator-reducer.cc
@@ -204,6 +204,8 @@ Reduction CommonOperatorReducer::ReducePhi(Node* node) {
if_false->opcode() == IrOpcode::kIfFalse &&
if_true->InputAt(0) == if_false->InputAt(0)) {
Node* const branch = if_true->InputAt(0);
+ // Check that the branch is not dead already.
+ if (branch->opcode() != IrOpcode::kBranch) return NoChange();
Node* const cond = branch->InputAt(0);
if (cond->opcode() == IrOpcode::kFloat32LessThan) {
Float32BinopMatcher mcond(cond);
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-556543.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698