RFR: 8345485: C2 MergeLoads: merge adjacent array/native memory loads into larger load [v4]
kuaiwei
duke at openjdk.org
Tue Mar 18 09:05:18 UTC 2025
On Tue, 18 Mar 2025 08:27:44 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 290:
>
>> 288: int[] ret = {i1};
>> 289: return new Object[]{ret};
>> 290: }
>
> Ah, I see you are using `|`. Can we also use `+`?
>
> FYI: if you use `Verify.java`, then you could directly do `return i2;`. It would get returned as a boxed `Integer`, and should be compared that way, without allocating an `int[]` and `Object[]`.
Now I only check ‘|’, so they can not be merged if using '+'. But I think it can be extended.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24023#discussion_r2000530238
More information about the hotspot-compiler-dev
mailing list