RFR: 8360520: RISC-V: C1: Fix primitive array clone intrinsic regression after JDK-8333154 [v4]
Feilong Jiang
fjiang at openjdk.org
Fri Jul 11 11:50:36 UTC 2025
On Thu, 10 Jul 2025 22:42:44 GMT, Dean Long <dlong at openjdk.org> wrote:
>> Feilong Jiang has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains six additional commits since the last revision:
>>
>> - Merge branch 'master' of https://github.com/openjdk/jdk into riscv-fix-c1-primitive-clone
>> - Merge branch 'master' of https://github.com/openjdk/jdk into riscv-fix-c1-primitive-clone
>> - Revert RISCV Macro modification
>> - Merge branch 'master' of https://github.com/openjdk/jdk into riscv-fix-c1-primitive-clone
>> - check unaligned flag at LIR_OpArrayCopy to avoid using AvoidUnalignedAccesses
>> - riscv: fix c1 primitive array clone intrinsic regression
>
> src/hotspot/share/c1/c1_LIR.cpp line 353:
>
>> 351: , _expected_type(expected_type)
>> 352: , _flags(flags) {
>> 353: #if defined(X86) || defined(AARCH64) || defined(S390) || defined(RISCV64) || defined(PPC64)
>
> Do we still need this #if? It would be nice if we can eventually remove it, but I guess arm32 support is missing.
You are right, ARM32 support is not available, so we have to keep these platform guards for now.
> src/hotspot/share/c1/c1_LIR.cpp line 354:
>
>> 352: , _flags(flags) {
>> 353: #if defined(X86) || defined(AARCH64) || defined(S390) || defined(RISCV64) || defined(PPC64)
>> 354: if (expected_type != nullptr && ((flags & ~LIR_OpArrayCopy::unaligned) == 0)) {
>
> I was concerned that this is platform-specific, but I checked and all platforms can handle unaligned or overlapping w/o using the stub. So maybe this should be using LIR_OpArrayCopy::unaligned|LIR_OpArrayCopy::overlapping?
Yes, LIR_OpArrayCopy::overlapping was also reset if `OmitChecksFlag` is true. Added `LIR_OpArrayCopy::overlapping` too.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25976#discussion_r2200508522
PR Review Comment: https://git.openjdk.org/jdk/pull/25976#discussion_r2200507132
More information about the hotspot-compiler-dev
mailing list