RFR: 8331558: AArch64: optimize integer remainder [v4]

Jin Guojie duke at openjdk.org
Fri May 31 00:45:33 UTC 2024


> On some Arm processors, a separate multiply/subtract is actually faster than the combined instruction.
> 
> (1) The following test has passed, which shows performance improvement.
> 
> make test TEST="micro:java.lang.IntegerDivMod"
> make test TEST="micro:java.lang.LongDivMod"
> 
> * IntegerDivMod.testDivideRemainderUnsigned baseline(ns/ops) 2223 with this pacth(ns/ops) 1885 improvement(%) 17.93%
> 
> * IntegerDivMod.testRemainderUnsigned baseline(ns/ops) 2225 with this pacth(ns/ops) 1885 improvement(%) 18.03%
> 
> * LongDivMod.testDivideRemainderUnsigned baseline(ns/ops) 2231 with this pacth(ns/ops) 1894 improvement(%) 17.79%
> 
> * LongDivMod.testRemainderUnsigned baseline(ns/ops) 2232 with this pacth(ns/ops) 1891 improvement(%) 18.03%
> 
> (2) jtreg test has passed
> 
> make run-test  TEST=tier1

Jin Guojie 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 five additional commits since the last revision:

 - Merge branch 'openjdk:master' into dev0530
 - Merge branch 'dev0530' of https://github.com/jinguojie-alibaba/jdk into dev0530
 - Merge branch 'openjdk:master' into dev0530
 - MacroAssembler::msub() takes a scratch register as an argument
 - 8331558: AArch64: optimize integer remainder
   
   On some Arm processors, a separate multiply/subtract is actually faster than the combined instruction.
   
   (1) The following test has passed, which shows performance improvement.
   
   make test TEST="micro:java.lang.IntegerDivMod"
   make test TEST="micro:java.lang.LongDivMod"
   
   * IntegerDivMod.testDivideRemainderUnsigned
     baseline(ns/ops) 2223
     with this pacth(ns/ops) 1885
     improvement(%) 17.93%
   
   * IntegerDivMod.testRemainderUnsigned
     baseline(ns/ops) 2225
     with this pacth(ns/ops) 1885
     improvement(%) 18.03%
   
   * LongDivMod.testDivideRemainderUnsigned
     baseline(ns/ops) 2231
     with this pacth(ns/ops) 1894
     improvement(%) 17.79%
   
   * LongDivMod.testRemainderUnsigned
     baseline(ns/ops) 2232
     with this pacth(ns/ops) 1891
     improvement(%) 18.03%
   
   (2) jtreg test has passed
   
   make run-test  TEST=tier1

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/19471/files
  - new: https://git.openjdk.org/jdk/pull/19471/files/73c7bdc0..64214599

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=19471&range=03
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=19471&range=02-03

  Stats: 2813 lines in 89 files changed: 1416 ins; 1108 del; 289 mod
  Patch: https://git.openjdk.org/jdk/pull/19471.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/19471/head:pull/19471

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


More information about the hotspot-dev mailing list