diff options
author | 2015-07-01 12:56:46 +0100 | |
---|---|---|
committer | 2015-07-01 13:54:32 +0100 | |
commit | 9fdb31e12023d94c710a766a54d8a57c91a196f9 (patch) | |
tree | 22be0afa06ceca65cb4d1ed457c0ea720845e9a4 /compiler/optimizing/instruction_simplifier.cc | |
parent | 3b0667c1d68ba88c71b031757b757dca659afd69 (diff) |
Do not do a type check when setting null to an array.
Change-Id: I7387d45aea697d4a3de273335647220a815a992b
Diffstat (limited to 'compiler/optimizing/instruction_simplifier.cc')
-rw-r--r-- | compiler/optimizing/instruction_simplifier.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/optimizing/instruction_simplifier.cc b/compiler/optimizing/instruction_simplifier.cc index e375f7b1d3..62f90c2f5e 100644 --- a/compiler/optimizing/instruction_simplifier.cc +++ b/compiler/optimizing/instruction_simplifier.cc @@ -398,6 +398,10 @@ void InstructionSimplifierVisitor::VisitArraySet(HArraySet* instruction) { } } + if (value->IsNullConstant()) { + instruction->ClearNeedsTypeCheck(); + } + if (!value->CanBeNull()) { instruction->ClearValueCanBeNull(); } |