summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/ion/fold-linear-arith-bug1319242.js
blob: 81001803620b78c92c256fc4bb58856d3241c84e (plain)
1
2
3
4
5
6
7
function f(x) {
    // Check that we do not fold +1 and -2 across truncated/non-truncated operations.
    return (((x | 0) + 1) | 0) + -2;
}
const int32_min = -Math.pow(2,31);
f(Infinity);
assertEq(f(int32_min - 1), int32_min - 2);