diff options
Diffstat (limited to 'compiler/optimizing/intrinsics_arm64.cc')
-rw-r--r-- | compiler/optimizing/intrinsics_arm64.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/optimizing/intrinsics_arm64.cc b/compiler/optimizing/intrinsics_arm64.cc index 4af63fa906..851b6e96ac 100644 --- a/compiler/optimizing/intrinsics_arm64.cc +++ b/compiler/optimizing/intrinsics_arm64.cc @@ -5437,10 +5437,8 @@ static void CreateVarHandleGetAndUpdateLocations(HInvoke* invoke, } // Get the type from the shorty as the invokes may not return a value. - LocationSummary* locations = CreateVarHandleCommonLocations(invoke, codegen); uint32_t arg_index = invoke->GetNumberOfArguments() - 1; DataType::Type value_type = GetDataTypeFromShorty(invoke, arg_index); - size_t old_temp_count = locations->GetTempCount(); if (value_type == DataType::Type::kReference && codegen->EmitNonBakerReadBarrier()) { // Unsupported for non-Baker read barrier because the artReadBarrierSlow() ignores // the passed reference and reloads it from the field, thus seeing the new value @@ -5448,6 +5446,9 @@ static void CreateVarHandleGetAndUpdateLocations(HInvoke* invoke, return; } + LocationSummary* locations = CreateVarHandleCommonLocations(invoke, codegen); + size_t old_temp_count = locations->GetTempCount(); + DCHECK_EQ(old_temp_count, (GetExpectedVarHandleCoordinatesCount(invoke) == 0) ? 2u : 1u); if (DataType::IsFloatingPointType(value_type)) { if (get_and_update_op == GetAndUpdateOp::kAdd) { |