Commit 667c5e84 authored by whesse@chromium.org's avatar whesse@chromium.org

Port optimization of comparison with a trivial LHS from ia32 to x64.

Review URL: http://codereview.chromium.org/2868028

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4943 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent d0a9f762
...@@ -3855,8 +3855,17 @@ void CodeGenerator::VisitCompareOperation(CompareOperation* node) { ...@@ -3855,8 +3855,17 @@ void CodeGenerator::VisitCompareOperation(CompareOperation* node) {
default: default:
UNREACHABLE(); 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()); Comparison(node, cc, strict, destination());
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment