ART: DCHECK still too strong for String NewInstance
Even though the presence of a irreducible loop phi is the reason why
String.<init> may see its first input not being the NewInstance, it
may see a different phi from the same cycle. We have to relax the
corresponding DCHECK.
Bug: 26676472
Change-Id: Iba6fffa74833c57aad8aa07dc382ff6b93838de1
diff --git a/compiler/optimizing/ssa_builder.cc b/compiler/optimizing/ssa_builder.cc
index c8244aa..165d09d 100644
--- a/compiler/optimizing/ssa_builder.cc
+++ b/compiler/optimizing/ssa_builder.cc
@@ -934,7 +934,7 @@
if (arg_this->IsNewInstance()) {
uninitialized_strings_.push_back(arg_this->AsNewInstance());
} else {
- DCHECK(arg_this->IsIrreducibleLoopHeaderPhi());
+ DCHECK(arg_this->IsPhi());
// NewInstance is not the direct input of the StringFactory call. It might
// be redundant but optimizing this case is not worth the effort.
}