RFR: 8345485: C2 MergeLoads: merge adjacent array/native memory loads into larger load [v4]
kuaiwei
duke at openjdk.org
Tue Mar 18 08:51:10 UTC 2025
On Tue, 18 Mar 2025 08:13:53 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 44:
>
>> 42: * @run main compiler.c2.TestMergeLoads aligned
>> 43: *
>> 44: * @requires os.arch != "riscv64" | vm.cpu.features ~= ".*zbb.*"
>
> Can you remove this global requirement, so that those platforms can at least do result verification?
> You can always add restrictions to the `@IR` rules.
Ok, I will add them to @IR rules.
> test/hotspot/jtreg/compiler/c2/TestMergeLoads.java line 69:
>
>> 67: switch (args[0]) {
>> 68: case "aligned" -> { framework.addFlags("-XX:-UseUnalignedAccesses"); }
>> 69: case "unaligned" -> { framework.addFlags("-XX:+UseUnalignedAccesses"); }
>
> Can you please also add an explicit run with `StressIGVN`? Because the flag is not whitelisted for the TestFramework, and so if it was set from the outside, the IR rules would not be executed. But it would be nice that your algorithm is stable to reorderings in IGVN ;)
I think my optimization is not dependent on order of IGVN. I will verify it with this option. Thanks.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24023#discussion_r2000490619
PR Review Comment: https://git.openjdk.org/jdk/pull/24023#discussion_r2000495030
More information about the hotspot-compiler-dev
mailing list