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

Unified Diff: test/cctest/compiler/test-loop-analysis.cc

Issue 852783002: [turbofan] Fix corner case in loop analysis. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 11 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/loop-analysis.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-loop-analysis.cc
diff --git a/test/cctest/compiler/test-loop-analysis.cc b/test/cctest/compiler/test-loop-analysis.cc
index 9c112681c2b8f9b5ea1a86f5f080419329fee6e9..8ce1e803539119ff6beed99fad285c2c552dc4ab 100644
--- a/test/cctest/compiler/test-loop-analysis.cc
+++ b/test/cctest/compiler/test-loop-analysis.cc
@@ -262,6 +262,23 @@ TEST(LaLoop1) {
}
+TEST(LaLoop1phi) {
+ // One loop with a simple phi.
+ LoopFinderTester t;
+ While w(t, t.p0);
+ Node* phi =
+ t.graph.NewNode(t.common.Phi(kMachAnyTagged, 2), t.zero, t.one, w.loop);
+ t.Return(phi, t.start, w.exit);
+
+ Node* chain[] = {w.loop};
+ t.CheckNestedLoops(chain, 1);
+
+ Node* header[] = {w.loop, phi};
+ Node* body[] = {w.branch, w.if_true};
+ t.CheckLoop(header, 2, body, 2);
+}
+
+
TEST(LaLoop1c) {
// One loop with a counter.
LoopFinderTester t;
« no previous file with comments | « src/compiler/loop-analysis.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698