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

Kangcheng Xu kxu at openjdk.org
Mon Sep 16 15:45:21 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 incrementally with one additional commit since the last revision:

  remove C2 requirement for tests

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/20877/files
  - new: https://git.openjdk.org/jdk/pull/20877/files/ef7882b0..bfe017d7

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=20877&range=07
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=20877&range=06-07

  Stats: 1 line in 1 file changed: 0 ins; 1 del; 0 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