RFR: 8365205: C2: Optimize popcount value computation using knownbits [v2]

Jatin Bhateja jbhateja at openjdk.org
Fri Sep 5 17:14:27 UTC 2025


> This patch optimizes PopCount value transforms using KnownBits information.
> Following are the results of the micro-benchmark included with the patch
> 
> 
> 
> System: 13th Gen Intel(R) Core(TM) i3-1315U
> 
> Baseline:
> Benchmark                                      Mode  Cnt       Score   Error  Units
> PopCountValueTransform.LogicFoldingKerenLong  thrpt    2  215460.670          ops/s
> PopCountValueTransform.LogicFoldingKerenlInt  thrpt    2  294014.826          ops/s
> PopCountValueTransform.StockKernelInt         thrpt    2  409295.875          ops/s
> PopCountValueTransform.StockKernelLong        thrpt    2  368025.608          ops/s
> 
> Withopt:
> Benchmark                                      Mode  Cnt       Score   Error  Units
> PopCountValueTransform.LogicFoldingKerenLong  thrpt    2  389978.082          ops/s
> PopCountValueTransform.LogicFoldingKerenlInt  thrpt    2  417261.583          ops/s
> PopCountValueTransform.StockKernelInt         thrpt    2  418649.269          ops/s
> PopCountValueTransform.StockKernelLong        thrpt    2  381330.221          ops/s
> 
> 
> Kindly review and share your feedback.
> 
> Best Regards,
> Jatin

Jatin Bhateja has updated the pull request incrementally with one additional commit since the last revision:

  New IR test addition and review resolutions

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/27075/files
  - new: https://git.openjdk.org/jdk/pull/27075/files/c83be331..a68fbc08

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

  Stats: 170 lines in 4 files changed: 155 ins; 4 del; 11 mod
  Patch: https://git.openjdk.org/jdk/pull/27075.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/27075/head:pull/27075

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


More information about the hotspot-compiler-dev mailing list