summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/ion/bug882565-1.js
blob: 84db9258ff5469390a100a21d310cd18fbe7e1d2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
function zero() { return 0; }
function f(x, a) {
  var test = 0x7fffffff;

  for (var i=0; i<100; i++)
  {
    if (i == 0) {
      test += 1;
      var t = (test > zero()) * (0xffffffff >>> x);
    }
    var test2 = test | 0;
    return [test2,t];
  }
}
var t = f(0, "");
assertEq(t[0], 0x80000000 | 0);
assertEq(t[1], 0xffffffff >>> 0);

var t = f(0);
assertEq(t[0], 0x80000000 | 0);
assertEq(t[1], 0xffffffff >>> 0);