blob: 4e3bf69d1b6de1179d396a35ecfa05120596765e [file] [log] [blame]
//@ skip if not $jitTests
let glob = 0
function doTest(number, bit) {
glob -= 1
if ((number>>bit)&1)
glob += 1
if (((~number)>>(bit+1))&1)
glob += 1
if (number & (1<<(bit-1)))
glob += 1
}
noInline(doTest);
for (let i=0; i<(1<<30); ++i)
doTest(i, 15)
if (glob != 536870912)
throw "Error: bad result: " + glob;