Status: New
Owner: [email protected]
Labels: Type-Bug Priority-Medium

New issue 2205 by [email protected]: MathFloorOfDiv optimization is very fragile
http://code.google.com/p/v8/issues/detail?id=2205

This optimization was implemented in Issue 2038 but is very fragile.

For example it does not kick in for code like:

function idiv(a) { return Math.floor(a / 2); }
idiv(1);
idiv(1);
idiv(1);
%OptimizeFunctionOnNextCall(idiv);
idiv(1);

because MathFloorOfDiv canonicalization happens only if dividend is known on the hydrogen level to be Int32 value and here it is not (but type feedback for inputs of DIV should actually tell hydrogen that it was always a int32; we just don't use this).


--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to