RFR: 8345485: C2 MergeLoads: merge adjacent array/native memory loads into larger load [v4]
kuaiwei
duke at openjdk.org
Tue Mar 18 08:59:14 UTC 2025
On Tue, 18 Mar 2025 08:19:47 GMT, Emanuel Peter <epeter at openjdk.org> wrote:
>> kuaiwei has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Revert extract value and add more tests
>
> test/hotspot/jtreg/compiler/c2/TestMergeLoads.java line 55:
>
>> 53: byte[] aB = new byte[RANGE];
>> 54: char[] aC = new char[RANGE];
>> 55: short[] aS = new short[RANGE];
>
> What about merging loads on `int[]`?
Now there's limit to merge 2 LoadI as LoadL.
For byte and short, there's already unsigned load for them in C2, so they can extend safely. But there's no unsigned load for integer, so I stop merging 2 integer load in this patch. I will check if it can be done in other way.
> test/hotspot/jtreg/compiler/c2/TestMergeLoads.java line 145:
>
>> 143: a[i] = (short)RANDOM.nextInt();
>> 144: }
>> 145: }
>
> Suggestion:
>
> }
>
>
> Please put a space between methods ;)
Ok
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24023#discussion_r2000516075
PR Review Comment: https://git.openjdk.org/jdk/pull/24023#discussion_r2000518140
More information about the hotspot-compiler-dev
mailing list