Index: test/mjsunit/regress/regress-2132.js |
diff --git a/test/mjsunit/regress/regress-crbug-242870.js b/test/mjsunit/regress/regress-2132.js |
similarity index 82% |
copy from test/mjsunit/regress/regress-crbug-242870.js |
copy to test/mjsunit/regress/regress-2132.js |
index 7183375ca811cedc81c870d34e694e98cf727f9b..d8987a554a011ca120b2e352c9e0ecee1c72f003 100644 |
--- a/test/mjsunit/regress/regress-crbug-242870.js |
+++ b/test/mjsunit/regress/regress-2132.js |
@@ -27,17 +27,22 @@ |
// Flags: --allow-natives-syntax |
-var non_const_true = true; |
- |
-function f() { |
- return (non_const_true || true && g()); |
+function mul(x, y) { |
+ return (x * y) | 0; |
} |
-function g() { |
- for (;;) {} |
+mul(0, 0); |
+mul(0, 0); |
+%OptimizeFunctionOnNextCall(mul); |
+assertEquals(0, mul(0, -1)); |
+assertTrue(%GetOptimizationStatus(mul) != 2); |
+ |
+function div(x, y) { |
+ return (x / y) | 0; |
} |
-assertTrue(f()); |
-assertTrue(f()); |
-%OptimizeFunctionOnNextCall(f); |
-assertTrue(f()); |
+div(4, 2); |
+div(4, 2); |
+%OptimizeFunctionOnNextCall(div); |
+assertEquals(1, div(5, 3)); |
+assertTrue(%GetOptimizationStatus(div) != 2); |