On Thu, 26 Sep 2024 11:39:02 GMT, Roman Kennke <rken...@openjdk.org> wrote:

>> src/hotspot/cpu/x86/stubGenerator_x86_64.cpp line 4008:
>> 
>>> 4006: #ifdef COMPILER2
>>> 4007:   if ((UseAVX == 2) && EnableX86ECoreOpts && 
>>> !UseCompactObjectHeaders) {
>>> 4008:     generate_string_indexof(StubRoutines::_string_indexof_array);
>> 
>> This stub routine should be re-enabled if `UseCompactObjectHeaders` is to 
>> become non-experimental and enabled by default in the future. Is there a RFE 
>> for this task?
>
> This comes from an assert in `LibraryCallKit::inline_string_indexOfI` and I 
> believe we can perhaps remove that assert and the !UCOH clause. I checked a 
> couple of tests that tripped that assert, and they seem to work fine, and I 
> also checked the code in `LibraryCallKit::inline_string_indexOfI` and 
> `generate_string_indexof_stubs()` and could not find anything obvious that 
> requires the base offset to be >=16. I am not sure why that assert is there. 
> I am now running tier1-4 with that change: 
> https://github.com/rkennke/jdk/commit/7001783e8c11718226506f42b7c1f1fda1af3ad0
> 
> If you know (or find) any reason why we need that assert, please let me know. 
> Otherwise I'd remove it, if you don't have objections.

I am not familiar with the `indexOf` implementation, but here is a relevant 
comment that motivates the assertion: 
https://github.com/openjdk/jdk/pull/16753#discussion_r1592774634.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/20677#discussion_r1777033220

Reply via email to