RFR: 8309502: RISC-V: String.indexOf intrinsic may produce misaligned memory loads
Vladimir Kempik
vkempik at openjdk.org
Wed Jun 7 07:43:55 UTC 2023
On Wed, 7 Jun 2023 06:20:33 GMT, Fei Yang <fyang at openjdk.org> wrote:
> Hi, I searched and found that we have four direct callers of `C2_MacroAssembler::string_indexof_linearscan`: three in file riscv.ad (by string_indexof_conUU, string_indexof_conLL and string_indexof_conUL) and one by `C2_MacroAssembler::string_indexof`. Did you check which one is triggering these unaligned accesses? I am not sure but it looks to me that the three direct callers in file riscv.ad are less likely to have such an issue. If that is true, we might need some distinugish among those callers for better performance.
Originally, when I found this misaligned load, this code `(this->*load_2chr)(ch2, Address(tmp3), noreg);` was corresponding to `lhu t1, 0(t4)`. So I can say the isLL variable was true.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/14320#issuecomment-1580114390
More information about the hotspot-compiler-dev
mailing list