Reviewers: Benedikt Meurer,

Message:
Could you take a look, please?

Description:
Make control reducer revisit newly introduced merges.

BUG=chromium:445876
LOG=N

Please review this at https://codereview.chromium.org/830293003/

Base URL: https://chromium.googlesource.com/v8/v8.git@master

Affected files (+5, -8 lines):
  M src/compiler/control-reducer.cc
  A + test/mjsunit/compiler/regress-445876.js


Index: src/compiler/control-reducer.cc
diff --git a/src/compiler/control-reducer.cc b/src/compiler/control-reducer.cc index acb2f06b04ea116e9c1ccbbf08978e72ae49d532..f17c26c16234f3d411b02e9242538e4f6e5da83c 100644
--- a/src/compiler/control-reducer.cc
+++ b/src/compiler/control-reducer.cc
@@ -196,6 +196,7 @@ class ControlReducerImpl {
       merge = graph()->NewNode(common_->Merge(2), merge, loop);
       end->ReplaceInput(0, merge);
       to_add = merge;
+      Push(merge);
     } else {
       // Append a new input to the final merge at the end.
       merge->AppendInput(graph()->zone(), loop);
Index: test/mjsunit/compiler/regress-445876.js
diff --git a/test/mjsunit/compiler/regress-ntl-effect.js b/test/mjsunit/compiler/regress-445876.js
similarity index 66%
copy from test/mjsunit/compiler/regress-ntl-effect.js
copy to test/mjsunit/compiler/regress-445876.js
index 708fe32828c9197dfa3d8c371ab01cbc1ad3317a..30e10e56c3ac424fb8843b700bec2af5ded334ac 100644
--- a/test/mjsunit/compiler/regress-ntl-effect.js
+++ b/test/mjsunit/compiler/regress-445876.js
@@ -4,13 +4,9 @@

 // Flags: --allow-natives-syntax

-function g() {
-  throw 0;
+function f(x) {
+  while (1) { s++; }
+  while (x) { s++; }
 }

-function f() {
-  g();
-  while (1) {}
-}
-
-assertThrows(function () { f(); });
+assertThrows(function () { f(1); });


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to