RFR: 8290034: Auto vectorize reverse bit operations. [v2]

Jatin Bhateja jbhateja at openjdk.org
Wed Jul 27 15:55:11 UTC 2022


> Summary of changes:
> - Intrinsify scalar bit reverse APIs to emit efficient instruction sequence for X86 targets with and w/o GFNI feature.
> - Handle auto-vectorization of Integer/Long.reverse bit operations.
> - Backend implementation for these were added with 4th incubation of VectorAPIs.
> 
> Following are performance number for newly added JMH mocro benchmarks:-
> 
> 
> No-GFNI(CLX):
> =============
> Baseline:
> Benchmark         (size)  Mode  Cnt  Score   Error  Units
> Integers.reverse     500  avgt    2  1.085          us/op
> Longs.reverse        500  avgt    2  1.236          us/op
> WithOpt:
> Benchmark         (size)  Mode  Cnt  Score   Error  Units
> Integers.reverse     500  avgt    2  0.104          us/op
> Longs.reverse        500  avgt    2  0.255          us/op
> 
> With-GFNI(ICX):
> ===============
> Baseline:
> Benchmark         (size)  Mode  Cnt  Score   Error  Units
> Integers.reverse     500  avgt    2  0.887          us/op
> Longs.reverse        500  avgt    2  1.095          us/op
> 
> Without:
> Benchmark         (size)  Mode  Cnt  Score   Error  Units
> Integers.reverse     500  avgt    2  0.037          us/op
> Longs.reverse        500  avgt    2  0.145          us/op
> 
> 
> Kindly review and share feedback.
> 
> Best Regards,
> Jatin

Jatin Bhateja 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 four additional commits since the last revision:

 - Merge branch 'master' of http://github.com/openjdk/jdk into JDK-8290034
 - 8290034: Styling comments resolved.
 - 8290034: Adding descriptive comments.
 - 8290034: Auto vectorize reverse bit operations.

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/9535/files
  - new: https://git.openjdk.org/jdk/pull/9535/files/53157a29..864c4d09

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=9535&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=9535&range=00-01

  Stats: 13282 lines in 450 files changed: 8194 ins; 3656 del; 1432 mod
  Patch: https://git.openjdk.org/jdk/pull/9535.diff
  Fetch: git fetch https://git.openjdk.org/jdk pull/9535/head:pull/9535

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


More information about the hotspot-compiler-dev mailing list