ART: Implicit null check should break def tracking
Implicit null check can provoke exception that needs to be sure all VRs are saved on stack.
The fix is to reset the def tracking system at the moment of adding an implicit null check.
Change-Id: Ie8a32b727086438e04e745d4a3f87f096ff36cac
Signed-off-by: Pavel Vyssotski <pavel.n.vyssotski@intel.com>
diff --git a/compiler/dex/quick/gen_common.cc b/compiler/dex/quick/gen_common.cc
index 061ee07..12a21d0 100644
--- a/compiler/dex/quick/gen_common.cc
+++ b/compiler/dex/quick/gen_common.cc
@@ -161,6 +161,10 @@
if (!cu_->compiler_driver->GetCompilerOptions().GetImplicitNullChecks()) {
return GenExplicitNullCheck(m_reg, opt_flags);
}
+ // If null check has not been eliminated, reset redundant store tracking.
+ if ((opt_flags & MIR_IGNORE_NULL_CHECK) == 0) {
+ ResetDefTracking();
+ }
return nullptr;
}