diff options
| author | 2015-06-27 13:44:06 +0100 | |
|---|---|---|
| committer | 2015-06-27 13:56:45 +0100 | |
| commit | 5e6926cf67b50bcab56dc244e09b6f8f608d4ca2 (patch) | |
| tree | 4457f4f7e0703dea95167e3ddf25c23c5f7109a4 /compiler | |
| parent | 9a83f59365443eead29a318fe28916df9412a720 (diff) | |
Quick: Fix a DCHECK to take type conflicts into account.
Bug: 21865466
Change-Id: I010c7058b5a58bea1ec61af5bd6a12c2eb8de1b4
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/dex/quick/gen_loadstore.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/dex/quick/gen_loadstore.cc b/compiler/dex/quick/gen_loadstore.cc index aa95e77f6d..3f89001772 100644 --- a/compiler/dex/quick/gen_loadstore.cc +++ b/compiler/dex/quick/gen_loadstore.cc @@ -107,7 +107,9 @@ void Mir2Lir::LoadValueDirectWideFixed(RegLocation rl_src, RegStorage r_dest) { } RegLocation Mir2Lir::LoadValue(RegLocation rl_src, RegisterClass op_kind) { - DCHECK(!rl_src.ref || op_kind == kRefReg); + // If op_kind isn't a reference, rl_src should not be marked as a reference either + // unless we've seen type conflicts (i.e. register promotion is disabled). + DCHECK(op_kind == kRefReg || (!rl_src.ref || (cu_->disable_opt & (1u << kPromoteRegs)) != 0u)); rl_src = UpdateLoc(rl_src); if (rl_src.location == kLocPhysReg) { if (!RegClassMatches(op_kind, rl_src.reg)) { |