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

Unified Diff: test/mjsunit/regress/regress-compare-constant-doubles.js

Issue 46883008: ia32: Fix comparisons of two constant double operands when exactly one of them is in new space. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 2 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.cc ('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-compare-constant-doubles.js
diff --git a/test/mjsunit/constant-compare-nil-value.js b/test/mjsunit/regress/regress-compare-constant-doubles.js
similarity index 78%
copy from test/mjsunit/constant-compare-nil-value.js
copy to test/mjsunit/regress/regress-compare-constant-doubles.js
index 9f5b2adb063abc0c7920d8dee30edb7ee6eb1ff9..0f8ffe307d154178993da4db370c7201552504a7 100644
--- a/test/mjsunit/constant-compare-nil-value.js
+++ b/test/mjsunit/regress/regress-compare-constant-doubles.js
@@ -27,16 +27,32 @@
// Flags: --allow-natives-syntax
-function inlined() {
- return 1;
-}
+var left = 1.5;
+var right;
+
+var keepalive;
function foo() {
- if ((inlined() + 0.5) == null) return "null";
- return "non-null";
+ // Fill XMM registers with cruft.
+ var a1 = Math.sin(1) + 10;
+ var a2 = a1 + 1;
+ var a3 = a2 + 1;
+ var a4 = a3 + 1;
+ var a5 = a4 + 1;
+ var a6 = a5 + 1;
+ keepalive = [a1, a2, a3, a4, a5, a6];
+
+ // Actual test.
+ if (left < right) return "ok";
+ return "bad";
+}
+
+function prepare(base) {
+ right = 0.5 * base;
}
-assertEquals("non-null", foo());
-assertEquals("non-null", foo());
+prepare(21);
+assertEquals("ok", foo());
+assertEquals("ok", foo());
%OptimizeFunctionOnNextCall(foo);
-assertEquals("non-null", foo());
+assertEquals("ok", foo());
« no previous file with comments | « src/ia32/lithium-ia32.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698