On Tue, 15 Oct 2024 22:31:27 GMT, Volodymyr Paprotski <d...@openjdk.org> wrote:
>> Roman Kennke has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Fix aarch64.ad > > src/hotspot/cpu/x86/c2_stubGenerator_x86_64_string.cpp line 1634: > >> 1632: >> 1633: >> 1634: // Copy the small (< 32 byte) haystack to the stack. Allows for >> vector reads without page fault > > Just to be pedantic, its `(<=32)` - this function also handles 32bytes case. > > - line 401: > > __ cmpq(haystack_len, 0x20); > __ ja(L_bigSwitchTop); > > - though line 293 (`highly_optimized_short_cases`) only seems to route16-byte > cases here: > ```__ cmpq(haystack_len_p, isU ? 8 : 16);``` I am not sure what you are looking at, but line 293 reads: __ cmpq(haystack_len_p, isU ? 16 : 32); for me. IOW, it routes > 32 byte cases to `L_begin`. But the following cmp/ja also routes <= 32 byte cases there, when `needle_len > 6`. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/20677#discussion_r1802694667