diff options
| author | 2018-03-22 19:48:44 +0000 | |
|---|---|---|
| committer | 2018-03-22 19:48:44 +0000 | |
| commit | 7af7d8dccc6d96d5d85564a58f5b18169a2f969b (patch) | |
| tree | e24e541da592ff22bb3fd81311110e82ed901a30 /compiler/optimizing/code_sinking.cc | |
| parent | 7ee5371298903e0eda412d08e02d2381f1d5aea8 (diff) | |
| parent | 071d43576b4a9ede8ef2a4289c5d79b1ae612c7a (diff) | |
Merge "Code sinking bug fix."
Diffstat (limited to 'compiler/optimizing/code_sinking.cc')
| -rw-r--r-- | compiler/optimizing/code_sinking.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/optimizing/code_sinking.cc b/compiler/optimizing/code_sinking.cc index f4760d661f..2e31d35584 100644 --- a/compiler/optimizing/code_sinking.cc +++ b/compiler/optimizing/code_sinking.cc @@ -214,6 +214,11 @@ static HInstruction* FindIdealPosition(HInstruction* instruction, DCHECK(target_block != nullptr); } + // Bail if the instruction can throw and we are about to move into a catch block. + if (instruction->CanThrow() && target_block->GetTryCatchInformation() != nullptr) { + return nullptr; + } + // Find insertion position. No need to filter anymore, as we have found a // target block. HInstruction* insert_pos = nullptr; |