fold-linear-arith-bug1319242.js (232B)
1 function f(x) { 2 // Check that we do not fold +1 and -2 across truncated/non-truncated operations. 3 return (((x | 0) + 1) | 0) + -2; 4 } 5 const int32_min = -Math.pow(2,31); 6 f(Infinity); 7 assertEq(f(int32_min - 1), int32_min - 2);