summaryrefslogtreecommitdiff
path: root/compiler/optimizing/induction_var_range.h
diff options
context:
space:
mode:
author Santiago Aboy Solanes <solanes@google.com> 2024-07-16 13:33:00 +0100
committer Santiago Aboy Solanes <solanes@google.com> 2024-07-16 15:59:32 +0000
commit91c9502fdf437fce5596631e50db5e70c034312a (patch)
tree65ad40e8e20ede6776fd1aa36829d57c030364ca /compiler/optimizing/induction_var_range.h
parent5514bcedf59460571e26ce68508ef4a9fa2b0077 (diff)
Update InductionVarRange::Replace to match more cases
We were missing to update some cases when `instruction` wasn't present in the induction analysis but `fetch` was. We can use `fetch` itself when querying for the InductionInfo to cover both the previous and new cases. Bug: 351868772 Fixes: 351868772 Test: art/test/testrunner/testrunner.py --host --64 --optimizing -b Test: m test-art-host-gtest Change-Id: I3c412efdef36d242b0182ed80ce62567c0e3eafc
Diffstat (limited to 'compiler/optimizing/induction_var_range.h')
-rw-r--r--compiler/optimizing/induction_var_range.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/optimizing/induction_var_range.h b/compiler/optimizing/induction_var_range.h
index a81227b41b..ab497414c9 100644
--- a/compiler/optimizing/induction_var_range.h
+++ b/compiler/optimizing/induction_var_range.h
@@ -128,8 +128,8 @@ class InductionVarRange {
HInstruction* GenerateLastValue(HInstruction* instruction, HGraph* graph, HBasicBlock* block);
/**
- * Updates all matching fetches with the given replacement in all induction information
- * that is associated with the given instruction.
+ * Updates all matching `fetch`es with the given `replacement` in all induction information
+ * that is present in the loops of the given `instruction`.
*/
void Replace(HInstruction* instruction, HInstruction* fetch, HInstruction* replacement);