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

Unified Diff: test/mjsunit/regress/regress-x87.js

Issue 20781007: Add X87 implementations for Integer32ToDouble, DoubleToI, DoubleToSmi (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: add a test that was still missing in cl Created 7 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/ia32/lithium-ia32.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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));
« no previous file with comments | « src/ia32/lithium-ia32.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698