RFR: 8360192: C2: Make the type of count leading/trailing zero nodes more precise [v9]

Jatin Bhateja jbhateja at openjdk.org
Mon Aug 11 11:46:17 UTC 2025


On Fri, 8 Aug 2025 08:21:56 GMT, Qizheng Xing <qxing at openjdk.org> wrote:

>> Qizheng Xing has updated the pull request incrementally with two additional commits since the last revision:
>> 
>>  - Add microbench
>>  - Add missing test method declarations
>
> Hi @jatin-bhateja, I've added a micro benchmark that includes the `numberOfNibbles` implementation from this PR description and your micro kernel.
> 
> Here's my test results on an Intel(R) Xeon(R) Platinum:
> 
> 
> # Baseline:
> Benchmark                                  Mode  Cnt     Score   Error  Units
> CountLeadingZeros.benchClzLongConstrained  avgt   15  1517.888 ± 5.691  ns/op
> CountLeadingZeros.benchNumberOfNibbles     avgt   15  1094.422 ± 1.753  ns/op
> 
> # This patch:
> Benchmark                                  Mode  Cnt    Score   Error  Units
> CountLeadingZeros.benchClzLongConstrained  avgt   15    0.948 ± 0.002  ns/op
> CountLeadingZeros.benchNumberOfNibbles     avgt   15  942.438 ± 1.742  ns/op

Thanks @MaxXSoft , 
I have created another JBS to optimize popcount using knownbits https://bugs.openjdk.org/browse/JDK-8365205

Changes look good to me.

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

PR Comment: https://git.openjdk.org/jdk/pull/25928#issuecomment-3174415748


More information about the hotspot-compiler-dev mailing list