summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/warp/bug1693062-02.js
blob: 473b68773b572b04449dbb14529c7aea40db184e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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);
}