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

Side by Side Diff: test/mjsunit/compiler/osr-multiple.js

Issue 809333002: [turbofan] Implement OSR for outer loops. (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 | « test/mjsunit/compiler/osr-manual2.js ('k') | test/mjsunit/compiler/osr-multiple2.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 // Flags: --use-osr --turbo-osr
6
7 function f1(a,b,c) {
8 var x = 0;
9 var y = 0;
10 var z = 0;
11 while (a > 0) { x += 19; a--; }
12 while (b > 0) { y += 23; b--; }
13 while (c > 0) { z += 29; c--; }
14 return x + y + z;
15 }
16
17 function f2(a,b,c) {
18 var x = 0;
19 var y = 0;
20 var z = 0;
21 while (a > 0) { x += 19; a--; }
22 while (b > 0) { y += 23; b--; }
23 while (c > 0) { z += 29; c--; }
24 return x + y + z;
25 }
26
27
28 function f3(a,b,c) {
29 var x = 0;
30 var y = 0;
31 var z = 0;
32 while (a > 0) { x += 19; a--; }
33 while (b > 0) { y += 23; b--; }
34 while (c > 0) { z += 29; c--; }
35 return x + y + z;
36 }
37
38 function check(f,a,b,c) {
39 assertEquals(a * 19 + b * 23 + c * 29, f(a,b,c));
40 }
41
42 check(f1, 50000, 5, 6);
43 check(f2, 4, 50000, 6);
44 check(f3, 11, 12, 50000);
OLDNEW
« no previous file with comments | « test/mjsunit/compiler/osr-manual2.js ('k') | test/mjsunit/compiler/osr-multiple2.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698