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

Unified Diff: test/unittests/compiler/control-reducer-unittest.cc

Issue 1123213002: [turbofan] Connect non-terminating loops via Terminate. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 7 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 | « test/unittests/compiler/common-operator-unittest.cc ('k') | test/unittests/compiler/node-test-utils.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/unittests/compiler/control-reducer-unittest.cc
diff --git a/test/unittests/compiler/control-reducer-unittest.cc b/test/unittests/compiler/control-reducer-unittest.cc
index e753c9cbfa5c2d7c51af41c85d3e6e9991444d96..2f65caadc37b833c888524b30fde1a826e3afcdf 100644
--- a/test/unittests/compiler/control-reducer-unittest.cc
+++ b/test/unittests/compiler/control-reducer-unittest.cc
@@ -57,18 +57,11 @@ TEST_F(ControlReducerTest, NonTerminatingLoop) {
Node* loop = graph()->NewNode(common()->Loop(2), graph()->start());
loop->AppendInput(graph()->zone(), loop);
ReduceGraph();
- Capture<Node*> branch;
EXPECT_THAT(
graph()->end(),
- IsEnd(IsMerge(
- graph()->start(),
- IsReturn(IsUndefinedConstant(), graph()->start(),
- IsIfFalse(
- AllOf(CaptureEq(&branch),
- IsBranch(IsAlways(),
- AllOf(loop, IsLoop(graph()->start(),
- IsIfTrue(CaptureEq(
- &branch)))))))))));
+ IsEnd(IsMerge(graph()->start(),
+ IsTerminate(graph()->start(),
+ AllOf(loop, IsLoop(graph()->start(), loop))))));
}
@@ -79,19 +72,12 @@ TEST_F(ControlReducerTest, NonTerminatingLoopWithEffectPhi) {
ephi->AppendInput(graph()->zone(), ephi);
ephi->AppendInput(graph()->zone(), loop);
ReduceGraph();
- Capture<Node*> branch;
EXPECT_THAT(
graph()->end(),
IsEnd(IsMerge(
graph()->start(),
- IsReturn(IsUndefinedConstant(),
- AllOf(ephi, IsEffectPhi(graph()->start(), ephi, loop)),
- IsIfFalse(
- AllOf(CaptureEq(&branch),
- IsBranch(IsAlways(),
- AllOf(loop, IsLoop(graph()->start(),
- IsIfTrue(CaptureEq(
- &branch)))))))))));
+ IsTerminate(AllOf(ephi, IsEffectPhi(graph()->start(), ephi, loop)),
+ AllOf(loop, IsLoop(graph()->start(), loop))))));
}
@@ -105,22 +91,15 @@ TEST_F(ControlReducerTest, NonTerminatingLoopWithTwoEffectPhis) {
ephi2->AppendInput(graph()->zone(), ephi2);
ephi2->AppendInput(graph()->zone(), loop);
ReduceGraph();
- Capture<Node*> branch;
EXPECT_THAT(
graph()->end(),
IsEnd(IsMerge(
graph()->start(),
- IsReturn(
- IsUndefinedConstant(),
+ IsTerminate(
IsEffectSet(
AllOf(ephi1, IsEffectPhi(graph()->start(), ephi1, loop)),
AllOf(ephi2, IsEffectPhi(graph()->start(), ephi2, loop))),
- IsIfFalse(AllOf(
- CaptureEq(&branch),
- IsBranch(
- IsAlways(),
- AllOf(loop, IsLoop(graph()->start(),
- IsIfTrue(CaptureEq(&branch)))))))))));
+ AllOf(loop, IsLoop(graph()->start(), loop))))));
}
@@ -129,16 +108,9 @@ TEST_F(ControlReducerTest, NonTerminatingLoopWithDeadEnd) {
loop->AppendInput(graph()->zone(), loop);
graph()->end()->ReplaceInput(0, graph()->NewNode(common()->Dead()));
ReduceGraph();
- Capture<Node*> branch;
- EXPECT_THAT(
- graph()->end(),
- IsEnd(IsReturn(
- IsUndefinedConstant(), graph()->start(),
- IsIfFalse(AllOf(
- CaptureEq(&branch),
- IsBranch(IsAlways(),
- AllOf(loop, IsLoop(graph()->start(),
- IsIfTrue(CaptureEq(&branch))))))))));
+ EXPECT_THAT(graph()->end(),
+ IsEnd(IsTerminate(graph()->start(),
+ AllOf(loop, IsLoop(graph()->start(), loop)))));
}
« no previous file with comments | « test/unittests/compiler/common-operator-unittest.cc ('k') | test/unittests/compiler/node-test-utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698