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

Unified Diff: test/cctest/compiler/test-control-reducer.cc

Issue 1001063003: [turbofan] Fix typo in ControlReducer. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 9 months 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/compiler/control-reducer.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/compiler/test-control-reducer.cc
diff --git a/test/cctest/compiler/test-control-reducer.cc b/test/cctest/compiler/test-control-reducer.cc
index f6d354767e7f40de5a7b40987fefd18499d5c419..c2b225ab009703a87fca31a8e9b24f671424070f 100644
--- a/test/cctest/compiler/test-control-reducer.cc
+++ b/test/cctest/compiler/test-control-reducer.cc
@@ -1189,11 +1189,25 @@ TEST(CNestedDiamonds_xyz) {
}
-TEST(CDeadDiamond) {
+TEST(CUnusedDiamond1) {
ControlReducerTester R;
// if (p0) { } else { }
- Diamond d(R, R.p0);
- R.ReduceMergeIterative(R.start, d.merge);
+ Node* branch = R.graph.NewNode(R.common.Branch(), R.p0, R.start);
+ Node* if_true = R.graph.NewNode(R.common.IfTrue(), branch);
+ Node* if_false = R.graph.NewNode(R.common.IfFalse(), branch);
+ Node* merge = R.graph.NewNode(R.common.Merge(2), if_true, if_false);
+ R.ReduceMergeIterative(R.start, merge);
+}
+
+
+TEST(CUnusedDiamond2) {
+ ControlReducerTester R;
+ // if (p0) { } else { }
+ Node* branch = R.graph.NewNode(R.common.Branch(), R.p0, R.start);
+ Node* if_true = R.graph.NewNode(R.common.IfTrue(), branch);
+ Node* if_false = R.graph.NewNode(R.common.IfFalse(), branch);
+ Node* merge = R.graph.NewNode(R.common.Merge(2), if_false, if_true);
+ R.ReduceMergeIterative(R.start, merge);
}
« no previous file with comments | « src/compiler/control-reducer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698