summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Santiago Aboy Solanes <solanes@google.com> 2024-11-21 11:46:50 +0000
committer Santiago Aboy Solanes <solanes@google.com> 2024-11-21 15:38:42 +0000
commitc987498b012e17be96af5d5f5a1b6e4652db1efe (patch)
tree893eb913aabe3b54b0be2c25c5383b633b0b6092
parentd4b4368669a4d7cd6abe9ecbd133e29a646d37a3 (diff)
Add comment and dcheck regarding SuperblockCloner edge case
Based on a comment in r.android.com/3365219. Bug: 368984521 Test: art/test/testrunner/testrunner.py -b --host --64 --optimizing Change-Id: Ic8b945ba418df380158456bfb295edfd1dc0ad01
-rw-r--r--compiler/optimizing/superblock_cloner.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/optimizing/superblock_cloner.cc b/compiler/optimizing/superblock_cloner.cc
index 06459c0fb4..276d2246cb 100644
--- a/compiler/optimizing/superblock_cloner.cc
+++ b/compiler/optimizing/superblock_cloner.cc
@@ -887,6 +887,9 @@ bool SuperblockCloner::IsSubgraphClonable() const {
DCHECK_EQ(exits.size(), 1u);
HInstruction* value = live_out.first;
if (!value->GetBlock()->Dominates(exits[0])) {
+ // This case can only happen when `value` is used in a catch phi, so the graph must contain a
+ // catch block.
+ DCHECK(graph_->HasTryCatch());
return false;
}
}