Eliminate intentional conversion from Smi to Int32 in HMul
authorverwaest@chromium.org <verwaest@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 27 Aug 2013 13:55:00 +0000 (13:55 +0000)
committerverwaest@chromium.org <verwaest@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 27 Aug 2013 13:55:00 +0000 (13:55 +0000)
commit788811244e75aaa45f5488c0acb5c0dca8f9dd4a
tree22517a4d009a28c7d079041399c52f0c2b7602b4
parentf55ba6b70ac217d877aaf9e253ba9b256bf91744
Eliminate intentional conversion from Smi to Int32 in HMul

If not all uses of arithmetic binary operation can be truncated to Smi, check if they can be truncated to Int32 which could avoid minus zero check

Fixed DoMulI on X64 to adopt correct operand size when the representation is Smi

Fixed DoMulI on ARM. Constant right operand optimization is based on Integer 32 instead of its representation.

BUG=
R=verwaest@chromium.org

Review URL: https://chromiumcodereview.appspot.com/22600005

Patch from Weiliang Lin <weiliang.lin2@gmail.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16361 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
src/arm/lithium-codegen-arm.cc
src/hydrogen-canonicalize.cc
src/hydrogen-infer-representation.cc
src/hydrogen-instructions.cc
src/hydrogen-instructions.h
src/hydrogen-representation-changes.cc
src/runtime.cc
src/runtime.h
src/x64/lithium-codegen-x64.cc
test/mjsunit/smi-mul.js [new file with mode: 0644]