RFR: 8332442: C2: refactor Mod cases in Compile::final_graph_reshaping_main_switch() [v6]
Kangcheng Xu
kxu at openjdk.org
Wed Sep 11 15:57:29 UTC 2024
> Hello all. This patch addresses [JDK-8332442](https://bugs.openjdk.org/browse/JDK-8332442) and refactors `Op_ModI`/`Op_ModL`/`Op_UModI`/`Op_UModL` cases in `DIVMOD` transforamtions. The purpose of the transformation to convert adjacent div `/` and mod `%` operations of the same operands into one should the platform support this feature (e.g., x86-64).
>
> I took the liberty adding _signed_ DIVMOD nodes (i.e., `DIV_MOD_I` and `DIV_MOD_L`) to the `IRNode` class constants as they are previously missing. Please let me know if they were left intentionally and if there are any other concerns. Thanks!
>
> ~This will be a draft PR before GHA tests are confirmed passing.~
Kangcheng Xu has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 12 additional commits since the last revision:
- Merge branch 'openjdk:master' into refactor-mod-cases
- improve formatting, nullptr comparison, update test flags, use custom @Run tests
- allow one div on platforms without hardware divmod
- remove platform restriction
- Merge branch 'openjdk:master' into refactor-mod-cases
- include aarch64 in tests, add more configuration combinations
- remove redundant arguments, test with -XX:-UseDivMod
- Merge branch 'master' into refactor-mod-cases
- Add test and IRNode for signed int/long divmod
- created IR tests
- ... and 2 more: https://git.openjdk.org/jdk/compare/d66e0754...fe7b82ef
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/20877/files
- new: https://git.openjdk.org/jdk/pull/20877/files/1ca06ae7..fe7b82ef
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=20877&range=05
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=20877&range=04-05
Stats: 1560 lines in 50 files changed: 946 ins; 343 del; 271 mod
Patch: https://git.openjdk.org/jdk/pull/20877.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/20877/head:pull/20877
PR: https://git.openjdk.org/jdk/pull/20877
More information about the hotspot-compiler-dev
mailing list