Quick: Fix "select" pattern to update data used for GC maps.
Follow-up to
https://android-review.googlesource.com/143222
Change-Id: I1c12af9a19f76e64fd209f6cc2eaec5587b3083b
diff --git a/compiler/dex/mir_optimization.cc b/compiler/dex/mir_optimization.cc
index 266b7c3..c85c3b6 100644
--- a/compiler/dex/mir_optimization.cc
+++ b/compiler/dex/mir_optimization.cc
@@ -671,6 +671,9 @@
}
int dead_true_def = if_true->ssa_rep->defs[0];
raw_use_counts_[dead_true_def] = use_counts_[dead_true_def] = 0;
+ // Update ending vreg->sreg map for GC maps generation.
+ int def_vreg = SRegToVReg(mir->ssa_rep->defs[0]);
+ bb->data_flow_info->vreg_to_ssa_map_exit[def_vreg] = mir->ssa_rep->defs[0];
// We want to remove ft and tk and link bb directly to ft_ft. First, we need
// to update all Phi inputs correctly with UpdatePredecessor(ft->id, bb->id)
// since the live_def above comes from ft->first_mir_insn (if_false).