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

Unified Diff: test/cctest/compiler/test-scheduler.cc

Issue 738613005: Restrict floating control to minimal control-connected component. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_scheduler-loop-1
Patch Set: Rebased and adapted. Created 6 years 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 | « src/zone-containers.h ('k') | test/unittests/compiler/control-equivalence-unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/compiler/test-scheduler.cc
diff --git a/test/cctest/compiler/test-scheduler.cc b/test/cctest/compiler/test-scheduler.cc
index 06e22db66283b26269618c48e6c4d8b1241d2e3f..3b0e6e47094a1b08fb89c45016f8a0834a2f8b93 100644
--- a/test/cctest/compiler/test-scheduler.cc
+++ b/test/cctest/compiler/test-scheduler.cc
@@ -1804,6 +1804,52 @@ TEST(NestedFloatingDiamonds) {
}
+TEST(NestedFloatingDiamondWithChain) {
+ HandleAndZoneScope scope;
+ Graph graph(scope.main_zone());
+ CommonOperatorBuilder common(scope.main_zone());
+
+ Node* start = graph.NewNode(common.Start(2));
+ graph.SetStart(start);
+
+ Node* p0 = graph.NewNode(common.Parameter(0), start);
+ Node* p1 = graph.NewNode(common.Parameter(1), start);
+ Node* c = graph.NewNode(common.Int32Constant(7));
+
+ Node* brA1 = graph.NewNode(common.Branch(), p0, graph.start());
+ Node* tA1 = graph.NewNode(common.IfTrue(), brA1);
+ Node* fA1 = graph.NewNode(common.IfFalse(), brA1);
+ Node* mA1 = graph.NewNode(common.Merge(2), tA1, fA1);
+ Node* phiA1 = graph.NewNode(common.Phi(kMachAnyTagged, 2), p0, p1, mA1);
+
+ Node* brB1 = graph.NewNode(common.Branch(), p1, graph.start());
+ Node* tB1 = graph.NewNode(common.IfTrue(), brB1);
+ Node* fB1 = graph.NewNode(common.IfFalse(), brB1);
+ Node* mB1 = graph.NewNode(common.Merge(2), tB1, fB1);
+ Node* phiB1 = graph.NewNode(common.Phi(kMachAnyTagged, 2), p0, p1, mB1);
+
+ Node* brA2 = graph.NewNode(common.Branch(), phiB1, mA1);
+ Node* tA2 = graph.NewNode(common.IfTrue(), brA2);
+ Node* fA2 = graph.NewNode(common.IfFalse(), brA2);
+ Node* mA2 = graph.NewNode(common.Merge(2), tA2, fA2);
+ Node* phiA2 = graph.NewNode(common.Phi(kMachAnyTagged, 2), phiB1, c, mA2);
+
+ Node* brB2 = graph.NewNode(common.Branch(), phiA1, mB1);
+ Node* tB2 = graph.NewNode(common.IfTrue(), brB2);
+ Node* fB2 = graph.NewNode(common.IfFalse(), brB2);
+ Node* mB2 = graph.NewNode(common.Merge(2), tB2, fB2);
+ Node* phiB2 = graph.NewNode(common.Phi(kMachAnyTagged, 2), phiA1, c, mB2);
+
+ Node* add = graph.NewNode(&kIntAdd, phiA2, phiB2);
+ Node* ret = graph.NewNode(common.Return(), add, start, start);
+ Node* end = graph.NewNode(common.End(), ret, start);
+
+ graph.SetEnd(end);
+
+ ComputeAndVerifySchedule(35, &graph);
+}
+
+
TEST(NestedFloatingDiamondWithLoop) {
HandleAndZoneScope scope;
Graph graph(scope.main_zone());
« no previous file with comments | « src/zone-containers.h ('k') | test/unittests/compiler/control-equivalence-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698