RFR: 8345485: C2 MergeLoads: merge adjacent array/native memory loads into larger load [v4]
kuaiwei
duke at openjdk.org
Mon Mar 24 06:52:09 UTC 2025
On Tue, 18 Mar 2025 09:46:25 GMT, Emanuel Peter <epeter at openjdk.org> wrote:
>> I think it's ok to swap. I collected merged mem info and sorted them by shift value. Then check the memory order. So if shift order follows memory access order (or reverse), they can be merged.
>
> Ah nice! That means you could add some tests where the order is shuffled, right?
I added tests which shuffle the order. Could you check if they are expected? Thanks.
>> 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.
>
>> Now there's limit to merge 2 LoadI as LoadL.
>
> Exactly, and that is fine. But you need a test where you merge two ints ;)
Tests of merging int are added
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24023#discussion_r2009548405
PR Review Comment: https://git.openjdk.org/jdk/pull/24023#discussion_r2009549365
More information about the hotspot-compiler-dev
mailing list