Chromium Code Reviews| Index: runtime/vm/flow_graph_allocator.cc |
| diff --git a/runtime/vm/flow_graph_allocator.cc b/runtime/vm/flow_graph_allocator.cc |
| index bb092dfc8c810bf52cb39c8c94129f9e5035f006..ddac6dae3ae65312486458cc28db78edab75d4e3 100644 |
| --- a/runtime/vm/flow_graph_allocator.cc |
| +++ b/runtime/vm/flow_graph_allocator.cc |
| @@ -1150,9 +1150,18 @@ void FlowGraphAllocator::ProcessOneInstruction(BlockEntryInstr* block, |
| // Normalize same-as-first-input output if input is specified as |
| // fixed register. |
| if (locs->out(0).IsUnallocated() && |
| - (locs->out(0).policy() == Location::kSameAsFirstInput) && |
| - (locs->in(0).IsMachineRegister())) { |
| - locs->set_out(0, locs->in(0)); |
| + (locs->out(0).policy() == Location::kSameAsFirstInput)) { |
| + if (locs->in(0).IsPairLocation()) { |
| + // Pair input, pair output. |
| + PairLocation* in_pair = locs->in(0).AsPairLocation(); |
| + if (in_pair->At(0).IsMachineRegister() || |
| + in_pair->At(1).IsMachineRegister()) { |
| + locs->set_out(0, Location::Pair(in_pair->At(0), in_pair->At(1))); |
|
Vyacheslav Egorov (Google)
2014/07/16 16:26:42
I wonder what happens if you have partial pair loc
Cutch
2014/07/16 16:39:29
Done.
|
| + } |
| + } else if (locs->in(0).IsMachineRegister()) { |
| + // Single input, single output. |
| + locs->set_out(0, locs->in(0)); |
| + } |
| } |
| const bool output_same_as_first_input = |