| Index: runtime/vm/intermediate_language_x64.cc
|
| diff --git a/runtime/vm/intermediate_language_x64.cc b/runtime/vm/intermediate_language_x64.cc
|
| index b58e4d1b41aacce57bb8ca650a796d9a875a462d..487d96194f51929571d9947e52acd8fc50429e86 100644
|
| --- a/runtime/vm/intermediate_language_x64.cc
|
| +++ b/runtime/vm/intermediate_language_x64.cc
|
| @@ -238,14 +238,16 @@ LocationSummary* ConstantInstr::MakeLocationSummary(Zone* zone,
|
| const intptr_t kNumInputs = 0;
|
| return LocationSummary::Make(zone,
|
| kNumInputs,
|
| - Location::RequiresRegister(),
|
| + Assembler::IsSafe(value())
|
| + ? Location::Constant(this)
|
| + : Location::RequiresRegister(),
|
| LocationSummary::kNoCall);
|
| }
|
|
|
|
|
| void ConstantInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| // The register allocator drops constant definitions that have no uses.
|
| - if (!locs()->out(0).IsInvalid()) {
|
| + if (locs()->out(0).IsRegister()) {
|
| Register result = locs()->out(0).reg();
|
| __ LoadObject(result, value());
|
| }
|
|
|