| 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 53443e19667851a821ef07a4938b172095b51348..3352cb7618276538013c15699acebe9dd7b495fc 100644
|
| --- a/runtime/vm/flow_graph_compiler_x64.cc
|
| +++ b/runtime/vm/flow_graph_compiler_x64.cc
|
| @@ -1233,7 +1233,12 @@ void ParallelMoveResolver::EmitMove(int index) {
|
| } else {
|
| ASSERT(source.IsConstant());
|
| if (destination.IsRegister()) {
|
| - __ LoadObject(destination.reg(), source.constant());
|
| + const Object& constant = source.constant();
|
| + if (constant.IsSmi() && (Smi::Cast(constant).Value() == 0)) {
|
| + __ xorq(destination.reg(), destination.reg());
|
| + } else {
|
| + __ LoadObject(destination.reg(), constant);
|
| + }
|
| } else {
|
| ASSERT(destination.IsStackSlot());
|
| StoreObject(ToStackSlotAddress(destination), source.constant());
|
|
|