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

Emanuel Peter epeter at openjdk.org
Wed Sep 10 14:58:05 UTC 2025


On Wed, 10 Sep 2025 14:26:31 GMT, Hannes Greule <hgreule at openjdk.org> wrote:

>> testPopCountElisionInt1 and testPopCountElisionLong1 check for absence of PopCount IR nodes.
>
> I think Or and And nodes aren't updated to make use if KnownBits themselves (that generally makes testing based on KnownBits a bit difficult).

Ah I see. We should do that soon, it would give us a good way to do this kind of verification.
So you can decide if you want to do the bits thing already in anticipation, or not yet. Personally, I would add it so that we catch the bugs in the future.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27075#discussion_r2337043857


More information about the hotspot-compiler-dev mailing list