I have changed it to using HMul, reorganized the function to avoid the long if
followed by the similar switch, and tried a micro-optimization of LMulI.


http://codereview.chromium.org/6685045/diff/1/src/hydrogen.cc
File src/hydrogen.cc (right):

http://codereview.chromium.org/6685045/diff/1/src/hydrogen.cc#newcode4536
src/hydrogen.cc:4536: instr = new HSub(graph_->GetConstant0(), value);
Argh, foiled again by -0.
Yes, you are correct.
Incidentally, it would work if we used a ConstantMinus0 instead, but
then we would lose smi-ness.
I guess multiplication is safer (and the slight speedup I saw was
probably due to suddently being able to ignore -0)

http://codereview.chromium.org/6685045/diff/1/src/hydrogen.cc#newcode4539
src/hydrogen.cc:4539: instr = new HSub(value, graph_->GetConstant0());
Agree, that's bad too.

http://codereview.chromium.org/6685045/

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

Reply via email to