From 7cd01f5d496c384874ea8c21eafb2b6479833e6a Mon Sep 17 00:00:00 2001 From: Vladimir Marko Date: Mon, 13 Oct 2014 18:29:44 +0100 Subject: Add regression test for null check elimination. Prompted by https://android-review.googlesource.com/110090 Bug: 17969907 Change-Id: I938c27cda0681b9431d69baf4eafa7ca2f9b5c9c --- compiler/dex/mir_optimization.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'compiler/dex/mir_optimization.cc') diff --git a/compiler/dex/mir_optimization.cc b/compiler/dex/mir_optimization.cc index 2ac0b51a89..84c056daf3 100644 --- a/compiler/dex/mir_optimization.cc +++ b/compiler/dex/mir_optimization.cc @@ -929,6 +929,8 @@ bool MIRGraph::EliminateNullChecks(BasicBlock* bb) { mir->optimization_flags |= MIR_IGNORE_NULL_CHECK; } else { // Do the null check. + // TODO: Rewrite the pass to converge first before doing any modifications so that + // we don't lose the MIR_IGNORE_NULL_CHECK here if previously set by some other pass. mir->optimization_flags &= ~MIR_IGNORE_NULL_CHECK; // Mark s_reg as null-checked ssa_regs_to_check->ClearBit(src_sreg); -- cgit v1.2.3-59-g8ed1b