Skip to content
This repository has been archived by the owner on May 16, 2023. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
8292385: assert(ctrl == kit.control()) failed: Control flow was added…
… although the intrinsic bailed out

Reviewed-by: dlong
Backport-of: 5757e2129ef23f6aa11a9a29d77ae86971b401c0
  • Loading branch information
TobiHartmann committed Oct 25, 2022
1 parent 65001c3 commit 16fbf7b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/hotspot/share/opto/library_call.cpp
Expand Up @@ -1613,12 +1613,19 @@ bool LibraryCallKit::inline_string_char_access(bool is_store) {
return false;
}

// Save state and restore on bailout
uint old_sp = sp();
SafePointNode* old_map = clone_map();

value = must_be_not_null(value, true);

Node* adr = array_element_address(value, index, T_CHAR);
if (adr->is_top()) {
set_map(old_map);
set_sp(old_sp);
return false;
}
old_map->destruct(&_gvn);
if (is_store) {
access_store_at(value, adr, TypeAryPtr::BYTES, ch, TypeInt::CHAR, T_CHAR, IN_HEAP | MO_UNORDERED | C2_MISMATCHED);
} else {
Expand Down

1 comment on commit 16fbf7b

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.