ART: Reset bb id to the last list mir
This patch fixes a bug in RemoveMIRList() to reset bb id to
the last list mir.
Change-Id: I0384d8d22e357b69725f455772f55296c50bc1d3
Signed-off-by: Chao-ying Fu <chao-ying.fu@intel.com>
diff --git a/compiler/dex/mir_graph.cc b/compiler/dex/mir_graph.cc
index ce56255..93b774c 100644
--- a/compiler/dex/mir_graph.cc
+++ b/compiler/dex/mir_graph.cc
@@ -1175,7 +1175,7 @@
}
// Remove the BB information and also find the after_list.
- for (MIR* mir = first_list_mir; mir != last_list_mir; mir = mir->next) {
+ for (MIR* mir = first_list_mir; mir != last_list_mir->next; mir = mir->next) {
mir->bb = NullBasicBlockId;
}