Index: test/mjsunit/compiler/osr-alignment.js |
diff --git a/test/mjsunit/compiler/osr-simple.js b/test/mjsunit/compiler/osr-alignment.js |
similarity index 71% |
copy from test/mjsunit/compiler/osr-simple.js |
copy to test/mjsunit/compiler/osr-alignment.js |
index 8ec1b2b9368c1670209cd4810968a20a2946b4b4..30d72d0614bd0de698029ca55848c39ae3125417 100644 |
--- a/test/mjsunit/compiler/osr-simple.js |
+++ b/test/mjsunit/compiler/osr-alignment.js |
@@ -27,7 +27,7 @@ |
// Flags: --use-osr |
-function f() { |
+function f1() { |
var sum = 0; |
for (var i = 0; i < 1000000; i++) { |
var x = i + 2; |
@@ -38,7 +38,49 @@ function f() { |
return sum; |
} |
+function f2() { |
+ var sum = 0; |
+ for (var i = 0; i < 1000000; i++) { |
+ var x = i + 2; |
+ var y = x + 5; |
+ var z = y + 3; |
+ sum += z; |
+ } |
+ return sum; |
+} |
-for (var i = 0; i < 2; i++) { |
- assertEquals(500009500000, f()); |
+function f3() { |
+ var sum = 0; |
+ for (var i = 0; i < 1000000; i++) { |
+ var x = i + 2; |
+ var y = x + 5; |
+ var z = y + 3; |
+ sum += z; |
+ } |
+ return sum; |
} |
+ |
+function test1() { |
+ var j = 11; |
+ for (var i = 0; i < 2; i++) { |
+ assertEquals(500009500000, f1()); |
+ } |
+} |
+ |
+function test2() { |
+ for (var i = 0; i < 2; i++) { |
+ var j = 11, k = 12; |
+ assertEquals(500009500000, f2()); |
+ } |
+} |
+ |
+function test3() { |
+ for (var i = 0; i < 2; i++) { |
+ var j = 11, k = 13, m = 14; |
+ assertEquals(500009500000, f3()); |
+ } |
+} |
+ |
+test1(); |
+test2(); |
+test3(); |