diff options
Diffstat (limited to 'compiler/dex/gvn_dead_code_elimination.cc')
-rw-r--r-- | compiler/dex/gvn_dead_code_elimination.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/compiler/dex/gvn_dead_code_elimination.cc b/compiler/dex/gvn_dead_code_elimination.cc index b1f5d87..044989e 100644 --- a/compiler/dex/gvn_dead_code_elimination.cc +++ b/compiler/dex/gvn_dead_code_elimination.cc @@ -1192,7 +1192,6 @@ bool GvnDeadCodeElimination::RecordMIR(MIR* mir) { case Instruction::CONST_WIDE_32: case Instruction::CONST_WIDE: case Instruction::CONST_WIDE_HIGH16: - case Instruction::ARRAY_LENGTH: case Instruction::CMPL_FLOAT: case Instruction::CMPG_FLOAT: case Instruction::CMPL_DOUBLE: @@ -1316,6 +1315,13 @@ bool GvnDeadCodeElimination::RecordMIR(MIR* mir) { } break; + case Instruction::ARRAY_LENGTH: + if ((mir->optimization_flags & MIR_IGNORE_NULL_CHECK) == 0) { + must_keep = true; + uses_all_vregs = true; + } + break; + case Instruction::AGET_OBJECT: case Instruction::AGET: case Instruction::AGET_WIDE: |