RFR: 8332268: C2: Add missing optimizations for UDivI/L and UModI/L and unify the shared logic with the signed nodes [v6]

theoweidmannoracle duke at openjdk.org
Thu Nov 28 10:02:03 UTC 2024


> This PR introduces
> - several new optimizations to unsigned division and modulo
>    - x % 1, x % x, x % 2^k
>    - x / 1, x / x, x / 2^k 
>    - does not implement the Granlund and Montgomery algorithm, which has been implemented for signed modulo division in the past. It is unclear if a lot is to be gained by implementing this.
> - tests to test existing optimizations for signed division and modulo 
>    - does not test the Granlund and Montgomery algorithm directly

theoweidmannoracle 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 21 additional commits since the last revision:

 - Merge branch 'master' into unsigned-div-opts
 - Rename to cast
 - Fix bug in unsigned_mod_ideal
 - Improve tests, remove edge case
 - Resolve review comments
 - Remove transform_unsigned_* and inline
 - Fix test comments
 - Minor fixes
 - Add 2^k-1 test
 - Fix code style
 - ... and 11 more: https://git.openjdk.org/jdk/compare/40ecd3fa...5bc40642

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/22061/files
  - new: https://git.openjdk.org/jdk/pull/22061/files/a249d81b..5bc40642

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=22061&range=05
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=22061&range=04-05

  Stats: 244505 lines in 4737 files changed: 95553 ins; 129533 del; 19419 mod
  Patch: https://git.openjdk.org/jdk/pull/22061.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/22061/head:pull/22061

PR: https://git.openjdk.org/jdk/pull/22061


More information about the hotspot-compiler-dev mailing list