summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/warp/bug1693062-02.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/jit-test/tests/warp/bug1693062-02.js')
-rw-r--r--js/src/jit-test/tests/warp/bug1693062-02.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/warp/bug1693062-02.js b/js/src/jit-test/tests/warp/bug1693062-02.js
new file mode 100644
index 0000000000..473b68773b
--- /dev/null
+++ b/js/src/jit-test/tests/warp/bug1693062-02.js
@@ -0,0 +1,16 @@
+function foo(x) {
+ var result;
+ if (x) {
+ result = Math.fround(~x);
+ } else {
+ var temp = Math.sqrt(2**53);
+ for (var i = 0; i < 1000; i++) {} // Trigger OSR
+ result = temp + 1;
+ }
+ return result;
+}
+
+foo(true);
+for (var i = 0; i < 10; i++) {
+ assertEq(foo(false), Math.sqrt(2**53) + 1);
+}