Index: test/mjsunit/regress/regress-x87.js |
diff --git a/test/mjsunit/compiler/osr-big.js b/test/mjsunit/regress/regress-x87.js |
similarity index 79% |
copy from test/mjsunit/compiler/osr-big.js |
copy to test/mjsunit/regress/regress-x87.js |
index ed71744b78e3c51aca7b62fcbf4b4c04a6d6904a..60380a8fcbc50fe7086df57715fd818bd1910ea9 100644 |
--- a/test/mjsunit/compiler/osr-big.js |
+++ b/test/mjsunit/regress/regress-x87.js |
@@ -25,21 +25,24 @@ |
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
-// Flags: --use-osr |
+// Flags: --allow-natives-syntax --noenable-sse2 |
-function f(x) { |
- var sum = 0; |
- var outer = 1000000; |
- var a = 1, b = 2, c = 3, d = 4, e = 5; |
- while (outer > 0) { |
- a = a + 5; |
- b = b + 4; |
- c = c + 3; |
- d = d + 2; |
- e = e + 1; |
- outer--; |
+// Regression for register allocation. |
+var x; |
+var a = new Float32Array([1,2, 4, 6, 8, 11, NaN, 1/0, -3]) |
+var val = 2.1*a[1]*a[0]*a[1*2*3*0]*a[1*1]*1.0; |
+assertEquals(8.4, val); |
+ |
+// Regression for double-phis |
+var a; |
+var t = true; |
+var res = [2.5, 2]; |
+for (var i = 0; i < 2; i++) { |
+ if (t) { |
+ a = 1.5; |
+ } else { |
+ a = true; |
} |
- return a + b + c + d + e; |
+ assertEquals(res[i], a+1); |
+ t = false; |
} |
- |
-assertEquals(15000015, f(5)); |