summaryrefslogtreecommitdiff
path: root/compiler/optimizing/builder.cc
diff options
context:
space:
mode:
author Nicolas Geoffray <ngeoffray@google.com> 2015-06-24 13:01:55 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2015-06-24 13:01:56 +0000
commit9dda8f231bf6aaac3f0397f1fa0cd9d42eb393ed (patch)
tree22b27b0e9926aaa6d9229bc831680ddc8d20fc92 /compiler/optimizing/builder.cc
parentd61d77d67a90f2e12ef89997e181f91f8858d7a8 (diff)
parent1efcc22cd1895c48adccbe49270d8e8583c2b12d (diff)
Merge "Fix another case of un-verified dead code."
Diffstat (limited to 'compiler/optimizing/builder.cc')
-rw-r--r--compiler/optimizing/builder.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/compiler/optimizing/builder.cc b/compiler/optimizing/builder.cc
index c49752642b..2bb6fbe350 100644
--- a/compiler/optimizing/builder.cc
+++ b/compiler/optimizing/builder.cc
@@ -2109,8 +2109,13 @@ bool HGraphBuilder::AnalyzeDexInstruction(const Instruction& instruction, uint32
case Instruction::MOVE_RESULT:
case Instruction::MOVE_RESULT_WIDE:
case Instruction::MOVE_RESULT_OBJECT:
- UpdateLocal(instruction.VRegA(), latest_result_);
- latest_result_ = nullptr;
+ if (latest_result_ == nullptr) {
+ // Only dead code can lead to this situation, where the verifier
+ // does not reject the method.
+ } else {
+ UpdateLocal(instruction.VRegA(), latest_result_);
+ latest_result_ = nullptr;
+ }
break;
case Instruction::CMP_LONG: {