Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/hotspot/share/opto/library_call.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1009,8 +1009,13 @@ Node* LibraryCallKit::make_string_method_node(int opcode, Node* str1_start, Node
case Op_StrEquals:
// We already know that cnt1 == cnt2 here (checked in 'inline_string_equals').
// Use the constant length if there is one because optimized match rule may exist.
#if HOTSPOT_TARGET_CLASSLIB == 8
result = new StrEqualsNode(control(), memory(TypeAryPtr::CHARS),
str1_start, str2_start, cnt2->is_Con() ? cnt2 : cnt1, ae);
#else
result = new StrEqualsNode(control(), memory(TypeAryPtr::BYTES),
str1_start, str2_start, cnt2->is_Con() ? cnt2 : cnt1, ae);
#endif
break;
default:
ShouldNotReachHere();
Expand Down Expand Up @@ -1396,7 +1401,11 @@ bool LibraryCallKit::inline_string_indexOfChar(StrIntrinsicNode::ArgEnc ae) {
RegionNode* region = new RegionNode(3);
Node* phi = new PhiNode(region, TypeInt::INT);

#if HOTSPOT_TARGET_CLASSLIB == 8
Node* result = new StrIndexOfCharNode(control(), memory(TypeAryPtr::CHARS), src_start, src_count, int_ch, ae);
#else
Node* result = new StrIndexOfCharNode(control(), memory(TypeAryPtr::BYTES), src_start, src_count, int_ch, ae);
#endif
C->set_has_split_ifs(true); // Has chance for split-if optimization
_gvn.transform(result);

Expand Down
Loading