Reviewers: Erik Corry, Description: Port optimization of comparison with a trivial LHS from ia32 to x64.
Please review this at http://codereview.chromium.org/2868028/show SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/ Affected files: M src/x64/codegen-x64.cc Index: src/x64/codegen-x64.cc =================================================================== --- src/x64/codegen-x64.cc (revision 4928) +++ src/x64/codegen-x64.cc (working copy) @@ -3855,8 +3855,17 @@ default: UNREACHABLE(); } - Load(left); - Load(right); + + if (left->IsTrivial()) { + Load(right); + Result right_result = frame_->Pop(); + frame_->Push(left); + frame_->Push(&right_result); + } else { + Load(left); + Load(right); + } + Comparison(node, cc, strict, destination()); } -- v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev
