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); |
} |