blob: 156b62d1ea8537774906f09ae55abf86ba4634c9 [file] [log] [blame]
// Regression test for 160329. This test should not crash or throw an exception.
function narrow(x) {
return x << 24 >> 24;
}
noInline(narrow);
for (var i = 0; i < 1000000; i++) {
let expected = i << 24;
let got = narrow(i);
expected = expected >> 24;
if (expected != got)
throw "FAILURE, expected:" + expected + ", got:" + got;
}