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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « src/compiler/loop-analysis.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/compiler/access-builder.h" 7 #include "src/compiler/access-builder.h"
8 #include "src/compiler/common-operator.h" 8 #include "src/compiler/common-operator.h"
9 #include "src/compiler/graph.h" 9 #include "src/compiler/graph.h"
10 #include "src/compiler/graph-visualizer.h" 10 #include "src/compiler/graph-visualizer.h"
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 255
256 Node* chain[] = {w.loop}; 256 Node* chain[] = {w.loop};
257 t.CheckNestedLoops(chain, 1); 257 t.CheckNestedLoops(chain, 1);
258 258
259 Node* header[] = {w.loop}; 259 Node* header[] = {w.loop};
260 Node* body[] = {w.branch, w.if_true}; 260 Node* body[] = {w.branch, w.if_true};
261 t.CheckLoop(header, 1, body, 2); 261 t.CheckLoop(header, 1, body, 2);
262 } 262 }
263 263
264 264
265 TEST(LaLoop1phi) {
266 // One loop with a simple phi.
267 LoopFinderTester t;
268 While w(t, t.p0);
269 Node* phi =
270 t.graph.NewNode(t.common.Phi(kMachAnyTagged, 2), t.zero, t.one, w.loop);
271 t.Return(phi, t.start, w.exit);
272
273 Node* chain[] = {w.loop};
274 t.CheckNestedLoops(chain, 1);
275
276 Node* header[] = {w.loop, phi};
277 Node* body[] = {w.branch, w.if_true};
278 t.CheckLoop(header, 2, body, 2);
279 }
280
281
265 TEST(LaLoop1c) { 282 TEST(LaLoop1c) {
266 // One loop with a counter. 283 // One loop with a counter.
267 LoopFinderTester t; 284 LoopFinderTester t;
268 While w(t, t.p0); 285 While w(t, t.p0);
269 Counter c(w, 0, 1); 286 Counter c(w, 0, 1);
270 t.Return(c.phi, t.start, w.exit); 287 t.Return(c.phi, t.start, w.exit);
271 288
272 Node* chain[] = {w.loop}; 289 Node* chain[] = {w.loop};
273 t.CheckNestedLoops(chain, 1); 290 t.CheckNestedLoops(chain, 1);
274 291
(...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after
853 TEST(LaEdgeMatrix3_2) { RunEdgeMatrix3_i(2); } 870 TEST(LaEdgeMatrix3_2) { RunEdgeMatrix3_i(2); }
854 871
855 872
856 TEST(LaEdgeMatrix3_3) { RunEdgeMatrix3_i(3); } 873 TEST(LaEdgeMatrix3_3) { RunEdgeMatrix3_i(3); }
857 874
858 875
859 TEST(LaEdgeMatrix3_4) { RunEdgeMatrix3_i(4); } 876 TEST(LaEdgeMatrix3_4) { RunEdgeMatrix3_i(4); }
860 877
861 878
862 TEST(LaEdgeMatrix3_5) { RunEdgeMatrix3_i(5); } 879 TEST(LaEdgeMatrix3_5) { RunEdgeMatrix3_i(5); }
OLDNEW
« 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