Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(91)

Unified Diff: runtime/vm/flow_graph_compiler_x64.cc

Issue 712993005: Infer range for BIT_XOR. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/flow_graph_compiler_mips.cc ('k') | runtime/vm/flow_graph_optimizer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_compiler_x64.cc
diff --git a/runtime/vm/flow_graph_compiler_x64.cc b/runtime/vm/flow_graph_compiler_x64.cc
index 1c4b7d7380f4011d06d150375ba0f057969f6425..a7b1e2d5357e33241b9cc4d6f87a6bdbed687b83 100644
--- a/runtime/vm/flow_graph_compiler_x64.cc
+++ b/runtime/vm/flow_graph_compiler_x64.cc
@@ -1595,6 +1595,9 @@ void ParallelMoveResolver::EmitMove(int index) {
if (destination.IsRegister()) {
if (constant.IsSmi() && (Smi::Cast(constant).Value() == 0)) {
__ xorq(destination.reg(), destination.reg());
+ } else if (constant.IsSmi() &&
+ (source.constant_instruction()->representation() == kUnboxedInt32)) {
+ __ movl(destination.reg(), Immediate(Smi::Cast(constant).Value()));
} else {
__ LoadObject(destination.reg(), constant, PP);
}
@@ -1616,7 +1619,13 @@ void ParallelMoveResolver::EmitMove(int index) {
__ movsd(destination.ToStackSlotAddress(), XMM0);
} else {
ASSERT(destination.IsStackSlot());
- StoreObject(destination.ToStackSlotAddress(), constant);
+ if (constant.IsSmi() &&
+ (source.constant_instruction()->representation() == kUnboxedInt32)) {
+ __ movl(destination.ToStackSlotAddress(),
+ Immediate(Smi::Cast(constant).Value()));
+ } else {
+ StoreObject(destination.ToStackSlotAddress(), constant);
+ }
}
}
« no previous file with comments | « runtime/vm/flow_graph_compiler_mips.cc ('k') | runtime/vm/flow_graph_optimizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698