diff options
author | Vladimir Marko <vmarko@google.com> | 2017-10-11 20:39:54 +0100 |
---|---|---|
committer | Vladimir Marko <vmarko@google.com> | 2017-10-12 10:58:02 +0100 |
commit | bea75ff0835324076fed6ff5d443b9e02c65d223 (patch) | |
tree | 61ae2e8fe552938fcae1e277f51823ba2a4f6e74 /compiler/optimizing/code_generator_mips.cc | |
parent | 567563a9c6ccc06c2c9889d1c3c4feaa3c2b2dab (diff) |
Fix using LiveIntervals beyond their lifetime.
Fixes a bug introduced by
https://android-review.googlesource.com/504041
Test: test-art-host-gtest
Test: testrunner.py --host --optimizing
Bug: 64312607
Change-Id: I7fd2d55c2a657f736eaed7c94c41d1237ae2ec0b
Diffstat (limited to 'compiler/optimizing/code_generator_mips.cc')
-rw-r--r-- | compiler/optimizing/code_generator_mips.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/compiler/optimizing/code_generator_mips.cc b/compiler/optimizing/code_generator_mips.cc index 7ea7b9cee2..e58f43e1bb 100644 --- a/compiler/optimizing/code_generator_mips.cc +++ b/compiler/optimizing/code_generator_mips.cc @@ -3967,7 +3967,6 @@ void InstructionCodeGeneratorMIPS::HandleGoto(HInstruction* got, HBasicBlock* su HLoopInformation* info = block->GetLoopInformation(); if (info != nullptr && info->IsBackEdge(*block) && info->HasSuspendCheck()) { - codegen_->ClearSpillSlotsFromLoopPhisInStackMap(info->GetSuspendCheck()); GenerateSuspendCheck(info->GetSuspendCheck(), successor); return; } @@ -8359,6 +8358,13 @@ void LocationsBuilderMIPS::VisitParallelMove(HParallelMove* instruction ATTRIBUT } void InstructionCodeGeneratorMIPS::VisitParallelMove(HParallelMove* instruction) { + if (instruction->GetNext()->IsSuspendCheck() && + instruction->GetBlock()->GetLoopInformation() != nullptr) { + HSuspendCheck* suspend_check = instruction->GetNext()->AsSuspendCheck(); + // The back edge will generate the suspend check. + codegen_->ClearSpillSlotsFromLoopPhisInStackMap(suspend_check, instruction); + } + codegen_->GetMoveResolver()->EmitNativeCode(instruction); } |