RFR: 8332442: C2: refactor Mod cases in Compile::final_graph_reshaping_main_switch() [v2]

Kangcheng Xu kxu at openjdk.org
Tue Sep 10 14:52:12 UTC 2024


On Tue, 10 Sep 2024 11:50:52 GMT, Roland Westrelin <roland at openjdk.org> wrote:

>> Kangcheng Xu has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   remove redundant arguments, test with -XX:-UseDivMod
>
> test/hotspot/jtreg/compiler/c2/TestDivModNodes.java line 34:
> 
>> 32:  * @test
>> 33:  * @summary Test DIV and MOD nodes are converted into DIVMOD where possible
>> 34:  * @requires os.arch=="amd64" | os.arch=="x86_64"
> 
> So this can run on aarch64 now?

I was under the impression aarch64 cannot calculate quotient and remainder with a single div instruction (unlike x86), and I assumed that's why existing tests on divmod doesn't include this arch. Looking at the source, only `src/hotspot/cpu/x86/x86_64.ad` and `s390.ad` seems to contain divmod related instructions.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/20877#discussion_r1752138368


More information about the hotspot-compiler-dev mailing list