RFR: 8367341: C2: apply KnownBits and unsigned bounds to And / Or operations
Emanuel Peter
epeter at openjdk.org
Mon Oct 13 13:18:47 UTC 2025
On Mon, 13 Oct 2025 12:28:23 GMT, Emanuel Peter <epeter at openjdk.org> wrote:
>> src/hotspot/share/opto/rangeinference.hpp line 192:
>>
>>> 190: // inference from the Type infrastructure of the compiler. It also allows more flexibility with the
>>> 191: // bit width of the integer type. As a result, it is more efficient to use for intermediate steps
>>> 192: // of inference, as well as more flexible to perform testing on different integer types.
>>
>> Would have been nice if we could have used the `TypeIntMirror` inside `TypeInt`, i.e. using composition. But sadly, we are already using fields from `TypeInt` directly everywhere, so not sure if that is very nice/easy.
>
> Hmm, we also have the third class `TypeIntPrototype`. Do you think we really need all 3 classes?
Ah, I suppose `TypeIntMirror` is always canonicalized from `TypeIntPrototype`, in the constructor?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27618#discussion_r2426208882
More information about the hotspot-compiler-dev
mailing list