Status: Accepted
Owner:
da...@chromium.org
Labels: Type-Bug Priority-Medium
New issue 2132 by
veg...@chromium.org: Canonicalization pass removes i|0
operation too early before it can affect -0 checks
http://code.google.com/p/v8/issues/detail?id=2132
function mul(x, y) {
return (x * y) | 0;
}
mul(0, 0);
mul(0, 0);
%OptimizeFunctionOnNextCall(mul);
mul(0, -1);
will cause deoptimization on minus zero check in mul-i. while in reality
this check should be removed:
0 1 i13 Mul i17 i18 ! -0? <|@
this happens because Canonicalize pass removes BIT_OR with 0 operation
before ComputeMinusZeroChecks happens. Thus -0? check is added to mul
because truncating operation is not present anymore.