RFR: 8365205: C2: Optimize popcount value computation using knownbits [v3]
Emanuel Peter
epeter at openjdk.org
Wed Sep 10 14:58:07 UTC 2025
On Wed, 10 Sep 2025 14:54:37 GMT, Emanuel Peter <epeter at openjdk.org> wrote:
>> 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.
> testPopCountElisionInt1 and testPopCountElisionLong1 check for absence of PopCount IR nodes.
@jatin-bhateja But there the clamps are with fixed constants. It would be nice if we also had some tests with randomized constants. We don't need IR tests for those, just result verification.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27075#discussion_r2337048167
More information about the hotspot-compiler-dev
mailing list