diff options
Diffstat (limited to 'compiler/dex/quick/gen_invoke.cc')
-rw-r--r-- | compiler/dex/quick/gen_invoke.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/compiler/dex/quick/gen_invoke.cc b/compiler/dex/quick/gen_invoke.cc index 92c13cef2a..4f02fd7486 100644 --- a/compiler/dex/quick/gen_invoke.cc +++ b/compiler/dex/quick/gen_invoke.cc @@ -1423,6 +1423,16 @@ bool Mir2Lir::GenInlinedUnsafePut(CallInfo* info, bool is_long, } void Mir2Lir::GenInvoke(CallInfo* info) { + if ((info->opt_flags & MIR_INLINED) != 0) { + // Already inlined but we may still need the null check. + if (info->type != kStatic && + ((cu_->disable_opt & (1 << kNullCheckElimination)) != 0 || + (info->opt_flags & MIR_IGNORE_NULL_CHECK) == 0)) { + RegLocation rl_obj = LoadValue(info->args[0], kCoreReg); + GenImmedCheck(kCondEq, rl_obj.reg.GetReg(), 0, kThrowNullPointer); + } + return; + } DCHECK(cu_->compiler_driver->GetMethodInlinerMap() != nullptr); if (cu_->compiler_driver->GetMethodInlinerMap()->GetMethodInliner(cu_->dex_file) ->GenIntrinsic(this, info)) { |