summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/ion/bailout-float-regs.js
blob: 175fc59cca04a2a50ba0d6e2f706dd440feaea95 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
function f() {
    var res = 0;
    for (var i = 0; i < 2000; i++) {
        var res1 = Math.abs(i - 123.5); // Double
        var res2 = Math.fround(i + 0.5); // Float32
        if (i > 1900) {
            bailout();
        }
        res += res1 + res2;
    }
    assertEq(res, 3767376);
}
f();