Revision: 4943
Author: [email protected]
Date: Thu Jun 24 07:22:25 2010
Log: Port optimization of comparison with a trivial LHS from ia32 to x64.
Review URL: http://codereview.chromium.org/2868028
http://code.google.com/p/v8/source/detail?r=4943
Modified:
/branches/bleeding_edge/src/x64/codegen-x64.cc
=======================================
--- /branches/bleeding_edge/src/x64/codegen-x64.cc Thu Jun 24 06:56:35 2010
+++ /branches/bleeding_edge/src/x64/codegen-x64.cc Thu Jun 24 07:22:25 2010
@@ -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