8238384: CTW: C2 compilation fails with "assert(store != load->find_exact_control(load->in(0))) failed: dependence cycle found"

Reviewed-by: vlivanov, thartmann
This commit is contained in:
Roland Westrelin 2020-02-20 16:41:05 +01:00
parent 1e796eae8f
commit 86ad195099
7 changed files with 82 additions and 20 deletions

View file

@ -1905,8 +1905,9 @@ bool Compile::must_alias(const TypePtr* adr_type, int alias_idx) {
bool Compile::can_alias(const TypePtr* adr_type, int alias_idx) {
if (alias_idx == AliasIdxTop) return false; // the empty category
if (adr_type == NULL) return false; // NULL serves as TypePtr::TOP
if (alias_idx == AliasIdxBot) return true; // the universal category
if (adr_type->base() == Type::AnyPtr) return true; // TypePtr::BOTTOM or its twins
// Known instance doesn't alias with bottom memory
if (alias_idx == AliasIdxBot) return !adr_type->is_known_instance(); // the universal category
if (adr_type->base() == Type::AnyPtr) return !C->get_adr_type(alias_idx)->is_known_instance(); // TypePtr::BOTTOM or its twins
// the only remaining possible overlap is identity
int adr_idx = get_alias_index(adr_type);