| Index: src/compiler/register-allocator.cc
|
| diff --git a/src/compiler/register-allocator.cc b/src/compiler/register-allocator.cc
|
| index a9cdf51b5636d7d2d0f484c6e2e36875e89cf3c9..61afa54d0a04374428e07fa348af3dd0ccb4f54f 100644
|
| --- a/src/compiler/register-allocator.cc
|
| +++ b/src/compiler/register-allocator.cc
|
| @@ -1078,9 +1078,8 @@ void RegisterAllocator::ProcessPhis(const InstructionBlock* block) {
|
| auto output = phi->output();
|
| int phi_vreg = phi->virtual_register();
|
| LiveRange* live_range = LiveRangeFor(phi_vreg);
|
| - BlockStartInstruction* block_start =
|
| - code()->GetBlockStart(block->rpo_number());
|
| - block_start->GetOrCreateParallelMove(GapInstruction::BEFORE, code_zone())
|
| + GapInstruction* gap = code()->GapAt(block->code_start() + 1);
|
| + gap->GetOrCreateParallelMove(GapInstruction::BEFORE, code_zone())
|
| ->AddMove(output, live_range->GetSpillOperand(), code_zone());
|
| live_range->SetSpillStartIndex(block->first_instruction_index());
|
| }
|
| @@ -1346,14 +1345,11 @@ void RegisterAllocator::ResolveControlFlow(const InstructionBlock* block,
|
| if (pred_op->Equals(cur_op)) return;
|
| GapInstruction* gap = nullptr;
|
| if (block->PredecessorCount() == 1) {
|
| - gap = code()->GapAt(block->first_instruction_index());
|
| + gap = code()->GapAt(block->first_instruction_index() + 1);
|
| } else {
|
| DCHECK(pred->SuccessorCount() == 1);
|
| gap = GetLastGap(pred);
|
| -
|
| - Instruction* branch = InstructionAt(pred->last_instruction_index());
|
| - DCHECK(!branch->HasPointerMap());
|
| - USE(branch);
|
| + DCHECK(!InstructionAt(pred->last_instruction_index())->HasPointerMap());
|
| }
|
| gap->GetOrCreateParallelMove(GapInstruction::START, code_zone())
|
| ->AddMove(pred_op, cur_op, code_zone());
|
|
|