Index: runtime/vm/intermediate_language_dbc.cc |
diff --git a/runtime/vm/intermediate_language_dbc.cc b/runtime/vm/intermediate_language_dbc.cc |
index 859f7d432f3faa8106d55636a27ca97ab0e79fbd..ec13a8339869a875de4b355bfe2cd7fdfb11c64e 100644 |
--- a/runtime/vm/intermediate_language_dbc.cc |
+++ b/runtime/vm/intermediate_language_dbc.cc |
@@ -339,7 +339,9 @@ EMIT_NATIVE_CODE(LoadClassId, 1, Location::RequiresRegister()) { |
EMIT_NATIVE_CODE(Constant, 0, Location::RequiresRegister()) { |
if (compiler->is_optimizing()) { |
- __ LoadConstant(locs()->out(0).reg(), value()); |
+ if (locs()->out(0).IsRegister()) { |
+ __ LoadConstant(locs()->out(0).reg(), value()); |
+ } |
} else { |
__ PushConstant(value()); |
} |