From 642c8f6e69929f46a1a52583cb55b68d83828a02 Mon Sep 17 00:00:00 2001 From: Vladimir Marko Date: Fri, 21 May 2021 09:24:03 +0100 Subject: Fix scheduler's `FieldAccessHeapLocation()`. Use the correct target for predicated get. Also remove an always-false condition from LSE. Test: m Bug: 188188275 Bug: 188847019 Change-Id: I731e181c8c0d812120dc4fad0c011158053fa7a8 --- compiler/optimizing/scheduler.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'compiler/optimizing/scheduler.cc') diff --git a/compiler/optimizing/scheduler.cc b/compiler/optimizing/scheduler.cc index 7140e2424a..cb340f530b 100644 --- a/compiler/optimizing/scheduler.cc +++ b/compiler/optimizing/scheduler.cc @@ -149,8 +149,10 @@ size_t SideEffectDependencyAnalysis::MemoryDependencyAnalysis::FieldAccessHeapLo DCHECK(GetFieldInfo(instr) != nullptr); DCHECK(heap_location_collector_ != nullptr); - size_t heap_loc = heap_location_collector_->GetFieldHeapLocation(instr->InputAt(0), - GetFieldInfo(instr)); + HInstruction* ref = instr->IsPredicatedInstanceFieldGet() + ? instr->AsPredicatedInstanceFieldGet()->GetTarget() + : instr->InputAt(0); + size_t heap_loc = heap_location_collector_->GetFieldHeapLocation(ref, GetFieldInfo(instr)); // This field access should be analyzed and added to HeapLocationCollector before. DCHECK(heap_loc != HeapLocationCollector::kHeapLocationNotFound); -- cgit v1.2.3-59-g8ed1b