summaryrefslogtreecommitdiff
path: root/compiler/optimizing/scheduler.cc
diff options
context:
space:
mode:
author Vladimir Marko <vmarko@google.com> 2021-05-21 09:24:03 +0100
committer Vladimir Marko <vmarko@google.com> 2021-05-21 09:28:10 +0100
commit642c8f6e69929f46a1a52583cb55b68d83828a02 (patch)
tree439e8e33788e7b346d245382f58a43436e9d89cc /compiler/optimizing/scheduler.cc
parenta393988fe65af884b81c63db54ac4afb7d973da2 (diff)
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
Diffstat (limited to 'compiler/optimizing/scheduler.cc')
-rw-r--r--compiler/optimizing/scheduler.cc6
1 files changed, 4 insertions, 2 deletions
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);